Setting up and using fftb

I am trying to learn how to treebank using fftb, but I am missing some basic understanding of what things are.

For example (to start), in the following instruction in the wiki:

Make a fresh profile

mkprof -s src/profile new/profile

What should src/ point to? I see it should be to a “skeleton”, but where does the skeleton come from?

At a guess, using any existing [incr tsdb()] profile with the data (specifically the item file) that you want to work with should work.

1 Like

Yes, maybe that’s right. I got:

(base) Murkin16:diss olzama$ mkprof -s tsdb/apn/ tsdb/gold/apn
9746  bytes	relations
1461  bytes	item
0     bytes	item-set
0     bytes	fold
0     bytes	analysis
0     bytes	phenomenon
0     bytes	parameter
0     bytes	set
0     bytes	item-phenomenon
0     bytes	run
0     bytes	parse
0     bytes	result
0     bytes	rule
0     bytes	output
0     bytes	edge
0     bytes	tree
0     bytes	decision
0     bytes	preference
0     bytes	update
0     bytes	score

Looks like a properly “fresh” profile to me?
(At any rate, I’ve been doing this on my mac, and fftb refused to start there. I will try again on ubuntu…)

That looks right for a fresh profile. Maybe fftb won’t open unless it’s pointed at a processed profile though?

So, I processed it according to the instructions:

(base) Murkin16:diss olzama$ art -f -a 'ace --disable-generalization -g grammars/held-out/apn/ace/apn.dat -O' tsdb/gold/apn/
reading results for                1	0 results
reading results for                2	0 results
reading results for                3	0 results
reading results for                4	0 results
reading results for                5	0 results
reading results for                6	0 results
reading results for                7	0 results
reading results for                8	0 results
reading results for                9	0 results
reading results for               10	0 results
reading results for               11	0 results
reading results for               12	0 results
reading results for               13	0 results
reading results for               14	0 results
reading results for               15	0 results
reading results for               16	0 results
reading results for               17	0 results
reading results for               18	0 results
reading results for               19	0 results
(base) Murkin16:diss olzama$ fftb -g grammars/held-out/apn/ace/apn.dat --browser --webdir ~/Tools/delphin/acetools-x86-0.9.31/assets/ tsdb/gold/apn/
-bash: fftb: command not found
(base) Murkin16:diss olzama$ ~/Tools/delphin/acetools-x86-0.9.31/fftb -g grammars/held-out/apn/ace/apn.dat --browser --webdir ~/Tools/delphin/acetools-x86-0.9.31/assets/ tsdb/gold/apn/
-bash: /Users/olzama/Tools/delphin/acetools-x86-0.9.31/fftb: cannot execute binary file

I am not sure that 0 results is correct? But in any case, ``cannot open a binary file’’ seems unrelated; more like it is a linux binary.

0 results is suspicious, but it does seem to be independent of fftb not being a readable binary file.

Yes, I got further on ubuntu:

And perhaps those “0 results” above (which I also got when processing with art on ubuntu) are ok? Because when I click on the items, I do get:

I can click on “Show MRS” and see the MRS, yay.

But what needs to happen next? When I clicked on “accept”, it moved me to the next item, but I am not sure the information about accepting the parse went anywhere? If I click on the item again, I have the same options as before accepting. How do I save my work?..

In particular, what does the “/2 annotated” means? There is only one parse here…

Furthermore, what do I do in general? With that sentence which only had one parse, it was showing to me the tree and the entire span was underlined green. So suppose I was able to accept or reject that one (even though I am not sure).

But the next sentence shows me this:

Screen Shot 2021-02-05 at 1.30.14 PM

Only the first word in the span is underlined green. I can click on the words, but I am not sure how to select the whole span. The instructions say to “middle click and drag” but I don’t even have middle click! I am on a mac. Is there another way?

Plus, I just don’t understand what it is showing. There should be 8 parses. Indeed it says “8 remaining”, but then what are the purple boxed and what do the numbers of trees mean there?

Those boxes are the discriminants, here shown as chains of rules. But you can get different views by clicking on the dropdown that says “exact unary chain”. If you select one of those, you’re saying: give me all trees that have this property.

This just means “item #2”, looks like.

OK, so…

Suppose I have a sentence (1) which has two parses:

(1) bɔj kaprə̃nrɛ ba
what turtle hear
`What did the turtle hear?’

There’s two parses because I did not specify any case system, so, the grammar can interpret the what as either the subject or the (fronted) wh-object:

Screen Shot 2021-02-05 at 2.02.52 PM

In fftb:

Suppose I want to accept the one with the wh-object reading and, for the sake of this example, let’s say I would like to reject the one with the wh-subject reading.

What is the process?..

I can click on any box and see a tree. I am assuming the 4 boxes correspond to 2 different trees here. Suppose I click on the ex-comp discriminant and I inspect the tree and the MRS, and I accept this one. It then immediately moves me to the next item, and if I try to get back to the item I want, it shows me the accepted tree:

If I click on the [x] at the right edge of the purple box which says “1 new manual”, I can see the disciminants again, but it then again starts saying “2 remaining”, so, it removed the annotation?

What am I supposed to do really with each of the items, in terms of accepting and rejecting different parses?

Narrow it down to the one that you want and click “accept”. If there are no good ones, click “reject”. When you go back to the overview screen (and reload) you should see green for accepted and red for rejected.

OK. And what if I want to accept two? Is that possible? Suppose both wh-subject and wh-object reading are good in the above example.

I’m not sure, because I haven’t used fftb with that goal before. Does the accept button appear clickable when there is still more than one tree active?

It appears not. So maybe that is not the intended use.

And so when I am done, what do I do?.. Just exit, and things are supposed to get saved?..

I’m fairly sure things are saved as you go. You can take a look at the underlying profile — there should be changes evident in some of the files there.

1 Like

I hope so :slight_smile:

Screen Shot 2021-02-05 at 4.14.41 PM

Not sure what the above means! But the 15h times below look reassuring:

It looks like you have already worked everything out hours ago, but to answer a few loose ends from this discussion:

  • When setting up a profile, the source can be any profile containing the correct items. You can also input a text file with one item per line using -i instead of -s, and you can also use methods other than the bundled mkprof tool to create the profile (e.g. [incr tsdb()] and pydelphin both have facilities for this).
  • 0 results according to ART while parsing a profile for FFTB is the expected result and not an error
  • The fftb binary in the acetools-x86-0.9.31 distribution referenced above is for Linux, not OSX; indeed there is no OSX binary release of FFTB at the moment, although it is possible to compile it under OSX and run it.
  • FFTB does not support accepting more than one reading as preferred, although there are some reasons to wish it could.
  • Work is saved to disk whenever you press ‘accept’ or ‘reject’.
1 Like

After many tentatives I was not able to compile FFTB under OS X. I am now running Big Sur, maybe I should try once more. But so far, I am using Docker (