nlptoolkit-dependencyparser
Advanced tools
Comparing version 1.0.3 to 1.0.4
import { Corpus } from "nlptoolkit-corpus/dist/Corpus"; | ||
import { ParserEvaluationScore } from "../ParserEvaluationScore"; | ||
export declare class UniversalDependencyTreeBankCorpus extends Corpus { | ||
private language; | ||
constructor(fileName: string); | ||
compareParses(corpus: UniversalDependencyTreeBankCorpus): ParserEvaluationScore; | ||
} |
@@ -21,2 +21,3 @@ (function (factory) { | ||
let sentence = ""; | ||
this.language = fileName.substring(0, fileName.indexOf('_')); | ||
let data = fs.readFileSync(fileName, 'utf8'); | ||
@@ -26,3 +27,3 @@ let lines = data.split("\n"); | ||
if (line.length == 0) { | ||
this.addSentence(new UniversalDependencyTreeBankSentence_1.UniversalDependencyTreeBankSentence(sentence)); | ||
this.addSentence(new UniversalDependencyTreeBankSentence_1.UniversalDependencyTreeBankSentence(this.language, sentence)); | ||
sentence = ""; | ||
@@ -29,0 +30,0 @@ } |
export declare class UniversalDependencyTreeBankFeatures { | ||
private featureList; | ||
constructor(features: string); | ||
static universalFeatureTypes: string[]; | ||
private static universalFeatureValues; | ||
private static turkishFeatureValues; | ||
private static englishFeatureValues; | ||
constructor(language: string, features: string); | ||
private static featureIndex; | ||
private static posIndex; | ||
static dependencyIndex(universalDependency: string): number; | ||
static numberOfValues(language: string, featureName: string): number; | ||
static featureValueIndex(language: string, featureName: string, featureValue: string): number; | ||
getFeatureValue(feature: string): string; | ||
@@ -5,0 +14,0 @@ featureExists(feature: string): boolean; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports"], factory); | ||
define(["require", "exports", "./UniversalDependencyPosType", "./UniversalDependencyRelation"], factory); | ||
} | ||
@@ -14,4 +14,6 @@ })(function (require, exports) { | ||
exports.UniversalDependencyTreeBankFeatures = void 0; | ||
const UniversalDependencyPosType_1 = require("./UniversalDependencyPosType"); | ||
const UniversalDependencyRelation_1 = require("./UniversalDependencyRelation"); | ||
class UniversalDependencyTreeBankFeatures { | ||
constructor(features) { | ||
constructor(language, features) { | ||
this.featureList = new Map(); | ||
@@ -24,3 +26,8 @@ if (features != "_") { | ||
let featureValue = feature.substring(feature.indexOf("=") + 1).trim(); | ||
this.featureList.set(featureName, featureValue); | ||
if (UniversalDependencyTreeBankFeatures.featureValueIndex(language, featureName, featureValue) != -1) { | ||
this.featureList.set(featureName, featureValue); | ||
} | ||
else { | ||
console.log("Either the feature " + featureName + " or the value " + featureValue + " is wrong"); | ||
} | ||
} | ||
@@ -33,2 +40,71 @@ else { | ||
} | ||
static featureIndex(featureName) { | ||
if (featureName.includes("[")) { | ||
featureName = featureName.substring(0, featureName.indexOf('[')); | ||
} | ||
for (let i = 0; i < UniversalDependencyTreeBankFeatures.universalFeatureTypes.length; i++) { | ||
if (UniversalDependencyTreeBankFeatures.universalFeatureTypes[i] == featureName) { | ||
return i; | ||
} | ||
} | ||
return -1; | ||
} | ||
static posIndex(uPos) { | ||
let index = 0; | ||
for (let universalDependencyPosType of Object.values(UniversalDependencyPosType_1.UniversalDependencyPosType)) { | ||
if (universalDependencyPosType.toString() == uPos) { | ||
return index; | ||
} | ||
index++; | ||
} | ||
return -1; | ||
} | ||
static dependencyIndex(universalDependency) { | ||
let index = 0; | ||
for (let dependency of UniversalDependencyRelation_1.UniversalDependencyRelation.universalDependencyTypes) { | ||
if (dependency == universalDependency) { | ||
return index; | ||
} | ||
index++; | ||
} | ||
return -1; | ||
} | ||
static numberOfValues(language, featureName) { | ||
let fIndex = UniversalDependencyTreeBankFeatures.featureIndex(featureName); | ||
if (fIndex != -1) { | ||
switch (language) { | ||
case "en": | ||
return UniversalDependencyTreeBankFeatures.englishFeatureValues[fIndex].length; | ||
case "tr": | ||
return UniversalDependencyTreeBankFeatures.turkishFeatureValues[fIndex].length; | ||
} | ||
} | ||
return -1; | ||
} | ||
static featureValueIndex(language, featureName, featureValue) { | ||
let searchArray; | ||
let fIndex = UniversalDependencyTreeBankFeatures.featureIndex(featureName); | ||
if (fIndex != -1) { | ||
switch (language) { | ||
case "en": | ||
searchArray = UniversalDependencyTreeBankFeatures.englishFeatureValues; | ||
break; | ||
case "tr": | ||
searchArray = UniversalDependencyTreeBankFeatures.turkishFeatureValues; | ||
break; | ||
case "u": | ||
default: | ||
searchArray = UniversalDependencyTreeBankFeatures.universalFeatureValues; | ||
break; | ||
} | ||
let featureValueIndex = -1; | ||
for (let i = 0; i < searchArray[fIndex].length; i++) { | ||
if (searchArray[fIndex][i] == featureValue) { | ||
featureValueIndex = i; | ||
} | ||
} | ||
return featureValueIndex; | ||
} | ||
return -1; | ||
} | ||
getFeatureValue(feature) { | ||
@@ -57,3 +133,80 @@ return this.featureList.get(feature); | ||
exports.UniversalDependencyTreeBankFeatures = UniversalDependencyTreeBankFeatures; | ||
UniversalDependencyTreeBankFeatures.universalFeatureTypes = ["PronType", "NumType", "Poss", "Reflex", "Foreign", | ||
"Abbr", "Typo", "Gender", "Animacy", "NounClass", | ||
"Number", "Case", "Definite", "Degree", "VerbForm", | ||
"Mood", "Tense", "Aspect", "Voice", "Evident", | ||
"Polarity", "Person", "Polite", "Clusivity"]; | ||
UniversalDependencyTreeBankFeatures.universalFeatureValues = [["Art", "Dem", "Emp", "Exc", "Ind", "Int", "Neg", "Prs", "Rcp", "Rel", "Tot"], | ||
["Card", "Dist", "Frac", "Mult", "Ord", "Range", "Sets"], | ||
["Yes"], | ||
["Yes"], | ||
["Yes"], | ||
["Yes"], | ||
["Yes"], | ||
["Com", "Fem", "Masc", "Neut"], | ||
["Anim", "Hum", "Inan", "Nhum"], | ||
["Bantu1", "Bantu2", "Bantu3", "Bantu4", "Bantu5", "Bantu6", "Bantu7", "Bantu8", "Bantu9", "Bantu10", "Bantu11", "Bantu12", "Bantu13", "Bantu14", "Bantu15", "Bantu16", "Bantu17", "Bantu18", "Bantu19", "Bantu20", "Bantu21", "Bantu22", "Bantu23", "Wol1", "Wol2", "Wol3", "Wol4", "Wol5", "Wol6", "Wol7", "Wol8", "Wol9", "Wol10", "Wol11", "Wol12"], | ||
["Coll", "Count", "Dual", "Grpa", "Grpl", "Inv", "Pauc", "Plur", "Ptan", "Sing", "Tri"], | ||
["Abs", "Acc", "Erg", "Nom", "Abe", "Ben", "Cau", "Cmp", "Cns", "Com", "Dat", "Dis", "Equ", "Gen", "Ins", "Par", "Tem", "Tra", "Voc", "Abl", "Add", "Ade", "All", "Del", "Ela", "Ess", "Ill", "Ine", "Lat", "Loc", "Per", "Sbe", "Sbl", "Spl", "Sub", "Sup", "Ter"], | ||
["Com", "Cons", "Def", "Ind", "Spec"], | ||
["Abs", "Aug", "Cmp", "Dim", "Equ", "Pos", "Sup"], | ||
["Conv", "Fin", "Gdv", "Ger", "Inf", "Part", "Sup", "Vnoun"], | ||
["Adm", "Cnd", "Des", "Imp", "Ind", "Int", "Irr", "Jus", "Nec", "Opt", "Pot", "Prp", "Qot", "Sub"], | ||
["Fut", "Imp", "Past", "Pqp", "Pres"], | ||
["Hab", "Imp", "Iter", "Perf", "Prog", "Prosp"], | ||
["Act", "Antip", "Bfoc", "Cau", "Dir", "Inv", "Lfoc", "Mid", "Pass", "Rcp"], | ||
["Fh", "Nfh"], | ||
["Neg", "Pos"], | ||
["0", "1", "2", "3", "4"], | ||
["Elev", "Form", "Humb", "Infm"], | ||
["Ex", "In"]]; | ||
UniversalDependencyTreeBankFeatures.turkishFeatureValues = [["Art", "Dem", "Ind", "Int", "Neg", "Prs", "Rcp", "Rel", "Tot"], | ||
["Card", "Dist", "Ord"], | ||
[], | ||
["Yes"], | ||
[], | ||
["Yes"], | ||
[], | ||
[], | ||
[], | ||
[], | ||
["Plur", "Sing"], | ||
["Acc", "Nom", "Dat", "Equ", "Gen", "Ins", "Abl", "Loc"], | ||
["Def", "Ind"], | ||
["Cmp", "Sup"], | ||
["Conv", "Fin", "Part", "Vnoun"], | ||
["Cnd", "Des", "Gen", "Imp", "Ind", "Nec", "Opt", "Pot", "DesPot", "CndPot", "CndGen", "CndGenPot", "GenPot", "PotPot", "GenNecPot", "GenNec", "NecPot", "GenPotPot", "ImpPot"], | ||
["Fut", "Past", "Pqp", "Pres", "Aor"], | ||
["Imp", "Perf", "Prog", "Prosp", "Hab", "Rapid"], | ||
["Cau", "Pass", "Rcp", "Rfl", "CauCau", "CauCauPass", "CauPass", "CauPassRcp", "CauRcp", "PassPass", "PassRfl", "PassRcp"], | ||
["Fh", "Nfh"], | ||
["Neg", "Pos"], | ||
["1", "2", "3"], | ||
[], | ||
[]]; | ||
UniversalDependencyTreeBankFeatures.englishFeatureValues = [["Art", "Dem", "Emp", "Ind", "Int", "Neg", "Prs", "Rcp", "Rel", "Tot"], | ||
["Card", "Frac", "Mult", "Ord"], | ||
["Yes"], | ||
[], | ||
[], | ||
[], | ||
[], | ||
["Fem", "Masc", "Neut"], | ||
[], | ||
[], | ||
["Plur", "Sing"], | ||
["Acc", "Nom", "Gen"], | ||
["Def", "Ind"], | ||
["Cmp", "Pos", "Sup"], | ||
["Fin", "Ger", "Inf", "Part"], | ||
["Imp", "Ind", "Sub"], | ||
["Past", "Pres"], | ||
[], | ||
["Pass"], | ||
[], | ||
[], | ||
["1", "2", "3"], | ||
[], | ||
[]]; | ||
}); | ||
//# sourceMappingURL=UniversalDependencyTreeBankFeatures.js.map |
@@ -5,3 +5,3 @@ import { Sentence } from "nlptoolkit-corpus/dist/Sentence"; | ||
private comments; | ||
constructor(sentence?: string); | ||
constructor(language?: string, sentence?: string); | ||
addComment(comment: string): void; | ||
@@ -8,0 +8,0 @@ toString(): string; |
@@ -19,6 +19,6 @@ (function (factory) { | ||
class UniversalDependencyTreeBankSentence extends Sentence_1.Sentence { | ||
constructor(sentence) { | ||
constructor(language, sentence) { | ||
super(); | ||
this.comments = new Array(); | ||
if (sentence != undefined) { | ||
if (language != undefined) { | ||
let lines = sentence.split("\n"); | ||
@@ -47,3 +47,3 @@ for (let line of lines) { | ||
let xpos = items[4]; | ||
let features = new UniversalDependencyTreeBankFeatures_1.UniversalDependencyTreeBankFeatures(items[5]); | ||
let features = new UniversalDependencyTreeBankFeatures_1.UniversalDependencyTreeBankFeatures(language, items[5]); | ||
let relation; | ||
@@ -50,0 +50,0 @@ if (items[6] != "_") { |
{ | ||
"name": "nlptoolkit-dependencyparser", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Turkish Dependency Parser Library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,5 +8,8 @@ import {Corpus} from "nlptoolkit-corpus/dist/Corpus"; | ||
private language: string | ||
constructor(fileName: string) { | ||
super(); | ||
let sentence = "" | ||
this.language = fileName.substring(0, fileName.indexOf('_')); | ||
let data = fs.readFileSync(fileName, 'utf8') | ||
@@ -16,3 +19,3 @@ let lines = data.split("\n") | ||
if (line.length == 0){ | ||
this.addSentence(new UniversalDependencyTreeBankSentence(sentence)); | ||
this.addSentence(new UniversalDependencyTreeBankSentence(this.language, sentence)); | ||
sentence = ""; | ||
@@ -19,0 +22,0 @@ } else { |
@@ -0,1 +1,4 @@ | ||
import {UniversalDependencyPosType} from "./UniversalDependencyPosType"; | ||
import {UniversalDependencyRelation} from "./UniversalDependencyRelation"; | ||
export class UniversalDependencyTreeBankFeatures { | ||
@@ -5,10 +8,107 @@ | ||
constructor(features: string) { | ||
if (features != "_"){ | ||
public static universalFeatureTypes = ["PronType", "NumType", "Poss", "Reflex", "Foreign", | ||
"Abbr", "Typo", "Gender", "Animacy", "NounClass", | ||
"Number", "Case", "Definite", "Degree", "VerbForm", | ||
"Mood", "Tense", "Aspect", "Voice", "Evident", | ||
"Polarity", "Person", "Polite", "Clusivity"] | ||
private static universalFeatureValues = [["Art", "Dem", "Emp", "Exc", "Ind", "Int", "Neg", "Prs", "Rcp", "Rel", "Tot"], | ||
["Card", "Dist", "Frac", "Mult", "Ord", "Range", "Sets"], | ||
["Yes"], | ||
["Yes"], | ||
["Yes"], | ||
["Yes"], | ||
["Yes"], | ||
["Com", "Fem", "Masc", "Neut"], | ||
["Anim", "Hum", "Inan", "Nhum"], | ||
["Bantu1", "Bantu2", "Bantu3", "Bantu4", "Bantu5", "Bantu6", "Bantu7", "Bantu8", "Bantu9", "Bantu10", "Bantu11", "Bantu12", "Bantu13", "Bantu14", "Bantu15", "Bantu16", "Bantu17", "Bantu18", "Bantu19", "Bantu20", "Bantu21", "Bantu22", "Bantu23", "Wol1", "Wol2", "Wol3", "Wol4", "Wol5", "Wol6", "Wol7", "Wol8", "Wol9", "Wol10", "Wol11", "Wol12"], | ||
["Coll", "Count", "Dual", "Grpa", "Grpl", "Inv", "Pauc", "Plur", "Ptan", "Sing", "Tri"], | ||
["Abs", "Acc", "Erg", "Nom", "Abe", "Ben", "Cau", "Cmp", "Cns", "Com", "Dat", "Dis", "Equ", "Gen", "Ins", "Par", "Tem", "Tra", "Voc", "Abl", "Add", "Ade", "All", "Del", "Ela", "Ess", "Ill", "Ine", "Lat", "Loc", "Per", "Sbe", "Sbl", "Spl", "Sub", "Sup", "Ter"], | ||
["Com", "Cons", "Def", "Ind", "Spec"], | ||
["Abs", "Aug", "Cmp", "Dim", "Equ", "Pos", "Sup"], | ||
["Conv", "Fin", "Gdv", "Ger", "Inf", "Part", "Sup", "Vnoun"], | ||
["Adm", "Cnd", "Des", "Imp", "Ind", "Int", "Irr", "Jus", "Nec", "Opt", "Pot", "Prp", "Qot", "Sub"], | ||
["Fut", "Imp", "Past", "Pqp", "Pres"], | ||
["Hab", "Imp", "Iter", "Perf", "Prog", "Prosp"], | ||
["Act", "Antip", "Bfoc", "Cau", "Dir", "Inv", "Lfoc", "Mid", "Pass", "Rcp"], | ||
["Fh", "Nfh"], | ||
["Neg", "Pos"], | ||
["0", "1", "2", "3", "4"], | ||
["Elev", "Form", "Humb", "Infm"], | ||
["Ex", "In"]] | ||
private static turkishFeatureValues = [["Art", "Dem", "Ind", "Int", "Neg", "Prs", "Rcp", "Rel", "Tot"], | ||
["Card", "Dist", "Ord"], | ||
[], | ||
["Yes"], | ||
[], | ||
["Yes"], | ||
[], | ||
[], | ||
[], | ||
[], | ||
["Plur", "Sing"], | ||
["Acc", "Nom", "Dat", "Equ", "Gen", "Ins", "Abl", "Loc"], | ||
["Def", "Ind"], | ||
["Cmp", "Sup"], | ||
["Conv", "Fin", "Part", "Vnoun"], | ||
["Cnd", "Des", "Gen", "Imp", "Ind", "Nec", "Opt", "Pot", "DesPot", "CndPot", "CndGen", "CndGenPot", "GenPot", "PotPot", "GenNecPot", "GenNec", "NecPot", "GenPotPot", "ImpPot"], | ||
["Fut", "Past", "Pqp", "Pres", "Aor"], | ||
["Imp", "Perf", "Prog", "Prosp", "Hab", "Rapid"], | ||
["Cau", "Pass", "Rcp", "Rfl", "CauCau", "CauCauPass", "CauPass", "CauPassRcp", "CauRcp", "PassPass", "PassRfl", "PassRcp"], | ||
["Fh", "Nfh"], | ||
["Neg", "Pos"], | ||
["1", "2", "3"], | ||
[], | ||
[]] | ||
private static englishFeatureValues = [["Art", "Dem", "Emp", "Ind", "Int", "Neg", "Prs", "Rcp", "Rel", "Tot"], | ||
["Card", "Frac", "Mult", "Ord"], | ||
["Yes"], | ||
[], | ||
[], | ||
[], | ||
[], | ||
["Fem", "Masc", "Neut"], | ||
[], | ||
[], | ||
["Plur", "Sing"], | ||
["Acc", "Nom", "Gen"], | ||
["Def", "Ind"], | ||
["Cmp", "Pos", "Sup"], | ||
["Fin", "Ger", "Inf", "Part"], | ||
["Imp", "Ind", "Sub"], | ||
["Past", "Pres"], | ||
[], | ||
["Pass"], | ||
[], | ||
[], | ||
["1", "2", "3"], | ||
[], | ||
[]] | ||
constructor(language: string, features: string) { | ||
if (features != "_") { | ||
let list = features.split("|"); | ||
for (let feature of list){ | ||
if (feature.includes("=")){ | ||
for (let feature of list) { | ||
if (feature.includes("=")) { | ||
let featureName = feature.substring(0, feature.indexOf("=")).trim(); | ||
let featureValue = feature.substring(feature.indexOf("=") + 1).trim(); | ||
this.featureList.set(featureName, featureValue); | ||
if (UniversalDependencyTreeBankFeatures.featureValueIndex(language, featureName, featureValue) != -1){ | ||
this.featureList.set(featureName, featureValue); | ||
} else { | ||
console.log("Either the feature " + featureName + " or the value " + featureValue + " is wrong"); | ||
} | ||
} else { | ||
@@ -21,17 +121,91 @@ console.log("Feature does not contain = ->" + features); | ||
getFeatureValue(feature: string): string{ | ||
private static featureIndex(featureName: string): number{ | ||
if (featureName.includes("[")){ | ||
featureName = featureName.substring(0, featureName.indexOf('[')); | ||
} | ||
for (let i = 0; i < UniversalDependencyTreeBankFeatures.universalFeatureTypes.length; i++){ | ||
if (UniversalDependencyTreeBankFeatures.universalFeatureTypes[i] == featureName){ | ||
return i; | ||
} | ||
} | ||
return -1; | ||
} | ||
private static posIndex(uPos: string): number{ | ||
let index = 0; | ||
for (let universalDependencyPosType of Object.values(UniversalDependencyPosType)){ | ||
if (universalDependencyPosType.toString() == uPos){ | ||
return index; | ||
} | ||
index++; | ||
} | ||
return -1; | ||
} | ||
public static dependencyIndex(universalDependency: string): number{ | ||
let index = 0; | ||
for (let dependency of UniversalDependencyRelation.universalDependencyTypes){ | ||
if (dependency == universalDependency){ | ||
return index; | ||
} | ||
index++; | ||
} | ||
return -1; | ||
} | ||
public static numberOfValues(language: string, featureName: string): number{ | ||
let fIndex = UniversalDependencyTreeBankFeatures.featureIndex(featureName); | ||
if (fIndex != -1) { | ||
switch (language) { | ||
case "en": | ||
return UniversalDependencyTreeBankFeatures.englishFeatureValues[fIndex].length; | ||
case "tr": | ||
return UniversalDependencyTreeBankFeatures.turkishFeatureValues[fIndex].length; | ||
} | ||
} | ||
return -1; | ||
} | ||
public static featureValueIndex(language: string, featureName: string, featureValue: string): number{ | ||
let searchArray; | ||
let fIndex = UniversalDependencyTreeBankFeatures.featureIndex(featureName); | ||
if (fIndex != -1){ | ||
switch (language){ | ||
case "en": | ||
searchArray = UniversalDependencyTreeBankFeatures.englishFeatureValues; | ||
break; | ||
case "tr": | ||
searchArray = UniversalDependencyTreeBankFeatures.turkishFeatureValues; | ||
break; | ||
case "u": | ||
default: | ||
searchArray = UniversalDependencyTreeBankFeatures.universalFeatureValues; | ||
break; | ||
} | ||
let featureValueIndex = -1; | ||
for (let i = 0; i < searchArray[fIndex].length; i++){ | ||
if (searchArray[fIndex][i] == featureValue){ | ||
featureValueIndex = i; | ||
} | ||
} | ||
return featureValueIndex; | ||
} | ||
return -1; | ||
} | ||
getFeatureValue(feature: string): string { | ||
return this.featureList.get(feature); | ||
} | ||
featureExists(feature: string): boolean{ | ||
featureExists(feature: string): boolean { | ||
return this.featureList.has(feature); | ||
} | ||
toString(): string{ | ||
if (this.featureList.size == 0){ | ||
toString(): string { | ||
if (this.featureList.size == 0) { | ||
return "_"; | ||
} | ||
let result = ""; | ||
for (let feature of this.featureList.keys()){ | ||
if (result == ""){ | ||
for (let feature of this.featureList.keys()) { | ||
if (result == "") { | ||
result = feature + "=" + this.getFeatureValue(feature); | ||
@@ -38,0 +212,0 @@ } else { |
@@ -11,5 +11,5 @@ import {Sentence} from "nlptoolkit-corpus/dist/Sentence"; | ||
constructor(sentence?: string) { | ||
constructor(language?: string, sentence?: string) { | ||
super(); | ||
if (sentence != undefined){ | ||
if (language != undefined){ | ||
let lines = sentence.split("\n") | ||
@@ -36,3 +36,3 @@ for (let line of lines){ | ||
let xpos = items[4]; | ||
let features = new UniversalDependencyTreeBankFeatures(items[5]); | ||
let features = new UniversalDependencyTreeBankFeatures(language, items[5]); | ||
let relation | ||
@@ -39,0 +39,0 @@ if (items[6] != "_"){ |
@@ -38,3 +38,75 @@ import * as assert from "assert"; | ||
}); | ||
it('testDependencyCorpus9', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("en_atis-ud-dev.conllu"); | ||
assert.strictEqual(572, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus10', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("en_atis-ud-test.conllu"); | ||
assert.strictEqual(586, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus11', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("en_atis-ud-train.conllu"); | ||
assert.strictEqual(4274, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus12', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_atis-ud-dev.conllu"); | ||
assert.strictEqual(572, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus13', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_atis-ud-test.conllu"); | ||
assert.strictEqual(586, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus14', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_atis-ud-train.conllu"); | ||
assert.strictEqual(4274, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus15', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_framenet-ud-dev.conllu"); | ||
assert.strictEqual(205, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus16', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_framenet-ud-test.conllu"); | ||
assert.strictEqual(205, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus17', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_framenet-ud-train.conllu"); | ||
assert.strictEqual(2288, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus18', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_kenet-ud-dev.conllu"); | ||
assert.strictEqual(1646, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus19', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_kenet-ud-test.conllu"); | ||
assert.strictEqual(1643, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus20', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_kenet-ud-train.conllu"); | ||
assert.strictEqual(15398, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus21', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_penn-ud-dev.conllu"); | ||
assert.strictEqual(622, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus22', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_penn-ud-test.conllu"); | ||
assert.strictEqual(924, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus23', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_penn-ud-train.conllu"); | ||
assert.strictEqual(14850, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus24', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_tourism-ud-dev.conllu"); | ||
assert.strictEqual(2166, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus25', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_tourism-ud-test.conllu"); | ||
assert.strictEqual(2191, corpus.sentenceCount()); | ||
}); | ||
it('testDependencyCorpus26', function() { | ||
let corpus = new UniversalDependencyTreeBankCorpus("tr_tourism-ud-train.conllu"); | ||
assert.strictEqual(15476, corpus.sentenceCount()); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66433877
2623