CHOROBA at MetaCPAN
Corpus | Treebank | |
---|---|---|
|
|
⊃
Phrase | Dependency | |
---|---|---|
Used in UD.
|
The cat could have chased all the dogs down the street.
Is that Microwave that you gave Dan really expensive?
At least you get to go to Florida in JANUARY.
Tab separated values
# sent_id = Example-2 | |||||||||
# text = Is that Microwave that you gave Dan really expensive? | |||||||||
# ID | FORM | LEMMA | UPOS | XPOS | FEATS | HEAD | DEPREL | DEPS | MISC |
1 | Is | be | AUX | VBZ | Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin | 9 | cop | 9:cop | _ |
2 | that | that | DET | DT | Number=Sing|PronType=Dem | 3 | det | 3:det | _ |
3 | Microwave | microwave | NOUN | NN | Number=Sing | 9 | nsubj | 6:obj|9:nsubj | _ |
4 | that | that | PRON | WDT | PronType=Rel | 6 | obj | 3:ref|6:obj | _ |
5 | you | you | PRON | PRP | Case=Nom|Person=2|PronType=Prs | 6 | nsubj | 6:nsubj | _ |
6 | gave | give | VERB | VBD | Mood=Ind|Number=Sing|Person=2|Tense=Past|VerbForm=Fin | 3 | acl:relcl | 3:acl:relcl | Cxn=rc-that-obj |
7 | Dan | Dan | PROPN | NNP | Number=Sing | 6 | iobj | 6:iobj | _ |
8 | really | really | ADV | RB | _ | 9 | advmod | 9:advmod | _ |
9 | expensive | expensive | ADJ | JJ | Degree=Pos | 0 | root | 0:root | SpaceAfter=No |
10 | ? | ? | PUNCT | . | _ | 9 | punct | 9:punct | _ |
perl -n
or -p
, one can run
btred -N -T -e '
FPosition()
if $this->{deprel} eq "nsubj"
&& $this->parent->{upostag} ne "VERB"
' data/*.conllu | tred -l-
ud.node [ deprel = "nsubj", parent ud.node $p := [ upostag != "VERB" ] ]; >> give $p.upostag >> for $1 give $1, count($1) sort by $2 |
|
TrEd plugins
package Treex::PML::Backend::UD; use warnings; use strict; use Treex::PML::IO qw{ open_backend close_backend }; sub test { my ($filename, $encoding) = @_; my $in = open_backend($filename, 'r', $encoding) or die "$filename: $!"; while (<$in>) { return unless /^#/; return 1 if /^\#\ (?:new(?:doc|par)\s+id |sent_id |text ) (?:\ =)? \ ./x; } }
Вперше за останні півроку працюю з 11-ї і встаю, коли на вулиці вже сонце.
TPRC 2024, Las Vegas | UD in TrEd |