Saravanan666/pypi-org huggingface dataset:
Package: g
$ gPassthrough to your current directories vcs (or reach for it with --cwd)Shortcut / powertool for developers to access current repos' vcs, whether it's
svn, hg, mercurial.$pipinstall--userg$gDevelopmental releasesYou can test the unpublished version of g before its released.pip:$pipinstall--user--upgrade--pregpipx:$pipxinstall--suffix=@nextg--pip-args'\--pre'--forceThen useg@next --help.Credits2021-12-05: Thanks toJohn Shanahan(@_shanahanjrs) for giving g usegDonationsYour donations fund development of new features, testing and support.
Your money will go directly to maintenance and development of the
project. If you are an individual, feel free to give whatever feels
right for the value you get out of the project.See donation options athttps://git-pull.com/support.html.More informationPython support: >= 3.7, pypyVCS supported: git(1), svn(1), hg(1)Source:https://github.com/vcs-python/gDocs:https://g.git-pull.comChangelog:https://g.git-pull.com/history.htmlAPI:https://g.git-pull.com/api.htmlIssues:https://github.com/vcs-python/g/issuesTest Coverage:https://codecov.io/gh/vcs-python/gpypi:https://pypi.python.org/pypi/gOpen Hub:https://www.openhub.net/p/gLicense:MIT.
Package: g09-cps-relocation
CPS relocationWe are Group9 and in the following we'll give you an instruction of how to use our CPS relocation implementation.SetupUse the package managerpipto install the necessary modules.First, clone the repository to your local system. OnPyPiyou can find the pip statement to install all necessary modules within your project automatically.pipinstallg09-cps-relocation==1.0.0Alternatively, you can install the modules one by one.pipinstallparamikopipinstallOwlready2pipinstallFlaskpipinstallflaskwebguipipinstallWerkzeugpipinstallrdflibFor some cases we figured out that a html-library is necessary for running the code. However, this might be optional for you:pipinstallrequestsRelocationIn general, you have to think yourself into two views:CPS point of viewPassenger point of view (the guy who enters the CPS on a certain location)By running the "main.py" in the folder "Implementation" you'll get an overview of the available points of interest. It is now up to you to give the CPS1 and CPS2 a starting position (= input in terminal). This human input is necessary to
a.) get the relocation process running and b.) continue the process when a CPS has dropped of a passenger. Afterwards, each CPS decides individually based on its character where the relocation should be.OntologyEvery decision of the CPS is based on their individual ontology.
You can find the written .owl files in the folder "Ontologies". For just in time access, the ontologies are positioned on the Apache2 server under following links:CPS1-OntologyCPS2-OntologyUsing FlaskBy running the the "app.py" a link in output console will appear. The URL will probably look like the following: "http://127.0.0.1:1337/". When you open this link your web browser will open and you are confronted with our GUI. From here on you act as from the passengers point of view. Just imagine to order a CPS, go to the CPS and let the CPS drive you to your destination. While you are driving to your destination you have enough time to fill out the survey about rating the pickup location which you started previously by running "app.py". Depending on how good or bad your ranking will be, the CPS will choose your pickup location next time again for his relocation.TechTalk: by entering the survey data about a pickup location, the ontologies that form the CPS characters will update. This enables us to give the CPS an intelligent character trait.
Package: g29py
g29pypython driver for logitech g29 wheel/pedalsinstallpipinstallg29pyfromg29pyimportG29g29=G29()g29.reset()# wheel cal# writeg29.set_range(500)g29.set_friction(0.5)#readg29.start_pumping()# threadwhile1:state=g29.get_state()print("steering:",state["steering"])print("brake:",state["brake"])print("accelerator",state["accelerator"])sourcesCommands based on nightmode'slogitech-g29node.js driver.Interface uses libhidapi ctype bindings from apmorton'spyhidapi.supportOnly Logitech G29 Driving Force Racing Wheels & Pedals kit supported on linux in ps3 mode.On linux, remove sudo requirements by adding udev rule.echo'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"'\|sudotee/etc/udev/rules.d/99-hidraw-permissions.rules
sudoudevadmcontrol--reload-rules
Package: g2fl
gavin's function libraryEndorsements"In less than a decade, the AI revolution has swept from research labs to broad industries to every corner of our daily life.  Dive into Deep Learning is an excellent text on deep learning and deserves attention from anyone who wants to learn why deep learning has ignited the AI revolution: the most powerful technology force of our time."— Jensen Huang, Founder and CEO, NVIDIA"This is a timely, fascinating book, providing with not only a comprehensive overview of deep learning principles but also detailed algorithms with hands-on programming code, and moreover, a state-of-the-art introduction to deep learning in computer vision and natural language processing. Dive into this book if you want to dive into deep learning!"— Jiawei Han, Michael Aiken Chair Professor, University of Illinois at Urbana-Champaign"This is a highly welcome addition to the machine learning literature, with a focus on hands-on experience implemented via the integration of Jupyter notebooks. Students of deep learning should find this invaluable to become proficient in this field."— Bernhard Schölkopf, Director, Max Planck Institute for Intelligent Systems"Dive into Deep Learning strikes an excellent balance between hands-on learning and in-depth explanation. I've used it in my deep learning course and recommend it to anyone who wants to develop a thorough and practical understanding of deep learning."— Colin Raffel, Assistant Professor, University of North Carolina, Chapel Hill
Package: g2gtools
g2gtoolscreates custom genomes by incorporating SNPs and indels into reference genome, extracts regions of interest, e.g., exons or transcripts, , and converts coordinates of files (bam, gtf, bed) between two genomes. Unlike other liftover tools, g2gtools does not throw away alignments that land on indel regions. Release Version 0.2 can now create personaldiploidgenomes. The new version still lifts over diploid alignments on personal genome coordinates back to that of reference so we can compare alignments from among samples in a population.Free software: MIT LicenseDocumentation for Release Ver. 0.2.XX:http://churchill-lab.github.io/g2gtools/.Documentation for Release Ver. 0.1.XX:https://g2gtools.readthedocs.org.ReferenceManuscript in preparation (expected in 2018)History0.2.5 (06/06/2018)Fixed error of always generating index file0.2.4 (06/05/2018)Automtically generates file index if not found0.2.3 (06/05/2018)Fixed end of contig tree mapping0.2.2 (06/04/2018)Fixed extract transcripts0.2.1 (05/30/2018)Hotfix to solve gtf parsing problem in python 30.2.0 (05/09/2018)Support for diploid VCFReimplemented to support G2G VCI (Variant Call Information)Support python30.1.31 (02/17/2017)Final release for custom haploid reconstruction0.1.29 (05/17/2016)Fixed parsing issue with GATK-generated VCF files0.1.27 (05/04/2016)Uploaded the package to Anaconda CloudFixed Travis CI fail0.1.23 (02/15/2016)Setup Travis CI for automated building0.1.22 (02/15/2016)Updated documentation0.1.20 (02/03/2016)Released to public with documentation at g2gtools.readthedocs.org0.1.0 (02/09/2015)Started github repository
Package: g2m-api-client
g2m-api-clientis a Python SDK client designed to interface with theAnalyzrplatform, a state-of-the-art machine learning platform developed byG2M Insightsdelivering custom predictive analytics in a single-tenant environment for B2B sales and marketing analysts.RequirementsThe client requires credentials to access theAnalyzrAPI. For more information contact your account representative or reach out to your support team atsupport@analyzr.ai. The client also requires the following dependencies:Python (>=3.7)Scikit-learn (>=1.0)InstallationThe easiest way to installg2m-api-clientis usingpip:pip install g2m-api-clientLast Updated: 8/8/2022
Package: g2nb
g2nbg2nbcombines the accessibility and research narrative capabilities ofJupyterwith
the genomics tools available inGalaxy,GenePattern, and
other popular bioinformatics platforms, adding many features for ease of use by non-programming scientists.InstallationInstalling this meta-package gets you the entire suite of g2nb tools.pip install g2nbFeaturesGenePattern Notebook:gives GenePattern users the
ability to interleave text, graphics, and code with their GenePattern analyses to create "notebooks" that
can be edited, shared, and published.GalaxyLab:Support for Galaxy analyses in Jupyter notebooks.igv-jupyter:An extension for Jupyter which wraps igv.js, the
javascript version of the Integrative Genomics Viewer.jupyter-wysiwyg:A rich test editor for markdown cells.nbtools:A framework for creating user-friendly Jupyter
notebooks that are accessible to both programming and non-programming users.
Package: g2o-python
g2o-pythonThis is a wrapper of the python binding ofg2ousing its branchpymem.How to use it in your codeimportg2o# Your codeMore examplesavailable here.How to installUse the released Pypi version, runningpipinstall-Ug2o-pythonBuild from sourceClone this repository and runpip install -U --user -v .
Package: g2p-fa
g2p_faA Grapheme to Phoneme model using LSTM implemented in pytorchInstallationpip install g2p_faUsage:>>> from g2p_fa import G2P_Fa
>>> g2p = G2P_Fa()
>>> g2p('سلام')
'sælɒːm'
>>> g2p('طلا')
'tʰælɒː'
>>> g2p('تلاش')
'tʰælɒːʃ'TrainingCreate a csv file with Persian text at the first column and IPA in second colmn. for example:ابتکار,ʔebtʰekʰɒːɾTo change the hyperparameters, you can pass them as a dict to the model:>>> hp = {
    'INPUT_DIM' : 41,
    'OUTPUT_DIM' : 33,
    'ENC_EMB_DIM' : 16,
    'DEC_EMB_DIM' : 16,
    'HID_DIM' : 128,
    'N_LAYERS' : 2,
    'ENC_DROPOUT' : 0.5,
    'DEC_DROPOUT' : 0.5
}Then create an instance of 'G2P_Fa' wihout loading checkpoint:>>> from g2p_fa import G2P_Fa
>>> g2p = G2P_Fa(checkpoint=None, hparams=hp)And then train the model with csv file:>>> g2p.train('data.csv',epoch=20)
len train: 18968, len valid: 4743
initial loss: 3.5005286693573
Epoch 1 / 20    Train Loss: 3.264, Valid loss: 2.996
Epoch 2 / 20    Train Loss: 2.937, Valid loss: 2.898
Epoch 3 / 20    Train Loss: 2.851, Valid loss: 2.828
Epoch 4 / 20    Train Loss: 2.768, Valid loss: 2.790
Epoch 5 / 20    Train Loss: 2.664, Valid loss: 2.836
Epoch 6 / 20    Train Loss: 2.579, Valid loss: 2.855
Epoch 7 / 20    Train Loss: 2.573, Valid loss: 2.820
Epoch 8 / 20    Train Loss: 2.510, Valid loss: 2.865
Epoch 9 / 20    Train Loss: 2.491, Valid loss: 2.849
Epoch 10 / 20   Train Loss: 2.417, Valid loss: 2.837
Epoch 11 / 20   Train Loss: 2.421, Valid loss: 2.817
Epoch 12 / 20   Train Loss: 2.370, Valid loss: 2.884
Epoch 13 / 20   Train Loss: 2.350, Valid loss: 2.872
Epoch 14 / 20   Train Loss: 2.318, Valid loss: 2.797
Epoch 15 / 20   Train Loss: 2.317, Valid loss: 2.653
Epoch 16 / 20   Train Loss: 2.316, Valid loss: 2.634
Epoch 17 / 20   Train Loss: 2.292, Valid loss: 2.629
Epoch 18 / 20   Train Loss: 2.215, Valid loss: 2.709
Epoch 19 / 20   Train Loss: 2.208, Valid loss: 2.581
Epoch 20 / 20   Train Loss: 2.182, Valid loss: 2.568Then you can save the model:>>> g2p.save('SAVE_PATH')For using your saved model you have to pass the checkpoint>>> g2p = G2P_Fa(checkpoint='SAVE_PATH',hparams=hp)
Package: g2pg
g2pgg2pg takes a Google Sheet, converts it to a DataFrame, which you can then manipulate as you need to.This DataFrame can then be written to a PostgreSQL database table.This makes use of a.envfile, which after much trial and error I finally got to work with gspread.Can install usingpip install g2pg.To use:import g2pgHow does it workg2pg uses thegspreadpackage to extract data from the Google Sheet.Follow these directions to get the json credentials file that can  be used withgspreadhttps://gspread.readthedocs.io/en/latest/oauth2.html#for-bots-using-service-accountMake sure you share any Gsheets with the email that is specified in your credentials file.The json credentials need to be stored in a.envfile. Don't upload the contents of your .env or json_credentials file to github unless you want everyone to know your secrets.If using this package you need to have a.envfile or enviroment variables set in the following way.DB_USER= 'username'
DB_PW = 'super_secret_password'
DB_URL = 'db_address'
DB_NAME = 'db_name'

SHEET_TYPE= 'service_account'
SHEET_PROJECT_ID= 'api-project-XXX'
SHEET_PRIVATE_KEY_ID= '2cd … ba4'
SHEET_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nNrDyLw … jINQh/9\n-----END PRIVATE KEY-----\n"
SHEET_CLIENT_EMAIL= 'yoursisdifferent@developer.gserviceaccount.com'
SHEET_CLIENT_ID= '1234567890'
SHEET_AUTH_URI= 'https://accounts.google.com/o/oauth2/auth'
SHEET_TOKEN_URI= 'https://oauth2.googleapis.com/token'
SHEET_AUTH_PROVIDER_X509_CERT_URL= 'https://www.googleapis.com/oauth2/v1/certs'
SHEET_CLIENT_X509_CERT_URL= 'https://www.googleapis.com/robot/v1/metadata/bla...bla..bla.iam.gserviceaccount.com'There are 2 methods available:def get_df_from_gsheet(gsheet_name,worksheet_name)This returns a datframe from the specified Google Sheet and worksheet.The worksheet name is optional and will default toSheet1.
The dataframe will have all columns and rows removed, where there is no data, and the column names will be converted to a database friendly format.def df_to_db(df, table_name,schema, index_name)This writes the specifieddfto thetable_namein the DB that is specified in the.envfile.schemais optional and will default topublicin postgres if not specified.index_nameis the index of your df. If not specified, it will default to index (this is used as the primary key in your DB table).
Package: g2p-id-py
g2p ID: Indonesian Grapheme-to-Phoneme ConverterThis library is developed to convert Indonesian (Bahasa Indonesia) graphemes (words) to phonemes in IPA. We followed the methods and designs used in the English equivalent library,g2p.Installationpipinstallg2p_id_pyHow to Usefromg2p_idimportG2ptexts=["Apel itu berwarna merah.","Rahel bersekolah di S M A Jakarta 17.","Mereka sedang bermain bola di lapangan.",]g2p=G2p()fortextintexts:print(g2p(text))>>[['a','p','ə','l'],['i','t','u'],['b','ə','r','w','a','r','n','a'],['m','e','r','a','h'],['.']]>>[['r','a','h','e','l'],['b','ə','r','s','ə','k','o','l','a','h'],['d','i'],['e','s'],['e','m'],['a'],['dʒ','a','k','a','r','t','a'],['t','u','dʒ','u','h'],['b','ə','l','a','s'],['.']]>>[['m','ə','r','e','k','a'],['s','ə','d','a','ŋ'],['b','ə','r','m','a','i','n'],['b','o','l','a'],['d','i'],['l','a','p','a','ŋ','a','n'],['.']]AlgorithmThis is heavily inspired from the Englishg2p.Spells out arabic numbers and some currency symbols, e.g.Rp 200,000 -> dua ratus ribu rupiah. This is borrowed fromCahya's code.Attempts to retrieve the correct pronunciation for homographs based on theirPOS (part-of-speech) tags.Looks up a lexicon (pronunciation dictionary) for non-homographs. This list is originally fromipa-dict, and we later made a modified version.For OOVs, we predict their pronunciations using either aBERT modelor anLSTM model.Phoneme and Grapheme Setsgraphemes=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']phonemes=['a','b','d','e','f','ɡ','h','i','j','k','l','m','n','o','p','r','s','t','u','v','w','z','ŋ','ə','ɲ','tʃ','ʃ','dʒ','x','ʔ']Implementation DetailsYou can find more details on how we handled homographs and out-of-vocabulary prediction on ourdocumentationpage.References@misc{g2pE2019,author={Park, Kyubyong & Kim, Jongseok},title={g2pE},year={2019},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/Kyubyong/g2p}}}@misc{TextProcessor2021,author={Cahya Wirawan},title={Text Processor},year={2021},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/cahya-wirawan/text_processor}}}Contributors
Package: g2pk2
g2pk2g2pk2 is a updated folk ofKyubyong's g2pk, which hasn’t been fixed in many years.It supports Windows, Linux, and macOS based onharmlessman's g2pkBug fixed한국어 어문 규범 제15항 (Korean grammar rules chapter 15)https://github.com/Kyubyong/g2pK/issues/6Bug in rulehttps://github.com/Kyubyong/g2pK/pull/13Requirementspython >= 3.6jamonltkInstallationpip install g2pk2How To Useg2pk2 uses same syntaxes as g2pk.>>> from g2pk2 import G2p
>>> g2p = G2p()
>>> g2p("포상은 열심히 한 아이에게만 주어지기 때문에 포상인 것입니다.")
'포상은 열심히 한 아이에게만 주어지기 때무네 포상인 거심니다.'If you want more information, checkg2pk
Package: g2pk3
g2pk3G2PK's upgrade versionUpdated content제20조항 오류 문제 해결일본어 발음 전사 추가Requirementspython >= 3.6jamog2p_enpyopenjtalkInstallationpip install g2pk3How To Useg2pk3 uses same syntaxes as g2pk.>>>fromg2pk3importG2p>>>g2p=G2p()>>>g2p("こんにちは. hello. 반갑습니다.")콘니치와.헐로.반갑씀니다.Referenceg2pkg2pk2
Package: g2pkk
g2pkkThis is a cross-platform g2p for Korean.g2pkk is a library that madeKyubyong's g2pkwork in Windows.
The reason why g2pk does not work well in Windows is that themecab, the morpheme analyzer used by g2pk, causes build errors in Windows.
g2pkk uses a different morpheme analyzer depending on the operating system.
Windows useseunjeon, which enables mecab to be used in Windows, and other operating systems usepython-mecab-ko, which was previously used in g2pk.Install g2pkk and make sure that a morpheme analyzer exists for the operating system of the system you are using for the first time, and if not, proceed with the installation automatically.Requirementspython >= 3.6jamonltkInstallationpip install g2pkkHow To Useg2pkk uses same syntaxes as g2pk.>>> from g2pkk import G2p
>>> g2p = G2p("포상은 열심히 한 아이에게만 주어지기 때문에 포상인 것입니다.")
>>> g2p("포상으 녈심히 하 나이에게만 주어지기 때무네 포상인 거심니다.")If you want more information, checkg2pk
Package: g2p-kz
Kazakh Language grapheme to phonemeThis g2p convert kazakh language scripts to phonemes.kazakh(arabic) script to phonemekazakh(cyrillic) script to phonemeNumbers to wordInstallationspipinstallg2p-kzUsagerequiresPythonv3+ to run.fromkzphonemeimportPhonemearab_text='ءبىلىم بۇلاعى'cyril_text='білім бұлағы'pho=Phoneme()arab_res=pho(arab_text,'arab')#output:   ['B', 'IH', 'L', 'IH', 'M', ' ', 'B', 'U', 'L', 'A', 'C', 'I']cyril_res=pho(cyril_text,'cyril')#output:   ['B', 'IH', 'L', 'IH', 'M', ' ', 'B', 'U', 'L', 'A', 'C', 'I']TableCyrillicArabicPhonemeNameNormalIsolatedFinalInitialMedial-Arabic Letter High Hamzaٴ0x0674-Arabic Letter Hamzaءﺀ-0x06210xFE80АаArabic Letter Alefا‎ﺍﺎA0x06270xFE8D0xFE8EӘәHamza + Alefءا‎AHArabic Letter High Hamza Alefٵ0x0675БбArabic Letter BehبﺏﺐﺑﺒB0x06280xFE8F0xFE900xFE910xFE92ВвArabic Letter OeۆﯙﯚV0x06C60xFBD90xFBDAГгArabic Letter GafگﮒﮓﮔﮕG0x06AF0xFB920xFB930xFB940xFB95ҒғArabic Letter AinعﻉﻊﻋﻌC0x06390xFEC90xFECA0xFECB0xFECCДдArabic Letter DalدﺩﺪD0x062F0xFEA90xFEAAЕеArabic Letter HehهﻩﻪE0x06470xFEE90xFEEAЖжArabic Letter JeemجﺝﺞﺟﺠJ0x062C0xFE9D0xFE9E0xFE9F0xFEA0ЗзArabic Letter ZainزﺯﺰZ0x06320xFEAF0xFEB0ИиArabic Letter YehيﻱﻲﻳﻴY0x064A0xFEF10xFEF20xFEF30xFEF4КкArabic Letter KafكﻙﻚﻛﻜK0x06430xFED90xFEDA0xFEDB0xFEDCҚқArabic Letter QafقﻕﻖﻗﻘQ0xFED50xFED50xFED60xFED70xFED8ЛлArabic Letter LamلﻝﻞﻟﻠL0x06440xFEDD0xFEDE0xFEDF0xFEE0МмArabic Letter MeemمﻡﻢﻣﻤM0x06450xFEE10xFEE20xFEE30xFEE4НнArabic Letter NoonنﻥﻦﻧﻨN0x06460xFEE50xFEE60xFEE70xFEE8ҢңArabic Letter NgڭﯓﯔﯕﯖNH0x06AD0xFBD30xFBD40xFBD50xFBD6ОоArabic Letter WawوﻭﻮO0x06480xFEED0xFEEEӨөHamza + WawءوOHArabic Letter High Hamza Wawٶ0x0676ПпArabic Letter PehپﭖﭗﭘﭙP0x067E0xFB560xFB570xFB580xFB59РрArabic Letter RehرﺭﺮR0x06310xFEAD0xFEAEСсArabic Letter SeenسﺱﺲﺳﺴS0x06330xFEB10xFEB20xFEB30xFEB4ТтArabic Letter TehتﺕﺖﺗﺘT0x062A0xFE950xFE960xFE970xFE98УуArabic Letter VeۋﯞﯟW0x06CB0xFBDE0xFBDFҰұArabic Letter UۇﯗﯘU0x06C70xFBD70xFBD8ҮүHamza + UءۇUHArabic Letter U with Hamza Aboveٷ0x0677ФфArabic Letter FehفﻑﻒﻓﻔF0x06410xFED10xFED20xFED30xFED4ХхArabic Letter HahحﺡﺢﺣﺤX0x062D0xFEA10xFEA20xFEA30xFEA4ҺһArabic Letter Heh DoachashmeeھﮪﮫﮬﮭXH0x06BE0xFBAA0xFBAB0xFBAC0xFBADЧчArabic Letter TchehچﭺﭻﭼﭽCH0x06860xFB7A0xFB7B0xFB7C0xFB7DШшArabic Letter SheenشﺵﺶﺷﺸSH0x06340xFEB50xFEB60xFEB70xFEB8ЩщSheen + SheenششЫыArabic Letter Alef MaksuraىﻯﻰﯨﯩI0x06490xFEEF0xFEF00xFBE80xFBE9ІіHamza + Alef MaksuraءىIHArabic Letter High Hamza Yehٸ0x0678-Arabic Ligature Lam with Alefﻻﻻﻼ-0xFEFB0xFEFB0xFEFCЭэHehه-ЮюYeh + Veيۋ-ЦцTeh + Seenتس-ЁёYeh + WawيوЯяYeh + Alefيا‎-Ияيا‎-АƏا‎-ЬЕЪЕيە-ИЕВЕВيەۆ-Ъъ-ЬьTodosWrite MORE TestsLicenseMITFree Software, Hell Yeah!
Package: g2pL
g2pLThis is the official repository of our paper G2PL:LEXICON ENHANCED CHINESE POLYPHONE DISAMBIGUATION WITH A NEW
DATASETInstallpip install g2pLRequirementspip install -r requirements.txtDownload点击此处下载模型及词向量等相关文件，将这些文件放入g2pL_files目录中。UsageYou can set the tone style, the default tone style is 2.from G2pL import G2PL

>>> g2p = G2PL()
>>> g2p("请您把这台收音机的音量调低一点。", 0)
['qing', 'nin', 'ba', 'zhe', 'tai', 'shou', 'yin', 'ji', 'de', 'yin', 'liang', 'tiao', 'di', 'yi', 'dian', '。']
>>> g2p("请您把这台收音机的音量调低一点。", 1)
['qǐng', 'nín', 'bǎ', 'zhè', 'tái', 'shōu', 'yīn', 'jī', 'de', 'yīn', 'liàng', 'tiáo', 'dī', 'yī', 'diǎn', '。']
>>> g2p("请您把这台收音机的音量调低一点。", 2)
['qing3', 'nin2', 'ba3', 'zhe4', 'tai2', 'shou1', 'yin1', 'ji1', 'de5', 'yin1', 'liang4', 'tiao2', 'di1', 'yi1', 'dian3', '。']
Package: g2pM
g2pMThis is the official repository of our paperA Neural Grapheme-to-Phoneme Conversion Package for MandarinChinese Based on a New Open Benchmark Dataset(Interspeech 2020).Installpip install g2pMThe CPP DatasetIn data folder, there are [train/dev/test].sent files and [train/dev/test].lb files. In *.sent file, each lines corresponds to one sentence and a special symbol ▁ (U+2581) is added to the left and right of polyphonic character. The pronunciation of the corresponding character is at the same line from *.lb file. For each sentence, there could be several polyphonic characters, but we randomly choose only one polyphonic character to annotate.Requirementspython >= 3.6numpyUsageIf you want to remove all the digits which denote the tones, set tone=False. Default setting is tone=True.If you want to split all the non Chinese characters (e.g. digit), set char_split=True. Default setting is char_split=False.>>> from g2pM import G2pM
>>> model = G2pM()
>>> sentence = "然而，他红了20年以后，他竟退出了大家的视线。"
>>> model(sentence, tone=True, char_split=False)
['ran2', 'er2', '，', 'ta1', 'hong2', 'le5', '20', 'nian2', 'yi3', 'hou4', '，', 'ta1', 'jing4', 'tui4', 'chu1', 'le5', 'da4', 'jia1', 'de5', 'shi4', 'xian4', '。']
>>> model(sentence, tone=False, char_split=False)
['ran', 'er', '，', 'ta', 'hong', 'le', '2', '0', 'nian', 'yi', 'hou', '，', 'ta', 'jing', 'tui', 'chu', 'le', 'da', 'jia', 'de', 'shi', 'xian', '。']
>>> model(sentence, tone=True, char_split=True)
['ran2', 'er2', '，', 'ta1', 'hong2', 'le5', '2', '0', 'nian2', 'yi3', 'hou4', '，', 'ta1', 'jing4', 'tui4', 'chu1', 'le5', 'da4', 'jia1', 'de5', 'shi4', 'xian4', '。']Model SizeLayerSizeEmbedding64LSTM x164Fully-Connected x264Total # of parameters477,228Model size1.7MBPackage size2.1MBEvaluation ResultModelDev.Testg2pC84.8484.45xpinyin(0.5.6)78.7478.56pypinyin(0.36.0)85.4486.13Majority Vote92.1592.08Chinese Bert97.9597.85Ours97.3697.31ReferenceTo cite the code/data/paper, please use this BibTex@article{park2020g2pm,author={Park, Kyubyong and Lee, Seanie},title={A Neural Grapheme-to-Phoneme Conversion Package for MandarinChinese Based on a New Open Benchmark Dataset},journal={Proc. Interspeech 2020},url={https://arxiv.org/abs/2004.03136},year={2020}}