Saravanan666/pypi-org huggingface dataset:
Package: sentence-cut
sentence cut轻量级的句子切分工具，以数值为核心，把较长的复杂句式（排比句、长难句）等切分为句子成分简单的短句，便于分析句中的数值类型。安装pipinstallsentence_cut使用目前提供两种切分模式（粗粒度 和 细粒度）参数method控制loose：粗粒度切分，只切分并列关系

    2020Q1~Q4，公司单季度营业收入分别为 12.99/16.44/19.82/21.56 亿元，同比增长，归母净利润 0.32/0.80/1.25/0.94 亿元

    切分为

    2020Q1公司单季度营业收入为12.99亿元，同比增长，归母净利润0.32亿元，
    2020Q2公司单季度营业收入为16.44亿元，同比增长，归母净利润0.80亿元，
    2020Q3公司单季度营业收入为19.82亿元，同比增长，归母净利润1.25亿元，
    2020Q4公司单季度营业收入为21.56亿元，同比增长，归母净利润0.94亿元，

strict：细粒度切分，在粗粒度切分的基础上，进一步把同一主语的多个数值短语且分开

    报告期内，公司主要产品产量保持平稳，生产矿产金11.18吨，与上年同期比较减少了4.53%，与前年同期比较增加了7.12%。

    切分为

    报告期内，公司主要产品产量保持平稳，生产矿产金11.18吨, 
    报告期内，公司主要产品产量保持平稳，生产矿产金与上年同期比较减少了4.53%,
    报告期内，公司主要产品产量保持平稳，生产矿产金与前年同期比较增加了7.12%代码示例如下：fromsentence_cutimportsentence_cutSC=sentence_cut()text="20年公司前三季度实现收入/归母净利润为695.7/338.3亿元，同比+9.6%/11.1%；20Q3单季度实现收入/归母净利润为239.4/112.3亿元，同比+7.2%/6.9%。">>>SC.cut_sentence(text)['20年公司前三季度收入695.7亿元，同比+9.6%，','20年公司前三季度归母净利润338.3亿元，同比11.1%，','20Q3单季度收入239.4亿元，同比+7.2%，','20Q3单季度归母净利润112.3亿元，同比6.9%，']text="20年公司前三季度实现收入/归母净利润为695.7/338.3亿元，同比+9.6%/11.1%；20Q3单季度实现收入/归母净利润为239.4/112.3亿元，同比+7.2%/6.9%；公司业绩延续上半年稳健增长态势，中秋国庆双节传统旺季带动需求快速增长，商超等直营渠道拓展稳步推进，产品结构持续优化，我们预计公司20-22年EPS为37.04/42.65/50.14元，维持“买入”。">>>SC.cut_sentence(text,method="strict")['20年公司前三季度收入695.7亿元','20年公司前三季度收入同比+9.6%','20年公司前三季度归母净利润338.3亿元','20年公司前三季度归母净利润同比11.1%','20Q3单季度收入239.4亿元','20Q3单季度收入同比+7.2%','20Q3单季度归母净利润112.3亿元','20Q3单季度归母净利润同比6.9%','公司业绩延续上半年稳健增长态势，中秋国庆双节传统旺季带动需求快速增长，商超等直营渠道拓展稳步推进，产品结构持续优化，我们预计公司2020年EPS为37.04元，维持“买入”','公司业绩延续上半年稳健增长态势，中秋国庆双节传统旺季带动需求快速增长，商超等直营渠道拓展稳步推进，产品结构持续优化，我们预计公司2021年EPS为42.65元，维持“买入”','公司业绩延续上半年稳健增长态势，中秋国庆双节传统旺季带动需求快速增长，商超等直营渠道拓展稳步推进，产品结构持续优化，我们预计公司2022年EPS为50.14元，维持“买入”']
Package: sentence-mixing
Sentence mixingThis library is used to analyze and smartly reorder phonemes of an audio sequence to form any desired sentence.
The goal of this library is to generate Sentence Mixing Youtube poops (example).Entry file issentence_mixer.py.
Here are examples of applications based on the library:CLI applicationGUI application (unstable)MFASM library is usingMontreal Forced Aligner, a powerful tool used to timestamp words and phonemes in a subtitled audio file.Installing MFADownloadrelease executable version 1.1.0 Beta 2Extract it asMontreal-Forced-AlignerJSON config fileTo use the library, you have to provide a json configuration file.
Here are all the fields to add into it:dict_path: Path to dictionnary file. This dictionnary associates every words of a language to associated phonemesalign_exe: MFA executable filetrained_model: pre-trained model MFA will use. Should be a ZIP filelang: three languages are supported for the moment:fr,enanddedict_consonant_vowel_path: Path to dictionary declaring the consonant and vowel phonemesfolder: Folder where the Youtube subtitles will be storedThis config file should be passed through the functionprepare_sm_config_fileRecommended config.jsonExample for French language:dict_path: choosefr/fr.dictdictionary inSM-Dictionariesrepoalign_exe:Montreal-Forced-Aligner/bin/mfa_aligntrained_model: choosefrench prosodylab modelamongMFA pretrained modellang:frdict_consonant_vowel_path: choosefr/fr_consonant_vowel.dictconsonant vowel dict inSM-DictionariesrepoAdd an unsupported languagePlease refer to this section ofSM-Dictionaries.
Package: sentence-pass
Sentence to password
This package contains class Password, with one methodgenerate_password.
This method takes one sentence and make it a password by adding number and special character into itExample:>>> from sen_pass.password_generator import Password
    >>> pw = Password(8, "Sad Autumn Girl")
    >>> print(pw.generate_password())
    S@d@utumnGirl291
    >>> print(pw.generate_password())
    S@d@utumnGirl291
    >>> print(pw.generate_password())
    $adAutumnGirl291
Package: sentence-plagiarism
Plagiarism CheckerThis is a command-line tool for checking the similarity between a given text and a set of reference documents. The tool uses the Jaccard similarity algorithm to compare the input text with the reference documents.InstallationInstall in an isolated environment using pipx (or normal pip):pipx install sentence-plagiarismCLI UsageTo run the plagiarism checker, use the following command:sentence-plagiarism<path-to-input-file><path-to-reference-file-1><path-to-reference-file-2>...[--threshold<threshold-value>][--output_file<path-to-output-file>][--quiet]<path-to-input-file>: Path to the input file to be checked for plagiarism.<path-to-reference-file-1> ...: Paths to the reference files to compare against.--threshold: (optional) The minimum similarity score required to consider a sentence as plagiarized. The value should be between 0 and 1.--output-file(optional): Path to the output file to save the results in JSON format.--quiet(optional): Flag to suppress the display of similar sentences in the console.ExampleThe following command:sentence-plagiarisminput.txt--reference-filesref1.txtref2.txt--similarity-threshold0.8--output-fileresults.jsoncan produce the following output on stdout:Input Sentence:     The retriever and seq2seq modules commence their operations as pretrained models, and through a joint fine-tuning process, they adapt collaboratively, thus enhancing both retrieval and generation for specific downstream tasks.
Reference Sentence:  foobar  The retriever and seq2seq modules commence their operations as pretrained models, and through a joint fine-tuning process, they adapt collaboratively, thus enhancing both retrieval and generation for specific downstream tasks.
Reference Document: ref1.txt
Similarity Score: 0.9667

Input Sentence:      Closing thoughts  For a comprehensive understanding of the RAG technique, we offer an in-depth exploration, commencing with a simplified overview and progressively delving into more intricate technical facets.
Reference Sentence:  barfoo  For a comprehensive understanding of the RAG technique, we offer an in-depth exploration, commencing with a simplified overview and progressively delving into more intricate technical facets.
Reference Document: ref2.txt
Similarity Score: 0.8966

Results saved to results.jsonand save results toresults.json.Programmatic Usagefromsentence_plagiarismimportcheckcheck(examined_file="txt/txt1.txt",reference_files=["txt/txt2.txt","txt/txt3.txt"],similarity_threshold=0.8,output_file=None,quiet=False,)LicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactKrystian Safjan -ksafjan@gmail.comProject Link:https://github.com/izikeros/sentence-plagiarism
Package: sentencesimilarity
Sentence Similaritysentencesimilarity  is a Python library that calculates similarity between given sentences list.InstallationUse the package managerpipto install foobar.pipinstallsentencesimilarityUsagefromsentencesimilarityimportsentences_similarity# call SentenceSimilarity class with the parameter model namesentenceSimilarity=sentences_similarity.SentenceSimilarity("your_transformers_model")# define your sentences as listsentences=['Python is the best programming language!','I literally love programming Python.','Fenerbahce will be the champion this season.']# Calculates the similarity of the first sentence with other sentencesprint(sentencecSimilarity.calculate_similarities(sentences))# Return most similar sentenceprint(sentencecSimilarity.return_most_similar(sentences)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: sentence-similarity
Sentence SimilarityPackage to calculate the similarity score between two sentencesExamplesUsing Transformersfromsentence_similarityimportsentence_similaritysentence_a="paris is a beautiful city"sentence_b="paris is a grogeous city"Supported ModelsYou can access some of the official model through thesentence_similarityclass. However, you can directly type the HuggingFace's model name such asbert-base-uncasedordistilbert-base-uncasedwhen instantiating asentence_similarity.See all the available models athuggingface.co/models.model=sentence_similarity(model_name='distilbert-base-uncased',embedding_type='cls_token_embedding')BERT is bidirectional, the [CLS] is encoded including all representative information of all tokens through the multi-layer encoding procedure. The representation of [CLS] is individual in different sentences.
Set embedding_type tocls_token_embedding, To compute the similarity score between two sentences based on [CLS] token.paper link (https://arxiv.org/pdf/1810.04805.pdf)score=model.get_score(sentence_a,sentence_b,metric="cosine")print(score)Available metric are euclidean, manhattan, minkowski, cosine score.Using Sentence Transformersfromsentence_similarityimportsentence_similaritysentence_a="paris is a beautiful city"sentence_b="paris is a grogeous city"Supported ModelsYou can access all the pretrained models ofSentence-TransformersSee all the available models atsbert/models.model=sentence_similarity(model_name='distilbert-base-uncased',embedding_type='sentence_embedding')Sentence-BERT (SBERT), a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity.
Set embedding_type tosentence_embedding(default embedding_type), To compute the similarity score between two sentences based on sbert.paper link (https://arxiv.org/pdf/1908.10084.pdf)score=model.get_score(sentence_a,sentence_b,metric="cosine")print(score)Available metric are euclidean, manhattan, minkowski, cosine score.
Package: sentenceslug
sentencesluga module to generate relatively easy to remember slugsInstallationpipinstallsentenceslugUsageIn[1]:fromsentenceslugimport*In[2]:sentence_slug()Out[2]:'Improve_That_Last_Day'In[3]:sentence_slug_digits()Out[3]:'Start_His_National_Town_377'In[4]:simple_slug()Out[4]:'NationalCar'In[5]:simple_slug_digits()Out[5]:'LegalSystem305'In[6]:nsa_codeword()Out[6]:'POORUSE'In[7]:make_slug(simple=True,digits=5,delimiter="-")Out[7]:'Short-Good-83933'ChangelogV1.1 2018-12-05- Python 3 Changes
Package: sentence-splitter
Text to sentence splitter using heuristic algorithm by Philipp Koehn and Josh Schroeder.This module allows splitting of text paragraphs into sentences. It is based on scripts developed by Philipp
Koehn and Josh Schroeder for processing theEuroparl corpus.The module is a port ofLingua::Sentence Perl modulewith
some extra additions (improved non-breaking prefix lists for some languages and added support for Danish,
Finnish, Lithuanian, Norwegian (Bokmål), Romanian, and Turkish).
Package: sentence-url
sentence-urlA port of the NPM packagereadable-urlto generate readable random phrases to add to dynamically generated URLs.GitHub repositoryTo generate readable URLs like Twitch's clips.Example:https://clips.twitch.tv/WiseAcceptableSnoodPupperGet startedTo install:pip install readable-urlTo import:from sentence-url import SentenceURLUsage Instructions"""
Takes 3 parameters.
1. An integer value - The number of words to be generated in the string. (Between 2 and 10).
2. A boolean value - If true, returns string in CamelCase, else lowercase.
3. A string - The seperator between the words.
"""

generator = SentenceURL() # 3, True, '' are the default values.

#generator = SentenceURL(False, 5, '-') # Other options.To generate a random phrase:url = generator.generate()
print(url); # Prints out 'ForgetfulHarshEgg'This can be used to add to the end of a URL.Example:https://example.com/photos/ForgetfulHarshEggFor best results, use an integer value of 3, 4, or 5.
Package: sentency
sentencyA small spaCy pipeline component for matching within document sentences using regular expressions.Free software: MIT licenseDocumentation:https://sentency.readthedocs.io.FeaturesspaCy component for sentence-by-sentence pattern matchingFind matches with complex patterns using the power of regular expressionsEasily convert simple keywords into valid regular expressionsSpecify matching patterns as well as patterns to ignoreAnnotate matches for NER (Named Entity Recognition) tasksInstallationpipinstallsentencyUsageThe following minimally complex example showcases the features of sentenCy.importspacyfromspacyimportdisplacyfromsentency.regeximportregexize_keywordsfromsentency.sentencyimportSentextext="""
Screening for abdominal aortic aneurysm.
Impression: There is evidence of a fusiform
abdominal aortic aneurysm measuring 3.4 cm.
"""aaa_keywords="abdominal aortic aneurysm"ignore_keywords="screening aneurysm"keyword_regex=regexize_keywords(aaa_keywords)ignore_regex=regexize_keywords(ignore_keywords)nlp=spacy.load("en_core_web_sm")nlp.add_pipe("sentex",config={"sentence_regex":keyword_regex,"ignore_regex":ignore_regex,"annotate_ents":True,"label":"AAA"})doc=nlp(text)displacy.render(doc,style="ent",options={"ents":["AAA"]})CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-03-08)First release on PyPI.
Package: sentia
SENTIASENTIA is a PyTorch implementation of a text generation model combining multiple neural network architectures like GRUs, Transformers, MHAs and MEPA.InstallationpipinstallsentiaUsageimporttorchfromsentiaimportSENTIA# Create modelmodel=SENTIA(vocab_size=10000,embedding_dim=512,num_heads=8,num_layers=6,hidden_dim=512)# Forward passinput_ids=torch.randint(0,10000,(1,32))outputs=model(input_ids)# Generate textgenerated=model.generate(input_ids,max_length=128)Model ArchitectureThe SENTIA model consists of the following components:Embedding layerGRU layerMEPA (Mutation Enhanced Plasticity Architecture) layersTransformer decoder layersMulti-head attention layerOutput head layers
These components are combined to leverage the strengths of multiple architectures for improved text generation capabilities.TrainingThe fit() method can bne used to train the model on a dataset. It handles the training loop, gradient accumulation, and RL calculations. Currently the scheduler parameter only supports StepLR
Package: sentianalyse
# sentianalyseA simple python library that generates sentiment type(positive,negetive,neutral)
pie chart, percentage,number and ternary value for pandas dataframe text portion.The code is Python 2 and 3 compatible.# InstallationFast install:::pip install sentianalyseFor a manual install get this package:$wgethttps://github.com/garain/sentianalyse/archive/master.zip$unzipmaster.zip$rmmaster.zip$cdsentianalyse-masterInstall the package:python setup.py install# The library is pandas dataframe dependent.::
Have to get dataframe(‘text columns’) and give to command.
Like df[‘text’]# Exampleimportsentianalyseassa# Features# - sentiment type pie chart :sa.pie()# sentiment type amount :# - Get the sentiment type(postive,negetive,neutral numbers)sa.number()# sentiment percentage :# - Get the percentage of sentiment typesa.percentage()# sa.ternary_analysis# - Get the type of all text, here -1:negetive, 0:neutral, 1:positivesa.ternary_analysis()importpandasaspddf=pd.read_csv("/home/samin/anaconda3/dataset_2.csv")percent=at.percentage(df['text'])print(percent)number=sa.number(df['text'])print(number)analysis=sa.analysis_ternary(df['text'])print(analysis)#sa.pie(df['text'])# Pass list of texts as inputdf=pd.DataFrame(["I love you very much."],columns=['text'])Here is the output:Positve : 33.31 %, Negetive 20.96 %, Neutral : 45.72 %
{'positive  ': 1087, 'negetive': 684, 'neutral': 1492}
    [-1, 1, 0.0, 0.0, 0.0, 0.0,.......,1]Please cite these publications if this library comes to any use:Ray, Biswarup, Avishek Garain, and Ram Sarkar. “An ensemble-based hotel recommender system using sentiment analysis and aspect categorization of hotel reviews.” Applied Soft Computing 98 (2021): 106935.Garain, Avishek, and Sainik Kumar Mahata. “Sentiment Analysis at SEPLN (TASS)-2019: Sentiment Analysis at Tweet Level Using Deep Learning.” (2019).Garain, Avishek, and Arpan Basu. “The titans at SemEval-2019 task 5: Detection of hate speech against immigrants and women in twitter.” Proceedings of the 13th International Workshop on Semantic Evaluation. 2019.Garain, Avishek. “Humor Analysis based on Human Annotation (HAHA)-2019: Humor Analysis at Tweet Level using Deep Learning.” (2019).Garain, Avishek, and Arpan Basu. “The titans at SemEval-2019 task 6: Offensive language identification, categorization and target identification.” Proceedings of the 13th International Workshop on Semantic Evaluation. 2019.
Package: senticnet
SenticNet APISimple API to use SenticNet (http://sentic.net/).InstallUsing pip:$ pip install senticnetUsing the repository code:$ python setup.py installHow to usefromsenticnet.senticnetimportSenticNetsn=SenticNet()concept_info=sn.concept('love')polarity_label=sn.polarity_label('love')polarity_value=sn.polarity_value('love')moodtags=sn.moodtags('love')semantics=sn.semantics('love')sentics=sn.sentics('love')Also, you can use other languages:fromsenticnet.babelsenticnetimportBabelSenticNetbsn=BabelSenticNet('pt')concept_info=sn.concept('amor')polarity_label=sn.polarity_label('amor')polarity_value=sn.polarity_value('amor')moodtags=sn.moodtags('amor')semantics=sn.semantics('amor')sentics=sn.sentics('amor')You can find all supported languages here:http://sentic.net/api/About SenticNetSenticNet is an initiative conceived at the MIT Media Laboratory in 2010 within an industrial Cooperative Awards in Science and Engineering (CASE) research project, funded by the UK Engineering and Physical Sciences Research Council (EPSRC) and born from the collaboration between the University of Stirling, the Media Lab, and Sitekit Labs.Currently, both the SenticNet knowledge base and the SenticNet framework are being maintained and further developed by the Sentic Team, a multidisciplinary research group based at the School of Computer Engineering of Nanyang Technological University in Singapore, but also by many other sentic enthusiasts around the world.Please acknowledge the authors by citing SenticNet 6 in any research work or presentation containing results obtained in whole or in part through the use of the API:E Cambria, Y Li, F Xing, S Poria, K Kwok. SenticNet 6: Ensemble application of symbolic and subsymbolic AI for sentiment analysis. In: CIKM, 105-114 (2020)
Package: sentidict
TL;DR a python 3 package for dictionary based sentimentThis script provides many different sentiment dictionaries for
performing sentiment analysis. It has grown out of a projec to make a
particular dataset, the language assessment by Mechanical Turk (labMT)
word list, accessible to wider range of people. The labMT word list was
created by combining the 5000 words most frequently appearing in four
sources: Twitter, the New York Times, Google Books, and music lyrics,
and then scoring the words for sentiment on Amazon’s Mechanical Turk.
The list is described in detail in the publication Dodds’ et al. 2011,
PLOS ONE, “Temporal Patterns of Happiness and Information in a
Global-Scale Social Network: Hedonometrics and Twitter.”Incomplete documentation is available atRead The
Docs.This work by Andy Reagan is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International License.
Package: sentify
sentify is a simple and fast open source Python toolkit that aggregates in one step the tedious task of fetching, converting to  text and segmenting  documents into one sentence per line clean text filesI put it together thinking that it is an often unavoidable "stepping stone"  for getting quickly to the really interesting NLP and AI tasks we care about these days.The collected clean sentences are ready for NLP and ML tasks, including passing them to Generative AI  for summarization, relation extraction and QA.It  handles local and remote txt and pdf files and urls as well as Wikipedia pages given by their title.See code athttps://github.com/ptarau/sentify/blob/main/sentify/main.pyfor the simple, all in one API.Get it fromgithubor fetch it frompypiwithpip3 install sentifySee tests/tests.py for testing out the API on several use cases.Enjoy,Paul TarauJanuary, 2024
Package: sentile
sentileSentinel tile utilitiesThe sentile module provides convenient Sentinel tile utility functions.UsageTile name parsing>>>fromsentile.s2importTile>>>tile=Tile("S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE")>>>tile.name'T33UVU'>>>tile.orbit'R065'Scene classification mask enum>>>fromsentile.s2importSCL>>>SCL.THIN_CIRRUS10Path lookup based on band name>>>fromsentile.s2importTile,Band10,Band60>>>tile=Tile("S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE")>>>tile.get_band(Band10.B04)PosixPath('S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE/GRANULE/L2A_T33UVU_A026660_20200730T102528/IMG_DATA/R10m/T33UVU_20200730T102031_B04_10m.jp2')>>>tile.get_band(Band60.SCL)PosixPath('S2A_MSIL2A_20200730T102031_N0214_R065_T33UVU_20200730T110107.SAFE/GRANULE/L2A_T33UVU_A026660_20200730T102528/IMG_DATA/R60m/T33UVU_20200730T102031_SCL_60m.jp2')sentile CLISentile's command line interface, named "sentile", has commands for extracting a Sentinel tile's properties.$sentile--helpDevelopmentFor developmentmake

make run
$ sentile --help

$ exit
make downInside the self-contained reproducible containerflake8 sentile
mypy sentile
pytestSee AlsoInspired by themercantilemodule for Web Mercator tiles ❤️LicenseCopyright © 2020 robofarmDistributed under the MIT License (MIT).
Package: sentimental-onix
Sentimental OnixSentiment Analysis usingonnxfor python with a focus on beingspacycompatibleand EEEEEASY to use.FeaturesEnglish sentiment analysisSpacy pipeline componentSentiment model downloading from githubInstall$pipinstallsentimental_onix# download english sentiment model$python-msentimental_onixdownloadenUsageimportspacyfromsentimental_oniximportpipelinenlp=spacy.load("en_core_web_sm")nlp.add_pipe("sentencizer")nlp.add_pipe("sentimental_onix",after="sentencizer")sentences=[(sent.text,sent._.sentiment)fordocinnlp.pipe(["i hate pasta on tuesdays","i like movies on wednesdays","i find your argument ridiculous","soda with straws are my favorite",])forsentindoc.sents]assertsentences==[("i hate pasta on tuesdays","Negative"),("i like movies on wednesdays","Positive"),("i find your argument ridiculous","Negative"),("soda with straws are my favorite","Positive"),]Benchmarklibraryresultspacytextblob58.9%sentimental_onix69%See./benchmark/for infoDev setup / testingexpandInstallinstall the dev package and pyenv versions$pipinstall-e".[dev]"$python-mspacydownloaden_core_web_sm
$python-msentimental_onixdownloadenRun tests$black.
$pytest-vvlPackaging and publishingpython3-mpipinstall--upgradebuildtwine
python3-mbuild
python3-mtwineuploaddist/*