patrickfrey / strusAnalyzer

Library for document analysis (segmentation, tokenization, normalization, aggregation) with the goal to get a set of items that can be inserted into a strus storage. Also some functions for analysing tokens or phrases of the strus query are provided.
http://www.project-strus.net
Mozilla Public License 2.0
3 stars 0 forks source link

Required order of definitions when using sub content with segmenter switch #48

Open patrickfrey opened 7 years ago

patrickfrey commented 7 years ago

A sub content in the document analyzer that switches to a different segmenter has to appear before any definition using selections of this sub content. If you do not follow this order restriction then the selection will be empty.

At least an error message as hint would help a lot.

patrickfrey commented 7 years ago

Example (using analyzer grammar of strusUtilities programs)

[Content] "encoding=UTF-8; content=JSON;" /posts/post/meta(); [Attribute] title = orig content /posts/post/meta()/title();

works, but not the following:

[Attribute] title = orig content /posts/post/meta()/title(); [Content] "encoding=UTF-8; content=JSON;" /posts/post/meta();