template-analysis 0.0.7
pip install template-analysis
Latest version
Released:
Create template from strings (reverse formatter)
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD-3-Clause)
- Author: Yui Kitsu
- Requires: Python >=3.9
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Project description
template-analysis
Generate template and extract variables from texts. In other words, template-analysis makes reverse template (untemplate).
Usage
Currently, this supports to analyze only two texts.
from template_analysis import analyze
result = analyze([
"A dog is a good pet",
"A cat is a good pet",
"A cat is a pretty pet",
"A bird is a great pet",
])
result.to_format_string() # => "A {} is a {} pet"
result.args[0] # => ["dog", "good"]
result.args[1] # => ["cat", "good"]
result.args[2] # => ["cat", "pretty"]
result.args[3] # => ["bird", "great"]
Concepts / Future plans
Development plans
- 1. Untemplate two texts.
- 2. Untemplate multiple / complex texts.
- 3. Untemplate nested / tree-structured texts.
- 4. Support several features for scraping.
- 5. Implement a more efficient algorithm.
Image boards
License
The 3-Clause BSD License. See also LICENSE file.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: BSD License (BSD-3-Clause)
- Author: Yui Kitsu
- Requires: Python >=3.9
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file template_analysis-0.0.7.tar.gz
.
File metadata
- Download URL: template_analysis-0.0.7.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61c5caf8887d632c8c71a401e66e58a2b673753ad82c748be082817f9f8d681 |
|
MD5 | 00b780d7f7b1482517e7f59dfa074ef2 |
|
BLAKE2b-256 | 25533cd35741eebe34b0b845c9b591608b0e1f889e6897f9345a41da4b7b641f |
File details
Details for the file template_analysis-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: template_analysis-0.0.7-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fbe57c4858d050fe1cb8f79021768df8dc555e6f9f10f951415d64a1e3f80ec |
|
MD5 | 0dc431e0913ecc76e8a4b13eba6574d3 |
|
BLAKE2b-256 | c136e914b73c18312e422a078fd640c1b54fd08751215a2c408c5cf188051fb5 |