nlptoolkit-dependencyparser
Advanced tools
Comparing version
@@ -16,2 +16,3 @@ export declare class UniversalDependencyTreeBankFeatures { | ||
toString(): string; | ||
clone(): UniversalDependencyTreeBankFeatures; | ||
} |
@@ -127,2 +127,5 @@ (function (factory) { | ||
} | ||
clone() { | ||
return new UniversalDependencyTreeBankFeatures("u", this.toString()); | ||
} | ||
} | ||
@@ -129,0 +132,0 @@ exports.UniversalDependencyTreeBankFeatures = UniversalDependencyTreeBankFeatures; |
@@ -17,2 +17,3 @@ import { Word } from "nlptoolkit-dictionary/dist/Dictionary/Word"; | ||
constructor(id?: number, name?: string, lemma?: string, upos?: UniversalDependencyPosType, xpos?: string, features?: UniversalDependencyTreeBankFeatures, relation?: UniversalDependencyRelation, deps?: string, misc?: string); | ||
clone(): UniversalDependencyTreeBankWord; | ||
getId(): number; | ||
@@ -19,0 +20,0 @@ getLemma(): string; |
@@ -46,2 +46,13 @@ (function (factory) { | ||
} | ||
clone() { | ||
let word = new UniversalDependencyTreeBankWord(this.id, this.name, this.lemma, this.upos, this.xpos, null, null, this.deps, this.misc); | ||
word.features = this.features.clone(); | ||
if (this.relation != null) { | ||
word.relation = this.relation.clone(); | ||
} | ||
else { | ||
this.relation = null; | ||
} | ||
return word; | ||
} | ||
getId() { | ||
@@ -48,0 +59,0 @@ return this.id; |
{ | ||
"name": "nlptoolkit-dependencyparser", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Turkish Dependency Parser Library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -216,2 +216,6 @@ import {UniversalDependencyPosType} from "./UniversalDependencyPosType"; | ||
} | ||
clone(): UniversalDependencyTreeBankFeatures{ | ||
return new UniversalDependencyTreeBankFeatures("u", this.toString()) | ||
} | ||
} |
@@ -53,2 +53,13 @@ import {Word} from "nlptoolkit-dictionary/dist/Dictionary/Word"; | ||
clone(): UniversalDependencyTreeBankWord{ | ||
let word = new UniversalDependencyTreeBankWord(this.id, this.name, this.lemma, this.upos, this.xpos, null, null, this.deps, this.misc) | ||
word.features = this.features.clone() | ||
if (this.relation != null) { | ||
word.relation = this.relation.clone() | ||
} else { | ||
this.relation = null | ||
} | ||
return word | ||
} | ||
getId(): number{ | ||
@@ -55,0 +66,0 @@ return this.id |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66438043
02694
1.09%