ua.net.nlp.bruk.WordContext.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nlp_uk Show documentation
Show all versions of nlp_uk Show documentation
NLP tools for Ukrainian language
The newest version!
package ua.net.nlp.bruk
import groovy.transform.Canonical
import groovy.transform.CompileStatic
@CompileStatic
@Canonical
class WordContext {
ContextToken contextToken
int offset
@CompileStatic
WordContext(ContextToken contexToken, int offset) {
this.contextToken = contexToken
this.offset = offset
}
@CompileStatic
String toString() {
def offs = offset > 0 ? "+$offset" : "$offset"
"$offs\t$contextToken"
}
}