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

add dialect filter #5

Closed
MiniXC opened this issue Sep 2, 2022 · 1 comment
Closed

add dialect filter #5

MiniXC opened this issue Sep 2, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MiniXC
Copy link
Owner

MiniXC commented Sep 2, 2022

As pointed out in #4, some languages are made up of a group of specific dialects in phoible.
We need to figure out how to communicate this best and have to add an option to filter by dialect to phones.

I think it might be best to go with something like this.

from phones import PhoneCollection
pc = PhoneCollection()
pc.langs("ast")
>>> ValueError: Need to select a dialect for "ast". Dialects can be listed using the list_dialects flag
pc.langs("ast", list_dialects=True)
>>> ["Asturian (Western)", "Asturian (North-Eastern)"
pc.langs("ast", "Asturian (Western)")

It would be nice to allow something like pc.langs("ast", "western"), which could be achieved by just checking if the dialect string only occurs in one of the dialect options.

@MiniXC
Copy link
Owner Author

MiniXC commented Sep 7, 2022

implemented in 0.0.3

@MiniXC MiniXC closed this as completed Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant