Skip to content

Commit

Permalink
formal and other styles
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed Nov 27, 2023
1 parent 732c8f1 commit 392651f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/attributes/style.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Azerbaidzan PROPN nonstandard
Herzegovina PROPN nonstandard
Tadzikistan PROPN nonstandard
Tanzania PROPN nonstandard
Te PRON formal
Tsekkoslovakia PROPN nonstandard
` PUNCT nonstandard
agregaatti NOUN nonstandard
Expand Down
7 changes: 7 additions & 0 deletions src/python/omorfi/formats/apertium_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class ApertiumFormatter(Formatter):
"enc",
"ess",
"f",
"frm",
"gen",
"ij",
"ill",
Expand Down Expand Up @@ -383,6 +384,10 @@ class ApertiumFormatter(Formatter):
"LOCATIVE": "loc",
"FTB3MAN": "",
"FTB3man": "",
"NONSTANDARD": "use_nonstd",
"ARCHAIC": "use_archaic",
"DIALECTAL": "use_dialect",
"FORMAL": "frm",
".": "",
"XForeign": "use_foreign",
"X": "x",
Expand Down Expand Up @@ -532,6 +537,8 @@ def wordmap2lexc(self, wordmap):
wordmap["analysis"] += self.stuff2lexc(subcat)
if wordmap["stub"] in ";:":
wordmap["analysis"] += self.stuff2lexc("SENTENCE-BOUNDARY")
if wordmap["style"]:
wordmap["analysis"] += self.stuff2lexc(wordmap["style"])
# XXX: for now
if wordmap["lemma"] in "¹²³½¼=≥µ#/%":
wordmap["analysis"] += self.stuff2lexc("NOUN")
Expand Down

0 comments on commit 392651f

Please sign in to comment.