Open livyreal opened 7 years ago
@livyreal The english corpus uses NUM. I vote for following the en-corpus, but expliciting the decision (and the arguments that support it (the en-corpus)) in our guidelines..
11 ( ( PUNCT -LRB- _ 14 punct _ SpaceAfter=No
12 713 713 NUM CD NumType=Card 14 nummod _ SpaceAfter=No
13 ) ) PUNCT -RRB- _ 14 punct _ _
14 345-9945 345-9945 NUM CD NumType=Card 9 appos _ _
15 Fax fax NOUN NN Number=Sing 2 list _ SpaceAfter=No
16 : : PUNCT : _ 15 punct _ _
17 ( ( PUNCT -LRB- _ 20 punct _ SpaceAfter=No
18 713 713 NUM CD NumType=Card 20 nummod _ SpaceAfter=No
19 ) ) PUNCT -RRB- _ 20 punct _ _
20 646-8420 646-8420 NUM CD NumType=Card 15 appos _ _
great, I vote for following them too. We then agree for keeping NUM
and not symbol.
But check the tokenization.
6 800.713.8600 800.713.8600 NUM CD NumType=Card 0 root _ SpaceAfter=No
6 800/711-8000 800/711-8000 NUM CD NumType=Card 4 appos _ _
13 202.582.1234 202.582.1234 NUM CD NumType=Card 11 appos _ _
14 or or CONJ CC _ 13 cc _ _
15 1.800.233.1234 1.800.233.1234 NUM CD NumType=Card 13 conj _ _
20 1 1 NUM CD NumType=Card 25 compound _ _
21 800 800 NUM CD NumType=Card 25 compound _ _
22 451 451 NUM CD NumType=Card 25 compound _ _
23 0491 0491 NUM CD NumType=Card 25 compound _ _
24 ( ( PUNCT -LRB- _ 25 punct _ SpaceAfter=No
25 0448 0448 NUM CD NumType=Card 19 appos _ SpaceAfter=No
26 ) ) PUNCT -RRB- _ 25 punct _ _
27 Office office NOUN NN Number=Sing 5 parataxis _ _
28 979 979 NUM CD NumType=Card 30 compound _ _
29 238 238 NUM CD NumType=Card 30 compound _ _
30 2102 2102 NUM CD NumType=Card 27 appos _ _
31 Home home NOUN NN Number=Sing 5 list _ _
32 979 979 NUM CD NumType=Card 34 compound _ _
33 548 548 NUM CD NumType=Card 34 compound _ _
34 7034 7034 NUM CD NumType=Card 31 appos
There is no consistency about tokens span. Should we decide for one way to tag or it is a very small issue? I'd prefer to do not split telephone numbers, even if they appear with parentheses, dots or bars.
@livyreal one problem is that we don't seem to have the subtype NumType=Card or Ord or Digits anymore, #79. so all numbers are failing the tests.
the EN corpus tagged them are NumType=Card
. we can add it to all NUM that are telephones, besides I do not agree that this is a good feature NumType. I'd prefer something as NumType=Tel
but it is not pure syntax.
it seems a good solution is keeping the tokenization (that is: break the telephone numbers with parentheses, but do not break telephone numbers with dot or slash:
24 ( ( PUNCT -LRB- _ 25 punct _ SpaceAfter=No
25 0448 0448 NUM CD NumType=Card 19 appos _ SpaceAfter=No
26 ) ) PUNCT -RRB- _ 25 punct _ _
800/711-8000 800/711-8000 NUM CD NumType=Card 4 appos _ _
) and tag all of them as NUM NumType=Card. It could be done automatically.
I also agree that "tagging all of them as NUM and NumType=Card" is the best bet. (not so sure about how the tokenization should go, as I have not looked into it. also not so sure how automatic this can be done, but surely some of it can be automatic, one hopes.)
Então ficamos com NumType=Card,Tel --> é preciso documentar. Quanto à tokenização, o ideal seria ter o número completo em uma linha, incluindo DDD e pontuação. É possível, @arademaker ?
CF558-3
25 os o DET <-sam>|<artd>|ART|M|P|@>N Definite=Def|Gender=Masc|Number=Plur|PronType=Art 26 det _ _
26 telefones telefone NOUN <np-def>|N|M|P|@P< Gender=Masc|Number=Plur 15 nmod _ _
27 ( ( PUNCT PU|@PU _ 28 punct _ _
28 011 011 NUM <card>|NUM|M|P|@N<PRED _ 26 appos _ _
29 ) ) PUNCT PU|@PU _ 28 punct _ _
30 231-5346 231-5346 NUM <first-cjt>|<card>|NUM|M|P|@N< _ 26 nummod _ _
31 e e CONJ <co-postnom>|KC|@CO _ 30 cc _ _
32 288-3514 288-3514 NUM <cjt>|<card>|NUM|M/F|P|@N< _
Nós achamos que o melhor jeito de tokenizar números de telefone é deixando toda a informação em uma única linha: pontuação, dd e número, quando houver. Assim o exemplo acima ficaria:
25 os o DET <-sam>|<artd>|ART|M|P|@>N Definite=Def|Gender=Masc|Number=Plur|PronType=Art 26 det _ _
26 telefones telefone NOUN <np-def>|N|M|P|@P< Gender=Masc|Number=Plur 15 nmod _ _
27 (011) 231-5346 (011) 231-5346 NUM _ _ 26 appos _ _
28 e e CONJ <co-postnom>|KC|@CO _ 27 cc _ _
29 288-3514 288-3514 NUM <cjt>|<card>|NUM|M/F|P|@N< _
É possível fazer, @arademaker ?
Nós também decidimos que vamos ter a feature NumType:Tel
já que números de telefone não são bem números e funcionam sintaticamente como nomes.
isso. E @arademaker , crisgóes era eu, que nao percebi que estava na conta dela.
Ainda prefiro a solução acima (tokenizar telefones em uma linha apenas), mas se não for possível, me parece que a relação adequada agora seria flat
e não mais mwe
.
"A new relation flat is added for semi-fixed multiword expressions for which there is no clear evidence that one of the components is the linguistic head. This covers the originally intended uses of the name and foreign relations but also other cases like title-name combinations and date expressions that do not have a clear endocentric syntactic structure. Subtypes like flat:name and flat:foreign can be used to preserve information in existing treebanks." from: http://universaldependencies.org/v2/summary.html
para tokenizar '(011) 231-5346' como uma coisa só, teriamos que introduzir o underscore para o arquivo permanecer válido. Acho que o melhor é marcar com name:flat
.
se não dá para tokenizar tudo numa linha só, vamos ter o problema de uniformizar as ocorrências:
CF35-7
4 (011) (011) ADP PRP|@P< _ 1 nmod _ MWE=(011)_263-4700
5 263-4700 263-4700 NUM NUM|@A< _ 1 mwe _ _
mas
CF759-5
17 ( ( PUNCT PU|@PU _ 18 punct _ _
18 tel. tel. NOUN <first-cjt>|<np-idf>|N|M|S|@N<PRED Gender=Masc|Number=Sing 16 appos _ _
19 011/253-1588 011/253-1588 NUM <card>|NUM|M|P|@N< _ 18 nummod _ _
20 ) ) PUNCT PU|@PU _ 18 punct _ _
Por mais que o tratamento em inglês não esteja uniforme, me parece claro que as guidelines indicam:
11 ( ( PUNCT -LRB- _ 14 punct _ SpaceAfter=No
12 713 713 NUM CD NumType=Card 14 nummod _ SpaceAfter=No
13 ) ) PUNCT -RRB- _ 14 punct _ _
14 345-9945 345-9945 NUM CD NumType=Card 9 appos _ _
15 Fax fax NOUN NN Number=Sing 2 list _ SpaceAfter=No
16 : : PUNCT : _ 15 punct _ _
17 ( ( PUNCT -LRB- _ 20 punct _ SpaceAfter=No
18 713 713 NUM CD NumType=Card 20 nummod _ SpaceAfter=No
19 ) ) PUNCT -RRB- _ 20 punct _ _
20 646-8420 646-8420 NUM CD NumType=Card 15 appos _ _
Isso é, quebrar os parenteses e marcá-los como PUNCT/punct
.
Isso daria muito trabalho, não @arademaker ? E sinceramente, pouco ganho na informação do corpus, a estrutura dos números de telefone não é relevante e os parenteses aí menos ainda.
@livyreal vamos deixar isso como baixa prioridade? Temos
$ awk '$2 ~ /^[0-9\-\/]{5,}$/ { print $4,$8}' *conllu | sort -n | uniq -c
2 NOUN appos
2 NOUN nmod
1 NOUN nmod:npmod
6 NUM appos
1 NUM ccomp
3 NUM conj
1 NUM dep
6 NUM fixed
14 NUM nmod
13 NUM nummod
1 NUM obj
1 NUM root
1 PROPN appos
1 PROPN flat:name
1 PROPN nmod
54 casos de tokens com wordform sendo 4 ou mais números ou "/" ou "-"
what about times:
% awk '$2 ~ /^[0-9]+h[0-9]+m?$/' *.conllu | head
19 22h30 22h30 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 14 obl _ SpaceAfter=No
11 20h30 20h30 NOUN <np-idf>|N|F|P|@N<PRED Gender=Fem|Number=Plur 1 parataxis _ SpaceAfter=No
24 8h30 8h30 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 3 obl _ _
27 14h30 14h30 NOUN <np-idf>|N|F|P|@N<PRED Gender=Fem|Number=Plur 24 appos _ _
9 16h30 16h30 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 6 obl _ _
18 15h30 15h30 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 15 obl _ SpaceAfter=No
13 17h45 17h45 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 3 obl _ SpaceAfter=No
7 22h10 22h10 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 3 obl _ SpaceAfter=No
3 11h30 11h30 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 21 obl _ _
5 5h25 5h25 NOUN <np-def>|N|F|P|@P< Gender=Fem|Number=Plur 2 obl _ _
(venv) ar@leme documents % awk '$2 ~ /^[0-9]+h[0-9]+m?$/' *.conllu | wc -l
83
Some telephone numbers are tagged as
mwe
(note the wrongPOS
of (011)).Some of them are annotated as
NUM
Following guidelines for
NUM
andSYM
it is not clear to me how we should tag them.