Class ExtendedPictographic

java.lang.Object
opennlp.tools.tokenize.uax29.ExtendedPictographic

public final class ExtendedPictographic extends Object
Checks the Unicode Extended_Pictographic property of a code point.

This is the one extra property the word boundary algorithm needs (rule WB3c), to keep emoji zero-width-joiner sequences together. The data is loaded once from the emoji-data.txt derived resource of the Unicode Character Database and stored in a BitSet, so membership is an O(1) bit check.

  • Method Details

    • is

      public static boolean is(int codePoint)
      Returns whether a code point has the Extended_Pictographic property.
      Parameters:
      codePoint - The code point. Values outside [0, U+10FFFF] return false.
      Returns:
      whether a code point has the Extended_Pictographic property