Commit 9e4f7e57c451ef131c5be4bffaf99111eb6f97d2

Authored by Michał Lenart
1 parent 3fa5c338

obsługa pozostałych elementów wyrażeń regularnych (opcjonalne występienie, dokła…

…dne podanie liczby wystąpień w nawiasach klamrowych)

git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@143 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
fsabuilder/morfeuszbuilder/fsa/convertinput.py
@@ -12,7 +12,7 @@ def _mergeEntries(inputLines, lowercase): @@ -12,7 +12,7 @@ def _mergeEntries(inputLines, lowercase):
12 prevInterps = None 12 prevInterps = None
13 for key, interp in inputLines: 13 for key, interp in inputLines:
14 key = key.lower() if lowercase else key 14 key = key.lower() if lowercase else key
15 -# print key 15 +# print 'key=', key, 'interp=', interp
16 assert key 16 assert key
17 if prevKey and prevKey == key: 17 if prevKey and prevKey == key:
18 prevInterps.append(interp) 18 prevInterps.append(interp)
@@ -95,7 +95,7 @@ class PolimorfConverter4Generator(object): @@ -95,7 +95,7 @@ class PolimorfConverter4Generator(object):
95 line = line.decode(self.inputEncoding).strip('\n') 95 line = line.decode(self.inputEncoding).strip('\n')
96 orth, base, tag, name = _parseLine(line) 96 orth, base, tag, name = _parseLine(line)
97 if base: 97 if base:
98 - if u':' in base and len(base) > 1: 98 + if u':' in base and len(base) > 1 and base.split(u':', 1)[1].isalpha():
99 base, homonymId = base.split(u':', 1) 99 base, homonymId = base.split(u':', 1)
100 else: 100 else:
101 homonymId = '' 101 homonymId = ''
@@ -130,8 +130,8 @@ class PolimorfConverter4Generator(object): @@ -130,8 +130,8 @@ class PolimorfConverter4Generator(object):
130 tagnum = int(tagnum) 130 tagnum = int(tagnum)
131 namenum = int(namenum) 131 namenum = int(namenum)
132 typenum = int(typenum) 132 typenum = int(typenum)
133 - yield (base, Interpretation4Generator(orth, base, tagnum, namenum, typenum, homonymId))  
134 prevLine = line 133 prevLine = line
  134 + yield (base, Interpretation4Generator(orth, base, tagnum, namenum, typenum, homonymId))
135 135
136 def convert(self, inputLines): 136 def convert(self, inputLines):
137 return _mergeEntries(self._reallyParseLines(self._sortLines(self._partiallyParseLines(inputLines))), lowercase=False) 137 return _mergeEntries(self._reallyParseLines(self._sortLines(self._partiallyParseLines(inputLines))), lowercase=False)
fsabuilder/morfeuszbuilder/segrules/preprocessor.py
@@ -9,7 +9,7 @@ from pyparsing import * @@ -9,7 +9,7 @@ from pyparsing import *
9 from morfeuszbuilder.utils import exceptions 9 from morfeuszbuilder.utils import exceptions
10 from pyparseString import pyparseString 10 from pyparseString import pyparseString
11 11
12 -identifier = Word(alphas, bodyChars=alphanums+u'_>*+') 12 +identifier = Word(alphas, bodyChars=alphanums+u'_>*+{},')
13 define = Keyword('#define').suppress() + identifier + Optional(Suppress('(') + identifier + Suppress(')')) + restOfLine + LineEnd() + StringEnd() 13 define = Keyword('#define').suppress() + identifier + Optional(Suppress('(') + identifier + Suppress(')')) + restOfLine + LineEnd() + StringEnd()
14 ifdef = Keyword('#ifdef').suppress() + identifier + LineEnd() + StringEnd() 14 ifdef = Keyword('#ifdef').suppress() + identifier + LineEnd() + StringEnd()
15 endif = Keyword('#endif').suppress() + LineEnd() + StringEnd() 15 endif = Keyword('#endif').suppress() + LineEnd() + StringEnd()
fsabuilder/morfeuszbuilder/segrules/rules.py
@@ -24,6 +24,9 @@ class SegmentRule(object): @@ -24,6 +24,9 @@ class SegmentRule(object):
24 def addToNFA(self, fsa): 24 def addToNFA(self, fsa):
25 raise NotImplementedError() 25 raise NotImplementedError()
26 26
  27 + def allowsEmptySequence(self):
  28 + raise NotImplementedError()
  29 +
27 def _doAddToNFA(self, startStates, endState): 30 def _doAddToNFA(self, startStates, endState):
28 raise NotImplementedError() 31 raise NotImplementedError()
29 32
@@ -42,6 +45,9 @@ class TagRule(SegmentRule): @@ -42,6 +45,9 @@ class TagRule(SegmentRule):
42 def _doAddToNFA(self, startState, endState): 45 def _doAddToNFA(self, startState, endState):
43 startState.addTransition((self.segnum, self.shiftOrth), endState) 46 startState.addTransition((self.segnum, self.shiftOrth), endState)
44 47
  48 + def allowsEmptySequence(self):
  49 + return False
  50 +
45 def __str__(self): 51 def __str__(self):
46 return u'%s(%d)' % (self.segtype, self.segnum) 52 return u'%s(%d)' % (self.segtype, self.segnum)
47 53
@@ -77,6 +83,9 @@ class ConcatRule(ComplexRule): @@ -77,6 +83,9 @@ class ConcatRule(ComplexRule):
77 lastChild = self.children[-1] 83 lastChild = self.children[-1]
78 lastChild._doAddToNFA(currStartState, endState) 84 lastChild._doAddToNFA(currStartState, endState)
79 85
  86 + def allowsEmptySequence(self):
  87 + return all(map(lambda rule: rule.allowsEmptySequence(), self.children))
  88 +
80 def __str__(self): 89 def __str__(self):
81 return u' '.join(map(lambda c: str(c), self.children)) 90 return u' '.join(map(lambda c: str(c), self.children))
82 91
@@ -93,6 +102,9 @@ class OrRule(ComplexRule): @@ -93,6 +102,9 @@ class OrRule(ComplexRule):
93 child._doAddToNFA(intermStartState, intermEndState) 102 child._doAddToNFA(intermStartState, intermEndState)
94 intermEndState.addTransition(None, endState) 103 intermEndState.addTransition(None, endState)
95 104
  105 + def allowsEmptySequence(self):
  106 + return any(map(lambda rule: rule.allowsEmptySequence(), self.children))
  107 +
96 def __str__(self): 108 def __str__(self):
97 return u'|'.join(map(lambda c: str(c), self.children)) 109 return u'|'.join(map(lambda c: str(c), self.children))
98 110
@@ -115,5 +127,33 @@ class ZeroOrMoreRule(UnaryRule): @@ -115,5 +127,33 @@ class ZeroOrMoreRule(UnaryRule):
115 intermEndState.addTransition(None, endState) 127 intermEndState.addTransition(None, endState)
116 endState.addTransition(None, intermStartState) 128 endState.addTransition(None, intermStartState)
117 129
  130 + def allowsEmptySequence(self):
  131 + return True
  132 +
118 def __str__(self): 133 def __str__(self):
119 return u'(' + str(self.child) + ')*' 134 return u'(' + str(self.child) + ')*'
  135 +
  136 +class OptionalRule(UnaryRule):
  137 +
  138 + def __init__(self, child, linenum):
  139 + super(OptionalRule, self).__init__(child, linenum)
  140 + assert isinstance(child, SegmentRule)
  141 +
  142 + def addToNFA(self, fsa):
  143 + raise ValueError()
  144 +
  145 + def _doAddToNFA(self, startState, endState):
  146 + intermStartState = RulesNFAState(self)
  147 + intermEndState = RulesNFAState(self)
  148 +
  149 + startState.addTransition(None, intermStartState)
  150 + startState.addTransition(None, endState)
  151 + self.child._doAddToNFA(intermStartState, intermEndState)
  152 + intermEndState.addTransition(None, endState)
  153 +
  154 + def allowsEmptySequence(self):
  155 + return True
  156 +
  157 + def __str__(self):
  158 + return u'(' + str(self.child) + ')?'
  159 +
fsabuilder/morfeuszbuilder/segrules/rulesParser.py
@@ -56,7 +56,11 @@ class RulesParser(object): @@ -56,7 +56,11 @@ class RulesParser(object):
56 combinationEnumeratedLines = segtypesConfigFile.enumerateLinesInSection(section, ignoreComments=False) 56 combinationEnumeratedLines = segtypesConfigFile.enumerateLinesInSection(section, ignoreComments=False)
57 combinationEnumeratedLines = list(preprocessor.preprocess(combinationEnumeratedLines, defs, filename)) 57 combinationEnumeratedLines = list(preprocessor.preprocess(combinationEnumeratedLines, defs, filename))
58 for rule in self._doParse(combinationEnumeratedLines, segtypesHelper, filename): 58 for rule in self._doParse(combinationEnumeratedLines, segtypesHelper, filename):
59 -# print rule 59 + if rule.allowsEmptySequence():
  60 + raise exceptions.ConfigFileException(
  61 + filename,
  62 + rule.linenum,
  63 + 'This rule allows empty segments sequence to be accepted')
60 rule.addToNFA(nfa) 64 rule.addToNFA(nfa)
61 # nfa.debug() 65 # nfa.debug()
62 try: 66 try:
@@ -86,6 +90,35 @@ class RulesParser(object): @@ -86,6 +90,35 @@ class RulesParser(object):
86 # return rules.TagRule(segtype) 90 # return rules.TagRule(segtype)
87 return rules.TagRule(segtypesHelper.getSegnum4Segtype(segtype), shiftOrth, segtype, lineNum) 91 return rules.TagRule(segtypesHelper.getSegnum4Segtype(segtype), shiftOrth, segtype, lineNum)
88 92
  93 + def _createQuantRule1(self, child, quantity, lineNum, line, segtypesHelper):
  94 + if quantity <= 0:
  95 + raise exceptions.ConfigFileException(segtypesHelper.filename, lineNum, u'%s - invalid quantity: %d' % (line, quantity))
  96 + else:
  97 + return rules.ConcatRule(quantity * [child], lineNum)
  98 +
  99 + def _createQuantRule2(self, child, leftN, rightN, lineNum, line, segtypesHelper):
  100 + if leftN > rightN or (leftN, rightN) == (0, 0):
  101 + raise exceptions.ConfigFileException(segtypesHelper.filename, lineNum, u'%s - invalid quantities: %d %d' % (line, leftN, rightN))
  102 + elif leftN == 0:
  103 + children = [rules.OptionalRule(child, lineNum)]
  104 + for n in range(2, rightN + 1):
  105 + children.append(self._createQuantRule1(child, n, lineNum, line, segtypesHelper))
  106 + return rules.OrRule(children, lineNum)
  107 + else:
  108 + children = [self._createQuantRule1(child, n, lineNum, line, segtypesHelper) for n in range(leftN, rightN + 1)]
  109 + return rules.OrRule(children, lineNum)
  110 +
  111 + def _createQuantRule3(self, child, quantity, lineNum, line, segtypesHelper):
  112 + if quantity <= 0:
  113 + raise exceptions.ConfigFileException(segtypesHelper.filename, lineNum, u'%s - invalid quantity: %d' % (line, quantity))
  114 + else:
  115 + return rules.ConcatRule(
  116 + [
  117 + rules.ConcatRule(quantity * [child], lineNum),
  118 + rules.ZeroOrMoreRule(child, lineNum)
  119 + ],
  120 + lineNum)
  121 +
89 def _doParseOneLine(self, lineNum, line, segtypesHelper, filename): 122 def _doParseOneLine(self, lineNum, line, segtypesHelper, filename):
90 rule = Forward() 123 rule = Forward()
91 tagRule = Word(alphanums+'_') 124 tagRule = Word(alphanums+'_')
@@ -94,7 +127,11 @@ class RulesParser(object): @@ -94,7 +127,11 @@ class RulesParser(object):
94 atomicRule = tagRule ^ shiftOrthRule ^ parenRule 127 atomicRule = tagRule ^ shiftOrthRule ^ parenRule
95 zeroOrMoreRule = atomicRule + Suppress('*') 128 zeroOrMoreRule = atomicRule + Suppress('*')
96 oneOrMoreRule = atomicRule + Suppress('+') 129 oneOrMoreRule = atomicRule + Suppress('+')
97 - unaryRule = atomicRule ^ zeroOrMoreRule ^ oneOrMoreRule 130 + optionalRule = atomicRule + Suppress('?')
  131 + quantRule1 = atomicRule + Suppress('{') + Word(nums) + Suppress('}')
  132 + quantRule2 = atomicRule + Suppress('{') + Word(nums) + Suppress(',') + Word(nums) + Suppress('}')
  133 + quantRule3 = atomicRule + Suppress('{') + Word(nums) + Suppress(',') + Suppress('}')
  134 + unaryRule = atomicRule ^ zeroOrMoreRule ^ oneOrMoreRule ^ optionalRule ^ quantRule1 ^ quantRule2 ^ quantRule3
98 oneOfRule = delimitedList(unaryRule, delim='|') 135 oneOfRule = delimitedList(unaryRule, delim='|')
99 complexRule = unaryRule ^ oneOfRule 136 complexRule = unaryRule ^ oneOfRule
100 if self.rulesType == RulesParser.PARSE4ANALYZER: 137 if self.rulesType == RulesParser.PARSE4ANALYZER:
@@ -107,6 +144,10 @@ class RulesParser(object): @@ -107,6 +144,10 @@ class RulesParser(object):
107 shiftOrthRule.setParseAction(lambda string, loc, toks: self._createNewTagRule(toks[0], True, lineNum, line, segtypesHelper)) 144 shiftOrthRule.setParseAction(lambda string, loc, toks: self._createNewTagRule(toks[0], True, lineNum, line, segtypesHelper))
108 # parenRule.setParseAction(lambda string, loc, toks: toks[0]) 145 # parenRule.setParseAction(lambda string, loc, toks: toks[0])
109 zeroOrMoreRule.setParseAction(lambda string, loc, toks: rules.ZeroOrMoreRule(toks[0], lineNum)) 146 zeroOrMoreRule.setParseAction(lambda string, loc, toks: rules.ZeroOrMoreRule(toks[0], lineNum))
  147 + quantRule1.setParseAction(lambda string, loc, toks: self._createQuantRule1(toks[0], int(toks[1], 10), lineNum, line, segtypesHelper))
  148 + quantRule2.setParseAction(lambda string, loc, toks: self._createQuantRule2(toks[0], int(toks[1], 10), int(toks[2], 10), lineNum, line, segtypesHelper))
  149 + quantRule3.setParseAction(lambda string, loc, toks: self._createQuantRule3(toks[0], int(toks[1], 10), lineNum, line, segtypesHelper))
  150 + optionalRule.setParseAction(lambda string, loc, toks: rules.OptionalRule(toks[0], lineNum))
110 oneOrMoreRule.setParseAction(lambda string, loc, toks: rules.ConcatRule([toks[0], rules.ZeroOrMoreRule(toks[0], lineNum)], lineNum)) 151 oneOrMoreRule.setParseAction(lambda string, loc, toks: rules.ConcatRule([toks[0], rules.ZeroOrMoreRule(toks[0], lineNum)], lineNum))
111 oneOfRule.setParseAction(lambda string, loc, toks: rules.OrRule(toks, lineNum)) 152 oneOfRule.setParseAction(lambda string, loc, toks: rules.OrRule(toks, lineNum))
112 concatRule.setParseAction(lambda string, loc, toks: toks[0] if len(toks) == 1 else rules.ConcatRule(toks, lineNum)) 153 concatRule.setParseAction(lambda string, loc, toks: toks[0] if len(toks) == 1 else rules.ConcatRule(toks, lineNum))
input/segmenty1.dat
@@ -7,9 +7,245 @@ praet=split composite @@ -7,9 +7,245 @@ praet=split composite
7 7
8 #define moze_interp(segmenty) wsz_interp segmenty wsz_interp 8 #define moze_interp(segmenty) wsz_interp segmenty wsz_interp
9 9
10 -dig>* dig  
11 -(adja dywiz)+ adj  
12 -naj> adj_sup 10 +# Segmenty występujące samodzielnie:
  11 +#
  12 +# domyślny typ segmentu samodzielnego:
  13 +moze_interp(samodz)
  14 +
  15 +# segment samotny, który nie dopuszcza nawet znaku interpunkcyjnego po
  16 +# sobie
  17 +samotny
  18 +
  19 +# przeszlik pojedynczy w formie nieaglutynacyjnej, np. „gniótł”:
  20 +moze_interp(praet_sg_na)
  21 +
  22 +# przeszlik pojedynczy w formie niezróżnicowanej aglutynacyjnie, np. „moze”:
  23 +moze_interp(praet_sg)
  24 +
  25 +# przeszlik mnogi, np. „czytali”:
  26 +moze_interp(praet_pl)
  27 +
  28 +# partykuła „by”:
  29 +moze_interp(by)
  30 +
  31 +# inne segmenty, które dopuszczają po sobie aglutynant,
  32 +# np. „powininna”, „czyżby”:
  33 +moze_interp(z_aglt)
  34 +moze_interp(z_aglt_by)
  35 +
  36 +# forma przymiotnikowa (dopuszcza adja):
  37 +moze_interp(adj)
  38 +
  39 +# dywiz (jako samodzielny segment jest tylko błędnym użyciem w funkcji
  40 +# myślnika, ale trzeba to dopuścić):
  41 +dywiz
  42 +
  43 +# pauza i półpauza w funkcji myślnika
  44 +pauza
  45 +polpauza
  46 +
  47 +#ifdef isolated
  48 +adja
  49 +#endif
  50 +
  51 +
  52 +# Połączenia z aglutynantami:
  53 +#
  54 +#ifdef split
  55 +# Czas przeszły:
  56 +# np. „gniotł·am”
  57 +moze_interp( praet_sg_agl aglsg )
  58 +# np. „czytał·em”
  59 +moze_interp(praet_sg aglsg)
  60 +# np. „czytali·ście”
  61 +moze_interp(praet_pl aglpl)
  62 +
  63 +# Tryb warunkowy:
  64 +# np. „gniótł·by”
  65 +moze_interp(praet_sg_na by)
  66 +# np. „czytało·by”
  67 +moze_interp(praet_sg by)
  68 +# np. „gnietli·by”
  69 +moze_interp(praet_pl by)
  70 +# np. „gniótł·by·ś”
  71 +moze_interp(praet_sg_na by aglsg)
  72 +# np. „czytał·by·m”
  73 +moze_interp(praet_sg by aglsg)
  74 +# np. „gnietli·by·śmy”
  75 +moze_interp(praet_pl by aglpl)
  76 +#else
  77 +# moze_interp(praetcond)
  78 +#endif
  79 +# np. „by·ś”
  80 +moze_interp(by aglsg)
  81 +# np. „by·ście”
  82 +moze_interp(by aglpl)
  83 +
  84 +# np. „gdyby·m”
  85 +moze_interp(z_aglt aglsg)
  86 +moze_interp(z_aglt_by aglsg)
  87 +# np. „gdyby·ście”
  88 +moze_interp(z_aglt aglpl)
  89 +moze_interp(z_aglt_by aglpl)
  90 +# oraz wersje z by, np. chybabym
  91 +moze_interp(z_aglt by aglsg)
  92 +moze_interp(z_aglt by aglpl)
  93 +
  94 +# To jest dużo za dużo, ale tytułem eksperymentu:
  95 +#ifdef permissive
  96 +moze_interp(samodz aglsg)
  97 +moze_interp(samodz aglpl)
  98 +#endif
  99 +
  100 +# Złożone formy przymiotnikowe
  101 +# np. „biało·-·czerwony”
  102 +moze_interp( (adja dywiz)+ adj )
  103 +# poniższe załatwione przez + powyżej:
  104 +# # np. „niebiesko·-·biało·-·czerwona”
  105 +# adja dywiz adja dywiz adj interp?
  106 +# # itd. (zatrzymujemy się pragmatycznie na 5 członach)
  107 +# adja dywiz adja dywiz adja dywiz adj interp?
  108 +# adja dywiz adja dywiz adja dywiz adja dywiz adj interp?
  109 +
  110 +# Formy zanegowane stopnia wyższego przymiotników i przysłówków (WK)
  111 +# np. „nie·grzeczniejszy”, „nie·grzeczniej”
  112 +moze_interp( adj_com )
  113 +moze_interp( nie> adj_com )
  114 +
  115 +# Formy „zanegowane” gerundiów i imiesłowów:
  116 +# np. „nie·czytanie”, „nie·przeczytany”, „nie·czytający”:
  117 +moze_interp( nie> negat )
  118 +
  119 +# Przyimki akceptujące krótką formę „-ń”
  120 +moze_interp(z_on_agl)
  121 +# np. „do·ń”
  122 +moze_interp(z_on_agl on_agl)
  123 +
  124 +# Liczba zapisana jako ciąg cyfr:
  125 +#moze_interp( dig>* dig )
  126 +dig{8}
  127 +dig dig{0,2}
  128 +dig{5,6}
  129 +dig{10,}
  130 +
  131 +# Liczba rzymska zapisana jako ciąg cyfr rzymskich:
  132 +# (kiepskie, trzeba poprawić wyrażeniem regularnym)
  133 +moze_interp( roman>* roman )
  134 +
  135 +# Formacje prefiksalne
  136 +#### trzeba wydzielić odpowiednie samodze!
  137 +# rzeczownikowe
  138 +# np. „euro·sodoma”, „e-·papieros”
  139 +moze_interp(nomina)
  140 +moze_interp( prefs> nomina ) !weak
  141 +# czasownikowe np. „po·nakapywać”
  142 +moze_interp(inf_imperf|praet_imperf|imps_imperf|fin_imperf|impt_sg_imperf|impt_pl_imperf|impt_sg_perf|impt_pl_perf)
  143 +moze_interp( prefv> (inf_imperf|praet_imperf|imps_imperf|fin_imperf|impt_sg_imperf|impt_pl_imperf) ) !weak
  144 +# przymiotnikowe np. „do·żylny”, „euro·sodomski”, „bez·argumentowy”
  145 +moze_interp(ppas|adv_pos|pact)
  146 +# moze_interp(prefa> adj)
  147 +moze_interp( prefa> ( adj|adv_pos|pact|ppas ) ) !weak
  148 +moze_interp( prefppas> ppas ) !weak
  149 +
  150 +# Apozycje z dywizem
  151 +# np. „kobieta-prezydent”
  152 +moze_interp( nomina (dywiz) nomina )
  153 +
  154 +# Zakresy liczbowe, daty, np. 1911-1939.
  155 +moze_interp((dig>* dig) dywiz (dig>* dig))
  156 +
  157 +# poniższe do sprawdzenia, najwyraźniej obecne w tekstach, skoro wprowadziliśmy:
  158 +# ?
  159 +adj dywiz adj
  160 +# ?
  161 +adj dywiz samodz
  162 +# ?
  163 +samodz dywiz adj
  164 +
  165 +#### PONIŻEJ REGUŁY WK
  166 +# Stopień najwyższy:
  167 +# np. „naj·zieleńszy”, „naj·mądrzej”
  168 +moze_interp( naj> adj_sup )
  169 +# Cząstka li przy osobowych formach czasownika oddzielona dywizem: znasz-li ten kraj
  170 +moze_interp( praet_sg dywiz li)
  171 +moze_interp( praet_sg aglsg dywiz li)
  172 +moze_interp( praet_pl dywiz li)
  173 +moze_interp( praet_pl aglpl dywiz li)
  174 +moze_interp( praet_sg_na dywiz li)
  175 +moze_interp( fin_perf)
  176 +moze_interp( fin_imperf)
  177 +moze_interp( (fin_perf|fin_imperf) dywiz li)
  178 +
  179 +# i bez dywizu --- czy bez dywizu jest sens łapać?
  180 +#moze_interp( praet_sg li)
  181 +#moze_interp( praet_pl li)
  182 +#moze_interp( praet_sg_na li)
  183 +#moze_interp( (fin_perf|fin_imperf) li)
  184 +
  185 +# reguła z partykułą ‹+że› przy trybie rozkazującym
  186 +# zakończonym na spółgłoskę
  187 +moze_interp(impt_sg_imperf ze)
  188 +moze_interp(impt_sg_perf ze)
  189 +# dodatkowo reguła dla part+że (niemalże, omalże, nieomalże):
  190 +# moze_interp(part_z_ze ze) --- już niepotrzebne, part. wpisane do słownika
  191 +# potrzebna jeszcze reguła dla ‹onże›
  192 +# i dla ‹+ż› przy zakończonym na samogłoskę
  193 +moze_interp(impt_pl_imperf z)
  194 +moze_interp(impt_pl_perf z)
  195 +
  196 +# aglutynant przy przymiotniku --- obsługiwane wyżej w wersji permissive
  197 +# moze_interp( adj aglsg )
  198 +moze_interp( adj aglpl )
  199 +
  200 +# forma złoż. liczebnika + przymiotnik, np. wieloaspektowy, pięciomasztowy
  201 +# dwudziestopięcioipółletni
  202 +moze_interp( i )
  203 +moze_interp( pol_zloz > adj ) !weak
  204 +moze_interp( num_zloz>+ adj ) !weak
  205 +moze_interp( num_zloz>+ i> pol_zloz> adj ) !weak
  206 +# moze_interp(num_zloz+ (i pol_zloz)? adj)
  207 +
  208 +# półdolarówka, półsiostra
  209 +moze_interp( ( pol_zloz>|num_zloz> ) nomina ) !weak
  210 +# nie analizuje: dwudziestopięcioipółlatek --- powinien?
  211 +# moze_interp( num_zloz nomina )
  212 +# czy dodać sufiksy: +latek m1, +latek m2, +latka f ? Chyba nie trzeba
  213 +
  214 +# wykluczenie ze złożeń przymiotników: ten, ów, ki, si.
  215 +moze_interp(adj_anty_zloz)
  216 +
  217 +# złożenia adja+adj/adv bez dywizu, np. średniopienny, sierściowłosy
  218 +moze_interp(adja>+ adj) !weak
  219 +
  220 +# złożenia konkretnych przyimków z formą -ń rzeczownika on:
  221 +moze_interp(prep_n)
  222 +moze_interp(prep_n n)
  223 +
  224 +# REGUŁY EKSPERYMENTALNE
  225 +# formy złoż. rzeczowników i sufiksy
  226 +moze_interp( substa> sufs ) !weak
  227 +
  228 +# złożenia imiesłowów przymiotnikowych czynnych;
  229 +# z braku form złoż. korzysta się z imiesłowów przysłówkowych + o
  230 +moze_interp(pcon)
  231 +# moze_interp( (pcon> morphconj dywiz)+ pact )
  232 +
  233 +# liczba arabska formą przymiotnikową, przysłówkową lub rzeczownikową: 22-letni, 20-latek,
  234 +# 1-majowy, 3-krotnie
  235 +moze_interp( dig>+ dywiz> (adj|adv_pos|nomina) )
  236 +
  237 +# liczba rzymska z formą przymiotnikową: XIX-wieczny
  238 +moze_interp( roman>+ dywiz> adj )
  239 +
  240 +# formy złoż. z sufiksem +latek:
  241 +moze_interp( num_zloz>+ latek ) !weak
  242 +moze_interp(num_zloz>+ i> pol_zloz> latek ) !weak
  243 +
  244 +# złożenia liczbowe z sufiksem +latek, np. 20-latek:
  245 +moze_interp( dig>+ dywiz> latek )
  246 +
  247 +# interpretacja znaków interpunkcyjnych
  248 +# moze_interp(samodz interp)
13 249
14 [generator combinations] 250 [generator combinations]
15 251
@@ -19,12 +255,35 @@ nie @@ -19,12 +255,35 @@ nie
19 prefs 255 prefs
20 prefv 256 prefv
21 prefa 257 prefa
  258 +prefppas
  259 +ppas
  260 +pcon
  261 +morphconj
  262 +li
  263 +substa
  264 +sufs
  265 +latek
  266 +dywiz
  267 +pauza
  268 +polpauza
  269 +kropka
  270 +adj_anty_zloz
  271 +adj_com
  272 +fin_perf
  273 +fin_imperf
  274 +nomina
  275 +adv_pos
  276 +pact
  277 +inf_imperf
  278 +praet_imperf
  279 +imps_imperf
  280 +ze
  281 +z
22 dig 282 dig
  283 +roman
23 adja 284 adja
24 adj 285 adj
25 adj_sup 286 adj_sup
26 -adj_com  
27 -fin  
28 negat 287 negat
29 on_agl 288 on_agl
30 z_on_agl 289 z_on_agl
@@ -32,34 +291,45 @@ samotny @@ -32,34 +291,45 @@ samotny
32 interp 291 interp
33 aglsg 292 aglsg
34 aglpl 293 aglpl
  294 +z_aglt
  295 +z_aglt_by
  296 +by
35 praetcond 297 praetcond
36 praet_sg_agl 298 praet_sg_agl
37 praet_sg_na 299 praet_sg_na
38 praet_sg 300 praet_sg
39 praet_pl 301 praet_pl
40 -z_aglt  
41 -by  
42 -li  
43 -nomina  
44 -adjectiva  
45 -verba_imperf  
46 -dywiz  
47 -kropka 302 +impt_sg_perf
  303 +impt_sg_imperf
  304 +impt_pl_perf
  305 +impt_pl_imperf
  306 +pol_zloz
  307 +num_zloz
  308 +i
  309 +n
  310 +prep_n
  311 +emoticon
  312 +killfile
48 samodz 313 samodz
49 314
  315 +
50 [tags] 316 [tags]
51 naj naj 317 naj naj
52 nie nie 318 nie nie
53 prefs prefs 319 prefs prefs
54 prefv prefv 320 prefv prefv
55 prefa prefa 321 prefa prefa
  322 +prefppas prefppas
56 dig dig 323 dig dig
  324 +roman romandig
57 adja adja 325 adja adja
  326 +substa substa
58 adj adj:%:pos 327 adj adj:%:pos
59 adj_sup adj:%:sup 328 adj_sup adj:%:sup
60 adj_sup adv:sup 329 adj_sup adv:sup
61 adj_com adj:%:com 330 adj_com adj:%:com
62 adj_com adj:%:com 331 adj_com adj:%:com
  332 +pcon pcon:imperf
63 negat ger:%:neg 333 negat ger:%:neg
64 negat pact:%:neg 334 negat pact:%:neg
65 negat ppas:%:neg 335 negat ppas:%:neg
@@ -67,49 +337,110 @@ on_agl ppron3:sg:gen.acc:m1.m2.m3:ter:nakc:praep @@ -67,49 +337,110 @@ on_agl ppron3:sg:gen.acc:m1.m2.m3:ter:nakc:praep
67 z_on_agl prep:% 337 z_on_agl prep:%
68 samotny brev:pun 338 samotny brev:pun
69 samotny brev:npun 339 samotny brev:npun
70 -samotny interj 340 +# samotny interj
  341 +samotny emoticon
71 interp interp 342 interp interp
72 aglsg aglt:sg:% 343 aglsg aglt:sg:%
73 aglpl aglt:pl:% 344 aglpl aglt:pl:%
74 -samodz %  
75 -praet_fin praet:%  
76 -praet_fin fin:%  
77 -li li:qub:% 345 +praet_sg_agl praet:sg:%:agl
  346 +praet_sg_na praet:sg:%:nagl
  347 +praet_sg praet:sg:%
  348 +praet_pl praet:pl:%
  349 +praet_sg winien:sg:%
  350 +praet_pl winien:pl:%
  351 +fin_perf fin:%:perf
  352 +fin_imperf fin:%:imperf
78 nomina subst:% 353 nomina subst:%
79 nomina ger:% 354 nomina ger:%
80 nomina depr:% 355 nomina depr:%
81 -adjectiva adj:%  
82 -adjectiva adv:%  
83 -adjectiva ppas:%  
84 -adjectiva pact:%  
85 -verba_imperf praet:%:imperf  
86 -verba_imperf fin:%:imperf  
87 -verba_imperf inf:imperf  
88 -verba_imperf imps:imperf  
89 -verba_imperf impt:imperf  
90 - 356 +adv_pos adv:pos
  357 +ppas ppas:%
  358 +pact pact:%
  359 +praet_imperf praet:%:imperf
  360 +inf_imperf inf:imperf
  361 +imps_imperf imps:imperf
  362 +impt_sg_imperf impt:sg:%:imperf
  363 +impt_sg_perf impt:sg:%:perf
  364 +impt_pl_imperf impt:pl:%:imperf
  365 +impt_pl_perf impt:pl:%:perf
  366 +num_zloz num:comp
  367 +prep_n prep:%:wok
  368 +samodz %
91 369
92 [lexemes] 370 [lexemes]
  371 +pol_zloz pół:num:comp
  372 +i i:conj
  373 +by by:qub
  374 +li li:qub
  375 +ze +że:qub
  376 +z +ż:qub
  377 +killfile +ć:qub
93 z_aglt aby:comp 378 z_aglt aby:comp
94 z_aglt bowiem:comp 379 z_aglt bowiem:comp
95 -by by:qub  
96 z_aglt by:comp 380 z_aglt by:comp
97 z_aglt cóż:subst 381 z_aglt cóż:subst
98 z_aglt czemu:adv 382 z_aglt czemu:adv
99 -z_aglt czyżby:qub  
100 -z_aglt choćby:comp  
101 -z_aglt chociażby:comp 383 +z_aglt_by czyżby:qub
  384 +z_aglt_by choćby:comp
  385 +z_aglt_by chociażby:comp
102 z_aglt dlaczego:adv 386 z_aglt dlaczego:adv
103 z_aglt dopóki:comp 387 z_aglt dopóki:comp
104 z_aglt dopóty:conj 388 z_aglt dopóty:conj
105 -z_aglt gdyby:comp 389 +z_aglt_by gdyby:comp
106 z_aglt gdzie:qub 390 z_aglt gdzie:qub
107 z_aglt gdzie:adv 391 z_aglt gdzie:adv
108 -z_aglt jakby:comp  
109 -z_aglt jakoby:comp 392 +z_aglt_by jakby:comp
  393 +z_aglt_by jakoby:comp
110 z_aglt kiedy:adv 394 z_aglt kiedy:adv
111 z_aglt kiedy:comp 395 z_aglt kiedy:comp
112 z_aglt tylko:qub 396 z_aglt tylko:qub
113 z_aglt żeby:comp 397 z_aglt żeby:comp
  398 +z_aglt to:conj
  399 +z_aglt chyba:qub
  400 +z_aglt że:qub
  401 +z_aglt czy:conj
  402 +z_aglt_by oby:qub
  403 +z_aglt_by bodajby:qub
  404 +z_aglt co:comp
114 dywiz -:interp 405 dywiz -:interp
  406 +pauza —:interp
  407 +polpauza –:interp
115 kropka .:interp 408 kropka .:interp
  409 +n on:ppron3:sg:gen.acc:m1.m2.m3:ter:nakc:praep
  410 +adj_anty_zloz ten:adj:%
  411 +adj_anty_zloz tenże:adj:%
  412 +adj_anty_zloz ck:adj:%
  413 +adj_anty_zloz c.k.:adj:%
  414 +adj_anty_zloz ki:adj:%
  415 +adj_anty_zloz si:adj:%
  416 +adj_anty_zloz ow:adj:%
  417 +adj_anty_zloz ów:adj:%
  418 +adj_anty_zloz ówże:adj:%
  419 +adj_anty_zloz mój:adj:%
  420 +adj_anty_zloz a-z:adj:%
  421 +adj_anty_zloz a-ż:adj:%
  422 +adj_anty_zloz kiż:adj:%
  423 +adj_anty_zloz be:adj:%
  424 +adj_anty_zloz caca:adj:%
  425 +adj_anty_zloz czyj:adj:%
  426 +adj_anty_zloz oboj:adj:%
  427 +adj_anty_zloz on:adj:%
  428 +adj_anty_zloz tyli:adj:%
  429 +prep_n do:prep:%
  430 +prep_n dla:prep:%
  431 +prep_n koło:prep:%
  432 +prep_n na:prep:%
  433 +prep_n o:prep:%
  434 +prep_n po:prep:%
  435 +prep_n poza:prep:%
  436 +prep_n spoza:prep:%
  437 +prep_n za:prep:%
  438 +prep_n zza:prep:%
  439 +morphconj +o+:morphconj
  440 +# adj_anty_zloz pop:adj:%
  441 +sufs +znawca:subst:%
  442 +sufs +dawca:subst:%
  443 +sufs +biorca:subst:%
  444 +sufs +żerca:subst:%
  445 +sufs +maniak:subst:%
  446 +latek latek:subst:%