@Test public void shouldApplySuffixesWithAttributes() { assertThat(engine.apply(new TurkishSequence("yap"), new SuffixFormSequence("+yAcAk"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("yap"), "acak"))); assertThat(engine.apply(new TurkishSequence("yap"), new SuffixFormSequence("+Iyor"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("yap"), "ıyor"))); assertThat(engine.apply(new TurkishSequence("yap"), new SuffixFormSequence("+Ar"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("yap"), "ar"))); assertThat(engine.apply(new TurkishSequence("yap"), new SuffixFormSequence("tI"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("yap"), "tı"))); assertThat(engine.apply(new TurkishSequence("kek"), new SuffixFormSequence("+I"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("kek"), "i"))); assertThat(engine.apply(new TurkishSequence("kek"), new SuffixFormSequence("+Im"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("kek"), "im"))); assertThat(engine.apply(new TurkishSequence("kek"), new SuffixFormSequence("+A"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("kek"), "e"))); assertThat(engine.apply(new TurkishSequence("kek"), new SuffixFormSequence("dA"), Arrays.asList(LexemeAttribute.NoVoicing)), equalTo(Pair.of(new TurkishSequence("kek"), "te"))); }
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);  }