Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.5%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: PonteIneptique
- Language: Python
- Default Branch: main
- Size: 19.5 MB
Statistics
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
LSS (Layout Segmentation Simplifier)
Install
pip install https://github.com/PonteIneptique/lss/archive/refs/heads/main.zip
or
pip install layouts-segmentation-simplifier
Use
Generic use
```python from lss.parsers import PageXML
file = PageXML.fromfile( # Path to your file "data/0002Main_frame.xml", # Optional: set-up the namespace, as they tend to change a lot namespace="http://schema.primaresearch.org/PAGE/gts/pagecontent/2019-07-15" )
Simplify your baseline: things within 10% of your line height will be discarded (Seems to be a good number)
file.simplify_lines(ratio=.10)
Simplify your baseline: things within 15% of your mask height will be discarded (Seems to be a good number)
file.simplify_masks(ratio=.15)
You can retrieve the xml in file.xml or dump the modified xml in file.xml
file.dump(filepath="file.xml")
```
Qualitatively search for best parameters
You can also get it to make multiple simulation, to chose the best value (highest ratio = bigger simplification)
```python from lss.parsers import PageXML
page = PageXML.fromfile("./data/0002Mainframe.xml") page.findnamespace() # Useful in case you use PageXML as it scans for the right namespace page.testvalues( [(.05, .05), (.1, .1), (.15, .15), (.20, .20)], image="./data/0002Mainframe.jpg", basenameoutput="./data/0002Mainframe" ) ```
In this context, lines will be simplified by a ratio of 0.05, 0.10, 0.15 and 0.20. Mask will be as well. Few files will be saved. Each test will create test files with overlays (cf. folder data for all examples):
Original | 15% ratio on both line and masks
:-------------------------:|:-------------------------:
| 
10% | 20%
:-------------------------:|:-------------------------:
| 
Owner
- Name: Thibault Clérice
- Login: PonteIneptique
- Kind: user
- Location: Chantilly, France
- Company: PSL ENS - Lattice
- Website: https://twitter.com/ponteineptique
- Twitter: ponteineptique
- Repositories: 81
- Profile: https://github.com/PonteIneptique
Simply working on stuff.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Layout Segmentation Simplifier (LSS)
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Thibault
family-names: Clérice
affiliation: Inria
orcid: 'https://orcid.org/0000-0003-1852-9204'
repository-code: 'https://github.com/PonteIneptique/lss'
abstract: >-
LSS is designed for simplifying baselines and masks in
ALTO or PAGE formats when too many points are used.
license: MPL-2.0-no-copyleft-exception
commit: 5906fbf
date-released: '2021-10-21'
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 4
- Total pull requests: 1
- Average time to close issues: 4 days
- Average time to close pull requests: 1 minute
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.75
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- PonteIneptique (4)
Pull Request Authors
- PonteIneptique (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 9 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 2
- Total maintainers: 1
pypi.org: layouts-segmentation-simplifier
Layout Segmentation Simplifier
- Homepage: https://github.com/ponteineptique/lss
- Documentation: https://layouts-segmentation-simplifier.readthedocs.io/
- License: MIT
-
Latest release: 0.0.2
published over 4 years ago
Rankings
Maintainers (1)
Dependencies
- Pillow >=8.3.2,<8.4.0
- click >=8.0.1,<9.0.0
- lxml ==4.6.3
- shapely >=1.7.1,<1.8.0
- simplification ==0.5.13
- tqdm >=4.62.3,<5.0.0
- actions/checkout v2 composite
- actions/setup-python v2 composite