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

Automate @mention references #2123

Open
awqk opened this issue Nov 26, 2024 · 2 comments
Open

Automate @mention references #2123

awqk opened this issue Nov 26, 2024 · 2 comments
Labels
discussion Meta: Feature discussions enhancement Request: New feature or improvement

Comments

@awqk
Copy link

awqk commented Nov 26, 2024

I already like the new @mention references, but I'm worried about the extra work required to keep them synchronised with the text in a document. Strike a line of dialogue, and you may need to drop a @mention, or maybe you don't, if the entity/character/... appears somewhere else in the same section or chapter.

My suggestion is to update the mention references automatically:

  • mention references are implicit (@mention does not need to appear in text, but mentions are tracked anyway)
  • tracking is done by a case-insensitive search of the text for the tag name or its alternate names (as part of rebuilding the index)
  • @tag definitions already support a tag name and a display name. This could be extended to define alternate spellings and/or declinations: `@tag Jane | Jane Doe | Jane's | Jane Doe's
  • it's the job of the author to provide alternate names, spellings an declinations in whatever language is used. Usually these words have already been added to the project spelling dictionary.
  • scope of a mention is the enclosing #(#...) title/heading/section. This could propagate to all enclosing headings.
@awqk awqk added the enhancement Request: New feature or improvement label Nov 26, 2024
@vkbo
Copy link
Owner

vkbo commented Nov 26, 2024

This is a pretty big feature, as it fundamentally changes how references are detected. I'm not sure it is wise to automate these things either. You don't need to track all mentions. Only those needed for consistency.

You can simplify the usage by setting the mention tag before the paragraph where the mention occurs. There are no restrictions on where the meta data lines are added. They're associated with the last seen heading in the document, regardless.

@vkbo vkbo added the discussion Meta: Feature discussions label Nov 26, 2024
@vkbo
Copy link
Owner

vkbo commented Dec 27, 2024

I'm going through feature requests, and looking at this one again. A few comments:

  • mention references are implicit (@mention does not need to appear in text, but mentions are tracked anyway)
  • tracking is done by a case-insensitive search of the text for the tag name or its alternate names (as part of rebuilding the index)

This is part is doable, but I wouldn't replace the @mention feature with this, but rather have it as an alternative where the indexer keeps track of where names and places from tags are mentioned in the text.

  • @tag definitions already support a tag name and a display name. This could be extended to define alternate spellings and/or declinations: @tag Jane | Jane Doe | Jane's | Jane Doe's
  • it's the job of the author to provide alternate names, spellings an declinations in whatever language is used. Usually these words have already been added to the project spelling dictionary.

This would break the display name feature though, so this is not a usable solution. Maybe a new tag would do it, but I don't particularly like the idea. The challenge is clear though, since the index needs to be able to pick up possible endings and other grammatical variations of names for multiple languages. This is a challenge. Maybe the project dictionary can help, but there is no mapping to the base form, so it's non-trivial.

Also, this approach seems rather high maintenance to me too. Having to define all forms of the name in advance, and relying on this to be done for them to show up in this overview.

  • scope of a mention is the enclosing #(#...) title/heading/section. This could propagate to all enclosing headings.

I would not want to redesign how data is indexed to headings. Mixing two set of rules is likely going to be confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Meta: Feature discussions enhancement Request: New feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants