<<

NAME

Udapi::Block::Write::TextModeTrees - legible dependency trees

SYNOPSIS

 # print a.conll in a readable format
 treex Read::CoNLLX from=a.conll Write::TreexTXT indent=1 tree_ids=1

DESCRIPTION

Trees written in plain text format format.

For example the following conll file (with tabs instead of spaces)

 1  We         PRP  _ _ _ 2  SBJ
 2  gave       VBD  _ _ _ 0  ROOT
 3  Kennedy    NNP  _ _ _ 2  IOBJ
 4  no         DT   _ _ _ 7  NMOD
 5  very       RB   _ _ _ 6  AMOD
 6  positive   JJ   _ _ _ 7  NMOD
 7  approval   NN   _ _ _ 2  OBJ
 8  in         IN   _ _ _ 2  ADV
 9  the        DT   _ _ _ 10 NMOD
 10 margin     NN   _ _ _ 8  PMOD
 11 of         IN   _ _ _ 10 NMOD
 12 his        PRP$ _ _ _ 13 NMOD
 13 preferment NN   _ _ _ 11 PMOD

will be printed (with indent=1 afuns=1) as

 ─┐
  │ ┌──We(PRP/SBJ)
  └─┤gave(VBD/ROOT)
    ├──Kennedy(NNP/IOBJ)
    │ ┌──no(DT/NMOD)
    │ │ ┌──very(RB/AMOD)
    │ ├─┘positive(JJ/NMOD)
    ├─┘approval(NN/OBJ)
    └─┐in(IN/ADV)
      │ ┌──the(DT/NMOD)
      └─┤margin(NN/PMOD)
        └─┐of(IN/NMOD)
          │ ┌──his(PRP$/NMOD)
          └─┘preferment(NN/PMOD)

PARAMETERS

tree_ids

If set to 1, print tree (root) ID above each tree.

indent

number of characters to indent node depth in the tree for better readability

sents

If set to 1, print the corresponding sentence on one line above each tree.

layer

defaults to `a' (surface dependency trees). If set to `t', the block will print t-trees with functors and formemes instead of a-trees.

AUTHORS

Matyáš Kopp

David Mareček <marecek@ufal.mff.cuni.cz>

Ondřej Dušek <odusek@ufal.mff.cuni.cz>

Martin Popel <popel@ufal.mff.cuni.cz>

COPYRIGHT AND LICENSE

Copyright © 2011-2016 by Institute of Formal and Applied Linguistics, Charles University in Prague

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

<<