toPartOfSpeechTagType method

PartOfSpeechTagType toPartOfSpeechTagType()

Implementation

PartOfSpeechTagType toPartOfSpeechTagType() {
  switch (this) {
    case 'ADJ':
      return PartOfSpeechTagType.adj;
    case 'ADP':
      return PartOfSpeechTagType.adp;
    case 'ADV':
      return PartOfSpeechTagType.adv;
    case 'AUX':
      return PartOfSpeechTagType.aux;
    case 'CONJ':
      return PartOfSpeechTagType.conj;
    case 'CCONJ':
      return PartOfSpeechTagType.cconj;
    case 'DET':
      return PartOfSpeechTagType.det;
    case 'INTJ':
      return PartOfSpeechTagType.intj;
    case 'NOUN':
      return PartOfSpeechTagType.noun;
    case 'NUM':
      return PartOfSpeechTagType.num;
    case 'O':
      return PartOfSpeechTagType.o;
    case 'PART':
      return PartOfSpeechTagType.part;
    case 'PRON':
      return PartOfSpeechTagType.pron;
    case 'PROPN':
      return PartOfSpeechTagType.propn;
    case 'PUNCT':
      return PartOfSpeechTagType.punct;
    case 'SCONJ':
      return PartOfSpeechTagType.sconj;
    case 'SYM':
      return PartOfSpeechTagType.sym;
    case 'VERB':
      return PartOfSpeechTagType.verb;
  }
  throw Exception('$this is not known in enum PartOfSpeechTagType');
}