Codota Logo
SynonymCatalogConnection.replaceInline
Code IndexAdd Codota to your IDE (free)

How to use
replaceInline
method
in
org.datacleaner.reference.SynonymCatalogConnection

Best Java code snippets using org.datacleaner.reference.SynonymCatalogConnection.replaceInline (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: datacleaner/DataCleaner

@Override
public Replacement replaceInline(final String sentence) {
  final SimpleSynonymCatalog simpleSynonymCatalog = _synonymCatalog.loadIntoMemory(_datastoreConnection);
  return simpleSynonymCatalog.openConnection(null).replaceInline(sentence);
}
origin: datacleaner/DataCleaner

  @Override
  public Object[] transform(final InputRow inputRow) {
    final String originalValue = inputRow.getValue(column);

    if (originalValue == null) {
      return new String[3];
    }

    if (replaceInlinedSynonyms) {
      final SynonymCatalogConnection.Replacement replacement =
          synonymCatalogConnection.replaceInline(originalValue);
      if (replacedSynonymsType == ReplacedSynonymsType.STRING) {
        return new Object[] { replacement.getReplacedString(), Joiner.on(' ').join(replacement.getSynonyms()),
            Joiner.on(' ').join(replacement.getMasterTerms()) };
      } else {
        return new Object[] { replacement.getReplacedString(), replacement.getSynonyms(),
            replacement.getMasterTerms() };
      }
    } else {
      final String masterTerm = synonymCatalogConnection.getMasterTerm(originalValue);
      final Object lookupResult = masterTerm != null ? masterTerm : (retainOriginalValue ? originalValue : null);
      final Object synonym = masterTerm != null ? originalValue : null;

      return new Object[] { lookupResult, synonym, masterTerm };
    }
  }
}
org.datacleaner.referenceSynonymCatalogConnectionreplaceInline

Javadoc

Replaces all synonyms with master terms in a sentence.

Popular methods of SynonymCatalogConnection

  • close
  • getMasterTerm
    Searches the catalog for a replacement (master) term for a given term
  • getSynonyms

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • startActivity (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now