Skip to content

Commit 400f0b5

Browse files
committed
Process general ier, iest, er, est. This requires making all the endings more specific so that earlier rules have precedence
1 parent cd4d343 commit 400f0b5

File tree

2 files changed

+72587
-68807
lines changed

2 files changed

+72587
-68807
lines changed

src/edu/stanford/nlp/process/Morpha.flex

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,21 +2087,25 @@ EY_ADJS = "cag"|"cak"|"clay"|"cliqu"|"crep"|"dic"|"dop"|"glu"|"goo"|"grip"|"hok"
20872087
<scan>"those"/_DT { return(stem(3, "at", "")); }
20882088
<scan>"these"/_DT { return(stem(3, "is", "")); }
20892089

2090-
<scan>"worse"/_JJ { return(stem(5, "bad", "")); }
2091-
<scan>"worst"/_JJ { return(stem(5, "bad", "")); }
2092-
<scan>"worse"/_RB { return(stem(5, "badly", "")); }
2093-
<scan>"worst"/_RB { return(stem(5, "badly", "")); }
2094-
<scan>"better"/_JJ { return(stem(6, "good", "")); }
2095-
<scan>"best"/_JJ { return(stem(4, "good", "")); }
2096-
<scan>"better"/_RB { return(stem(6, "well", "")); }
2097-
<scan>"best"/_RB { return(stem(4, "well", "")); }
2098-
2099-
<scan>{E_ADJS}r/_JJ { return(stem(1, "", "")); }
2100-
<scan>{E_ADJS}st/_JJ { return(stem(2, "", "")); }
2101-
<scan>{XX_ADJS}er/_JJ { return(stem(3, "", "")); }
2102-
<scan>{XX_ADJS}est/_JJ { return(stem(4, "", "")); }
2103-
<scan>{EY_ADJS}ier/_JJ { return(stem(3, "ey", "")); }
2104-
<scan>{EY_ADJS}iest/_JJ { return(stem(4, "ey", "")); }
2090+
<scan>"worse"/_JJR { return(stem(5, "bad", "")); }
2091+
<scan>"worst"/_JJS { return(stem(5, "bad", "")); }
2092+
<scan>"worse"/_RBR { return(stem(5, "badly", "")); }
2093+
<scan>"worst"/_RBS { return(stem(5, "badly", "")); }
2094+
<scan>"better"/_JJR { return(stem(6, "good", "")); }
2095+
<scan>"best"/_JJS { return(stem(4, "good", "")); }
2096+
<scan>"better"/_RBR { return(stem(6, "well", "")); }
2097+
<scan>"best"/_RBS { return(stem(4, "well", "")); }
2098+
2099+
<scan>{E_ADJS}r/_JJ[RS] { return(stem(1, "", "")); }
2100+
<scan>{E_ADJS}st/_JJ[RS] { return(stem(2, "", "")); }
2101+
<scan>{XX_ADJS}er/_JJ[RS] { return(stem(3, "", "")); }
2102+
<scan>{XX_ADJS}est/_JJ[RS] { return(stem(4, "", "")); }
2103+
<scan>{EY_ADJS}ier/_JJ[RS] { return(stem(3, "ey", "")); }
2104+
<scan>{EY_ADJS}iest/_JJ[RS] { return(stem(4, "ey", "")); }
2105+
<scan>{G}+ier/_JJ[RS] { return(stem(3, "y", "")); }
2106+
<scan>{G}+iest/_JJ[RS] { return(stem(4, "y", "")); }
2107+
<scan>{G}+er/_JJ[RS] { return(stem(2, "", "")); }
2108+
<scan>{G}+est/_JJ[RS] { return(stem(3, "", "")); }
21052109

21062110
<scan>{G}+/_NN[^P] { yybegin(noun); yypushback(yylength()); return(next()); }
21072111
<scan>{G}+/_NNP { return(proper_name_stem()); }

0 commit comments

Comments
 (0)