geneea-nlp-client
Version:
The TypeScript Client for Geneea Interpretor G3 API.
58 lines (57 loc) • 1.56 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UPos = void 0;
exports.UPosToStr = UPosToStr;
exports.UPosFromStr = UPosFromStr;
/**
* Universal POS tags.
* See http://universaldependencies.org/u/pos/all.html
*/
var UPos;
(function (UPos) {
// === Open class ===
/** adjective */
UPos["ADJ"] = "ADJ";
/** adverb */
UPos["ADV"] = "ADV";
/** interjection */
UPos["INTJ"] = "INTJ";
/** noun */
UPos["NOUN"] = "NOUN";
/** proper noun */
UPos["PROPN"] = "PROPN";
/** verb */
UPos["VERB"] = "VERB";
// === Closed class ===
/** adposition (preposition or postposition) */
UPos["ADP"] = "ADP";
/** auxiliary */
UPos["AUX"] = "AUX";
/** coordinating conjunction */
UPos["CCONJ"] = "CCONJ";
/** determiner */
UPos["DET"] = "DET";
/** numeral */
UPos["NUM"] = "NUM";
/** pronoun */
UPos["PRON"] = "PRON";
/** particle */
UPos["PART"] = "PART";
/** subordinating conjunction */
UPos["SCONJ"] = "SCONJ";
/** punctuation */
UPos["PUNCT"] = "PUNCT";
/** symbol */
UPos["SYM"] = "SYM";
/** other */
UPos["X"] = "X";
})(UPos || (exports.UPos = UPos = {}));
/** Conversion to the string value used by the API. */
function UPosToStr(upos) {
return upos.toString();
}
/** Conversion from a [string][posStr]; with [X] as a fallback for unknown values. */
function UPosFromStr(posStr) {
var _a;
return (_a = UPos[posStr.toUpperCase()]) !== null && _a !== void 0 ? _a : UPos.X;
}