Add stts upos support
Change-Id: Id8cf3859489e24c6b90c83f59fc03970e3b9626c
diff --git a/.gitignore b/.gitignore
index 22671b4..6752854 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,5 +9,6 @@
/termmapper
/cmd/termmapper/termmapper
*.yaml
+!/mappings/*.yaml
\#*
!/cmd/termmapper/
\ No newline at end of file
diff --git a/README.md b/README.md
index 8a9d0df..b81ee81 100644
--- a/README.md
+++ b/README.md
@@ -170,9 +170,11 @@
The SDK script and server data-attribute in the HTML are determined by the configuration file's `sdk` and `server` values, with fallback to default endpoints if not specified.
-### GET /health
+## Supported mappings
-Health check endpoint that returns "OK" with HTTP 200 status.
+### `mappings/stts-upos.yaml`
+
+Mapping between STTS and UD part-of-spech tags.
## Progress
diff --git a/mappings/stts-upos.yaml b/mappings/stts-upos.yaml
new file mode 100644
index 0000000..3a6abee
--- /dev/null
+++ b/mappings/stts-upos.yaml
@@ -0,0 +1,62 @@
+id: stts-upos
+desc: Mapping from STTS and Universal dependency Part-of-Speech
+foundryA: opennlp
+layerA: p
+foundryB: upos
+layerB: p
+mappings:
+ - "[$\\(] <> [PUNCT & PunctType=Brck]"
+ - "[$,] <> [PUNCT & PunctType=Comm]"
+ - "[$.] <> [PUNCT & PunctType=Peri]"
+ - "[ADJA] <> [ADJ]"
+ - "[ADJD] <> [ADJ & Variant=Short]"
+ - "[ADV] <> [ADV]"
+ - "[APPO] <> [ADP & AdpType=Post]"
+ - "[APPR] <> [ADP & AdpType=Prep]"
+ - "[APPRART] <> [ADP & AdpType=Prep & PronType=Art]"
+ - "[APZR] <> [ADP & AdpType=Circ]"
+ - "[ART] <> [DET & PronType=Art]"
+ - "[CARD] <> [NUM & NumType=Card]"
+ - "[FM] <> [X & Foreign=Yes]"
+ - "[ITJ] <> [INTJ]"
+ - "[KOKOM] <> [CCONJ & ConjType=Comp]"
+ - "[KON] <> [CCONJ]"
+ - "[KOUI] <> [SCONJ]"
+ - "[KOUS] <> [SCONJ]"
+ - "[NE] <> [PROPN]"
+ - "[NN] <> [NOUN]"
+ - "[PAV] <> [ADV & PronType=Dem]"
+ - "[PDAT] <> [DET & PronType=Dem]"
+ - "[PDS] <> [PRON & PronType=Dem]"
+ - "[PIAT] <> [DET & (PronType=Ind | PronType=Neg | PronType=Tot)]"
+ - "[PIDAT] <> [DET & AdjType=Pdt & (PronType=Ind | PronType=Neg | PronType=Tot)]"
+ - "[PIS] <> [PRON & (PronType=Ind | PronType=Neg | PronType=Tot)]"
+ - "[PPER] <> [PRON & PronType=Prs]"
+ - "[PPOSAT] <> [DET & Poss=Yes & PronType=Prs]"
+ - "[PPOSS] <> [PRON & Poss=Yes & PronType=Prs]"
+ - "[PRELAT] <> [DET & PronType=Rel]"
+ - "[PRELS] <> [PRON & PronType=Rel]"
+ - "[PRF] <> [PRON & PronType=Prs & Reflex=Yes]"
+ - "[PTKA] <> [PART]"
+ - "[PTKANT] <> [PART & PartType=Res]"
+ - "[PTKNEG] <> [PART & Polarity=Neg]"
+ - "[PTKVZ] <> [ADP & PartType=Vbp]"
+ - "[PTKZU] <> [PART & PartType=Inf]"
+ - "[PWAT] <> [DET & PronType=Int]"
+ - "[PWAV] <> [ADV & PronType=Int]"
+ - "[PWS] <> [PRON & PronType=Int]"
+ - "[TRUNC] <> [X & Hyph=Yes]"
+ - "[VAFIN] <> [AUX & Mood=Ind & VerbForm=Fin]"
+ - "[VAIMP] <> [AUX & Mood=Imp & VerbForm=Fin]"
+ - "[VAINF] <> [AUX & VerbForm=Inf]"
+ - "[VAPP] <> [AUX & Aspect=Perf & VerbForm=Part]"
+ - "[VMFIN] <> [VERB & Mood=Ind & VerbForm=Fin & VerbType=Mod]"
+ - "[VMINF] <> [VERB & VerbForm=Inf & VerbType=Mod]"
+ - "[VMPP] <> [VERB & Aspect=Perf & VerbForm=Part & VerbType=Mod]"
+ - "[VVFIN] <> [VERB & Mood=Ind & VerbForm=Fin]"
+ - "[VVIMP] <> [VERB & Mood=Imp & VerbForm=Fin]"
+ - "[VVINF] <> [VERB & VerbForm=Inf]"
+ - "[VVIZU] <> [VERB & VerbForm=Inf]"
+ - "[VVPP] <> [VERB & Aspect=Perf & VerbForm=Part]"
+ - "[XY] <> [X]"
+