Package: pysle
pysleQuestions?  Comments?  Feedback?Pronounced like 'p' + 'isle'.An interface to a pronunciation dictionary with stress markings
(ISLEX - the international speech lexicon),
along with some tools for working with comparing and aligning
pronunciations (e.g. a list of phones someone said versus a standard or
canonical dictionary pronunciation).Table of contentsDocumentationTutorialsVersion HistoryRequirementsISLE DictionaryInstallationUpgradingUsageCommon Use CasesCiting psyleAcknowledgementsDocumentationAutomatically generated pdocs can be found here:http://timmahrt.github.io/pysle/TutorialsThere are tutorials available for learning how to use Pysle.  These
are in the form of IPython Notebooks which can be found in the /tutorials/
folder distributed with Pysle.You can view them online using the external website Jupyter:Tutorial 1: Introduction to PysleTutorial 2: PronunciationtoolsVersion HistoryPysle uses semantic versioning (Major.Minor.Patch)Please viewCHANGELOG.mdfor version history.RequirementsThe following python modules are required.  They should be installed automatically but you can
install them manually if you have any problems.typing-extensionspraatIOPython 3.7.*or aboveClick here to visit travis-ci and see the specific versions of python that pysle is currently tested underIf you are usingPython 2.xorPython < 3.7, you can usePysle 3.x.ISLE Dictionarypysle requires the ISLEdict pronunciation dictionary
(copyright Mark Hasegawa-Johnson, licensed under the MIT open source license).
This is bundled with psyle.  However, you may want to use a subset of the pronunciations
or you may want to add your own pronunciations.In that case, please get the original file.ISLEX github pageDirect link to the ISLEX file used in this project(ISLEdict.txt)Seeexamples/isletool_examples.pyfor an example of how to load a custom ISLEdict file.InstallationPysle is on pypi and can be installed or upgraded from the command-line shell with pip like sopython -m pip install pysle --upgradeOtherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and typepython setup.py installIf python is not in your path, you'll need to enter the full path e.g.C:\Python36\python.exe setup.py installUpgradingPlease viewUPGRADING.mdfor detailed information about how to upgrade from earlier versions.UsageHere is a typical usagefrompysleimportisletoolisle=isletool.Isle()print(isle.lookup('catatonic')[0].toList())# Get the first entry's pronunciation# >> [[['k', 'ˌæ'], ['ɾ', 'ə'], ['t', 'ˈɑ'], ['n', 'ɪ', 'k']]]and anotherfrompysleimportisletoolfrompysleimportpronunciationtoolsisle=isletool.Isle()searchWord='another'phoneList=['n','ʌ','ð','ɚ']returnList=pronunciationtools.findBestSyllabification(isle,searchWord,phoneList)syllableList=returnList[2]print(syllableList)# >> [["''"], ['n', 'ʌ'], ['ð', 'ɚ']]Please see \examples for example usageCommon Use CasesWhat can you do with this library?look up the list of phones and syllables for canonical pronunciations
of a wordisletool.LexicalTool('ISLEdict.txt').lookup('cat')map an actual pronunciation to a dictionary pronunciation (can be used
to automatically find speech errors)pronunciationtools.findClosestEntryForPhones(isleDict,'cat',['k','æ',])automatically syllabify a praat textgrid (seepraatIO)
containing words and phones (e.g. force-aligned text)pysle.syllabifyTextgrid(isleDict,praatioTextgrid,"words","phones")Citing pyslePysle is general purpose coding and doesn't need to be cited
(you should cite theISLEX projectinstead) but if you would like to, it can be cited like so:Tim Mahrt. Pysle.https://github.com/timmahrt/pysle, 2016.AcknowledgementsDevelopment of Pysle was possible thanks to NSF grantIIS 07-03624to Jennifer Cole and Mark Hasegawa-Johnson, NSF grantBCS 12-51343to Jennifer Cole, José Hualde, and Caroline Smith, and
to the A*MIDEX project (n°ANR-11-IDEX-0001-02) to James Sneed German
funded by the Investissements d'Avenir French Government program, managed
by the French National Research Agency (ANR).