Examples of synthesize()


Examples of org.kiji.schema.tools.synth.NGramSynthesizer.synthesize()

    getPrintStream().printf("Generating %d users on kiji table '%s'...%n", mNumUsers, mTableURI);
    final KijiTableWriter tableWriter = mTable.openTableWriter();
    try {
      for (int iuser = 0; iuser < mNumUsers; iuser++) {
        final String fullName = fullNameSynth.synthesize();
        final String email =
            EmailSynthesizer.formatEmail(fullName.replace(" ", "."), emailSynth.synthesizeDomain());
        final EntityId entityId = mTable.getEntityId(email);
        tableWriter.put(entityId, "info", "name", fullName);
        tableWriter.put(entityId, "info", "email", email);
View Full Code Here

Examples of org.languagetool.synthesis.FrenchSynthesizer.synthesize()

public class FrenchSynthesizerTest extends TestCase {

  public final void testSynthesizeStringString() throws IOException {
    FrenchSynthesizer synth = new FrenchSynthesizer();
    assertEquals(synth.synthesize(dummyToken("blablabla"), "blablabla").length, 0);
   
    assertEquals("[nagent]", Arrays.toString(synth.synthesize(dummyToken("nager"), "V ind pres 3 p")));
  }

  private AnalyzedToken dummyToken(String tokenStr) {
View Full Code Here

Examples of org.languagetool.synthesis.FrenchSynthesizer.synthesize()

  public final void testSynthesizeStringString() throws IOException {
    FrenchSynthesizer synth = new FrenchSynthesizer();
    assertEquals(synth.synthesize(dummyToken("blablabla"), "blablabla").length, 0);
   
    assertEquals("[nagent]", Arrays.toString(synth.synthesize(dummyToken("nager"), "V ind pres 3 p")));
  }

  private AnalyzedToken dummyToken(String tokenStr) {
    return new AnalyzedToken(tokenStr, tokenStr, tokenStr);
  }
View Full Code Here

Examples of org.languagetool.synthesis.Synthesizer.synthesize()

    String posTag = oldPosTag.replaceFirst(":v_[a-z]+", requiredPostTagsRegEx);

    //    System.out.println("  creating suggestion for " + tokenReadings + " / " + tokenReadings.getAnalyzedToken(0) +" and tag " + posTag);

    try {
      String[] synthesized = ukrainianSynthesizer.synthesize(tokenReadings.getAnalyzedToken(0), posTag, true);

      //      System.out.println("Synthesized: " + Arrays.asList(synthesized));
      suggestions.addAll( Arrays.asList(synthesized) );
    } catch (IOException e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of org.languagetool.synthesis.Synthesizer.synthesize()

       
    if( tokenString.equals("їх") ) {
      msg += ". Можливо тут потрібно присвійний займенник «їхній»?";
      try {
        String newYihPostag = "adj:p" + requiredPostTagsRegEx + ".*";
        String[] synthesized = ukrainianSynthesizer.synthesize(new AnalyzedToken("їхній", "adj:m:v_naz:&pron", "їхній"), newYihPostag, true);
        suggestions.addAll( Arrays.asList(synthesized) );
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

Examples of org.languagetool.synthesis.Synthesizer.synthesize()

      return new BooleanClause(query, BooleanClause.Occur.MUST);
      */
      final Synthesizer synthesizer = language.getSynthesizer();
      if (synthesizer != null) {
        try {
          final String[] synthesized = synthesizer.synthesize(new AnalyzedToken(termStr, null, termStr), ".*", true);
          final Query query;
          if (synthesized.length == 0) {
            query = new TermQuery(termQueryTerm);
          } else {
            query = new RegexpQuery(getTermQueryTerm(element, StringUtils.join(synthesized, "|")));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.