Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pronunciation-lexicon-specification-json

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pronunciation-lexicon-specification-json

Builder for Pronunciation Lexicon Specification.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

pronunciation-lexicon-specification-json

Convert JSON to Pronunciation Lexicon Specification(PLS) XML.

  • Human writable JSON to Pronunciation Lexicon Specification (PLS) XML.

PLS spec: Pronunciation Lexicon Specification (PLS) Version 1.0

Install

Install with npm:

npm install pronunciation-lexicon-specification-json

Usage

import {jsonToPLSXML} from "pronunciation-lexicon-specification-json";
jsonToPLSXML({
 "lang": "en-US",
 "alphabet": "ipa",
 "lexeme": [
   {
     "grapheme": [
       "colour",
       "color"
     ],
     "phoneme": "kʌlər"
   },
   {
     "grapheme": "Roberto",
     "phoneme": "ɹəˈbɛːɹɾoʊ"
   }
 ]
})

It output PLS(XML).

<?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.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Keywords

FAQs

Package last updated on 23 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc