Пример #1
0
  @Ignore("We don't have these models integrated yet")
  @Test
  public void testPortuguese() throws Exception {
    String[] bosqueTags =
        new String[] {
          "?",
          "adj",
          "adv",
          "art",
          "conj-c",
          "conj-s",
          "ec",
          "in",
          "n",
          "num",
          "pp",
          "pron-det",
          "pron-indp",
          "pron-pers",
          "prop",
          "prp",
          "punc",
          "v-fin",
          "v-ger",
          "v-inf",
          "v-pcp",
          "vp"
        };

    JCas jcas =
        runTest(
            "pt",
            null,
            "Este é um teste .",
            new String[] {"pron-det", "v-fin", "art", "n", "punc"},
            new String[] {"PR", "V", "ART", "NN", "PUNC"});

    AssertAnnotations.assertTagset(POS.class, "bosque", bosqueTags, jcas);

    jcas =
        runTest(
            "pt",
            "maxent",
            "Este é um teste .",
            new String[] {"pron-det", "v-fin", "art", "n", "punc"},
            new String[] {"PR", "V", "ART", "NN", "PUNC"});

    AssertAnnotations.assertTagset(POS.class, "bosque", bosqueTags, jcas);

    jcas =
        runTest(
            "pt",
            "perceptron",
            "Este é um teste .",
            new String[] {"pron-det", "v-fin", "art", "n", "punc"},
            new String[] {"PR", "V", "ART", "NN", "PUNC"});

    AssertAnnotations.assertTagset(POS.class, "bosque", bosqueTags, jcas);

    jcas =
        runTest(
            "pt",
            "mm-maxent",
            "Este é um teste .",
            new String[] {"PROSUB", "V", "ART", "N", "."},
            new String[] {"POS", "POS", "POS", "POS", "POS"});

    // AssertAnnotations.assertTagset(POS.class, "bosque", bosqueTags, jcas);

    jcas =
        runTest(
            "pt",
            "mm-perceptron",
            "Este é um teste .",
            new String[] {"PROSUB", "V", "ART", "N", "."},
            new String[] {"POS", "POS", "POS", "POS", "POS"});

    // AssertAnnotations.assertTagset(POS.class, "bosque", bosqueTags, jcas);

    jcas =
        runTest(
            "pt",
            "cogroo",
            "Este é um teste .",
            new String[] {"pron-det", "v-fin", "artm", "nm", "."},
            new String[] {"POS", "POS", "POS", "POS", "POS"});

    AssertAnnotations.assertTagset(POS.class, "bosque", bosqueTags, jcas);
  }