Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conllu-insert-token-line command #38

Open
arademaker opened this issue May 1, 2020 · 1 comment
Open

conllu-insert-token-line command #38

arademaker opened this issue May 1, 2020 · 1 comment

Comments

@arademaker
Copy link

arademaker commented May 1, 2020

This could remunerate the tokens (and adjust the heads) and add a token line with a number already filled?

We also need commands to

  1. new multi-word token
  2. new empty nodes
@odanoburu odanoburu changed the title C-c C-l conllu-insert-token-line command May 1, 2020
@odanoburu
Copy link
Owner

This could remunerate the tokens (and adjust the heads)

I thought of doing this at the time of implementation, but:

  • it's more complex
  • sometimes you want some tokens to have the new token as head, so you'd have to adjust the head adjustment

it might be worth it, though! I'm still trying to balance the mode's complexity with its features. ideally I'd have the mode less complex — it currently reimplements lots of things that are in cl-conllu and other UD libraries — and delegate tasks like this one to these libraries. we can even make it abstract enough so that we can support all of them. for instance there might be a variable conllu-add-token-command that specifies a shell command to be run with the current sentence as input plus an id. when the user calls the conllu-insert-token-line command the command specified by the variable is run with the ID at point as argument + the current sentence, and the output is expected to be a new sentence with a new token added after the ID (and the new sentence might even come with readjusted heads or whatever). this can even be implemented outside the mode with the API I've just exposed, although if it's generally useful it should probably be added to the mode. we should get more UD people using the mode so that we have more feedback and contributions ;P

and add a token line with a number already filled?

if we were to add a new-multi-word-token and new-empty-node commands, then sure! it does not do that so that the token template that is inserted is equally useful for the three kinds of token.

PS: I changed the name of the issue because I think it's better to refer to the command name than to the keybinding (which can be changed by the user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants