Package org.carrot2.language
Class TokenTypeUtils
- java.lang.Object
-
- org.carrot2.language.TokenTypeUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisCommon(int flag)ReturntrueifTokenizer.TF_COMMON_WORDis set.static booleanisDocumentSeparator(int type)Returnstrueif the given type hasTokenizer.TF_SEPARATOR_DOCUMENTset.static booleanisFieldSeparator(int type)Returnstrueif the given type hasTokenizer.TF_SEPARATOR_FIELDset.static booleanisInQuery(int flag)ReturntrueifTokenizer.TF_QUERY_WORDis set.static booleanisTerminator(int type)Returnstrueif the given type hasTokenizer.TF_TERMINATORset.static intmaskType(int rawType)Mask the given raw token type and leave just the token type bits.
-
-
-
Method Detail
-
maskType
public static int maskType(int rawType)
Mask the given raw token type and leave just the token type bits.
-
isDocumentSeparator
public static boolean isDocumentSeparator(int type)
Returnstrueif the given type hasTokenizer.TF_SEPARATOR_DOCUMENTset.
-
isFieldSeparator
public static boolean isFieldSeparator(int type)
Returnstrueif the given type hasTokenizer.TF_SEPARATOR_FIELDset.
-
isTerminator
public static boolean isTerminator(int type)
Returnstrueif the given type hasTokenizer.TF_TERMINATORset.
-
isCommon
public static boolean isCommon(int flag)
ReturntrueifTokenizer.TF_COMMON_WORDis set.
-
isInQuery
public static boolean isInQuery(int flag)
ReturntrueifTokenizer.TF_QUERY_WORDis set.
-
-