What is a taxonomy?

Taxonomies allow you to arrange your queries and categories into a hierarchical structure and this hierarchical structure is reflected in the output. You create nodes in your taxonomy, which function as folders. You can mix and match nodes, categories and queries within a node. By default, a taxonomy can be up to 5 levels deep and contain up to the number of queries and categories allowed in your configuration.

Why have a taxonomy?

Taxonomies allow you to build more complex categorization structures for your content, as well as mixing queries and categories. Categories are more useful for matching broad areas such as Sports, while queries are better at finding specific things, like "Yankees."

How do I create a taxonomy?

The easiest way to create a taxonomy is through SWEB, our online configuration management tool. However, we also have an endpoint, api.semantria.com/taxonomy, where you can create a new taxonomy via programmatic means.

What output do I get from a taxonomy?

Every query or category that matches a document will be provided in the output under a special “taxonomy” section of the output. In addition, the structure of the taxonomy nodes containing the matching queries and categories will also be printed.

What Makes A Match?

Matches are calculated on the queries and categories in a node. If any of the queries or categories in a node match a document, the node will be returned in the output. For instance, if you have two queries, Cats and Dogs contained in a node called Pets, if either Cats or Dogs matches a document, the node Pets will be returned. If a node contains a child node, by default the child node only will be returned if the parent node is also returned. For example if you have a taxonomy like this:

Node name=Pets
topic type=query name=Pets query=“pet OR domesticated”
Node name = Cats
topic type=query name=Cats query=“cat OR feline”
Node name= Dogs
topic type=query name=Dogs query=“dog OR canine”

A document with the text “Cats are awesome” will not be a match for the node Cats, even though the query topic “Cats” is a hit for the document. The reason this is not a match is that the parent node, Pets, has a query topic associated with it, Pets, that was not matched. If the document read “I enjoy having pets and cats are awesome” then the node Cats will be matched and returned since its parent node, Pets, also matches.

Whether parent matching is enforced is controllable at the node level.