Saravanan666/pypi-org huggingface dataset:
Package: documentor
Auto Documentation for developersAuthor: Shaon MajumderUtilitiesAuto DocumentationInstallationpip install documentationFunction UsagesFunction Usages EndVersioningmajor.minor[.maintenance[.build]](example:1.4.3.5249)adoption: major.minor.patch.maintenance.status.trials_for_successThe last position0 for alpha (status)1 for beta (status)2 for release candidate3 for (final) releaseFor instance:1.2.0.1 instead of 1.2-a11.2.1.2 instead of 1.2-b2 (beta with some bug fixes)1.2.2.3 instead of 1.2-rc3 (release candidate)1.2.3.0 instead of 1.2-r (commercial distribution)1.2.3.5 instead of 1.2-r5 (commercial distribution with many bug fixes)
Package: document-polluter
Document PolluterOverviewDocument Polluter replaces gendered words in documents to create test data for machine learning models in order to identify bias.Checkout the examples in theinteractive notebook.Installationdocument-polluteris available on PyPIhttp://pypi.python.org/pypi/document-polluterInstall via pip$ pip install document-polluterInstall via easy_install$ easy_install document-polluterInstall from repogit repo <https://github.com/gregology/document-polluter>$ git clone --recursive git://github.com/gregology/document-polluter.git
$ cd document-polluter
$ python setup.py installBasic usage>>> from document_polluter import DocumentPolluter
>>> documents = ['she shouted', 'my son', 'the parent']
>>> dp = DocumentPolluter(documents=documents, genre='gender')
>>> print(dp.polluted_documents['female'])
['she shouted', 'my daughter', 'the mother']Running Test$ python document_polluter/tests.py
Package: document-processing
document_processingInstallpipinstalldocument_processingThis package provides functions to pre-process text for various NLP tasks. It usesspaCyand its models to analyse the text.BehaviourThe entry point of this package isprocess_dcoumentsin which you put theSeriesof documents to process and thespaCymodel name that will be loaded to transform the texts.From a document, you can extract tokens, lemmas and entities with theget_tokens_lemmas_entities_from_documentfunction, giving it the document returned by the previous function, and the preprocessing function, as described below.Pre-processing functionspreprocess_list_of_texts: process tokens, remove stopwords, non-standard characters, etc.preprocess_list_of_tweets: same as above, and remove all token that seem to be HTTP links, which are often present in Tweets.
Package: document-scanner
Document ScannerAn interactive document scanner built in Python using OpenCVThe scanner takes a poorly scanned image, finds the corners of the document, applies the perspective transformation to get a top-down view of the document, sharpens the image, and applies an adaptive color threshold to clean up the image.On my test dataset of 300 images, the program correctly detected the corners of the document 92.8% of the time.The scanner can process an entire directory of images automatically and save the output in an output directory:Here are some examples of images before and after scan:UsageYou can use this script by downloading it from pypipipinstalldocument-scanneraftter installing it from pypi index, you can use it from the terminal as follows.python scan.py (--images <IMG_DIR> | --image <IMG_PATH>) [-i]The-iflag enables interactive mode, where you will be prompted to click and drag the corners of the document. For example, to scan a single image with interactive mode enabled:python scan.py --image sample_images/desk.JPG -iAlternatively, to scan all images in a directory without any input:python scan.py --images sample_images
Package: document-template
安装方法使用pip安装pip install document-template使用方法参考test.py和test.html:test.html:<html><head><metacharset="UTF-8"><metaname="viewport"content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"><metahttp-equiv="X-UA-Compatible"content="ie=edge"><title>#{title}</title></head><body><h1>#{head}</h1><ahref="#{url}">#{url}</a><br><h1>网站标题</h1><hr><spanstyle="font-size: larger;font-weight: bold">#{large_font}</span><br>show_span 为真时显示:
#{bool:show_span}<span>show_span is True</span>#{bool:show_span}
show_span 为假时显示:
#{bool:!show_span}<span>show_span is False</span>#{bool:!show_span}<br>#{copy:start}渲染多行文本，并替换局部内容：#{contents} 和 #{another_contents}<br>#{copy:end}</body></html>test.py:importsysfromdocument_templateimportDocumentTemplate__author__='liying'ifsys.version_info<(3,0):reload(sys)sys.setdefaultencoding('utf-8')if__name__=='__main__':id_dict={"title":"标题","head":"正文标题","url":"https://github.com/liying2008","large_font":"大号字体"}id_dict['show_span']=True# Multi-line copy supports string, list and tuple# id_dict['contents'] = 'ABCDEFG'# id_dict['another_contents'] = '1234567'id_dict['contents']=('A','B','C','D','E','F','G')id_dict['another_contents']=['1','2','3','4','5','6','7']dt=DocumentTemplate()dt.load("test.html",encoding='utf-8')dt.set_identifier_dict(id_dict)dt.save_document("new_test.html")指令说明普通变量：#{var} 定义普通模板变量；bool指令：#{bool:var}text#{bool:var} 通过变量 var 是否为 True 控制 text 是否显示，或者 #{bool:!var}text#{bool:!var} 通过变量 var 是否为 False 控制 text 是否显示；copy指令：#{copy:start}text#{collection_var}#{copy:end} 循环遍历 collection_var ，将其值填充到内容中。注意事项不支持copy 指令内使用copy 指令或bool 指令。LICENSEMIT License
Package: document-tools
Document Tools🔧 Tools to automate your document understanding tasks.This package contains tools to automate your document understanding tasks by leveraging the power of🤗 Datasetsand🤗 Transformers.With this package, you can (or will be able to):🚧Createa dataset from a collection of documents.✅Transforma dataset to a format that is suitable for training a model.🚧Traina model on a dataset.🚧Evaluatethe performance of a model on a dataset of documents.🚧Exporta model to a format that is suitable for inference.FeaturesThis project is under development and is in the alpha stage. It is not ready for production use, and if you find any
bugs or have any suggestions, please let us know by opening anissueor apull request.Featured models❌DiT✅LayoutLMv2✅LayoutLMv3✅LayoutXLMUsageOne-liner to get started:fromdatasetsimportload_datasetfromdocument_toolsimporttokenize_dataset# Load a dataset from 🤗 Hubdataset=load_dataset("deeptools-ai/test-document-invoice",split="train")# Tokenize the datasettokenized_dataset=tokenize_dataset(dataset,target_model="layoutlmv3")For more information, please see thedocumentationCreditsThis package was created withCookiecutterand thewaynerv/cookiecutter-pypackageproject template.
Package: document-tracking
document_trackingThis project is originaly based on the Miranda et al.’s implementation of a news tracking algorithm published in the following paper (original code:)Miranda, Sebastião, Artūrs Znotiņš, Shay B. Cohen, et Guntis Barzdins. 
2018. “Multilingual Clustering of Streaming News”. In 2018 
Conference on Empirical Methods in Natural Language Processing, 4535‑44.
Brussels, Belgium: Association for Computational Linguistics. 
https://www.aclweb.org/anthology/D18-1483/.This work is a reimplementation of the original work from these authors where the entire API was rewritten to be used by external projects. The idea of this reimplementation is to propose the news tracking algorithms with industrial standards, such as allowing automation and quality.The package also includes alternative algorithms and baselines, currently only K-Means is provided.AlgorithmSupervisedMain ClassMiranda et al. (2018)Yesdocument_tracking.miranda.StreamingAggregatorK-MeansNodocument_tracking.kmeans.KMeansAggregatorUse thenews_trackingpackage in order to use this library if you’re not a developer.Installationpipinstalldocument_trackingLicenceSome parts, provided by Miranda et al. in their original paper remain under the BSD-3 clause. The code that is reused from the original code is provided under athird_partypackage and remains under its own license. Other part are released under the GPLv3 licence. To make it easier distinguish both licenses, headers were added on top of files. Both licenses are included in this repository.
Package: document-tracking-resources
document_tracking_resourcesThis package is part of thenews_trackingproject and aims at providing the necessary resources for algorithms to run and data preparation.Installationpipinstalldocument_tracking_resourcesData formatDocument tracking algorithms use two classes,NewsCorpusandTwitterCorpusrespectively for news articles data (with title and content) and tweets. A corpus is to be seen as a table of elements that comprises, at least, three categories of elements:Documentcharacteristics: the columns that correspond to the document itself: date of publication, title, text, source, etc. See theDOCUMENT_COLUMNSproperty.Documentfeatures: the different computed features (either TF-IDF weightings or dense representation for instance) that represent the multiple dimensions of the documents (title, text or both) of the original corpus. See theFEATURE_COLUMNSproperty.Documentcluster: the ground truth cluster id of each document, in order to train and test the corpus. See theGROUND_TRUTH_COLUMNSproperty.This data format relies on thepandaslibrary, especially theDataFramedata structure. It is generally saved in.pickleformat in order to make it easy to load and save the structure. TheCorpusAPI provides functions to loadDataFramein.pickleformat as aCorpus.Features formatThe features of theCorpusare column named after theFEATURES_COLUMNSlist. This package allows manipulating two kind of data different features:Sparse: generally produced via a TF-IDF weighting model, the sparse representation is saved as a mapping, for each dimension (title, text or both) between the feature to weight (the tokens for instance) and its weight. Each dimension is then a dictionary of all the terms and their weightings.Dense: vectors of equal size that provide a representation, as a vector of number of each dimension of the original document (title, text or both).
Package: document-variable-injector
Document argument injectorProvides a simple helper methodArgument(s):document      (str)   the document loaded as a stringparams        (dict)  key,value == match,replacementencapsulation (tuple)   variable encapsulation ('leftisde', 'rightside')Returns the provided document with injected parametersUsagefrominjectorimportinjectordocument:strwithopen('profile.html','r')asfile:document=file.read()payload:dict={'user.firstName':'John','user.lastName':'Smith','user.email':'jsmith@example.com','user.phone':'+555111444''user.postcode':'1234 Town','user.address':'12 Street'}injector(document=document,params=params,encapsulation=('{','}'))
Package: docums-autorefs
docums-autorefsAutomatically link across pages in Docums.InstallationWithpip:python3-mpipinstalldocums-autorefsUsage# docums.ymlplugins:-search-autorefsIn one of your Markdown files (e.g.doc1.md) create some headings:## Hello, world!## Another headingLink to [Hello, World!](#hello-world) on the same page.This is anormallink to an anchor. Docums generates anchors for each heading, and they can always be used to link to something, either within the same page (as shown here) or by specifying the path of the other page.But with this plugin, you canlink to a heading from any other pageon the sitewithoutneeding to know the path of either of the pages, just the heading title itself.Let's create another Markdown page to try this,subdir/doc2.md:We can [link to that heading][hello-world] from another page too.

This works the same as [a normal link to that heading](../doc1.md#hello-world).Linking to a heading without needing to know the destination page can be useful if specifying that path is cumbersome, e.g. when the pages have deeply nested paths, are far apart, or are moved around frequently. And the issue is somewhat exacerbated by the fact that Docums supports onlyrelativelinks between pages.Note that this plugin's behavior is undefined when trying to link to a heading title that appears several times throughout the site. Currently it arbitrarily chooses one of the pages.Requirementsdocums-autorefsrequires Python 3.6 or above.To install Python 3.6, I recommend usingpyenv.# install pyenvgitclonehttps://github.com/pyenv/pyenv~/.pyenv# setup pyenv (you should also put these three lines in .bashrc or similar)exportPATH="${HOME}/.pyenv/bin:${PATH}"exportPYENV_ROOT="${HOME}/.pyenv"eval"$(pyenvinit-)"# install Python 3.6pyenvinstall3.6.12# make it available globallypyenvglobalsystem3.6.12
Package: docums-charts-plugin
docums-charts-pluginDocumsplugin to create plots from data using the declarativevegalitesyntax. This makes it easier to build reproducible reports.đŸ‘‰ See it in action on thedemo pageIncludes supports fordocurialtheme features likeinstant loadinganddark color themes.InstallationInstall the plugin usingpip3:pip3installdocums-charts-pluginNext, add the following lines to yourdocums.yml:plugins:
  - search
  - charts

extra_javascript:
  - https://cdn.jsdelivr.net/npm/vega@5
  - https://cdn.jsdelivr.net/npm/vega-lite@5
  - https://cdn.jsdelivr.net/npm/vega-embed@6

markdown_extensions:
  - pymdownx.superfences:
      custom_fences:
        - name: vegalite
          class: vegalite
          format: !!python/name:docums_charts_plugin.fences.fence_vegaliteIf you have nopluginsentry in your config file yet, you'll likely also want to add thesearchplugin. Docums enables it by default if there is nopluginsentry set.UsageYou can insert any validvegaliteJSON into a markdown file using:```vegalite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "A simple bar chart with embedded data.",
  "data": {
    "values": [
      {"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
      {"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
      {"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
    ]
  },
  "mark": "bar",
  "encoding": {
    "x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
    "y": {"field": "b", "type": "quantitative"}
  }
}
```See thevegalite editorfor a range of examples you could copy-paste into your docums siteDocumentationSee the documentationkhanhduy1407.github.io/docums-charts-pluginfor examples, use cases and options.
Package: docums-exclude
File exclude plugin for documsdocums-excludeis adocums pluginthat allows you
to exclude files from your input using unix-style wildcards (globs) or
regular expressions (regexes).Quick startInstall the module using pip:pip3 install docums-excludeIn your project, add a plugin configuration todocums.yml:plugins:-exclude:glob:-exclude/this/path/*-"*.tmp"-"*.pdf"-"*.gz"regex:-'.*\.(tmp|bin|tar)$'You can provide zero or more patterns of each type.  (If you don't provide
any patterns, then nothing will happen!)Note!  Because of peculiarity of yaml syntax, theglob:andregex:linesmust notstart with a dash, but the lines under themmuststart with
a dash.Also because of yaml, patterns that start with a punctuation mark must be
quoted.When writing regexes, it's best to use single quotes rather than double
quotes, so that your regex backslash escapes are preserved correctly without
having to be doubled up.
Package: docums-git-authors-plugin
docums-git-authors-pluginLightweightDocumsplugin to display git authors of a markdown page:Authors: Jane Doe, John DoeSee thedemo. The plugin only considers authors of the current lines in the page ('surviving code' usinggit blame).Other Docums plugins that use information from git:docums-git-revision-date-localized-pluginfor displaying the last revision dateSetupInstall the plugin using pip3:pip3installdocums-git-authors-pluginNext, add the following lines to yourdocums.yml:plugins:
  - search
  - git-authorsIf you have nopluginsentry in your config file yet, you'll likely also want to add thesearchplugin. Docums enables it by default if there is nopluginsentry set.You can then use the{{ git_page_authors }}tag in your markdown document, or choose to customize your docums theme (seeusagepage in the docs).Note when using build environmentsThis plugin needs access to the last commit that touched a specific file to be able to retrieve the date. By default many build environments only retrieve the last commit, which means you might need to:Change your CI settingsgithub actions: setfetch_depthto0(docs)gitlab runners: setGIT_DEPTHto1000(docs)bitbucket pipelines: setclone: depth: full(docs)DocumentationSeekhanhduy1407.github.io/docums-git-authors-plugin
Package: docums-git-revision-date-localized-plugin
docs-git-revision-date-localized-pluginOther Docums plugins that use information from git:docums-git-authors-pluginfor displaying the authors from gitSetupInstall the plugin usingpip3with the following command:pip3installdocums-git-revision-date-localized-pluginNext, add the following lines to yourdocums.yml:plugins:-search-git-revision-date-localizedIf you have nopluginsentry in your config file yet, you'll likely also want to add thesearchplugin. Docums enables it by default if there is nopluginsentry set.Thedocurialtheme has built in support forgit-revision-date-localizedand you should already see the last revision date on the bottom of your pages. See thedocumentationon how to fine-tune the appearance and the date format.Note when using build environmentsThis plugin needs access to the last commit that touched a specific file to be able to retrieve the date. By default many build environments only retrieve the last commit, which means you might need to:Change your CI settingsgithub actions: setfetch-depthto0(docs)gitlab runners: setGIT_DEPTHto0(docs)bitbucket pipelines: setclone: depth: full(docs)DocumentationSeekhanhduy1407.github.io/docums-git-revision-date-localized-plugin.
Package: docums-img2fig-plugin
Docums Img2Fig PluginThisDocumsplugin converts markdown encoded images like![An image caption](\assets\images\my-image.png)into<figureclass="figure-image"><imgsrc="\assets\images\my-image.png"alt="An image caption"><figcaption>An image caption</figcaption></figure>RequirementsThis package requires Python >=3.5 and Docums version 1.0.0.0 or higher.InstallationInstall the package with pip:pip install docums-img2fig-pluginEnable the plugin in yourdocums.yml:plugins:-search-img2figNote:If you have nopluginsentry in your config file yet, you'll likely also want to add thesearchplugin. Docums enables it by default if there is nopluginsentry set, but now you have to enable it explicitly.More information about plugins in theDocums documentation
Package: docums-nav-enhancements
Docums Nav EnhancementsThis is a small plugin for the excellentDocumsproject which makes some enhancements to the navigation.FeaturesEnhanced titlesBy default, Docums looks for a level 1 atx-style header found at the top of the document and uses that for the page title.If you are dealing with documentation from third-party sources you may find that some of them start their titles at level 2 (possibly for aesthetic reasons), or use setext-style headers instead.This plugin will try to help by looking through each Markdown document and using the following rules to detect a page title instead:Use the first atx-style header found in the document at any level between 1 to 6, which is any line beginning with between 1 to 6 '#' characters.Or use the first setext-style header, which is any line where the line immediately after contains only '=' or '-' characters, effectively 'underlining' the line.It will also remove any additional markup that is found in the title, such as image or link tags, which would otherwise be rendered as string literals in the generated HTML.Reduced foldersIn order to de-clutter the navigation, the plugin looks for any sections containing only one page, and tries to collapse that page up a level into its parent. This helps deal with navigation bars filled with single-page folders to keep things looking tidy.UsageInstall the plugin:pipinstalldocums-nav-enhancementsAdd the plugin to yourdocums.ymlDocums configurationfile:plugins:-docums-nav-enhancementsKnown issuesWhen changing the page title, or collapsing single-page folders, this can sometimes result in the effective page title being quite different. Currently this plugin does not re-sort the nav bar alphabetically when this happens.A second issue is that these options are not independently controllable, at least not in the first version; it's all or nothing for now!
Package: docums-print-site-plugin
docums-print-site-pluginDocumsplugin that adds a print page to your site that combines the entire site, allowing for easy export to PDF and standalone HTML. Seedemo.Features :star2:Support fordocurialtheme, including features like instant loading and dark color themes.Support for pagination in PDFs.Many options to customize appearanceOption to add a cover pageLightweight, no dependencies.SetupInstall the plugin usingpip3:pip3installdocums-print-site-pluginNext, add the following lines to yourdocums.yml:plugins:
  - search
  - print-site⚠️ Make sure to putprint-siteto thebottomof the plugin list. This is because other plugins might alter your site (like the navigation), and you want these changes included in the print page.If you have nopluginsentry in your config file yet, you'll likely also want to add thesearchplugin. Docums enables it by default if there is nopluginsentry set.UsageNavigate to/print_page/orprint_page.htmlExport to standalone HTML (seeexport to HTML)Export to PDF using your browser usingFile > Print > Save as PDF(seeexport to PDF)DocumentationAvailable atkhanhduy1407.github.io/docums-print-site-plugin.
Package: docums-redirects
Docums RedirectsPlugin fordocumsto create page redirects (e.g. for moved/renamed pages).InstallingNote:This package requires Docums version 1.0.0 or higher.Install with pip:pipinstalldocums-redirectsUsingTo use this plugin, specify your desired redirects in the plugin'sredirect_mapssetting in yourdocums.yml:plugins:-redirects:redirect_maps:'old.md':'new.md''old/file.md':'new/file.md''some_file.md':'http://external.url.com/foobar'Note: don't forget that specifying thepluginssetting will override the defaults if you didn't already have it set! Seethis pagefor more information.The redirects map should take the form of a key/value pair:The key of each redirect is the originalmarkdown doc(relative to thedocs_dirpath).This plugin will handle the filename resolution during thedocums buildprocess.
This should be set to what the original markdown doc's filename was (or what itwould beif it existed), not the final HTML file rendered by DocumsThe value is theredirect target. This can take the following forms:Path of themarkdown docyou wish to be redirected to (relative todocs_dir)This plugin will handle the filename resolution during thedocums buildprocess.
This should be set to what the markdown doc's filename is, not the final HTML file rendered by DocumsExternal URL (e.g.http://example.com)During thedocums buildprocess, this plugin will create.htmlfiles insite_dirfor each of the "old" file that redirects to the "new" path.
It will produce a warning if any problems are encountered or of the redirect target doesn't actually exist (useful if you havestrict: trueset).use_directory_urlsIf you haveuse_directory_urls: trueset (which is the default), this plugin will modify the redirect targets to thedirectoryURL, not theactualindex.htmlfilename.
However, it will create theindex.htmlfile for each target in the correct place so URL resolution works.For example, a redirect map of'old/dir/README.md': 'new/dir/README.md'will result in an HTML file created at$site_dir/old/dir/index.htmlwhich redirects to/new/dir/.Additionally, a redirect map of'old/dir/doc_name.md': 'new/dir/doc_name.md'will result in$site_dir/old/dir/doc_name/index.htmlredirecting to/new/dir/doc_name/.This mimics the behavior of how Docums builds the site dir without this plugin.ContributingPull Requests are welcome.File bugs and suggestions in theGitHub Issues.ReleasingmakereleaseIt will prompt you for your PyPI user and password.See:https://packaging.python.org/tutorials/packaging-projects/https://packaging.python.org/guides/migrating-to-pypi-org/