Feature paths

A feature path provides a way to access feature values in the common analysis structures, similar to XPath statements that are used to access XML elements in an XML document.

Feature paths are useful if you want to access a feature structure that combines complex features, for example features that are array valued or point to another feature structure. Using a feature path, you can associate the value of a feature directly with a feature structure, and store this value in the semantic search index or in a database.

For example, consider an annotator that identifies cars and their makes. It creates annotations of type car that have an attribute make. However, make does not contain the actual company (for example, Chevrolet) but contains a feature structure of type Company, which itself has a string-valued attribute companyname. To enable a semantic query that combines car names and company names, a feature path make/companyname is used to attach the value of companyname to the car span that is generated for the car annotation. This enables the query, "Give me documents that contain cars made by Chevrolet", by using '/car[@make="Chevrolet"]'.

A feature path is a sequence of feature names (f1/.../fn) with the following properties: You can narrow the type scope of a particular feature. For example, consider a feature additionalInfo of type uima.cas.TOP. If you know that the value of your feature additionalInfo is actually of type EmployeeInfo which has the feature salary, you can access this feature using additionalInfo/EmployeeInfo:salary. Note that in this example, the feature path additionalInfo/salary would result in an error, as salary has not been defined for the type uima.cas.TOP.
Features that are array- or list-valued have the following additional properties: