Mova0.6 pre-release

the flag of Brazil 39. Brazilian Portuguese in Mova

Mova’s Brazilian Portuguese edition uses the code pt-x-br. A processing run can assign languages to spans, look for a parser model for each assigned language, and return grammatical annotations where a model is available. For pt-x-br, Mova currently has neither a parser model nor an annotated corpus for measuring one. The grammar manual supplies descriptive claims that Squid can queue for implementation.

Language and span identification with langseg

Language identification is level 1 of tools/mova-parse. It assigns a language to each sentence and span. Span-level identification matters for mixed-language input because level 2 selects a parser for each span using its assigned language. A sentence-level label alone therefore does not determine which model is used throughout a sentence.

Within Latin-script text, tools/langseg distinguishes English and French using a Latin table, a lexicon for each language and a character four-gram model. A character four-gram is a sequence of four characters. The stage also distinguishes varieties written in Hebrew script and recognizes Hebrew or Aramaic in scholarly transliteration. Scripts outside its supported cases are reported as other.

Extending Latin-script identification to another language requires both a lexicon and a Lang code. langseg latin-lexicon builds a lexicon from an open Universal Dependencies training split. The presence of pt-x-br as the manual’s edition code gives no basis for expecting tools/langseg to return that code for arbitrary Portuguese text. The model lookup described below applies when a span is assigned that language. The tag on a span conveys the identification stage’s decision and leaves the grammatical analysis to level 2.

The pt-x-br model path and Parse=None output

Level 2 of tools/mova-parse looks for the model at <code>.bin, using the span’s language code in both positions. For pt-x-br, that convention gives pt-x-br.bin. The Brazilian Portuguese model is absent.

When an assigned language has no model file, tools/mova-parse reports the missing model in the # parse comment. The token rows for the affected span carry the following values in the analysis fields. This is the missing-model output for those rows.

CoNLL-U fieldValueInformation left unavailable
LEMMA_Dictionary form
UPOS_Universal part of speech
XPOS_Language-specific part of speech
FEATS_Morphological features
HEAD_Syntactic head
DEPREL_Dependency relation to the head
MISCParse=NoneExplicit indication that the span received no parse

Parse=None records the absence of a model-based analysis for the span. An underscore in FEATS under this condition supplies no evidence about which features a word has. Likewise, an underscore in HEAD leaves a word’s attachment unknown, including whether it would be the root. For mixed-language input, the lookup applies separately to each identified span. The missing model for one language leaves open the possibility of parsing another span whose language has a model.

Treebank availability and open UD training data

A treebank contains sentences with reference annotations. For dependency parsing, its annotations specify which word governs each dependent and what relation holds between them. The train split supplies examples for learning these annotations. The development split, or dev split, supplies separate examples for evaluating the resulting predictions.

Portuguese has open training data in Universal Dependencies. The published Portuguese UD work describes the conversion of the Bosque treebank, part of Floresta Sintá(c)tica, to UD. Bosque contains news text from Brazil and Portugal. The data therefore have both a variety dimension and a genre dimension. A measurement on a mixed Portuguese split describes performance on that split. A measurement intended to describe Brazilian Portuguese specifically needs an evaluation set whose Brazilian provenance is established. News text also establishes performance only for the material evaluated. (Rademaker et al. 2017, pp. 197–206)

An open treebank and a treebank held by Mova are different resources. Mova currently holds no annotated pt-x-br corpus, so it has no local treebank baseline for the Brazilian edition. The published Portuguese resource establishes the availability of UD annotations outside Mova. It supplies no Mova model or Mova measurement for pt-x-br.

The en training and evaluation baseline

Mova’s parser is the en crate. The baseline specified in What every language gets is the same for every language. The UD training split goes through en xpos-fill before en train trains a tagger and dependency parser. en parse-eval then measures the trained parser against the development split. English and French have models named en.bin and fr.bin, respectively. Brazilian Portuguese has no measured baseline.

MeasureFull nameWhat a correct attachment requires
UASUnlabeled attachment scoreThe predicted syntactic head matches the reference head.
LASLabeled attachment scoreBoth the predicted head and the predicted dependency relation match the reference.

Both measures use the same reference distinction between the governor of a dependent and the label on that dependency. Consider the following illustration of what they measure.

FormGlossTranslation
A pesquisadora revisou o texto.DEF.F.SG researcher.F.SG revise.PRET.3SG DEF.M.SG text.M.SGThe researcher revised the text.

(constructed)

In a reference analysis where texto attaches to revisou as obj, predicting the same head with the label obl satisfies the unlabeled criterion for that word. It fails the labeled criterion. Predicting pesquisadora as the head fails both criteria, even if the predicted relation is obj. This example illustrates the scoring distinction. It supplies no measured result or parser output.

The attachment measures concern the dependency tree. Tagging and lemmatization involve separate predictions, so a value for either attachment score would leave the quality of those predictions undetermined. For Brazilian Portuguese, the absence of a baseline leaves both attachment scores unreported.

Coverage gaps for tagging, lemmatization and parsing

Language segmentation identifies spans for routing. Brazilian Portuguese word tokenization is outside the current coverage. The missing-model fields describe token rows produced for an input span and give no evidence that Brazilian Portuguese word boundaries have been analyzed. Word segmentation is also part of the annotation design of a UD treebank. For Portuguese, the conversion of existing annotations to UD involves decisions about the units to which the grammatical analysis applies. (Rademaker et al. 2017, pp. 197–206)

Tagging would supply a universal part of speech in UPOS and a language-specific tag in XPOS. Morphological annotation would supply feature values in FEATS. Lemmatization would supply a dictionary form in LEMMA. The dependency parser would identify the head in HEAD and the relation in DEPREL. On Brazilian Portuguese spans handled by the missing-model branch, all six fields are empty. Word forms in those rows therefore give the reader only the input forms and no grammatical predictions to inspect.

For instance, in the constructed example above, revisou is an inflected form of revisar ‘to revise’. A lemma would record revisar, a part-of-speech tag would identify the word as a verb, and morphological features could record the distinctions glossed as PRET.3SG, the third-person singular preterite. A dependency analysis would connect the verb to the other words in the clause. Each of those facts requires its own annotation. The form revisou in a row carrying Parse=None supplies none of those annotations.

Input requirements for frames and pragmatics

Mova’s frame, pragmatic and world processing reads English dependency trees. At that interface, the input is a tree that provides syntactic relations. Language labels and token rows with empty HEAD and DEPREL fields provide no such input. For Brazilian Portuguese, the current missing-model output consequently provides no tree to prag or world.

Parsing is a prerequisite for giving these components syntactic input in another language. The current input support described for the components is English. A future Brazilian Portuguese attachment score would evaluate the dependency parser against a reference treebank. It would leave frame recognition and pragmatic interpretation unevaluated.

Squid claims and implementation status

Squid reads the grammar manual and turns each grammatical point into a claim. Formalizable claims include rules, closed lists and statistics. These claims wait in Squid’s queue for a place in Mova’s code. A queued claim records a point that can be formalized. Implementation requires code that carries it out.

A description of a word boundary in the manual is a claim about the language. Applying it to running text requires a tokenizer. Likewise, a table of forms can describe how those forms are distributed, while tagging has to assign an analysis to each form in context. Treebank annotations provide reference analyses on which a parser can train and against which it can be evaluated. The manual, queue and treebank thus supply different kinds of information about coverage.

The rules in the Brazilian Portuguese manual are still unimplemented. The first points for implementation are those needed by a tokenizer, a tagger and a UD treebank baseline. The shared multilingual routing and missing-model output are already present. They account for the current output when a span is assigned pt-x-br.

How Mova handles Brazilian Portuguese today

tools/langseg assigns a language to each sentence and span at level 1 of tools/mova-parse. It distinguishes English and French in Latin script using its Latin table, language lexicons and character four-gram model. It also distinguishes Hebrew-script varieties and handles Hebrew or Aramaic in scholarly transliteration. Other scripts are reported as other. An additional Latin-script language requires a lexicon and a Lang code. The langseg latin-lexicon command uses an open UD train split to build the lexicon. Span identification is available only where tools/langseg knows the script or lexicon.

At level 2, tools/mova-parse uses the span’s language to look up its model. There is no model for pt-x-br. For a span assigned that code, the output reports the missing model in the # parse comment, sets LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL to _, and records Parse=None in MISC. Brazilian Portuguese currently has no Mova tokenization, tagging, lemmatization or parsing.

Mova holds no annotated Brazilian Portuguese treebank and has measured no treebank baseline for the edition. The common baseline in What every language gets uses en xpos-fill before en train trains the tagger and tree parser on the UD training split. en parse-eval measures UAS and LAS on the development split. The available models are English en.bin and French fr.bin.

Mova’s frames, pragmatics and world processing read English trees. In the absence of a Brazilian Portuguese parse, prag and world have no tree to read for that language. Squid converts grammatical points in the manual into claims and queues the formalizable rules, closed lists and statistics. The Brazilian Portuguese rules remain unimplemented. The first points needed are those for tokenization, tagging and a UD treebank baseline.

Sources for this chapter

This page in Markdown https://md.mova.elamur.ai/free/en/docs/languages/pt/pt-x-br/39-mova-tools/