geneea-nlp-client
Version:
The TypeScript Client for Geneea Interpretor G3 API.
130 lines (129 loc) • 3.94 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UDep = void 0;
exports.UDepToStr = UDepToStr;
exports.UDepFromStr = UDepFromStr;
/**
* Universal syntactic dependencies V2 and V1.
* See http://universaldependencies.org/u/dep/all.html
*/
var UDep;
(function (UDep) {
// === Nominals - Core ===
/** nominal subject */
UDep["NSUBJ"] = "nsubj";
/** object (V2) */
UDep["OBJ"] = "obj";
/** indirect object */
UDep["IOBJ"] = "iobj";
// === Nominals - Non-core dependents ===
/** oblique nominal (V2) */
UDep["OBL"] = "obl";
/** vocative */
UDep["VOCATIVE"] = "vocative";
/** expletive */
UDep["EXPL"] = "expl";
/** dislocated elements */
UDep["DISLOCATED"] = "dislocated";
// === Nominals - Nominal dependents ===
/** nominal modifier */
UDep["NMOD"] = "nmod";
/** appositional modifier */
UDep["APPOS"] = "appos";
/** numeric modifier */
UDep["NUMMOD"] = "nummod";
// === Clauses - Core ===
/** clausal subject */
UDep["CSUBJ"] = "csubj";
/** clausal complement */
UDep["CCOMP"] = "ccomp";
/** open clausal complement */
UDep["XCOMP"] = "xcomp";
// === Clauses - Non-core dependents ===
UDep["ADVCL"] = "advcl";
/** adverbial clause modifier */
// === Clauses - Nominal dependent ===
UDep["ACL"] = "acl";
/** clausal modifier of noun (adjectival clause) */
// === Modifier words - Non-core dependents
/** adverbial modifier */
UDep["ADVMOD"] = "advmod";
/** discourse element */
UDep["DISCOURSE"] = "discourse";
// === Modifier words - Nominal dependent ===
/** adjective modifier */
UDep["AMOD"] = "amod";
// === Function Words - Non-core dependents ===
/** auxiliary */
UDep["AUX"] = "aux";
/** */
UDep["COP"] = "cop";
/** */
UDep["MARK"] = "mark";
// === Function Words - Nominal dependent ===
/** determiner */
UDep["DET"] = "det";
/** classifier (V2) */
UDep["CLF"] = "clf";
/** case marking */
UDep["CASE"] = "case";
// === Coordination ===
/** conjunct */
UDep["CONJ"] = "conj";
/** coordinating conjunction */
UDep["CC"] = "cc";
// === MWE ===
/** fixed multiword expression (V2) */
UDep["FIXED"] = "fixed";
/** flat multiword expression (V2) */
UDep["FLAT"] = "flat";
/** compound */
UDep["COMPOUND"] = "compound";
// === Loose ===
/** list */
UDep["LIST"] = "list";
/** parataxis */
UDep["PARATAXIS"] = "parataxis";
// === Special ===
/** orphan (V2) */
UDep["ORPHAN"] = "orphan";
/** goes with */
UDep["GOESWITH"] = "goeswith";
/** overridden disfluency */
UDep["REPARANDUM"] = "reparandum";
// === Other ===
/** punctuation */
UDep["PUNCT"] = "punct";
/** root */
UDep["ROOT"] = "root";
/** unspecidied dependency */
UDep["DEP"] = "dep";
// === V1 ===
/** passive auxiliary (V1) */
UDep["AUXPASS"] = "auxpass";
/** clausal passive subject (V1) */
UDep["CSUBJPASS"] = "csubjpass";
/** direct object (V1; in V2 as obj) */
UDep["DOBJ"] = "dobj";
/** foreign words (V1) */
UDep["FOREIGN"] = "foreign";
/** multi-word expression (V1) */
UDep["MWE"] = "mwe";
/** name (V1) */
UDep["NAME"] = "name";
/** negation modifier (V1) */
UDep["NEG"] = "neg";
/** passive nominal subject (V1) */
UDep["NSUBJPASS"] = "nsubjpass";
/** remnant in ellipsis (V1) */
UDep["REMNANT"] = "remnant";
})(UDep || (exports.UDep = UDep = {}));
/** Conversion to the string value used by the API. */
function UDepToStr(udep) {
return udep.toString();
}
/** Conversion from a [string][depStr]; with [DEP] as a fallback for unknwon values. */
function UDepFromStr(depStr) {
var _a;
return (_a = UDep[depStr.toUpperCase()]) !== null && _a !== void 0 ? _a : UDep.DEP;
}