Package: plaintext-analyzer
Installation from pip3pip3install--verboseplaintext_analyzerpython-mspacydownloaden_core_web_trf
python-mspacydownloades_dep_news_trfUsagePlease refer toapi docs.Excutable usageGet vocabularies from plaintext filepta_vocab--sourceen_plaintext.txt--stypeFILE--langenGet vocabularies from textpta_vocab--source"The typical Bangladeshi breakfast consists of flour-based flatbreads such as chapati, roti or paratha, served with a curry. Usually the curry can be vegetable, home-fried potatoes, or scrambled eggs. The breakfast varies according to location and the eater's income. In villages and rural areas, rice with curry (potato mash, dal ) is mostly preferred by day laborers. In the city, sliced bread with jam or jelly is chosen due to time efficiency. In Bangladesh tea is preferred to coffee and is an essential part of most breakfasts. Having toasted biscuits, bread or puffed rice with tea is also very popular."--stypeRAW--langenGet vocabularies from plaintext file, and write to csv filespta_vocab--sourceen_plaintext.txt--stypeFILE--langen--dstnameen_vocabGet vocabularies from text, and write to csv filepta_vocab--source"The typical Bangladeshi breakfast consists of flour-based flatbreads such as chapati, roti or paratha, served with a curry. Usually the curry can be vegetable, home-fried potatoes, or scrambled eggs. The breakfast varies according to location and the eater's income. In villages and rural areas, rice with curry (potato mash, dal ) is mostly preferred by day laborers. In the city, sliced bread with jam or jelly is chosen due to time efficiency. In Bangladesh tea is preferred to coffee and is an essential part of most breakfasts. Having toasted biscuits, bread or puffed rice with tea is also very popular."--stypeRAW--langen--dstnameen_vocabGet phrases from plaintext filepta_phrase--sourceen_plaintext.txt--stypeFILE--langenGet phrases from textpta_phrase--source"The typical Bangladeshi breakfast consists of flour-based flatbreads such as chapati, roti or paratha, served with a curry. Usually the curry can be vegetable, home-fried potatoes, or scrambled eggs. The breakfast varies according to location and the eater's income. In villages and rural areas, rice with curry (potato mash, dal ) is mostly preferred by day laborers. In the city, sliced bread with jam or jelly is chosen due to time efficiency. In Bangladesh tea is preferred to coffee and is an essential part of most breakfasts. Having toasted biscuits, bread or puffed rice with tea is also very popular."--stypeRAW--langenGet phrases from plaintext file, and write to csv filespta_phrase--sourceen_plaintext.txt--stypeFILE--langen--dstnameen_phraseGet phrases from text, and write to csv filepta_phrase--source"The typical Bangladeshi breakfast consists of flour-based flatbreads such as chapati, roti or paratha, served with a curry. Usually the curry can be vegetable, home-fried potatoes, or scrambled eggs. The breakfast varies according to location and the eater's income. In villages and rural areas, rice with curry (potato mash, dal ) is mostly preferred by day laborers. In the city, sliced bread with jam or jelly is chosen due to time efficiency. In Bangladesh tea is preferred to coffee and is an essential part of most breakfasts. Having toasted biscuits, bread or puffed rice with tea is also very popular."--stypeRAW--langen--dstnameen_phrasePackage usagedef parser_vocab(source, stype, lang):

  sf = PlaintextReader(source, stype, lang)
  sens = sf.sentences

  analyzer = VocabAnalyzer(lang)
  exs = analyzer.overview_vocabs(sens)

  print(exs)

def parser_phrase(source, stype, lang):

  sf = PlaintextReader(source, stype, lang)
  sens = sf.sentences

  analyzer = PhraseAnalyzer(lang)
  exs = analyzer.overview_phrases(sens)

  print(exs)DevelopmentClone projectgit clone https://github.com/qishe-nlp/plaintext-analyzer.gitInstallpoetryInstall dependenciespoetry updateTestpoetry run pytest -rPwhich run tests undertests/*Executepoetry run pta_vocab --help
poetry run pta_phrase --helpCreate sphinx docspoetry shell
cd apidocs
sphinx-apidoc -f -o source ../plaintext_analyzer
make html
python -m http.server -d build/htmlHost docs on github pagescp -rf apidocs/build/html/* docs/BuildChangeversioninpyproject.tomlandplaintext_analyzer/__init__.pyBuild python package bypoetry buildGit commit and pushPublish from local dev envSet pypi test environment variables in poetry, refer topoetry docPublish to pypi test bypoetry publish -r testPublish through CIGithub action build and publish package totest pypi repogit tag [x.x.x]
git push origin masterManually publish topypi repothroughgithub action