Comments (4)
For now I pushed a hotfix with values_with_allophones
- I will not have enough time to look more into this in the next few weeks. Once I have more time though I'm happy to look into it more. If you want to tackle it, you're welcome to open a pull request.
from phones.
Hi, thanks for pointing this out! As far as I can remember, a quirk with PHOIBLE is that one language can have the same phone several times with different allophones, which messes with other functionality in this library.
For example, for "eng", the output with allophones is this
[a (eng), a (eng), a (eng), aɪ (eng), aɪ (eng), aɪ (eng), aɪ (eng), aɪ (eng), aʊ (eng), aʊ (eng), aʊ (eng), aʊ (eng), aʊ (eng), aː (eng), b (eng), b (eng), b (eng), b (eng), b (eng), b (eng), b (eng), d (eng), d (eng), d (eng), d (eng), d (eng), d (eng), d (eng), d̠ʒ (eng), d̠ʒ (eng), d̠ʒ (eng), d̠ʒ (eng), d̠ʒ (eng), d̠ʒ (eng), d̠ʒ (eng), e (eng), e (eng), ei (eng), eə (eng), eə (eng), eɪ (eng), eɪ (eng), eɪ (eng), eɪ̯ (eng), eː (eng), eː (eng), eː (eng), f (eng), f (eng), f (eng), f (eng), f (eng), f (eng), f (eng), h (eng), h (eng), h (eng), h (eng), h (eng), h (eng), h (eng), i (eng), i (eng), iə (eng), iɛ (eng), iɪ (eng), iː (eng), iː (eng), iː (eng), iː (eng), iː (eng), j (eng), j (eng), j (eng), j (eng), j (eng), j (eng), j (eng), k (eng), k (eng), kx (eng), kʰ (eng), kʰ (eng), kʰ (eng), kʰ (eng), l (eng), l (eng), l (eng), l (eng), l (eng), l (eng), l (eng), m (eng), m (eng), m (eng), m (eng), m (eng), m (eng), m (eng), n (eng), n (eng), n (eng), n (eng), n (eng), n (eng), n (eng), oe (eng), oʊ (eng), oʊ (eng), oː (eng), oː (eng), p (eng), pʰ (eng), pʰ (eng), pʰ (eng), pʰ (eng), pʰ (eng), pʰ (eng), r (eng), s (eng), s (eng), s (eng), s (eng), s (eng), s (eng), s (eng), t (eng), ts (eng), tʰ (eng), tʰ (eng), tʰ (eng), tʰ (eng), tʰ (eng), t̠ʃ (eng), t̠ʃ (eng), t̠ʃ (eng), t̠ʃ (eng), t̠ʃ (eng), t̠ʃ (eng), t̠ʃ (eng), u (eng), uː (eng), uː (eng), uː (eng), v (eng), v (eng), v (eng), v (eng), v (eng), v (eng), v (eng), w (eng), w (eng), w (eng), w (eng), w (eng), w (eng), w (eng), z (eng), z (eng), z (eng), z (eng), z (eng), z (eng), z (eng), æ (eng), æ (eng), æ (eng), æe (eng), æo (eng), ð (eng), ð (eng), ð (eng), ð (eng), ð (eng), ð (eng), ð (eng), øː (eng), ŋ (eng), ŋ (eng), ŋ (eng), ŋ (eng), ŋ (eng), ŋ (eng), ŋ (eng), ɐ (eng), ɐʉ (eng), ɐː (eng), ɑ (eng), ɑ (eng), ɑe (eng), ɑː (eng), ɑː (eng), ɑː (eng), ɒ (eng), ɒ (eng), ɒ (eng), ɒ (eng), ɒ (eng), ɒɯ (eng), ɒː (eng), ɔ (eng), ɔɪ (eng), ɔɪ (eng), ɔɪ (eng), ɔɪ (eng), ɔɪ (eng), ɔː (eng), ɔː (eng), ɔː (eng), ɘ (eng), ə (eng), ə (eng), ə (eng), ə (eng), ə (eng), əʊ (eng), ɚ (eng), ɚː (eng), ɛ (eng), ɛ (eng), ɛ (eng), ɛ (eng), ɛ (eng), ɛ (eng), ɛʉ (eng), ɛʉ (eng), ɛː (eng), ɜː (eng), ɡ (eng), ɡ (eng), ɡ (eng), ɡ (eng), ɡ (eng), ɡ (eng), ɡ (eng), ɪ (eng), ɪ (eng), ɪ (eng), ɪ (eng), ɪ (eng), ɪ (eng), ɪə (eng), ɵː (eng), ɹ (eng), ɹ (eng), ɹ (eng), ɹ (eng), ɹ (eng), ɹ (eng), ʃ (eng), ʃ (eng), ʃ (eng), ʃ (eng), ʃ (eng), ʃ (eng), ʃ (eng), ʉə (eng), ʉː (eng), ʉː (eng), ʉː (eng), ʊ (eng), ʊ (eng), ʊ (eng), ʊ (eng), ʊ (eng), ʊ (eng), ʊ (eng), ʊə (eng), ʌ (eng), ʌ (eng), ʌ (eng), ʒ (eng), ʒ (eng), ʒ (eng), ʒ (eng), ʒ (eng), ʒ (eng), ʒ (eng), θ (eng), θ (eng), θ (eng), θ (eng), θ (eng), θ (eng), θ (eng)]
While it might be a bit messy, do you think .values_with_allophones
would be a good solution for this?
Otherwise I might turn .values
into a function with a flag allophones
which defaults to true (but can be turned off for internal library functionality.
I'm leaning towards the first, since most users probably don't expect the same phone to appear several times for a given language.
Merging all the allophone lists would be another possibility, but this obfuscates the original data and could lead to unexpected results - in truth the different lists are just compiled by different linguists (I think).
from phones.
Also thanks for pointing out the warning, this will be fixed for 0.0.5 (see #11)
from phones.
Hm, I see. It is probably due to merging multiple dialects into a language, since each dialect could have different allophones for the same given phoneme... Another solution could be merging all the allophones into a single phone. These could be separated if the load_dialects
flag is True. Do you see it more feasible?
from phones.
Related Issues (14)
- some tokens not recognized as equal in plot_collection HOT 1
- ɶ not found HOT 1
- Some languages not found HOT 3
- add dialect filter HOT 1
- TypeError: normalize() argument 2 must be str, not float HOT 1
- add SAMPA conversion
- Attribute `dialect_list` returns `TypeError` HOT 1
- remove allophone column before grouping to avoid pandas warning
- add docs for values_with_allophones
- A problem with usage HOT 3
- basic tests
- `PhoneCollection.values` method fails HOT 2
- fix documentation generation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phones.