// ĠCopyright Ġ( C ) Ġ 2 0 2 1 ĠRe ece ĠH . ĠD un n . ĠSPDX - License - Identifier : ĠApache - 2 . 0 č Ċ package Ġopen nlp . ext . con ll . tests . tre eb ank . features čĊč Ċ import Ġopen nlp . ext . con ll . tre eb ank . Feature č Ċ import Ġopen nlp . ext . con ll . tre eb ank . features . Unknown Feature Value č Ċ import Ġopen nlp . ext . con ll . tre eb ank . features . ver bal .* č Ċ import Ġorg . hamcrest . Core Matchers .` is ` č Ċ import Ġorg . hamcrest . Core Matchers . same Instance č Ċ import Ġorg . hamcrest . Matcher Assert . assertThat č Ċ import Ġorg . junit . jupiter . api . DisplayName č Ċ import Ġorg . junit . jupiter . api . Test čĊč Ċ @ DisplayName (" Universal ĠDependencies ĠVer bal ĠFeature ĠSets ") č Ċ class ĠVer bal Feature Sets Test Ġ{ čĊĠĠĠ Ġprivate Ġfun Ġfeature ( value : ĠString ): ĠFeature Ġ{ čĊĠĠĠĠĠĠĠ Ġval Ġfe ats Ġ= ĠFeature . parse ( value ) čĊĠĠĠĠĠĠĠ ĠassertThat ( feats . size , Ġ` is `( 1 )) čĊĠĠĠĠĠĠĠ Ġreturn Ġfe ats . first () čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" VerbForm ") čĊĠĠĠ Ġfun Ġverb Form () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Conv "), Ġ` is `( same Instance ( VerbForm . Conv ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Fin "), Ġ` is `( same Instance ( VerbForm . Fin ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = G dv "), Ġ` is `( same Instance ( VerbForm . G dv ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Ger "), Ġ` is `( same Instance ( VerbForm . Ger ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Inf "), Ġ` is `( same Instance ( VerbForm . Inf ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Part "), Ġ` is `( same Instance ( VerbForm . Part ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Sup "), Ġ` is `( same Instance ( VerbForm . Sup ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = V no un "), Ġ` is `( same Instance ( VerbForm . V no un ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" VerbForm = Other "), Ġ` is `( Unknown Feature Value (" VerbForm ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Mood ") čĊĠĠĠ Ġfun Ġm ood () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Ad m "), Ġ` is `( same Instance ( Mood . Ad m ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = C nd "), Ġ` is `( same Instance ( Mood . C nd ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Des "), Ġ` is `( same Instance ( Mood . Des ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Imp "), Ġ` is `( same Instance ( Mood . Imp ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Ind "), Ġ` is `( same Instance ( Mood . Ind ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = I rr "), Ġ` is `( same Instance ( Mood . I rr ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = J us "), Ġ` is `( same Instance ( Mood . J us ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = N ec "), Ġ` is `( same Instance ( Mood . N ec ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Opt "), Ġ` is `( same Instance ( Mood . Opt ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Pot "), Ġ` is `( same Instance ( Mood . Pot ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Pr p "), Ġ` is `( same Instance ( Mood . Pr p ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Q ot "), Ġ` is `( same Instance ( Mood . Q ot ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Sub "), Ġ` is `( same Instance ( Mood . Sub ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Mood = Other "), Ġ` is `( Unknown Feature Value (" Mood ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Tense ") čĊĠĠĠ Ġfun Ġtense () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Tense = F ut "), Ġ` is `( same Instance ( Tense . F ut ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Tense = Imp "), Ġ` is `( same Instance ( Tense . Imp ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Tense = Past "), Ġ` is `( same Instance ( Tense . Past ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Tense = P qp "), Ġ` is `( same Instance ( Tense . P qp ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Tense = Pres "), Ġ` is `( same Instance ( Tense . Pres ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Tense = Other "), Ġ` is `( Unknown Feature Value (" Tense ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Aspect ") čĊĠĠĠ Ġfun Ġaspect () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = H ab "), Ġ` is `( same Instance ( Aspect . H ab ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = Imp "), Ġ` is `( same Instance ( Aspect . Imp ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = Iter "), Ġ` is `( same Instance ( Aspect . Iter ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = Perf "), Ġ` is `( same Instance ( Aspect . Perf ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = Prog "), Ġ` is `( same Instance ( Aspect . Prog ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = Pro sp "), Ġ` is `( same Instance ( Aspect . Pro sp ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Aspect = Other "), Ġ` is `( Unknown Feature Value (" Aspect ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Voice ") čĊĠĠĠ Ġfun Ġvoice () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Act "), Ġ` is `( same Instance ( Voice . Act ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Ant ip "), Ġ` is `( same Instance ( Voice . Ant ip ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Bf oc "), Ġ` is `( same Instance ( Voice . Bf oc ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = C au "), Ġ` is `( same Instance ( Voice . C au ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Dir "), Ġ` is `( same Instance ( Voice . Dir ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Inv "), Ġ` is `( same Instance ( Voice . Inv ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Lf oc "), Ġ` is `( same Instance ( Voice . Lf oc ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Mid "), Ġ` is `( same Instance ( Voice . Mid ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Pass "), Ġ` is `( same Instance ( Voice . Pass ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = R cp "), Ġ` is `( same Instance ( Voice . R cp ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Voice = Other "), Ġ` is `( Unknown Feature Value (" Voice ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" E vid ent ") čĊĠĠĠ Ġfun Ġe vid ent () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" E vid ent = Fh "), Ġ` is `( same Instance ( E vid ent . Fh ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" E vid ent = N fh "), Ġ` is `( same Instance ( E vid ent . N fh ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" E vid ent = Other "), Ġ` is `( Unknown Feature Value (" E vid ent ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Pol arity ") čĊĠĠĠ Ġfun Ġpol arity () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol arity = Neg "), Ġ` is `( same Instance ( Pol arity . Neg ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol arity = Pos "), Ġ` is `( same Instance ( Pol arity . Pos ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol arity = Other "), Ġ` is `( Unknown Feature Value (" Pol arity ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Person ") čĊĠĠĠ Ġfun Ġperson () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Person = 0 "), Ġ` is `( same Instance ( Person . Zero ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Person = 1 "), Ġ` is `( same Instance ( Person . First ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Person = 2 "), Ġ` is `( same Instance ( Person . Second ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Person = 3 "), Ġ` is `( same Instance ( Person . Third ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Person = 4 "), Ġ` is `( same Instance ( Person . Four th ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Person = Other "), Ġ` is `( Unknown Feature Value (" Person ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Pol ite ") čĊĠĠĠ Ġfun Ġpol ite () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol ite = E lev "), Ġ` is `( same Instance ( Pol ite . E lev ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol ite = Form "), Ġ` is `( same Instance ( Pol ite . Form ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol ite = H umb "), Ġ` is `( same Instance ( Pol ite . H umb ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol ite = Inf m "), Ġ` is `( same Instance ( Pol ite . Inf m ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Pol ite = Other "), Ġ` is `( Unknown Feature Value (" Pol ite ", Ġ" Other "))) čĊĠĠĠ Ġ} čĊčĊĠĠĠ Ġ@ Test čĊĠĠĠ Ġ@ DisplayName (" Clus ivity ") čĊĠĠĠ Ġfun Ġcl us ivity () Ġ{ čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Clus ivity = Ex "), Ġ` is `( same Instance ( Clus ivity . Ex ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Clus ivity = In "), Ġ` is `( same Instance ( Clus ivity . In ))) čĊĠĠĠĠĠĠĠ ĠassertThat ( feature (" Clus ivity = Other "), Ġ` is `( Unknown Feature Value (" Clus ivity ", Ġ" Other "))) čĊĠĠĠ Ġ} č Ċ } čĊ