blob: 56ad88398a455cf35969b2ae86e321964b3f3ee1 [file] [log] [blame]
COSMAS:
- disjunctions with more than 2 arguments are parsed as nested by ANTLR grammar:
"A oder B oder C" becomes (simplified) "A|(B|C)"
- using stacks proves to be a good choice for tree processing
- queries of form "A B C" where A, B, C are terms of type <R> (see http://www.ids-mannheim.de/cosmas2/win-app/hilfe/suchanfrage/eingabe-grafisch/syntax/ARGUMENT_R.html)
are strictly speaking not well-formed since there is no linking operator between the individual terms. The Cosmas II web app offers two alternatives of how to interpret
such lacking operators: as a logical OR or as a /+w1 distance operator. In KorAP, the second alternative will be chose as this appears to be more intuitive (effectively,
the query expresses a sequence of terms) and more in line with other QLs (e.g. Poliqarp)
- distance operators allow to specify a minimal and maximal distance between their arguments, in the form "/wn:m" where n and m are integers. In case only one number
is given (like "/w2"), Cosmas II interprets this as the maximal distance. Note that it is not possible to specify a minimal but possibly infinite distance between to
tokens - for obvious reasons.
- distance operator: flip arguments and change 'minus' to 'plus'
- operands of distance operators to be expressed via shrink/classes?
- #BEG() and #END() are solved via shrink, with the shrink argument not being a class but a position (first/last) indicating the first or last word in the matched sequence
- #BED() with two conditions (like 'sa,-pa') can't be mapped to position group as implemented -> make two position groups and embed in 'and'-group
Poliqarp
- empty tokens as distance operators