User Tools

Site Tools


02_browsing:04_queries:03_regex

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
02_browsing:04_queries:03_regex [2020/04/21 11:08]
simone [Separators]
02_browsing:04_queries:03_regex [2020/04/21 11:24]
simone
Line 1: Line 1:
-====== 2.4.Regular Expressions ======+====== 2.4.Regular Expressions ======
 In order to search for spelling variants, different forms of a lemma or else, you need to formulate RegEx expressions in ANNIS. For this, you put your query in between slashes.  In order to search for spelling variants, different forms of a lemma or else, you need to formulate RegEx expressions in ANNIS. For this, you put your query in between slashes. 
  
Line 141: Line 141:
 Accordingly, the system for querying is different. If you query for ''/man/'' on the token level, you will find exactly one occurrence, namely the token //man//, because all other tokens contain more than those three characters, e.g. //manually// contains five more characters. Accordingly, the system for querying is different. If you query for ''/man/'' on the token level, you will find exactly one occurrence, namely the token //man//, because all other tokens contain more than those three characters, e.g. //manually// contains five more characters.
  
-If you query for //man// on the message level, you will find nothing, because ANNIS will search for a whole message that contains only these three characters. In order to actually find the word you are looking for, you have to query for "any characters (''.*'') followed by the string //man// followed by any characters" (the function "any charactersconsists of the character full stop that stands for //any character// as shown above. The asterisk stands for an endless repetition as explained in the next section). Such a string will look like:+If you query for //man// on the message level, you will find nothing, because ANNIS will search for a whole message that contains only these three characters. In order to actually find the word you are looking for, you have to query for "any characters (''.*'') followed by the string //man// followed by any characters" (the function //any characters// consists of the character full stop that stands for //any character// as shown above. The asterisk stands for an endless repetition as explained in the next section). Such a string will look like:
  
 ''msg=/.*man.*/'' ''msg=/.*man.*/''
02_browsing/04_queries/03_regex.txt · Last modified: 2022/06/27 09:21 (external edit)