public class TokenizerResource extends Resource
Modifier and Type | Field and Description |
---|---|
TokenizationConfig |
config |
Constructor and Description |
---|
TokenizerResource(java.lang.String name) |
TokenizerResource(java.lang.String name,
java.lang.String path) |
TokenizerResource(java.lang.String name,
java.lang.String path,
int lang) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
_getParametersDigest() |
void |
addTokenizationException(java.lang.String pattern,
int kind)
Add a tokenization exception
|
protected void |
alloc(java.lang.String name,
java.lang.String path) |
protected void |
allocate()
Function you should override to perform allocation of the underlying
data.
|
protected void |
free()
Function you should override to perform deallocation of the underlying
data.
|
int |
getTokenKind(java.lang.String token)
Stand-alone use of token kind computing
|
void |
overwriteCharKind(char ch,
int kind)
Add a character kind exception
|
boolean |
overwriteUnicodePropertyKind(java.lang.String property,
int kind)
Add a kind exception for a whole set of character defined by a unicode property
|
equals, finalize, getExpandedPath, getExpandedPath, getExpandedPath, getExpandedPathIfExists, getExpandedPathIfExists, getIdentifier, getLang, getLangName, getName, hashCode, hasPath, register, register, release, release
public TokenizationConfig config
public TokenizerResource(java.lang.String name, java.lang.String path, int lang)
public TokenizerResource(java.lang.String name, java.lang.String path)
public TokenizerResource(java.lang.String name)
protected java.lang.String _getParametersDigest()
_getParametersDigest
in class Resource
protected void allocate() throws ResourceNotFoundException, ResourceAllocationFailedException
allocate
in class Resource
ResourceNotFoundException
ResourceAllocationFailedException
protected void alloc(java.lang.String name, java.lang.String path)
protected void free()
public void addTokenizationException(java.lang.String pattern, int kind)
pattern
- A regular expression matching the exceptionkind
- The token kind of the exceptionpublic void overwriteCharKind(char ch, int kind)
The
- character the kind of which must be overridenkind
- The token kind of the characterpublic boolean overwriteUnicodePropertyKind(java.lang.String property, int kind)
property
- The unicode property defining the character set
The supported unicode property names are those of the regular expression syntax
that can be found at https://www.regular-expressions.info/unicode.html#categorykind
- The token kind of the characterpublic int getTokenKind(java.lang.String token)
Copyright © 2013 Dassault Systèmes, All Rights Reserved.