from Tagger import Tagger

class OutOfVocabularyTagger(Tagger):
    def __init__(self):
        super(OutOfVocabularyTagger, self).__init__("OoV", ["corpus"])
    
    def tag(self, tokens, sentence, taggingState):
        supersenses = []
        if len(tokens) == 1:
            token = tokens[0]
            if token["word"].startswith("@"):
                supersenses.append("n.person")
#            elif token["word"].startswith("#"):
#                supersenses.extend(["n.communication", "n.person", "n.group", "n.location"])
            elif token["word"].startswith("'") and token["POS"] == "VERB":
                supersenses.append("v.stative")
            elif token["lemma"] in ("place", "restaurant", "store"):
                supersenses.append("n.group")
            elif token["lemma"] in ("place", "restaurant", "store", "hotel", "places", "shop", "guys", "salon"):
                supersenses.append("n.group")
            elif token["lemma"] in ("get", "got", "s") and token["POS"] == "VERB":
                supersenses.append("v.stative")
            elif token["lemma"] in ("go", "went", "going", "coming") and token["POS"] == "VERB":
                supersenses.append("v.motion")
        supersenses = self.filterByPOS(tokens, supersenses, taggingState)
        return supersenses #(None if len(supersenses) == 0 else supersenses)
        
f14e510bd76f046f90bfc8aabbc7a599b722b320
<mask token>


class OutOfVocabularyTagger(Tagger):
    <mask token>
    <mask token>

<mask token>


class OutOfVocabularyTagger(Tagger):

    def __init__(self):
        super(OutOfVocabularyTagger, self).__init__('OoV', ['corpus'])
    <mask token>

<mask token>


class OutOfVocabularyTagger(Tagger):

    def __init__(self):
        super(OutOfVocabularyTagger, self).__init__('OoV', ['corpus'])

    def tag(self, tokens, sentence, taggingState):
        supersenses = []
        if len(tokens) == 1:
            token = tokens[0]
            if token['word'].startswith('@'):
                supersenses.append('n.person')
            elif token['word'].startswith("'") and token['POS'] == 'VERB':
                supersenses.append('v.stative')
            elif token['lemma'] in ('place', 'restaurant', 'store'):
                supersenses.append('n.group')
            elif token['lemma'] in ('place', 'restaurant', 'store', 'hotel',
                'places', 'shop', 'guys', 'salon'):
                supersenses.append('n.group')
            elif token['lemma'] in ('get', 'got', 's') and token['POS'
                ] == 'VERB':
                supersenses.append('v.stative')
            elif token['lemma'] in ('go', 'went', 'going', 'coming') and token[
                'POS'] == 'VERB':
                supersenses.append('v.motion')
        supersenses = self.filterByPOS(tokens, supersenses, taggingState)
        return supersenses

from Tagger import Tagger


class OutOfVocabularyTagger(Tagger):

    def __init__(self):
        super(OutOfVocabularyTagger, self).__init__('OoV', ['corpus'])

    def tag(self, tokens, sentence, taggingState):
        supersenses = []
        if len(tokens) == 1:
            token = tokens[0]
            if token['word'].startswith('@'):
                supersenses.append('n.person')
            elif token['word'].startswith("'") and token['POS'] == 'VERB':
                supersenses.append('v.stative')
            elif token['lemma'] in ('place', 'restaurant', 'store'):
                supersenses.append('n.group')
            elif token['lemma'] in ('place', 'restaurant', 'store', 'hotel',
                'places', 'shop', 'guys', 'salon'):
                supersenses.append('n.group')
            elif token['lemma'] in ('get', 'got', 's') and token['POS'
                ] == 'VERB':
                supersenses.append('v.stative')
            elif token['lemma'] in ('go', 'went', 'going', 'coming') and token[
                'POS'] == 'VERB':
                supersenses.append('v.motion')
        supersenses = self.filterByPOS(tokens, supersenses, taggingState)
        return supersenses

from Tagger import Tagger

class OutOfVocabularyTagger(Tagger):
    def __init__(self):
        super(OutOfVocabularyTagger, self).__init__("OoV", ["corpus"])
    
    def tag(self, tokens, sentence, taggingState):
        supersenses = []
        if len(tokens) == 1:
            token = tokens[0]
            if token["word"].startswith("@"):
                supersenses.append("n.person")
#            elif token["word"].startswith("#"):
#                supersenses.extend(["n.communication", "n.person", "n.group", "n.location"])
            elif token["word"].startswith("'") and token["POS"] == "VERB":
                supersenses.append("v.stative")
            elif token["lemma"] in ("place", "restaurant", "store"):
                supersenses.append("n.group")
            elif token["lemma"] in ("place", "restaurant", "store", "hotel", "places", "shop", "guys", "salon"):
                supersenses.append("n.group")
            elif token["lemma"] in ("get", "got", "s") and token["POS"] == "VERB":
                supersenses.append("v.stative")
            elif token["lemma"] in ("go", "went", "going", "coming") and token["POS"] == "VERB":
                supersenses.append("v.motion")
        supersenses = self.filterByPOS(tokens, supersenses, taggingState)
        return supersenses #(None if len(supersenses) == 0 else supersenses)
        