Skip to content

Commit 9b5bec8

Browse files
committed
Special case for elder/eldest lemmas
1 parent c26b25e commit 9b5bec8

File tree

2 files changed

+66016
-65973
lines changed

2 files changed

+66016
-65973
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -2113,6 +2113,10 @@ S_ENDING_DEMONYMS = "Afghan"|"Afghani"|"African"|"Albanian"|"Alexandrine"|"Alger
21132113
/* remove commas from numbers, eg 5,000 -> 5000 */
21142114
<scan>({DIGIT}|",")+([.]{DIGIT}+)?/_CD { return(yytext().replaceAll(",", "")); }
21152115

2116+
/* an unusual exception - don't want to get 'eld' */
2117+
<scan>"elder"/_JJR { return(stem(5, "old", "")); }
2118+
<scan>"eldest"/_JJS { return(stem(5, "old", "")); }
2119+
21162120
<scan>"worse"/_JJR { return(stem(5, "bad", "")); }
21172121
<scan>"worst"/_JJS { return(stem(5, "bad", "")); }
21182122
<scan>"worse"/_RBR { return(stem(5, "badly", "")); }

0 commit comments

Comments
 (0)