Skip to main content

Text tokenizer done for SPLN 2022/2023

Project description

Table of Contents

  1. Objetivo
  2. Argparser

Objetivo

  • O objetivo deste TPC era a criação de um package python que recebesse como input ficheiros textos e fosse capaz de os tokenizar. Passando como argumento alguns regex costumizados transformá-los em tokens que iriam aparecer no texto final.
  • Por fim era ainda objetivo a disponibilização do módulo feito num repositório como o pypi ou o testpypi
  • Era ainda possível adicionar tokens costumizáveis com o argumento –abbreviations, sendo estas definidas em formato json

Argparser

usage: Tokenizor [-h] [--files [FILES ...]] [--chapter CHAPTER] [--pagebreak PAGEBREAK] [--output [OUTPUT ...]]
                 [--append] [--abbreviations ABBREVIATIONS]

Tokenize a file given as input

options:
  -h, --help            show this help message and exit
  --files [FILES ...], -f [FILES ...]
                        Define the file that is supposed to be tokenized
  --chapter CHAPTER, -cap CHAPTER
                        Define the regex for a Chapter
  --pagebreak PAGEBREAK, -pb PAGEBREAK
                        Define the regex for a page break
  --output [OUTPUT ...], -o [OUTPUT ...]
                        Define the output files to be written. The output files will map to the same order of
                        input files. If number of output files is less than the number of input files then the
                        other files will be written to the stdin.
  --append, -a          Define if the output is supposed to be appended
  --abbreviations ABBREVIATIONS, -abbr ABBREVIATIONS
                        Define the path to a json with a json that maps the regex of the abbreviation with the
                        token wanted.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokenizador-1.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokenizador-1.4-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tokenizador-1.4.tar.gz.

File metadata

  • Download URL: tokenizador-1.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for tokenizador-1.4.tar.gz
Algorithm Hash digest
SHA256 5bc9fa298ee8d535b602140685a0ceed908a3edd608601dd2995610aad961f87
MD5 9f00cc19aa719aa8240425afe43c7b7c
BLAKE2b-256 0d695f9d10b5f132bc75f9d8f2d28d4e08449d7ad2d997a0d7cf28a57ed702f6

See more details on using hashes here.

File details

Details for the file tokenizador-1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: tokenizador-1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for tokenizador-1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b2672d55974368b3137f3a67f139013ba164ab5cbf459b8c19ffb3b2781efd86
MD5 fe001dbc9a38351a1b502306c0fda557
BLAKE2b-256 5145bfcacf40b4ef84e39e98d3e4cab402632e0a70a0d643a1784010ca08a7cb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page