[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

This is an old revision of the document!


Table of Contents

Plánujeme nové API pro (nový) Treex.
Mělo by jít implementovat ve více jazycích, sami bychom chtěli implementovat asi Perl, Python, Java, C++.
Implementační poznámky jsou zde api-implementation

ref attributes:
scalar: a/lex.rf, src/tnode
list: a/aux.rf, , coref/*, align/*

Node

Primary methods

get_attr
set_attr
get_bundle → bundle
remove
get_referencing_nodes
create_child
get_parent → parent
set_parent
get_children

Word-order methods

precedes($another_node)
get_next_node → next_node()
get_prev_node → prev_node()
shift_after_node($reference_node, {without_children⇒1})
shift_after_subtree($reference_node, {without_children⇒1})
shift_before_node($reference_node, {without_children⇒1})
shift_before_subtree($reference_node, {without_children⇒1})
is_nonprojective($reference_node, {without_children⇒1})

New methods

sentence – vrátí string věty, smí se volat pouze na technickém kořenu
set_sentence

Derived methods

language
selector
get_document
get_root
is_root
is_leaf
get_descendants → descendants
get_siblings → siblings
get_left_neighbor → prev_sibling
get_right_neighbor → next_sibling
is_descendant_of
get_depth → depth
get_address → address

NEzachovat

[sg]et_deref_attr – budeme ukládat rovnou reference na uzel, nikoli ID
get_zone – zony zrusime
remove_reference – interní pro mazání uzlů
fix_pml_type
get_pml_type_name
get_layer
dominates
generate_new_id
following
get_attrs
add_to_listattr – nepoužívá se

Questionable

to_string
equals

get_aligned_nodes
get_aligned_nodes_by_tree
get_aligned_nodes_of_type
is_aligned_to
delete_aligned_node
add_aligned_node
update_aligned_nodes

Mají children/descendants/siblings vracet pole, či iterable?

Mají children/descendants/siblings být metoda, či property?

Mají children/descendants/siblings vracet setříděné uzly?


[ Back to the navigation ] [ Back to the content ]