Package org.nlpub.watset.util
Enum Word2VecFormat.SpaceStrategy
- java.lang.Object
-
- java.lang.Enum<Word2VecFormat.SpaceStrategy>
-
- org.nlpub.watset.util.Word2VecFormat.SpaceStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<Word2VecFormat.SpaceStrategy>
- Enclosing class:
- Word2VecFormat
public static enum Word2VecFormat.SpaceStrategy extends Enum<Word2VecFormat.SpaceStrategy>
Space character handling strategy.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAILThrow aIllegalStateExceptionwhen space occurs.IGNOREDo nothing when space occurs.REPLACEReplace spaces with underscores (_).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Word2VecFormat.SpaceStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static Word2VecFormat.SpaceStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IGNORE
public static final Word2VecFormat.SpaceStrategy IGNORE
Do nothing when space occurs.
-
FAIL
public static final Word2VecFormat.SpaceStrategy FAIL
Throw aIllegalStateExceptionwhen space occurs.
-
REPLACE
public static final Word2VecFormat.SpaceStrategy REPLACE
Replace spaces with underscores (_).
-
-
Method Detail
-
values
public static Word2VecFormat.SpaceStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Word2VecFormat.SpaceStrategy c : Word2VecFormat.SpaceStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Word2VecFormat.SpaceStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-