Tab Completion For Annotation And Wordgraph

Description

The Tab completion for the commands "annotation" and "wordgraph" generates a list of Files in the current directory instead of a list of annotations / wordgraphs. Maybe this has something to do with autoloading.

This is how to reproduce this bug:
cdg verkaufen
annotation <tab><tab>
wordgraph <tab><tab>
Result output:
cdgp> wordgraph
.ICEauthority      .firefox/          .kderc
...

cdgp> annotation 
.ICEauthority      .firefox/          .kderc
...

Comments

renamed topic
-- MichaelDaum on 22 Feb 2005, 11:34:07

This is indeed a result of autoloading. `annotation' (like all commands) falls back to offering file names when it has no alternatives at all. This happens if a grammar stores all of its trees in separate files and none in the primary .cdg file.

It is a very bad idea to enable intelligent completion on annotation names that would be loaded if they were requested. The entire point of autoloading is that you only use it if you have too much stuff to fit into RAM at the same time. Although having a file name in a List is much cheaper than loading an entire annotation, it is still way to expensive to be of any use in realistic corpora. `verkaufen' has only 1894 sentences, but `heise' has 260,000 sentences, TAZ has 5,000,000 sentences, and `stuttgart' would have 30,000,000 sentences. The time needed to even sort these items into the options list, as readline does, is ridiculous.

If you dislike the current behaviour, do not enable programmable completion for autoloadable items. Either change CDG's completion behaviour so that it does not complete at all when there are no items, rather then offer file names. Alternatively, change ccc-Makefile so that it optionally (optionally, mind you!) cat's all annotations into the main file rather than arrange to have them autoloaded. You can then use that option if you create small corpora where it is useful.
-- KilianAFoth on 24 Feb 2005, 12:33:23

Don't shout. It does not improve anybody's mood to fix errors.
-- MichaelDaum on 25 Feb 2005, 11:15:46

The current code deals with performance issues nicely. The loop collecting anno-ids is (a) very lean and (b) interruptable. This bug/wish is fixed for annotations.

Completing wordgraphs ids is a different storry as they are not stored into separate files ... hm.
-- MichaelDaum on 25 Feb 2005, 11:20:30

 

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback