Classifier
Functions
Link copied to clipboard
abstract fun getClassificationsForLine(text: String, lexState: EndOfLineState, syntacticClassifierAbsent: Boolean): ClassificationResult
Gives lexical classifications of tokens on a line without any syntactic context. For instance, a token consisting of the text 'string' can be either an identifier named 'string' or the keyword 'string', however, because this classifier is not aware, it relies on certain heuristics to give acceptable results. For classifications where speed trumps accuracy, this function is preferable; however, for true accuracy, the syntactic classifier is ideal. In fact, in certain editing scenarios, combining the lexical, syntactic, and semantic classifiers may issue the best user experience.
Link copied to clipboard
abstract fun getEncodedLexicalClassifications(text: String, endOfLineState: EndOfLineState, syntacticClassifierAbsent: Boolean): Classifications