Saravanan666/pypi-org huggingface dataset:
Package: textree
jaTexTreeCreate nodes as specified in the tree text.FeaturesCompatible with python2,3Data can be assigned to nodesConvert between text and node objectsRequirement2019-12-26Raspbierry Pi4 Model B Rev 1.2Raspbianbuster 10.0 2019-09-26setupbash 5.0.3(1)-releasePython 2.7.16Python 3.7.3InstallationpipinstalltextreeUsageFoundationsConvert from text to node object.importtextreetree_text="""AA1A11A111A112A2B"""tree=TexTree()root=tree.to_node(tree_text)print(root,root.Name)fornodeintree.Nodes:print(node.Line)print(tree.to_text())ReferenceConvert between text and objects.root=tree.to_node(tree_text)tree.to_text()Reference and assignment.node.Namenode.Parentnode.Childrennode.Name='NewName'node.Parent=Node('Parent')node.Children.append(Node('Child'))Move.node.to_first()node.to_last()node.to_next()node.to_prev()Get.Node.Path.select(root,'A/A1/A11')Node.Path.select(A,'A1/A11')Insertion / deletion.node.insert_first(Node('new'))node.insert_last(Node('new'))node.insert_next(Node('new'))node.insert_prev(Node('new'))node.delete()Update.node=Node.Path.select(root,'A/A1/A11')node.Name='UpdateName'There are many others. Refer to thecodeorAPI listfor details.Attribute of NodeAttributes can be assigned to the same line.importtextreetree_text="""A	attrAA1	attrA1A11	attrA11A111	attrA111A112	attrA112A2	attrA2B	attrB"""tree=TexTree()root=tree.to_node(tree_text)print(root,root.Name)fornodeintree.Nodes:print(node.Name,node,Attr)Attribute of RootNodeAttributes can be assigned to RootNode.importtextreetree_text="""<ROOT>	root_attrA	attrAA1	attrA1A11	attrA11A111	attrA111A112	attrA112A2	attrA2B	attrB"""tree=TexTree()root=tree.to_node(tree_text)print(root,root.Name,root.Attr)fornodeintree.Nodes:print(node.Name,node,Attr)Deserialization of attributesThe user can embed the attribute analysis code freely. Of course you can also write code to serialize to text.The following code gives the nodemy_name.classMyNodeDeserializer(NodeDeserializer):defdeserialize(self,ana,parent,parents=Node):node=Node(ana.Line,parent=parent)node.my_name='My name is '+node.Namereturnnodetree=TexTree(node_deserializer=MyNodeDeserializer())root=tree.to_node(tree_text)fornodeintree.Nodes:print(node.my_name)classMyNodeAttributeSerializer(NodeAttributeSerializer):defserialize(self,attr):return'my_name='+attrtree=TexTree(node_deserializer=MyNodeDeserializer(),node_serializer=NodeSerializer(MyNodeAttributeSerializer()))root=tree.to_node(tree_text)fornodeintree.Nodes:print(node.my_name)print(tree.to_text())NoteAlpha version. Checking installationAuthorytyaruLicenseThis software isAGPLv3licensed. (GNU Affero General Public License v3)agpl-3.0
Package: text-replace
Text ReplaceDescriptionA python package that traverse files based on some regex pattern to select certain files and then update the text in these files using regex.InstallPyPI:pip install text-replaceSource:git clone https://github.com/Salaah01/text-replace.gitUsageusage: python -m text_replace [-h] [-d ROOT_DIR] [-f FILE_PATTERN] [-s] [-r] [-t TEXT_PATTERN] [-m {default,relative-url-prefixer}] [-n NEW_TEXT]

Search through files and replace text.

optional arguments:
  -h, --help            show this help message and exit
  -d ROOT_DIR, --root-dir ROOT_DIR
                        Root directory.
  -f FILE_PATTERN, --file-pattern FILE_PATTERN
                        Regex pattern to follow when searching for files.
  -s, --skip-check      Show a list of files that will potentially be changed before proceeding.
  -r, --recursive       Recursively search for files?
  -t TEXT_PATTERN, --text-pattern TEXT_PATTERN
                        Regex pattern for searching for text to replace.
  -m {default,relative-url-prefixer}, --mode {default,relative-url-prefixer}
  -n NEW_TEXT, --new-text NEW_TEXT
                        Next text to replace the old text with.PresetsPreset exist withintest_replace/presetsand they include helpful shortcuts
to perform certain replaces. These include:relative_url_prefixerUpdates the relative URLs in your files to include a prefix.
e.g: /about becomes iamsalaah.com/about where the prefix set is iamsalaah.com.
Package: textscrub
Text-Scrubbing-PackageIntroductionTextScrub is a text-cleaning package which prevents you from spending long hours cleaning web scrapped data, either to prepare for a presentation or for NLP projects. The user can run single line of code to clean the textual data.Resources UsedEditor used: VS codePython version: 3.9.4Packages used: unicodedata, sys, os, regex, string, numpy, pandas, sklearn, levenshtein, spacy, nltk, emojiProject OrganizationThis package has the following structure.TextScrubPkg/
  |- examples
    |-example.ipynb
  |- textscrub/
    |- __init__.py
    |- clean.py
    |- nlp.py
    |- normalize_text.py
  |- docs/
    |- index.md
    |- textimage.png
  |- tests/
    |- __init__.py
    |- test_clean.py
    |- test_nlp.py
    |- testing_dataset.csv
    |- testing_normalize.py
  |- setup.py
  |- requirements.txt
  |- LICENSE
  |- README.mdUsersAnalysts: Requiring quick data-cleaning functionalities, and who are not technically adeptData Scientists: Programmers wanting to clean web-scrapped data. Focus on experimenting with model-building instead of scrubbingFunction DescriptionThis package provides two main task specific fucntions:Basic Cleaning for Data AnalyisAdvanced Cleaning for NLP related tasksFor cleaning the data call thetextscrub.normalize_text.normalize_text(your text)function. The function parameters defined are as follows:remove_glyphs- Removes non-ascii characters, non-printable charaters, accents, and non-latin charactersremove_spaces- Remove Extra Spaces, including tabs and line breaksremove_html_tags- Remove HTML tagsremove_hyperlinks- Remove hyperlinksremove_punctuation- Remove Puntuationtokenizing- Tokenizationstopwords_removal- Remove Stopwordslemmat- Perform Lemmatizationreplace_emojis- Replace emojisremove_emojis- Remove emojisBy default these parameters are true. If you do not require them, then you can set is asFalse.Apart from this we can normalize a string column as well. To do this, calltextscrub.clean.homogenize_column(col_name)from the textscrub package.How to UseTo test the functionalities of the package, refer to thePython notebook
Package: text-selector
text_selectorA Custom Jupyter Widget for selecting part of text and assingning it one of tags.Use the widget with the active learning tool:https://github.com/IINemo/active_learning_toolbox/tree/seqUsage:An example of use case can be found inexample.ipynbNote: if you have less than 10 tags you don't need to pass colors, otherwise you have too.The result is represented via widgets public fieldres.
It can be in 1 of 3 states:Empty: nobody selected anything in widgetContaining string ofNone: text doesn't contain any squences and user checked this widget as "Done"Containing dicts with selected sequencesInstallationTo install this extension simply run folowing comands:$ pip install text_selector
$ jupyter nbextension enable --py --sys-prefix text_selectorTo install for jupyterlab$ jupyter labextension install text_selectorFor a development installation (requires npm) run in terminal:$ git clone https://github.com/randomunrandom/text_selector.git
$ cd text_selector
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix text_selector
$ jupyter nbextension enable --py --sys-prefix text_selector
$ jupyter labextension install jsDockerTo create and start docker container run:$ git clone https://github.com/randomunrandom/text_selector.git
$ cd text_selector
$ docker build -t text_selector .
$ docker run -p 8888:8888 -it --rm --name text_selector text_selectorif port 8888 is occupied change ${port} to any available port$ docker run -p ${port}:8888 -it --rm --name text_selector text_selectorCite@inproceedings{shelmanov2019bibm,
    title={Active Learning with Deep Pre-trained Models for Sequence Tagging of Clinical and Biomedical Texts},
    author={Artem Shelmanov and Vadim Liventsev and Danil Kireev and Nikita Khromov and Alexander Panchenko and Irina Fedulova and Dmitry V. Dylov},
    booktitle={Proceedings of International Conference on Bioinformatics & Biomedicine (BIBM)},
    year={2019}
}
Package: textshare
textshareA simple command line utility to share code and textsDownload python package herepypiSubmit issues heregithubinstallation$pipinstalltextshareusagetextshare [OPTIONS] [FILEPATHS]…Options:--inputuses stdin as input--mapreturns output as a map of filepaths and url--helpShow this message and exit.examples$texsharefile1file2$catfile|textshare-i$texshare--mapfile1file2|textshare-iTODOSplit large files into chunks
Package: textshot
TextShotTake a screenshot and copy its text content to the clipboard. Works on Windows, macOS, and most modern Linux distros.Usetextshot.py -hprints the available command line options:usage: textshot.py [-h] [-i INTERVAL] [langs]

Take a screenshot and copy its text content to the clipboard.

positional arguments:
langs                 languages passed to tesseract, eg. "eng+fra" (default: eng)

optional arguments:
-h, --help            show this help message and exit
-i INTERVAL, --interval INTERVAL
                        select a screen region then take textshots every INTERVAL millisecondsExamplesBasic usage:python textshot.pyopens an overlay where a rectangle can be drawn around the text to be copied.Alternate languages:python textshot.py eng+fraspecifies use of English as the primary language and French as the secondary language. Make sure that the appropriate data files for Tesseract are installed for other languages. A list of all supported languages can be foundhere.Continuously copy text content:python textshot.py --interval 200draw a rectangle at a screen region then copy text from it every 200ms.HotkeysIt is recommended to attach a global hotkey to this tool, so you can run it without opening a console and typing in the command.OnWindows, one can accomplish this by using anAutoHotkeyscript;textshot.ahkcontains a sample AHK script that can be used.
OnUbuntu, open the Keyboard Settings, which shows you all the Gnome shortcuts. At the bottom there is a+button to add your own shortcuts. Click it and set the command to/usr/bin/python3 <path-to-textshot.py>. In case you are using a virtual environment, thepython3path above should point to the environment'spython3instead of the globalpython3.
The process on other operating systems can be found by searching how to run a shell command with a keyboard shortcut.InstallationPrerequisitesInstallGoogle's Tesseract OCR Engine, and ensure thattesseractcan be reached from the command line by adding the directory to your system path.Installation withpip$ pip install textshot
$ textshotYou may wish to use a virtual environment if the dependencies conflict with others on your machine.Installation from sourceClone this repository...git clone https://github.com/ianzhao05/textshot.git...andcdinto it:cd textshotRunpip install .(for development, you may install withpip install -e .which will allow you to test your modifications without reinstall)You may now runtextshotFrom repository@rigred has added this to the AUR, so Arch Linux users can install the packagetextshot-gitwith their AUR helper. For example,yay -S textshot-git. This may not be up to date, so if you encounter issues, use the normal installation method above.TroubleshootingmacOSYou may need to give permission to capture the screen. You can do so by going to System Preferences > Security & Privacy > Privacy > Screen Recording, then checking the box for Terminal/iTerm.LinuxIf the text shows up correctly in the notification, but you cannot paste it, installxclip(e.g. withsudo apt install xclip).
Package: textsimi
Text-SimilarityPackage for texts similarity, based ontextdistanceUsageinstallationpip install textsimiexample usage:fromtestsimiimporttextsimilarityaststs.print_all_algorithms()print(ts.compute_similarity('hello','hi'))print(ts.top_K_similarity_between_one_mention_and_many_candidates(5,'hi',['hi','hihi','hello',"what's up",'greetings','how are you','hallo','wie gehts']))'''['hamming', 'mlipns', 'levenshtein', 'damerau_levenshtein', 'jaro_winkler', 'strcmp95', 'needleman_wunsch', 'gotoh', 'smith_waterman', 'jaccard', 'sorensen', 'tversky', 'overlap', 'tanimoto', 'cosine', 'monge_elkan', 'bag', 'ratcliff_obershelp', 'arith_ncd', 'rle_ncd', 'bwtrle_ncd', 'sqrt_ncd', 'entropy_ncd', 'bz2_ncd',   'zlib_ncd', 'editex', 'prefix', 'postfix', 'length', 'identity', 'matrix']Current algorithm is Jaccard({'qval': 1, 'as_set': False, 'external': True})0.16666666666666666['hi', 'hihi', 'wie gehts', 'hallo', 'hello']'''colab notebook for tf-idf text similarity
Package: textslack
textslackA text cleaning pipeline to perform text cleaning, along with additional functionalities for sentiment, pos extraction, and word count.After pip install, please follow the below step to access the functionalities:from textslack.textslack import TextSlackslack = TextSlack()Below are the key functionalities currently available in the all the versions:transform(text): normalises and cleans unstructured textextract_nouns(text): cleans text to keep only nounsextract_verbs(text): cleans text to keep only verbsextract_adjectives(text): cleans text to keep only adjectivesextract_adverbs(text): cleans text to keep only adverbssentiment(text): returns a string as sentimentword_occurances(word, text): returns frequency of a word mentioned in the textv.0.1.5 updates:transform method can now be used on a list and an entire pandas dataframe column.textslack can perform basic text cleaning for some non-english languages as well, just pass the language while creating the object as shown below.slack = TextSlack(lang='spanish')Please refer the below medium article for a detailed explanation of textslack functionalities.https://medium.com/analytics-vidhya/text-processing-made-easy-with-textslack-4214ae6bc67a
Package: textsplitter
Text SplitterA Python library to split large text into smaller chunks based on the maximum token size and other criteria.FeaturesSplit text into smaller chunks based on maximum token sizeEnd chunks at sentence boundariesPreserve formattingRemove URLsReplace entitiesRemove stopwordsInstallationTo install the library, run the following command:pip install textsplitterUsageHere's a simple example of how to use the TextSplitter:fromtextsplitterimportTextSplittersample_text="Your sample text goes here..."text_splitter=TextSplitter(max_token_size=20,end_sentence=True,preserve_formatting=True,remove_urls=True,replace_entities=True,remove_stopwords=True,language='english')chunks=text_splitter.split_text(sample_text)fori,chunkinenumerate(chunks):print(f"Chunk{i+1}:\n{chunk}")
Package: textstat-cli
# Textstat CLIA wrapper for textstat so that it can be better integrated it in to your automated publishing pipelines. This isn’t to have you make decisions about your text, but to arm you better about your text.## RequirementsPython 3.3 minimum## Installation`bash python3-mpip install textstat_cli `## Usage`bash python3-mtextstat_cli ./content `## LicenseGPLv3
Package: text-styling
Módulo "text_styling"Esse pacote contém módulo com cores e estilos para texto.Ele é útil, pois se toda hora tivessemos que escrever\033[<Código de cor>m, nosso código ficaria muito poluído.Por isso esse pacote facilita a estilização dos textos em Python.ÍndiceMódulo "text_styling"Índicemódulo "colors"Variáveis disponíveisExemplomódulo "background"Exemplomódulo "styles"ExemploContate-memódulo "colors"Esse módulo do pacote contém variáveis para cor do texto.Variáveis disponíveisAs variáveis disponíveis no módulo são:resetblackredgreenyellowbluemagentacyanwhiteinversionExemplo# Forma padrãoprint("\033[31mEste texto está em vermelho\033[m")# Usando o módulo "colors"fromtext_styling.colorsimportred,resetprint(f"{red}Este texto está em vermelho{reset}")Saída:Este texto está em vermelhomódulo "background"Esse módulo do pacote contém variáveis para cor do fundo do texto.As variáveis disponíveis no módulo são:bg_resetbg_blackbg_redbg_greenbg_yellowbg_bluebg_magentabg_cyanbgwhiteExemplo# Forma padrãoprint("\033[41mEste texto está em vermelho\033[m")# Usando o módulo "background"fromtext_styling.backgroundimportbg_red,resetprint(f"{bg_red}Este texto está com o fundo vermelho{reset}")Saída:Este é um texto com fundo vermelhomódulo "styles"Esse módulo do pacote contém variáveis para estilo de texto.resetboldsmallitalicunderlinedExemplo# Forma padrãoprint("\033[3mEste texto está em itálico\033[m")# Usando o módulo "styles"fromtext_styling.stylesimportitalic,resetprint(f"{italic}Este texto está em itálico{reset}")Saída:Este texto está em itálicoContate-mePara relatar problemas ou me contatar, mande um e-mail paraviniciusmarcelinosilva1983@ gmail.com, sempre respondo.
Package: textsummarizer
[]TextSummarizerWhat is TextSummarizer ?Automatic text summarization  takes a string and it will summarize that text for youthis package is developed using bs4 and requestsInstallationpipinstalltextsummarizerUsagefromtextsummarizer.textsummarizerimportTextSummarizertext="""The United States of America (USA), commonly known as the United States (U.S. or US) or simply America, is a country comprising 50 states, a federal district, five major self-governing territories, and various possessions.[i] At 3.8 million square miles (9.8 million km2), the United States is the world's third or fourth largest country by total area[d] and is slightly smaller than the entire continent of Europe. With a population of over 327 million people, the U.S. is the third most populous country. The capital is Washington, D.C., and the most populous city is New York City. Most of the country is located contiguously in North America between Canada and Mexico."""obj=TextSummarizer(text=text)print(obj.get)AuthorsSoumil Nitin ShahBachelor in Electronic Engineering |
Masters in Electrical Engineering |
Master in Computer Engineering |Website :https://soumilshah.herokuapp.comGithub:https://github.com/soumilshah1995Linkedin:https://www.linkedin.com/in/shah-soumil/Blog:https://soumilshah1995.blogspot.com/Youtube :https://www.youtube.com/channel/UC_eOodxvwS_H7x2uLQa-svw?view_as=subscriberFacebook Page :https://www.facebook.com/soumilshah1995/Email :shahsoumil519@gmail.comLicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: text-summarizer
Text-SummarizerText summarization Python library (in progress)Installationpip install text-summarizerPackages neededNLTKiso-639lang-detectUsage# Import summarizer
from text_summarizer import summarizer

# Init summarizer parameters
summarizer.text = input_text
summarizer.algo = Summ.TEXT_RANK    # Summ.TEXT_RANK is equals to "textrank"
summarizer.percentage = 0.25

# Summarize with summarize() (returns a paragraph) or schematize() (returns a schema)
summarizer.summarize()
summarizer.schematize()

# You can also init the parameters in the summarize() / schematize() call
summarizer.summarize(text_to_be_summarized)
summarizer.summarize(text_to_be_summarized, "textrank", 0.5)More info about Text summarization
Package: textsynth
TextSynth Python InterfaceEasy-to-use Python wrapper for the TextSynth APIWhat is this?This is a simple Python library that handles interactions with theTextSynthAPI. It handles authentication, wraps
requests and responses, and validates the data you pass to TextSynth.See theTextSynth documentationfor
an up-to-date reference on the underlying API and capabilities of TextSynth.How do I use it?To install and get your API key set up:pipinstalltextsynthexportTEXTSYNTH_SECRET_KEY='<your secret key here>'Then, in a Python session:>>>importtextsynth>>>textsynth.engine('gptj_6B').completions('Once upon a time')Completions(text=' there was a company called Tinkoff. It didn’t do much that day.\n')For more information about how to use this library, check outthe documentation.Is this library production-ready?Not yet! I have yet to create a comprehensive test suite, so far I have only
been manually testing everything on my own credits. I plan to add automated
tests that work with the free version ofts_server, so that anyone can run them
locally without incurring charges.Once I have comprehensive unit and integration tests, and I have used this
library in a major application myself, then I will release version 1.0 and
declare it production-ready.If you notice any bugs or other problems, please report them athttps://github.com/ptakdotio/textsynth/issues.
Package: text_table
>>> t = TextTable((5, 'abc'), (10, 'def'))
>>> t.row('foobarbaz', 'yadayadayada')
>>> print t.draw()

.-------+------------.
| abc   | def        |
+-------+------------+
| foob- | yadayaday- |
| arbaz | ada        |
'-------+------------'Ported from Sebastian Riedel’s Text::SimpleTable[1] to Python.
License is same as that of Text::SimpleTable - Artistic or GPL license.[1]:http://search.cpan.org/~sri/Text-SimpleTable/lib/Text/SimpleTable.pm
Package: texttablescoop
📝 TextTableScoopWelcome toTextTableScoop🌟, a versatile tool designed for extracting text from files and CSV tables, particularly focusing on Office files like Excel, PowerPoint, etc. This project is part of a'ProjectText'suite that includesProjectTextAgentandProjectDataBaseQnA.🚀 FeaturesSpecializes in extracting text from various file formats, including Office files.Designed to work in both Windows with COM and Linux with LibreOffice + PyUNO.Current implementation supports Linux + LibreOffice + PyUNO.Windows support with COM environment is planned for robust file handling.📥 InstallationTo installTextTableScoop, use the following pip command:pip3installgit+https://github.com/Flagro/TextTableScoop.git🛠️ UsageRuntexttablescoopfrom the bin folder with these arguments:path: Path to the file or directory to process.-tor--temp: (Optional) Path to a custom temporary folder.-por--project: (Optional) Path to the project folder the file belongs to.--ignore: (Optional) Comma-separated list of patterns to ignore.🖥️ Example Commandtexttablescoop'path/to/file'--temp'path/to/temp'--project'path/to/project'--ignore'pattern1,pattern2'🤝Collaboration & IssuesOpen for collaboration; check theissues pagefor discussions.Here's how you can contribute:Fork the Project.Create your Feature Branch (git checkout -b feature/AmazingFeature).Commit your Changes (git commit -m 'Add some AmazingFeature').Push to the Branch (git push origin feature/AmazingFeature).Open a Pull Request.
Package: texttactoe
TextTacToeThis is an TUI App for playing TicTacToe built usingTextualin Python3.NOTE:Due to the fact that textual t is still in the develepment stage, I reccomend you install this only in virtual env. This app will probably change heavily as textual changes.DependenciesTextual:python -m pip install textualInstallpython -m pip install texttactoeRunIf installed correctly, you should be able to run 1 of 2 ways, as a python module or a standalone script:python -m texttactoeortexttactoeThe following options are available for customization. Note that the color options currently do not check whether they are a valid colors. We use textual/rich to customize the color and so it mus be a valid choice from these frameworks.usage: texttactoe [-h] [-v] [-p1 PLAYER1] [-p2 PLAYER2] [-c1 COLOR1] [-c2 COLOR2] [-r]

A tictactoe TUI.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         display version information
  -p1 PLAYER1, --player1 PLAYER1
                        Name of Player1
  -p2 PLAYER2, --player2 PLAYER2
                        Name of Player2
  -c1 COLOR1, --color1 COLOR1
                        Color of Player1
  -c2 COLOR2, --color2 COLOR2
                        Color of Player2
  -r, --random          Randomize player colors