public class NonWordCorrector
extends java.lang.Object
History:
Modifier and Type | Method and Description |
---|---|
static TokenObj |
GetCorrectTerm(TokenObj inTokenObj,
CSpellApi cSpellApi)
The core method to correct a word by following steps:
Convert inToken to coreTerm
detect if misspell (OOV) - non-word
get candidates
get candidates from 1To1.
|
static TokenObj |
GetCorrectTerm(TokenObj inTokenObj,
CSpellApi cSpellApi,
boolean debugFlag)
This method does not use context scores to find the correct term.
|
static TokenObj |
GetCorrectTerm(TokenObj inTokenObj,
CSpellApi cSpellApi,
boolean debugFlag,
int tarPos,
java.util.ArrayList<TokenObj> nonSpaceTokenList)
This method uses context scores to find the correct term.
|
static void |
main(java.lang.String[] args) |
public static TokenObj GetCorrectTerm(TokenObj inTokenObj, CSpellApi cSpellApi)
inTokenObj
- the input tokenObj (single word)cSpellApi
- CSpell Api objectpublic static TokenObj GetCorrectTerm(TokenObj inTokenObj, CSpellApi cSpellApi, boolean debugFlag)
inTokenObj
- the input tokenObj (single word)cSpellApi
- CSpell Api objectdebugFlag
- flag for debug printpublic static TokenObj GetCorrectTerm(TokenObj inTokenObj, CSpellApi cSpellApi, boolean debugFlag, int tarPos, java.util.ArrayList<TokenObj> nonSpaceTokenList)
inTokenObj
- the input tokenObj (single word)cSpellApi
- CSpell Api objectdebugFlag
- flag for debug printtarPos
- position for target tokennonSpaceTokenList
- token list without space token(s)public static void main(java.lang.String[] args)
Submit a bug or feature
Copyright © 2018 National Library of Medicine