Saravanan666/pypi-org huggingface dataset:
Package: textpanel
textpanelCreate boxes in the terminal.Python port ofboxenInstallpipinstalltextpanelUsagefromtextpanelimportpanelprint(panel("Hello World!",padding=1))#╭──────────────╮#│              │#│ Hello World! │#│              │#╰──────────────╯print(panel("Hello World!",padding=1,title='title'))#╭───── title ──────╮#│                  │#│   Hello World!   │#│                  │#╰──────────────────╯APIpanel(text, style?, padding?, margin?, width?, expand?, border_color?, text_alignment?, text_color?, border?, title?, title_alignment?)textRequiredType:stringText inside the boxborder_styleType:string | dictDefault:singleValues:'single'┌───┐
│foo│
└───┘'double'╔═══╗
║foo║
╚═══╝'round'╭───╮
│foo│
╰───╯'bold'┏━━━┓
┃foo┃
┗━━━┛'single-double'╓───╖
║foo║
╙───╜'double-single'╒═══╕
│foo│
╘═══╛'classic'+---+
|foo|
+---+'arrow'↘↓↓↓↙
→foo←
↗↑↑↑↖Box border styleCan be custom defined with a dict:{"topLeft":"┌","topRight":"┐","bottomRight":"┘","bottomLeft":"└","left":"│","right":"│","top":"─","bottom":"─"}titleType:strDisplay a title at the top of the box.title_alignmentType:strDefault:leftValues:leftcenterrightAlign the title in the top bar.'left'┌ title ────────┐
│foo bar foo bar│
└───────────────┘'center'┌──── title ────┐
│foo bar foo bar│
└───────────────┘'right'┌──────── title ┐
│foo bar foo bar│
└───────────────┘paddingType:numberDefault:0Space between the text and box border.marginType:numberDefault:0Space around the box.widthType:numberDefault:0Width of the box.expandType:boolDefault:FalseExpand the box to the terminal width.border_colorType:strValues:"black""red""green""orange""blue""purple""cyan""lightgrey""darkgrey""lightred""lightgreen""yellow""lightblue""pink""lightcyan"Color of the box border.text_alignmentType:strDefault:leftValues:leftcenterrightAlignment of the text inside the box.text_colorType:strValues:"black""red""green""orange""blue""purple""cyan""lightgrey""darkgrey""lightred""lightgreen""yellow""lightblue""pink""lightcyan"Color of the text inside the box.
Package: textparser
AboutA text parser written in the Python language.The project has one goal, speed! See the benchmark below more details.Project homepage:https://github.com/eerimoq/textparserDocumentation:http://textparser.readthedocs.org/en/latestCreditsThanksPyParsingfor a user friendly interface. Many oftextparser’s class names are taken from this project.InstallationpipinstalltextparserExample usageTheHello Worldexample parses the stringHello, World!and
outputs its parse tree['Hello',',','World','!'].The script:importtextparserfromtextparserimportSequenceclassParser(textparser.Parser):deftoken_specs(self):return[('SKIP',r'[ \r\n\t]+'),('WORD',r'\w+'),('EMARK','!',r'!'),('COMMA',',',r','),('MISMATCH',r'.')]defgrammar(self):returnSequence('WORD',',','WORD','!')tree=Parser().parse('Hello, World!')print('Tree:',tree)Script execution:$ env PYTHONPATH=. python3 examples/hello_world.py
Tree: ['Hello', ',', 'World', '!']BenchmarkAbenchmarkcomparing the speed of 10 JSON parsers, parsing a276
kb file.$ env PYTHONPATH=. python3 examples/benchmarks/json/speed.py

Parsed 'examples/benchmarks/json/data.json' 1 time(s) in:

PACKAGE         SECONDS   RATIO  VERSION
textparser         0.10    100%  0.21.1
parsimonious       0.17    169%  unknown
lark (LALR)        0.27    267%  0.7.0
funcparserlib      0.34    340%  unknown
textx              0.54    546%  1.8.0
pyparsing          0.68    684%  2.4.0
pyleri             0.88    886%  1.2.2
parsy              0.92    925%  1.2.0
parsita            2.28   2286%  unknown
lark (Earley)      2.34   2348%  0.7.0NOTE 1: The parsers are not necessarily optimized for
speed. Optimizing them will likely affect the measurements.NOTE 2: The structure of the resulting parse trees varies and
additional processing may be required to make them fit the user
application.NOTE 3: Only JSON parsers are compared. Parsing other languages may
give vastly different results.ContributingFork the repository.Implement the new feature or bug fix.Implement test case(s) to ensure that future changes do not break
legacy.Run the tests.python3 -m unittestCreate a pull request.
Package: textparsingtools
Text Parsing ToolsThis is a collection of various functions to aid in parsing and organization of data stored in text files.InstallationYou can install Text Parsing Tools from a command line via PyPI:python3 -m pip install textparsingtoolsThis library was programmed using Python 3.8, and it has not been tested on older versions.How to useImport the library and use its functions as needed. Here is a quick demo:import text_parsing_tools

file_path = '<insert path here>'
input_file_name = 'Input file'
output_name = 'Output spreadsheet'

replacement_strings = [[' - ', '-'], ['   ', '  ']]

with open(file_path + input_file_name + '.txt', 'r') as input_file:
    file_lines = [recursively_replace(line , replacement_strings) for line in input_file.readlines()]

data_1 = get_text_data(file_lines, r"data_begin", r"data_end", 0, 1, data_begin_offset = 4)
data_2 = get_text_data(file_lines, r"data_2_begin", r"data_2_end", 0, 1, 2, 3, data_begin_offset = 5)

unique_names = []
[unique_names.append(row[0]) for row in data_1 if row[0] and row[0] not in unique_names]
[unique_names.append(row[0]) for row in data_2 if row[0] and row[0] not in unique_names]

data_1 = transpose_transcript_data(data_1, unique_names, empty_value = '=NA()')
data_2 = transpose_transcript_data(data_2, unique_names, empty_value = '=NA()')

combined_data = interleave_datasets(unique_names, data_1, data_2)

variables = ['Var 1', 'Var 2', 'Var 3', 'Var 4']
header = build_header(unique_names, variables)
write_excel_file(file_path + output_name, [combined_data], header)
Package: text-password-protect
Protect any text with your own password.Ever want a simple library to encrypt some text with a password? Well
here it is. This is a great library for building quick One Time Secret
apps in PythonWarningUse this package at your own discretion. There is no guarantee about the strength
of the encryption.UsageTo install runpipinstalltext-password-protectIn code:fromtext_password_protectimportTextPasswordProtecttest_text="Hello There"test_password="General Kenobi"# Create an instance of the class.# You can set a salt an initialization time, change the salt with the# set_salt method, or set TPPSALT as an environment variable, which will# be read at initialization time.tpp=TextPasswordProtect(salt="BAD_SALT_DO_NOT_USE!")# Encrypt your messageciphertext=tpp.encrypt(test_text,test_password)# Ciphertext is of type bytesprint(ciphertext)# Decrypt ciphertextplaintext=tpp.decrypt(ciphertext,test_password)print(plaintext)# Want the sha256 hex digest of some text?sha256=tpp.sha256hex(test_password)print(sha256)LicenseFree software: MIT licenseDocumentation:https://text-password-protect.readthedocs.io.History0.2.0 (2022-06-16)Adding sha256 capabilities0.1.1 (2022-06-16)Few minor tweaks to docs, READMEs. Code didn’t change0.1.0 (2022-06-15)First release on PyPI.
Package: textPlay
TextPlay 💬Welcome to the TextPlay repository! 👋This versatile Python module provides a range of text-related functions and tools to enhance your text analysis, summarization, translation, Morse code encoding/decoding, Google search, and more.To use my moduleimporttextPlayFeaturesText Summarizer 📝:Generate concise summaries of long articles, documents, or text.Link Summarizer 🌐:Automatically generate summaries of web articles and provide condensed information.Spell Checker ✨:Correct spelling errors in text to improve text quality.Extract Keywords 🔤:Identify important keywords in text for indexing, tagging, or search optimization.Morse Coder and Decoder 🚦:Encode and decode messages in Morse code for communication or fun.Google Search 🔍:Fetch and display search results from Google.Translator 🌍:Translate text from one language to another.Sort Dictionary 📚:Organize and present data in a specific order.Sentiment Analysis 😃:Perform Sentiment Label, Sentiment Polarity, and Sentiment Subjectivity analysis - simultaneously.Simple Chat Bot 💬:Engage with users, answer queries, and integrate with Google search.InstallationTo install the TextPlay module, you can download it directly by usingpippipinstalltextPlayModules UsedSummarizationspacySTOP_WORDSfromspacy.lang.en.stop_wordspunctuationfromstringnlargestfromheapqnewspaperSentiment AnalysisTextBlobfromtextblobSpell CheckingSpellCheckerfromspellcheckerWeb ScrapingrequestsBeautifulSoupfrombs4TranslationTranslatorfromgoogletransStop Word RemovalstringBotrandomAfter installing package install a external english module for spacy by:python-mspacydownloaden_core_web_smModule DetialsVersion:0.1.1Title:textPlayLicense:Apache License Version 2.0AUTHOR:Rakesh KannaAuthor Email:rakeshkanna0108@gmail.comGITHUB PROFILE:https://github.com/rakeshkanna-rkGITHUB LIBARY:https://github.com/rakeshkanna-rk/textPlay
Package: text-ppf
TextPreProcessingPython package for preprocessing text for NLP modelsINSTALLATIONDownload PyPi Package, or$ pip install text-ppfTo upgrade:$ pip install text-ppf --upgradeWHAT IT DOESAn all-in-one function which,Removes punctuationSplits the text into a list of wordsRemoves stopwordsMakes each word lowercaseLemmatizes each wordUSAGEtext_ppfimportpandasaspdfromtext_ppfimporttext_ppf#LOADING DATASETdf=pd.read_csv('filename.csv')# print(df.head)dfNew=df['heading'].apply(text_ppf.clean_up)print(dfNew)
Package: text-prepender
Text PrependerCreated in mind to add Legal Text to the top of codetext-prepender recursively goes through a specified directory/list of files, and adds text to the top of supported filetypes.
If there is a filetype that you want to add/know how to add, please make a pull request!ParametersOptional parameters:Command LineInputDescription-h, --helpGet description of text-prepender-p, --pathdirpathThe path to the directory which text-prepender will start at (default: '.')-t, --text-filefilepathThe path to the file which text-prepender will start at (default: NOTICE)-i, --extra-ignoresspace delimited listAdditional file paths/names to ignore. Ex. (-i file1 path1 path2)-v, --enable-verboseFlag to turn on verbose logging to list skipped files at the endTo Run:# run on all files in current directorytext-prepender# text-prepender --path path/to different directoryor# run on a specific set of filestext-prependerfile1path/to/file2text-prepender --text-file path/to/filepre-commitIf you'd like text-prepender to be run automatically when making changes to files in your Git repository, you can installpre-commitand add the following text to your repositories'.pre-commit-config.yaml:repos:-repo:https://github.com/dontirun/text-prependerrev:v0.1.0# The version of text-prependerhooks:-id:text-prepender#  args:#    - '--text-file'#    - 'NOTICE'Manual BuildClone the repoBuild the packagepip install buildpython -m buildInstall the latest version of the packagewhlpip install dist/text_prepender-x.x.x-py3-none-any.whl.tar.gzpip install dist/text-prepender-x.x.x.tar.gz
Package: text-preprocessing
A python package for text preprocessing task in natural language processing.UsageTo use this text preprocessing package, first install it using pip:pipinstalltext-preprocessingThen, import the package in your python script and call appropriate functions:fromtext_preprocessingimportpreprocess_textfromtext_preprocessingimportto_lower,remove_email,remove_url,remove_punctuation,lemmatize_word# Preprocess text using default preprocess functions in the pipelinetext_to_process='Helllo, I am John Doe!!! My email is john.doe@email.com. Visit our website www.johndoe.com'preprocessed_text=preprocess_text(text_to_process)print(preprocessed_text)# output: hello email visit website# Preprocess text using custom preprocess functions in the pipelinepreprocess_functions=[to_lower,remove_email,remove_url,remove_punctuation,lemmatize_word]preprocessed_text=preprocess_text(text_to_process,preprocess_functions)print(preprocessed_text)# output: helllo i am john doe my email is visit our websiteFeaturesFeatureFunctionconvert to lower caseto_lowerconvert to upper caseto_upperkeep only alphabetic and numerical characterskeep_alpha_numericcheck and correct spellingscheck_spellingexpand contractionsexpand_contractionremove URLsremove_urlremove namesremove_nameremove emailsremove_emailremove phone numbersremove_phone_numberremove SSNsremove_ssnremove credit card numbersremove_credit_card_numberremove numbersremove_numberremove bullets and numberingremove_itemized_bullet_and_numberingremove special charactersremove_special_characterremove punctuationsremove_punctuationremove extra whitespaceremove_whitespacenormalize unicode (e.g., café -> cafe)normalize_unicoderemove stop wordsremove_stopwordtokenize wordstokenize_wordtokenize sentencestokenize_sentencesubstitute custom words (e.g., vs -> versus)substitute_tokenstem wordsstem_wordlemmatize wordslemmatize_wordpreprocess text through a sequence of preprocessing functionspreprocess_text
Package: textprobability
TextProbabilityThis project provides utilities for roughly estimating the probability that a given
string would be observed in a corpus that has some specified set of properties. No
serious attempt is to be made to specify the theoretical significance of this so-called
"probability." Instead, the use of "probabilities" as program output is motivated by one
or two common use cases, such asDistinguishing between mostly correct English text and randomly produced characters,
orDetermining whether a very short snippet of text is English, German, or French, given
that it comes from a corpus that is (say) 60% English, 30% German, and 10% French.Please consider the use of the term "probability" as a pragmatic abuse of language that
is used to make make certain calculations easier to explain.DataThis project uses data collected from Wikipedia on the following languages:German (de)English (en)Spanish (es)French (fr)Italian (it)Portuguese (pt)Turkish (tr)Feel free to read thedata collection
logsto see what kinds of sources were used for language data.This includes on the order of 10 MB of data per language. This incurs a one-time cost on
program startup when data is initially loaded from JSON files. This quantity of data is
fromaftersummarizing the original data, a process which can reduce its size by up to
an order of magnitude. It is not yet clear what the consequences are of summarizing the
language data. For example, it may have a helpful de-noising effect, or it may
adversely affect the quality of the model by limiting its worldly knowledge -- probably
the latter.UsageTo determine the language of a string:fromtextprobability.classifyimportdefault_classifierprobabilities_by_language_with_default_priors=default_classifier(snippet)The most probable language will be the argmax of the resulting map.To determine a rough "probability" of observing a particular string in a corpus having
some language:bcp_47_langcode="fr"p_given_french=markov(bcp_47_langcode)# The result is a function.my_text="le sigle"probability_of_my_text=p_given_french(my_text)# The result is a float in [0, 1].To run examples, run:python3-mtextprobability.examples.classificationOr:python3-mtextprobability.examples.defaultsFor help collecting new language data, run:python3-mtextprobability.data.get_data--help
Package: textprome
TextPro.meGenerate image from text with visual effectsLegalThis code is in no way affiliated with, authorized, maintained, sponsored or endorsed by Textpro.me or any of its
affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.LicenseThe MIT License (MIT)Copyright (c) 2021Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Package: textra
@TexTraMachine translation for EveryoneInstallpipinstalltextraUsage$trans--help
usage:trans[-h][--nameNAME][--keyKEY][--secretSECRET][--engineENGINE][-sSOURCE][-tTARGET]text

positionalarguments:text

options:-h,--helpshowthishelpmessageandexit--nameNAMEUserID--keyKEY--secretSECRET-eENGINE,--engineENGINE-sSOURCE,--sourceSOURCE-tTARGET,--targetTARGETExamples$trans'I am God. You are Dog.'私は神だお前は犬だ$trans-sja-ten吾輩は猫である
IamthecatYou can get the key and secret from here.
Package: textract2page
textract2pageConvert AWS Textract JSON to PRImA PAGE XMLIntroductionThis software converts OCR results fromAmazon AWS Textract Responsefiles toPAGE XMLfiles.InstallationIn a Pythonvirtualenv:pip install textract2pageUsageThe package contains a file-based conversion function provided as CLI and Python API.
The function takes the Textract JSON file and the original image file which was used
as input for the OCR. (That is necessary because Textract stores coordinates infloatratios, whereas PAGE usesintin pixel indices.)Python APITo convert a Textract fileexample.jsonfor an image fileexample.jpgto a PAGEexample.xml:fromtextract2pageimportconvert_fileconvert_file("example.json","example.jpg","example.xml")CLIAnalogously, on the command line interface:textract2page example.json example.jpg > example.xml
textract2page -O example.xml example.json example.jpgYou can get a list of options with--helpor-hTestingRequires installation and a local copy of the repository.To run regression tests withpytest, domake deps-test
make test-apiTo run regression test via command line, do# optionally:
sudo apt-get install xmlstarlet
make test-cli(Ifxmlstarletis available, then the CLI test will
also validate the result tree. Otherwise, this just
checks the command completes without error.)
Package: textract-trp
Amazon Textract Results Parser -textract-trpAmazonTextract Results Parserortrpmodule packaged and improved for ease of use.TL;DRpip install textract-trpRequires Python 3.6 or newer.Usageimportboto3importtrptextract_client=boto3.client('textract')results=textract_client.analyze_document(...yourfileandotherparams...)doc=trp.Document(results)Now you can examinedoc.pages. For example print all the detected on the page:print(doc.pages[0].text)Or print out the detected tables in CSV format:forrowindoc.pages[0].tables[0].rows:forcellinrow.cells:print(cell.text.strip(),end=",")print()Or retrieve text from a given position on the page. For that we have to createBounding Boxwith the required coordinates relative to the page.# Coordinates are from top-left corner [0,0] to bottom-right [1,1]bbox=trp.BoundingBox(width=0.220,height=0.085,left=0.734,top=0.140)lines=doc.pages[0].getLinesInBoundingBox(bbox)# Print only the lines contained in the Bounding Boxforlineinlines:print(line.text)Refer to theTextract blog postand toamazon-textract-code-samplesGitHub repository for more details.BackgroundTheAmazon blog post about Textractrefers to a python moduletrp.pywhich used to be quite hard to find. There
are many posts on the internet from people looking for the module, often confused by
the"other trp module"that's got nothing to do with Textract.Hence I decided to package and publish thetrp.pymodule from theaws-samples/amazon-textract-code-samplesrepository. Fortunately itsMIT
licensepermits that.Over time I have made some improvements to the module for ease of use.MaintainerMichael Ludvig
Package: text-randomizer
text_randomizertested only in python3.10, no dependenciesexample of usagefrom text_randomizer import Template

template = Template('1-2 {комнатные|к.|ком.|Комн.} квартиры в {центре|центре города}. {Хороший|Отличный} ремонт, [пластиковые окна,|кабельное ТВ,|Интернет,|стиральная машина,|2 телевизора,|микроволновка,|пылесос,|утюг,|посуда,] новая мебель. Все {необходимые документы|документы}. В {этой|данной} квартире {очень|достаточно} [уютно,|тихо,] комфортно. {В шаговой доступности|Рядом|Рядом с домом} [2 аптеки,|3 супермаркета,] 2 стоянки для {авто|автомобилей}.')
print(template.render())
print(template.render())
print(template.render())

# Result 1
1-2 н квартиры в н. й ремонт, 2 телевизора,пылесос,микроволновка,стиральная машина,утюг,кабельное ТВ,Интернет,посуда,пластиковые окна, новая мебель. Все м. В н квартире о тихо,уютно, комфортно. с 3 супермаркета,2 аптеки, 2 стоянки для т.

# Result 2
1-2 к квартиры в н. н ремонт, микроволновка,2 телевизора,кабельное ТВ,пластиковые окна,стиральная машина,пылесос,посуда,утюг,Интернет, новая мебель. Все м. В д квартире о тихо,уютно, комфортно. м 2 аптеки,3 супермаркета, 2 стоянки для о.

# Result 3
1-2 е квартиры в т. й ремонт, Интернет,утюг,пылесос,пластиковые окна,микроволновка,2 телевизора,кабельное ТВ,посуда,стиральная машина, новая мебель. Все е. В н квартире е уютно,тихо, комфортно. с 3 супермаркета,2 аптеки, 2 стоянки для о.
Package: textrank4ch
我家还蛮大的, 欢迎你们来我家van.https://github.com/skykisekitextrank4ch"基于textrank的关键字摘取与摘要句摘取",具体textrank的知识参考, 我个人觉得还不错:《PageRank 笔记》《textrank提取关键词与关键句》完整文档见README.mdGitHub:https://github.com/skykiseki/textrank4ch
Package: textrazor
TextRazor Python SDKPython SDK for the TextRazor Text Analytics API.TextRazor offers state-of-the-art natural language processing tools
through a simple API, allowing you to build semantic technology into
your applications in minutes.Hundreds of applications rely on TextRazor to understand unstructured
text across a range of verticals, with use cases including social media
monitoring, enterprise search, recommendation systems and ad targeting.Getting StartedGet a free API key fromhttps://www.textrazor.com.Install the TextRazor Python SDKpipinstalltextrazorCreate an instance of the TextRazor object and start analyzing your
text.fromtextrazorimportTextRazorclient=TextRazor(YOUR_API_KEY_HERE,extractors=["entities"])response=client.analyze("Barclays misled shareholders and the public about one of the biggest investments in the bank's history, a BBC Panorama investigation has found.")forentityinresponse.entities():print(entity)For full API documentation visithttps://www.textrazor.com/docs/pythonIf you have any questions please get in touch atsupport@textrazor.com