All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ua.net.nlp.bruk.WordContext.groovy Maven / Gradle / Ivy

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"
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy