ufal / treex

Treex NLP framework
33 stars 6 forks source link

Fix undef warning in T2A::PT::PrepositionContraction #21

Closed martinpopel closed 8 years ago

martinpopel commented 8 years ago

@joaoantonioverdade or @luismsgomes: This is just a minor issue.

$node->set_form(undef) creates many undef warnings, one of them was in this very block when checking $last_node->form =~ /^[[:alpha:]]+$/

Setting form (or lemma) to an empty string (or undef) is a hack, which may lead to strange problems (though now I am not aware of any). Deleting the node, seems to be a more elegant solution.