filelist_filter icon

Documentation of filelist_filter TrEd extension

(Create a file-list by filtering text file columns)


This extensions adds a function to TrEd allowing the user to create a file list by filtering a given input text file (e.g. a PML-TQ query result) that consists of one or more TAB-separated columns the last of which is a file name, URL, or a node address. The filtering is then based on the values in the other columns.

A typical use case is when you have a result of some query over a treebank and you want to view only parts of the resulting set that match certain constraints.

For example, consider the following PML-TQ query (over PDT 2.0):

t-node $V := [ gram/sempos='v', echild t-node $N := [ gram/sempos ~ '^n' ] ]
>> $V.t_lemma, $N.functor, address($N) sort by $1, $2

The query selects verbs effectively governing a noun and produces a text file with three columns: the verb's lemma, the noun's functor and an address of the noun (file name followed by a tree and node number).

The user can now use this extension to create a file list which lists the locations of nouns with functor CPHR or DPHR governed by a verb with t-lemma být (to be).


filelist_filter icon
  1. Create an input file with one or more TAB-separated columns per line, the last of which is a file name, URL, or a node address (e.g. using a PML-TQ query similar to that above and saving the result to a file).

  2. Press F10 or select Macros->TredMacro->* File-list Filter from menu

  3. Select the input file

  4. If the last column of the input file contains relative file names, select a base directory.

  5. Create column filters. You can filter by equality or regular expression on a column value. You can use negative column numbers to count columns from the right.

  6. Confirm to create the filelist. The filelist is opened immediately and available in the Session menu for later use. It can be deleted using the File->File List dialog.