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

Refactor the representation of a word inside Studio #123

Open
joanise opened this issue Oct 24, 2022 · 0 comments
Open

Refactor the representation of a word inside Studio #123

joanise opened this issue Oct 24, 2022 · 0 comments

Comments

@joanise
Copy link
Member

joanise commented Oct 24, 2022

Currently, in readalongs/align.py we use dicts to store words, typically with a start, end and then id or text. This is confusing and difficult to use and document correctly. See discussion starting with "Orthogonal to this PR" in #119

Implementation to consider: reimplement a Word class using @dataclass and have the .text attribute calculated (and cached) on use, so that we just have one Word object type with the different query attributes we need, thus making it at lot more intuitive to both document and use.

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

1 participant