Codota Logo
DictionaryConnection.getLengthSortedValues
Code IndexAdd Codota to your IDE (free)

How to use
getLengthSortedValues
method
in
org.datacleaner.reference.DictionaryConnection

Best Java code snippets using org.datacleaner.reference.DictionaryConnection.getLengthSortedValues (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: datacleaner/DataCleaner

private String capitalizeWordsByDictionaries(final String value) {
  final String preparedString = UCharacter.toTitleCase(value, BreakIterator.getWordInstance());
  for (final DictionaryConnection allWordsDictionaryConnection : allWordsDictionaryConnections) {
    final Iterator<String> lengthSortedValues = allWordsDictionaryConnection.getLengthSortedValues();
    while (lengthSortedValues.hasNext()) {
      final String candidate = lengthSortedValues.next();
      if (candidate.equalsIgnoreCase(value)) {
        return candidate;
      }
    }
  }
  return getAllWords(preparedString).stream().map(this::capitalizeWordByDictionaries)
      .collect(Collectors.joining());
}
origin: datacleaner/DataCleaner

@Override
public Iterator<String> getLengthSortedValues() {
  return _dictionary.loadIntoMemory(_datastoreConnection).openConnection(null).getLengthSortedValues();
}
origin: datacleaner/DataCleaner

@Initialize
public void init() {
  _dictionaryConnection = _dictionary.openConnection(_configuration);
  multiWordDictionaryPatterns = new LinkedHashMap<>();
  final Iterator<String> allValues = _dictionaryConnection.getLengthSortedValues();
  while (allValues.hasNext()) {
    final String value = allValues.next();
    if (!StringUtils.isSingleWord(value)) {
      final Pattern pattern;
      if (_dictionary.isCaseSensitive()) {
        pattern = Pattern.compile("\\b" + Pattern.quote(value) + "\\b");
      } else {
        pattern = Pattern.compile("\\b" + Pattern.quote(value.toLowerCase()) + "\\b");
      }
      multiWordDictionaryPatterns.put(value, pattern);
    }
  }
}
org.datacleaner.referenceDictionaryConnectiongetLengthSortedValues

Popular methods of DictionaryConnection

  • close
  • containsValue
  • getAllValues

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • String (java.lang)
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Reference (javax.naming)
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
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