Saravanan666/pypi-org huggingface dataset:
Package: word2number-en
|travis_pic| |codecov_pic|==============
Word to Number (en)This is a Python module to convert number words (eg. twenty one) to numeric digits (21). It works for positive numbers upto the range of 999,999,999,999 (i.e. billions).++++++++++++
Installation
++++++++++++
Please ensure that you haveupdated pipto the latest version before installing word2number_en.You can install the module using Python Package Index using the below command... code-block:: pythonpip install word2number_enMake sure you install all requirements given in requirements.txt.. code-block:: pythonpip install -r requirements.txt+++++
Usage
+++++
First you have to import the module using the below code.
.. code-block:: pythonfrom word2number_en import w2nThen you can use theword_to_nummethod to convert a number-word to numeric digits, as shown below... code-block:: python>>> print w2n.word_to_num("two million three thousand nine hundred and eighty four")
2003984

>>> print(w2n.word_to_num('two point three')) 
2.3

>>> print(w2n.word_to_num('112')) 
112

>>> print(w2n.word_to_num('point one')) 
0.1

>>> print(w2n.word_to_num('one hundred thirty-five')) 
135

>>> print(w2n.word_to_num('million million'))
Error: Redundant number! Please enter a valid number word (eg. two million twenty three thousand and forty nine)
None

>>> print(w2n.word_to_num('blah'))
Error: No valid number words found! Please enter a valid number word (eg. two million twenty three thousand and forty nine)
None+++++++++++
Bugs/Errors
+++++++++++Please ensure that you have updated pip to the latest version before installing word2number.If you find any bugs/errors in the usage of above code, please raise an issue throughGithub <http://github.com/neuri-ai/w2n_en>_. If you don't know how to use Github or raise an issue through it, I suggest that you should learn it. Else, send an email toakshay2626@gmail.comwith a clear example that can reproduce the issue.++++++++++++
Contributors
++++++++++++Ben Batorsky (bpben <https://github.com/bpben>__)Alex (ledovsky <https://github.com/ledovsky>__)Tal Yarkoni (tyarkoni <https://github.com/tyarkoni>__)ButteredGroove (ButteredGroove <https://github.com/ButteredGroove>__)TurqW (TurqW <https://github.com/TurqW>__).. |travis_pic| image::https://travis-ci.org/akshaynagpal/w2n.svg?branch=master:target:https://travis-ci.org/akshaynagpal/w2n.. |codecov_pic| image::https://codecov.io/gh/akshaynagpal/w2n/branch/master/graph/badge.svg:target:https://codecov.io/gh/akshaynagpal/w2n
Package: word2number-es
|travis_pic| |codecov_pic|==============
Word to Number (Es)This is a Python module to convert number words (eg. veintiuno) to numeric digits (21). It works for positive numbers upto the range of 999,999,999,999 (i.e. billions).++++++++++++
Installation
++++++++++++
Please ensure that you haveupdated pipto the latest version before installing word2number_es.You can install the module using Python Package Index using the below command... code-block:: pythonpip install word2number_esMake sure you install all requirements given in requirements.txt.. code-block:: pythonpip install -r requirements.txt+++++
Usage
+++++
First you have to import the module using the below code.
.. code-block:: pythonfrom word2number_es import w2nThen you can use theword_to_nummethod to convert a number-word to numeric digits, as shown below... code-block:: python>>> print(w2n.word_to_num('dos punto tres'))
2.3

>>> print(w2n.word_to_num('112'))
112

>>> print(w2n.word_to_num('punto cinco')) 
0.5

>>> print(w2n.word_to_num('dosmil veintitres')) 
2023

>>> print(w2n.word_to_num('millon millon'))
Error: Redundant number! Please enter a valid number word (eg. two million twenty three thousand and forty nine)
None

>>> print(w2n.word_to_num('blah'))
Error: No valid number words found! Please enter a valid number word (eg. two million twenty three thousand and forty nine)
NoneYou can also use thenumwords_in_sentenceto convert all number words in a sentence to numeric digits, as shown below... code-block:: python>>> print(w2n.numwords_in_sentence("el reloj me costo diez mil pesos"))
el reloj me costo 10000 pesos++++++++++++
Contributors
++++++++++++Ben Batorsky (bpben <https://github.com/bpben>__)Alex (ledovsky <https://github.com/ledovsky>__)Tal Yarkoni (tyarkoni <https://github.com/tyarkoni>__)ButteredGroove (ButteredGroove <https://github.com/ButteredGroove>__)TurqW (TurqW <https://github.com/TurqW>__)
Package: word2num-de
word2num-deENTransforms written numbers in German to numbers.Works for numbers 0-999999DEÃœbersetzt ausgeschriebene Zahlen in (auf Deutsch) in ZahlenUnterstÃ¼tzt Zahlen zwischen 0 und 999999.Implementation based on the following project:https://github.com/IBM/wort-to-numberInstallationPackage can be installed using pip.pipinstallword2num-deUsage exampleImport the main function word_to_number.from word2num_de import word_to_numberGiven a written-out number, the function returns the number as an integer.print(word_to_number("sechshunderteinundzwanzig"))
621Larger numbers are also supported.print(word_to_number("zweiunddreiÃŸigtausendfÃ¼nfhundertachtundvierzig"))
32548None is returned in case the word is not a number.print(word_to_number("bÃ¤ckerei"))
NoneThe function should also be robust to words including numbers in them (e.g.; Viereck, Servieren, Tausendsassa, etc.).print(word_to_number("tausendsassa"))
None
Package: word2tei
word2teiThis file will become your README and also the index of your
documentation.Installpipinstallword2teiHow to useFill me in please! Don’t forget code examples:input_path="data/input.docx"output_path="data/output.xml"template_path="data/template.xml"convert_docx_to_tei(input_path,output_path,template_path)
Package: word2Tex
word2Tex: Citation handling and fixing applicationThe modules included in this package are cite2Tex and fixBibTex which help with
citations when migrating a manuscript into LaTeX.Installationpipinstallword2Texcite2TexThis module can be used as a command-line tool or in python. It goes through a
text file and converts citations into LaTeX format (e.g. Viena et al. 2018 -->
\cite{Viena2018}). If a bibtex bibliography file is provided then citations
will be looked up by author and year and the correct citation key will be used.
Additionally, if a bib is provided, citations not found in the bib will be left
alone and you will be notified which citations are missing from the bib.UsageTo use in the command line:cite2Texpath_to_file.txt-bpath_to_bib.bib-opath_to_output_file.txtthe-band-oflags are optional.To use in python:fromword2Teximportcite2Texasc2tfn='path_to_file.txt'bib_fn='path_to_bib.bib'# optionalsave_file='path_to_save_edited_text.txt'# optional, regardless will always write to a new file# This will allow you to view all citations in the document and see what they will becomewithopen(fn)asf:matches=c2t.find_matches(f.read(),bib=bib_fn)#This creates the dataframe matches which you cna view and check# To convert a filew2t.citations2Tex(fn,bib=bib,save_file=save_file)fixBibTexThis module allows correction of citation ID in bibtex files when exported from applications such as EndNote. Citation IDs will be set to AuthorYear using the first authors last name. If there are duplicates with this method then the article's journal initials will be tacked onto the end or an index number to ensure unique IDs.UsageTo use from command-line:fixBibTexpath_to_bib_file.bib-ooutput_file.bibThe output file is optional. Regardless this will always save to a new file to avoid dataloss.In python:fromword2TeximportfixBibTexasfbtfn='path_to_bib_file.bib'out_fn='out_file_path.bib'# optionalfbt.fix_bibtexDB(fn,save_file=out_fn)
Package: word2vec
word2vecPython interface to Google word2vec.Training is done using the original C code, other functionality is pure Python with numpy.Installationpip install word2vecThe installation requires to compile the original C code:CompilationIn order to compile the original C code agcccompiler is needed.You can override the compilation flags if needed:WORD2VEC_CFLAGS='-march=corei7' pip install word2vecWindows:There is basic some support for this support based on thiswin32 port.UsageExample notebook:word2vecThe default functionality from word2vec is available from the command line:word2vecword2phraseword2vec-distanceword2vec-word-analogyword2vec-compute-accuracyExperimental functionality on doc2vec can be found in this other example:doc2vec
Package: word2vec-wikification-py
wiki_node_disambiguation - - -What’s this ?You can run “Wikification” as easy as possible.According to wikipedia,Wikificationisin computer science, entity linking with Wikipedia as the target knowledge baseYou can get disambiguated result with its score.Please visitGithub
pagealso. If you find any bugs and you report it to github issue, I’m glad.
Any pull-requests are welcomed.RequirementPython3.x (checked under )I recommend to use “Anaconda” distribution.Setuppython setup.py installGet wikipedia entity vector modelGo tothis
pageand
download model file fromhere.
Or rundownload_model.shTo those who uses interface.predict_japanese_wiki_names()You’re supposed to have mysql somewhere.The step until using it.start mysql server somewheredownload latest mysql dump filesinitialize wikipedia database with mysqlTo download wikipedia dump files, execute following commandswget https://dumps.wikimedia.org/jawiki/latest/jawiki-latest-redirect.sql.gz
wget https://dumps.wikimedia.org/jawiki/latest/jawiki-latest-page.sql.gz
gunzip jawiki-latest-redirect.sql.gz
gunzip jawiki-latest-page.sql.gzTo initialize wikipedia database with mysql,% CREATE DATABASE wikipedia;
% mysql -u [user_name] -p[password] wikipedia < jawiki-latest-redirect.sql
% mysql -u [user_name] -p[password] wikipedia < jawiki-latest-page.sqlChange logsversion0.1releasedIt supports only Japanese wikipedia
Package: word2wiz
# Word2WizCommand line tool and web application to convert Word documents to DocumentWizard configurations.### RequirementsFor the command line tool:- python3- pip- spellTo create a server:- vagrantTo use the converter from the command line you can install the necessarydependencies with pip:```pip install -r requirements.txt```To create a server you can run a virtual machine with vagrant (vagrant andvirtualbox are needed):```vagrant upvagrant provision```This will download the OS and install dependencies inside that virtual machine.If you don't want to create a virtual machine, you can also just use the _verylimited_ flask server, runing```python3 server.py```### How to run itTo run the converter form the### How it worksThis tool parses an input docx document, looking for text between the marks `«`and `»`. Then, it generates a Spell file, generating questions based on thosematches. Finally, the spell file is compiled ang an XML is generated with theWizard Configuration.In the case of the web interface, the output will be a zip file containing thewizard configuration XML, the intermediate Spell and a TXT with the linkbetween the questions and the metadatas.### TODO:- [ ] Remove the zip files after the session is closed.- [ ] Handle colisions in the uploaded files. Two files can have the same name.
Package: wordai
WordAiis an online
service for spinning text (synonym substitution)
that creates unique version(s) of existing text.
This package provides a way to easily interact withWordAi API.
Usage requires an API subscription,get it here.Source code @ GitHubInstall within virtualenv$virtualenvfoo$cdfoo$gitclonehttps://github.com/niteoweb/wordai$bin/pipinstallwordai/# running tests:$bin/pipinstallunittest2mock$bin/python-munittestdiscover-swordai/src/wordai/testsBuildout$gitclonehttps://github.com/niteoweb/wordai$virtualenv--no-site-packages./wordai/$cdwordai$bin/pythonbootstrap.py$bin/buildout# running tests and check code for imperfections$./pre-commit-hook.shUsage# from wordai.regular import RegularWordAi as WordAi>>>fromwordai.turingimportTuringWordAiasWordAi>>>wai=WordAi('demo@demo.com','demo')>>>printwai.text_with_spintax(u"Some test text whič is fü.")u"Some {test|evaluation} text whič is fü.\n"Changelog0.1 (2013-03-08)TuringWordAi and RegularWordAi classes.Tests and documentation.
[Matej Cotman]License (3-clause BSD)Copyright (c) 2012, NiteoWeb Ltd.
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.Neither the name of NiteoWeb Ltd. nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL NITEOWEB LTD. BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: word-alignment-visualization
Word Alignment VisualizationOverviewWord Alignment Visualization is a Python package designed to facilitate the visual exploration of word alignments between two sentences. The package provides an interactive widget that displays original and translated sentences with word alignment lines.FeaturesDynamic visualization of word alignments.Hover effects for highlighting word pairs and alignment lines.Easy integration into Jupyter notebooks.Usagefromword_alignment_visualizationimportshow_word_alignments# Example datasrc_tokens=["I","love","coding"]tgt_tokens=["J'aime","coder"]alignment=[[0,0],[1,0],[2,1]]# Display word alignment visualizationshow_word_alignments(src_tokens,tgt_tokens,alignment)Installationpipinstallword-alignment-visualizationContributionsContributions are welcome! If you have ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request.LicenseThis project is licensed under theGNU GPLv3  License.
Package: wordasso
# wordassosmall python package, several word association function based on datamuse API## Installation```pip install wordasso```if it can not install spacy and the model needed automatically, you could fix this by installing it manually```pip install spacypython -m spacy download en_core_web_sm```and then```pip install wordasso```## Usagethese functions are based on datamuse means like API which could be used to query 100 related words of a given word### syn_wordsreturn related words which has 'synonym' in tags list```>>> from wordasso.wordasso import syn_words>>> print(syn_words("author"))# output['writer', 'source', 'generator']```### pho_wordsreturn related words which sound like the key word most, default list size is 10.```>>> from wordasso.wordasso import pho_words>>> print(pho_words("author"))# output['writer', 'actor', 'authorship', 'writers', 'drafter', 'reporter', 'owner', 'songwriter', 'signer', 'source']>>> print(pho_words("author", L=5)# output['writer', 'actor', 'authorship', 'writers', 'drafter']```### ent_wordsreturn Named Entities associated to the related words of the given word.```>>> from wordasso.wordasso import ent_words>>> print(ent_words("author"))# output{French, Judeo, Christian, Islam, trustee, Medina, trustee, Judeo, Mecca, Muhammad}```
Package: wordbook
Wordbook is a Python asynchronous library to query Dict servers. It implements the main parts of DICT protocol (RFC 2229<https://tools.ietf.org/html/rfc2229>).The library consists two classes:DictBase: which implements commands from RFC2229.Wordbook: which exposes more abstract methods to find a definition within dictionaries.Both classes are asynchronous and require Python 3.5+.InstallationTo install from pypi$sudopipinstallwordbookor from source:$sudopythonsetup.pyinstallExamplesGetting information from a server using theDictBaseclass:import asyncio
import wordbook


async def main():
    dictb = wordbook.DictBase()
    await dictb.connect()
    await dictb.client('wordbook/server-status.py')
    info = await dictb.show_server()
    for line in info:
        print(line)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
    loop.close()Output:dictd 1.12.1/rf on Linux 4.10.0-30-generic
On LT19758: up 07:55:45, 5 forks (0.6/hour)

Database      Headwords         Index          Data  Uncompressed
gcide              203645       3859 kB         12 MB         38 MB
wn                 147311       3002 kB       9247 kB         29 MB
moby-thesaurus      30263        528 kB         10 MB         28 MBGetting definition of wordmockusing theWordBookDatabaseclass:import asyncio
import wordbook

async def main():
    wb = wordbook.WordBookDatabase('wn')
    await wb.connect()
    lines = await wb.define('mock')
    for line in lines:
        print(line)

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
    loop.close()Output:["mock" wn "WordNet (r) 3.0 (2006)"]
mock
    adj 1: constituting a copy or imitation of something; "boys in
           mock battle"
    n 1: the act of mocking or ridiculing; "they made a mock of him"
    v 1: treat with contempt; "The new constitution mocks all
         democratic principles" [syn: {mock}, {bemock}]
    2: imitate with mockery and derision; "The children mocked their
       handicapped classmate"You can find more examples in directoryexample/.ResourcesThe DICT Development Group -http://www.dict.org/RFC 2229:https://tools.ietf.org/html/rfc2229
Package: wordcab
Wordcab Python📖 Transcribe and Summarize any business communication at scale with Wordcab's APIWordcabis a transcription and summarization service that provides a simple API to summarize anyaudio,text, orJSONfile.It also includes compatibility with other transcripts platforms like:Getting startedYou can learn more about Wordcab services and pricing on ourwebsite.If you want to try out the API, you cansignupfor a free account and start using the API
right away.RequirementsOS:Python:InstallationYou can installWordcab Pythonvia pip fromPyPI:$pipinstallwordcabStart using the API with any python script right away!UsageStart Summary full pipelineimporttimefromwordcabimportretrieve_job,retrieve_summary,start_summaryfromwordcab.core_objectsimportAudioSource,GenericSource,InMemorySource# Prepare your input source## For a transcript stored as a .txt or .json filesource=GenericSource(filepath="path/to/file.txt")# Or file.json## For a transcript stored as an audio filesource=AudioSource(filepath="path/to/file.mp3")## For a transcript already in memorytranscript={"transcript":["SPEAKER A: Hello.","SPEAKER B: Hi."]}source=InMemorySource(obj=transcript)# Launch the Summarization jobjob=start_summary(source_object=source,display_name="sample_txt",summary_type="narrative",summary_lens=[1,3],tags=["sample","text"],)# Wait for the job completionwhileTrue:job=retrieve_job(job_name=job.job_name)ifjob.job_status=="SummaryComplete":breakelse:time.sleep(3)# Get the summary idsummary_id=job.summary_details["summary_id"]# Retrieve the summarysummary=retrieve_summary(summary_id=summary_id)# Get the summary as a human-readable stringprint(summary.get_formatted_summaries())# Save the json object to a filewithopen("wordcab_summary.json","w")asf:f.write(summary)DocumentationPlease see theDocumentationfor more details.ContributingContributions are very welcome. 🚀
To learn more, see theContributor Guide.LicenseDistributed under the terms of theWordcab Python SDKis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.
Package: wordcel
😶 Wordcelwordcelis a library of functions that help users create text-based features from large language models.Today, it is comprised of a single functionapply_io_bound_function, which is conceptually similar to Pandas'.apply. Because LLMs are primarily consumed via API, users are subject to network latency, errors, and inference costs. Accordingly, the aforementionedwordcelfunction differs from Pandas'.applyin that it handles (a) caching outputs from LLM providers and (b) threading, which increases speed.However, it is up to the user to handle a variety of odds and ends such as API retrying (thoughwordcel.llm_providers.openai_callis provided as a convenience, and popular libraries like Langchain and Llama Index also provide support for retrying) and chunking text.InstallationYou can simplypip install wordcel.Example UsageFirst import the relevant functions.importpandasaspdfromwordcel.featurizeimportapply_io_bound_functionfromwordcel.llm_providersimportopenai_callThen, load your data.data={"id":[1,2,3,4,5],"text":["I love this product! It's amazing.","The service was terrible. I'm very disappointed.","The weather today is just perfect.","This movie is fantastic. I highly recommend it.","I had a bad experience with this company's customer support.",],}df=pd.DataFrame(data)Define your LLM function for extracting features from the text.defsentiment_classify(text):prompt=f"Classify the sentiment of the following text into one of two categories, POS or NEG. Respond in one word only.\n\n{text}"returnopenai_call(prompt,model="gpt-3.5-turbo",max_tokens=32)Finally, giveapply_io_bound_functionyour df, function, column to process, a unique identifying column, and optionally the number of threads you'd like to use and a cache folder (if none is provided then one will be created for you).results=apply_io_bound_function(df,sentiment_classify,text_column="text",id_column="id",num_threads=4,cache_folder="cache",)print(results)joined_results=df.join(results.set_index("id"),on="id")print()print(joined_results)This will output:id result
0   1    POS
1   2    NEG
2   3    POS
3   4    POS
4   5    NEG

   id                                               text result
0   1                 I love this product! It's amazing.    POS
1   2   The service was terrible. I'm very disappointed.    NEG
2   3                 The weather today is just perfect.    POS
3   4    This movie is fantastic. I highly recommend it.    POS
4   5  I had a bad experience with this company's cus...    NEG
Package: wordcloud
word_cloudA little word cloud generator in Python. Read more about it on theblog
postor thewebsite.The code is tested against Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12.InstallationIf you are using pip:pip install wordcloudIf you are using conda, you can install from theconda-forgechannel:conda install -c conda-forge wordcloudInstallation noteswordcloud depends onnumpy,pillow, andmatplotlib.If there are no wheels available for your version of python, installing the
package requires having a C compiler set up. Before installing a compiler, report
an issue describing the version of python and operating system being used.ExamplesCheck outexamples/simple.pyfor a short intro. A sample output is:Or runexamples/masked.pyto see more options. A sample output is:Getting fancy with some colors:Generating wordclouds for Arabic:Command-line usageThewordcloud_clitool can be used to generate word clouds directly from the command-line:$ wordcloud_cli --text mytext.txt --imagefile wordcloud.pngIf you're dealing with PDF files, thenpdftotext, included by default with many Linux distribution, comes in handy:$ pdftotext mydocument.pdf - | wordcloud_cli --imagefile wordcloud.pngIn the previous example, the-argument orderspdftotextto write the resulting text to stdout, which is then piped to the stdin ofwordcloud_cli.py.Usewordcloud_cli --helpso see all available options.LicensingThe wordcloud library is MIT licenced, but contains DroidSansMono.ttf, a true type font by Google, that is apache licensed.
The font is by no means integral, and any other font can be used by setting thefont_pathvariable when creating aWordCloudobject.