Comments (3)
Hi! Thank you for your comment.
If you are converting Mandarin to IPA, I recommend https://nk2028.shn.hk/putonghua-ipa-converter/ though it still does not support raw pinyin.
These converters are actually old enough (I wrote them in 2019), and I am planning on a extensive rewrite on them but I haven't got the time to set about it.
One of the original reason why I didn't include contour tones to the converter is that tone 3 can vary between 21 and 214, let alone the light tone.
from graphemecluster.github.io.
For the time being, please execute the following script in your browser console to convert from accents to contour tones:
`IPA here`
.replace(/([^.]*)\u0301([^.]*)/g, "$1$2˥")
.replace(/([^.]*)\u030C([^.]*)/g, "$1$2˧˥")
.replace(/([^.]*)\u0300([^.]*)/g, "$1$2˨˩˦")
.replace(/([^.]*)\u0302([^.]*)/g, "$1$2˥˩")
from graphemecluster.github.io.
For spreadsheet- or TSV-like data, execute the following in your browser console in https://graphemecluster.github.io/pinyin_to_ipa_converter:
console.log(
`your spreadsheet data here, separate each column with tabs and each row with new lines`
.split("\n")
.map(row => row
.split("\t")
.map(cell => PinyinToIPA(cell)
.replace(/<span>\.<\/span><wbr>/g, ".")
.replace(/([^.]*)\u0301([^.]*)/g, "$1$2˥")
.replace(/([^.]*)\u030C([^.]*)/g, "$1$2˧˥")
.replace(/([^.]*)\u0300([^.]*)/g, "$1$2˨˩˦")
.replace(/([^.]*)\u0302([^.]*)/g, "$1$2˥˩")
)
.join("\t")
)
.join("\n")
)
from graphemecluster.github.io.
Related Issues (1)
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 graphemecluster.github.io.