@Test public void shouldApplySuffixes() { assertThat(engine.apply(new TurkishSequence("elma"), null, null), equalToAppliedStr("elma")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence(""), null), equalToAppliedStr("elma")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence(" "), null), equalToAppliedStr("elma")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("lAr"), null), equalToAppliedStr("elmalar")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("cI"), null), equalToAppliedStr("elmacı")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("lAş"), null), equalToAppliedStr("elmalaş")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("dIr"), null), equalToAppliedStr("elmadır")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("nIn"), null), equalToAppliedStr("elmanın")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("+nIn"), null), equalToAppliedStr("elmanın")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("+yI"), null), equalToAppliedStr("elmayı")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("+sI"), null), equalToAppliedStr("elması")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("+dAn"), null), equalToAppliedStr("elmadan")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("+Im"), null), equalToAppliedStr("elmam")); assertThat(engine.apply(new TurkishSequence("elma"), new SuffixFormSequence("+ylA"), null), equalToAppliedStr("elmayla")); assertThat(engine.apply(new TurkishSequence("armut"), null, null), equalToAppliedStr("armut")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence(""), null), equalToAppliedStr("armut")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence(" "), null), equalToAppliedStr("armut")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("lAr"), null), equalToAppliedStr("armutlar")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("cI"), null), equalToAppliedStr("armutçu")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("lAş"), null), equalToAppliedStr("armutlaş")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("dIr"), null), equalToAppliedStr("armuttur")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("In"), null), equalToAppliedStr("armudun")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("+nIn"), null), equalToAppliedStr("armudun")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("+yI"), null), equalToAppliedStr("armudu")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("+sI"), null), equalToAppliedStr("armudu")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("+Im"), null), equalToAppliedStr("armudum")); assertThat(engine.apply(new TurkishSequence("armut"), new SuffixFormSequence("+ylA"), null), equalToAppliedStr("armutla")); assertThat(engine.apply(new TurkishSequence("del"), new SuffixFormSequence("+yAcAk"), null), equalToAppliedStr("delecek")); assertThat(engine.apply(new TurkishSequence("del"), new SuffixFormSequence("dIk"), null), equalToAppliedStr("deldik")); assertThat(engine.apply(new TurkishSequence("del"), new SuffixFormSequence("m"), null), equalToAppliedStr("delm")); assertThat(engine.apply(new TurkishSequence("del"), new SuffixFormSequence("+Iyor"), null), equalToAppliedStr("deliyor")); assertThat(engine.apply(new TurkishSequence("del"), new SuffixFormSequence("+Ar"), null), equalToAppliedStr("deler")); assertThat(engine.apply(new TurkishSequence("ata"), new SuffixFormSequence("+yAcAk"), null), equalToAppliedStr("atayacak")); assertThat(engine.apply(new TurkishSequence("ata"), new SuffixFormSequence("dIk"), null), equalToAppliedStr("atadık")); assertThat(engine.apply(new TurkishSequence("ata"), new SuffixFormSequence("m"), null), equalToAppliedStr("atam")); assertThat(engine.apply(new TurkishSequence("ata"), new SuffixFormSequence("+Ar"), null), equalToAppliedStr("atar")); assertThat(engine.apply(new TurkishSequence("at"), new SuffixFormSequence("+Iyor"), Arrays.asList(LexemeAttribute.NoVoicing)), equalToAppliedStr("atıyor")); assertThat(engine.apply(new TurkishSequence("bul"), new SuffixFormSequence("mAlI"), null), equalToAppliedStr("bulmalu")); assertThat(engine.apply(new TurkishSequence("bul"), new SuffixFormSequence("mAl!I"), null), equalToAppliedStr("bulmalı")); }
public Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes) { return this.apply(surface, phoneticsAnalyzer.calculatePhoneticAttributes(surface, lexemeAttributes), form, lexemeAttributes); }
PhoneticsEngine { public Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes) { return this.apply(surface, phoneticsAnalyzer.calculatePhoneticAttributes(surface, lexemeAttributes), form, lexemeAttributes); } }
PhoneticsEngine { public Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes) { return this.apply(surface, phoneticsAnalyzer.calculatePhoneticAttributes(surface, lexemeAttributes), form, lexemeAttributes); } PhoneticsEngine(SuffixFormSequenceApplier suffixFormSequenceApplier); }
PhoneticsEngine { public Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes) { return this.apply(surface, phoneticsAnalyzer.calculatePhoneticAttributes(surface, lexemeAttributes), form, lexemeAttributes); } PhoneticsEngine(SuffixFormSequenceApplier suffixFormSequenceApplier); boolean isSuffixFormApplicable(final Set<PhoneticAttribute> phoneticAttributes, final SuffixFormSequence suffixFormSequence); Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes); Pair<TurkishSequence, String> apply(final TurkishSequence surface, final Set<PhoneticAttribute> _phoneticAttributes, final SuffixFormSequence suffixFormSequence, final Collection<LexemeAttribute> _lexemeAttributes); boolean expectationsSatisfied(final Collection<PhoneticExpectation> phoneticExpectations, final SuffixFormSequence _form); boolean applicationMatches(final TurkishSequence input, final String appliedStr, final boolean voicingAllowed); }
PhoneticsEngine { public Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes) { return this.apply(surface, phoneticsAnalyzer.calculatePhoneticAttributes(surface, lexemeAttributes), form, lexemeAttributes); } PhoneticsEngine(SuffixFormSequenceApplier suffixFormSequenceApplier); boolean isSuffixFormApplicable(final Set<PhoneticAttribute> phoneticAttributes, final SuffixFormSequence suffixFormSequence); Pair<TurkishSequence, String> apply(TurkishSequence surface, SuffixFormSequence form, Collection<LexemeAttribute> lexemeAttributes); Pair<TurkishSequence, String> apply(final TurkishSequence surface, final Set<PhoneticAttribute> _phoneticAttributes, final SuffixFormSequence suffixFormSequence, final Collection<LexemeAttribute> _lexemeAttributes); boolean expectationsSatisfied(final Collection<PhoneticExpectation> phoneticExpectations, final SuffixFormSequence _form); boolean applicationMatches(final TurkishSequence input, final String appliedStr, final boolean voicingAllowed);  }