Skip to content

Commit

Permalink
dkpro#66 Add inflection group to word form
Browse files Browse the repository at this point in the history
  - Setting inflection group in gender handlers
  • Loading branch information
highsource committed Dec 19, 2018
1 parent 1a9cae6 commit 604f727
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 208 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public EinzahlHandler(DEWordFormNounTableHandler nounTableHandler) {
public void handleIfFound(WiktionaryWordForm wordForm, String label, int index, String value, Matcher matcher,
ParsingContext context) {
wordForm.setNumber(GrammaticalNumber.SINGULAR);
wordForm.setInflectionGroup(index);
final DEGenderText genderText = this.nounTableHandler.getGenusByIndex(index);
if (genderText != null) {
wordForm.setGender(genderText.asGrammaticalGender());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ public MehrzahlHandler(DEWordFormNounTableHandler nounTableHandler) {
public void handleIfFound(WiktionaryWordForm wordForm, String label, int index, String value, Matcher matcher,
ParsingContext context) {
wordForm.setNumber(GrammaticalNumber.PLURAL);
wordForm.setInflectionGroup(index);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ public PluralHandler(DEWordFormNounTableHandler nounTableHandler) {
public void handleIfFound(WiktionaryWordForm wordForm, String label, int index, String value, Matcher matcher,
ParsingContext context) {
wordForm.setNumber(GrammaticalNumber.PLURAL);
wordForm.setInflectionGroup(index);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public SingularHandler(DEWordFormNounTableHandler nounTableHandler) {
public void handleIfFound(WiktionaryWordForm wordForm, String label, int index, String value, Matcher matcher,
ParsingContext context) {
wordForm.setNumber(GrammaticalNumber.SINGULAR);
wordForm.setInflectionGroup(index);
final DEGenderText genderText = this.nounTableHandler.getGenusByIndex(index);
if (genderText != null) {
wordForm.setGender(genderText.asGrammaticalGender());
Expand Down
Loading

0 comments on commit 604f727

Please sign in to comment.