Using delphin process --select for only one item

What’s the way to add the “i-id = xx” to the following command, in order to only update a single item in a test suite?

delphin process --full-forest --options="-y --yy-rules" -g ~/delphin/srg/ace/srg.dat --select i-tokens  tsdb/home/updated/mrs/

(I did try to find the answer in the docs!)

Thanks for checking the docs first :slight_smile:

You could not find it because there is no option to process and update specific items while leaving the rest untouched. If the grammar has changed such that it necessitates reprocessing the profile, the assumption is that you’d reprocess the whole profile to ensure that it reflects a state of the grammar and is not reflecting an inconsistent mixture of grammar states. While this assumption may be disempowering in some cases, I think those cases are too rare to warrant a new feature. Furthermore, the profile does not just track the results, but also metadata about the runs, so you would either have an inconsistent franken-profile or you would have to also update the run and parse files to link up with your new results.

As a workaround, the --select option takes a TSQL query which you can use to select specific i-id values (e.g., --select="i-tokens where i-id=xx"), but this will result in a profile with only the selected items (assuming they yield parses). If you do this in a temporary profile, you can copy the relevant lines from result (and run and parse if you value consistency; see above) into the original profile, replacing those that existed for the selected i-id items.

And if you don’t like the manual copying steps in the previous paragraph, you can automate it using the Python API instead of the delphin command, but this is also unconventional usage and would put the API through some awkward contortions to get right.

1 Like

I agree! It’s just that I am doing something really weird right now. Now that you said it, I am surprised myself that I even wanted to do it :). It’s just that I need to copy previous treebanking decisions every time I fix the next issue with updating the profiles (I think). But it’s not that hard.