Extract UPOS tags in annotation helper
Change-Id: Ib04f7d853e998ec38443ac3b8abe1484b111c05a
diff --git a/dev/js/src/hint/foundries/ud.js b/dev/js/src/hint/foundries/ud.js
index 6777c73..13374ce 100644
--- a/dev/js/src/hint/foundries/ud.js
+++ b/dev/js/src/hint/foundries/ud.js
@@ -1,4 +1,4 @@
-define(["hint/foundries"], function (ah) {
+define(["hint/foundries", "hint/foundries/upos"], function (ah, uposArray) {
ah["-"].push(
["UDPipe", "ud/", "Morphology, Part-of-Speech"]
);
@@ -8,25 +8,7 @@
["Part-of-Speech", "p="]
];
- ah["ud/p="] = [
- ["ADJ","ADJ ","adjective"],
- ["ADP","ADP ","adposition"],
- ["ADV","ADV ","adverb"],
- ["AUX","AUX ","auxiliary"],
- ["CCONJ","CCONJ ","coordinating conjunction"],
- ["DET","DET ","determiner"],
- ["INTJ","INTJ ","interjection"],
- ["NOUN","NOUN ","noun"],
- ["NUM","NUM ","numeral"],
- ["PART","PART ","particle"],
- ["PRON","PRON ","pronoun"],
- ["PROPN","PROPN ","proper noun"],
- ["PUNCT","PUNCT ","punctuation"],
- ["SCONJ","SCONJ ","subordinating conjunction"],
- ["SYM","SYM ","symbol"],
- ["VERB","VERB ","verb"],
- ["X","X ","other"]
- ];
+ ah["ud/p="] = uposArray;
ah["ud/m="] = [
["abbreviation","abbr:"],
diff --git a/dev/js/src/hint/foundries/upos.js b/dev/js/src/hint/foundries/upos.js
new file mode 100644
index 0000000..d33de9b
--- /dev/null
+++ b/dev/js/src/hint/foundries/upos.js
@@ -0,0 +1,23 @@
+define(function () {
+ return [
+ // Universal POS tags
+ // https://universaldependencies.org/u/pos/
+ ["ADJ","ADJ ","adjective"],
+ ["ADP","ADP ","adposition"],
+ ["ADV","ADV ","adverb"],
+ ["AUX","AUX ","auxiliary"],
+ ["CCONJ","CCONJ ","coordinating conjunction"],
+ ["DET","DET ","determiner"],
+ ["INTJ","INTJ ","interjection"],
+ ["NOUN","NOUN ","noun"],
+ ["NUM","NUM ","numeral"],
+ ["PART","PART ","particle"],
+ ["PRON","PRON ","pronoun"],
+ ["PROPN","PROPN ","proper noun"],
+ ["PUNCT","PUNCT ","punctuation"],
+ ["SCONJ","SCONJ ","subordinating conjunction"],
+ ["SYM","SYM ","symbol"],
+ ["VERB","VERB ","verb"],
+ ["X","X ","other"]
+ ];
+});