pronunciation-lexicon-specification-yaml
v1.0.1
Published
Convert YAML(YML) to Pronunciation Lexicon Specification(PLS) XML.
Downloads
12
Readme
pronunciation-lexicon-specification-yaml
Convert YAML(YML) to Pronunciation Lexicon Specification(PLS) XML.
Related
Install
Install with npm:
npm install pronunciation-lexicon-specification-yaml
Usage
import { toPLSXML } from "pronunciation-lexicon-specification-yaml";
toPLSXML(yamlContent);
lang: "en-US"
alphabet: "ipa"
lexeme:
- grapheme:
- "colour"
- "color"
phoneme: "kʌlər"
- grapheme: "Roberto"
phoneme: "ɹəˈbɛːɹɾoʊ"
to be
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0" xmlns="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd" alphabet="ipa" xml:lang="en-US">
<lexeme>
<grapheme>colour</grapheme>
<grapheme>color</grapheme>
<phoneme>kʌlər</phoneme>
</lexeme>
<lexeme>
<grapheme>Roberto</grapheme>
<phoneme>ɹəˈbɛːɹɾoʊ</phoneme>
</lexeme>
</lexicon>
Changelog
See Releases page.
Running tests
Install devDependencies and Run npm test
:
npm i -d && npm test
Contributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
License
MIT © azu