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
Last synced: 10 months ago · JSON representation ·

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
Created over 4 years ago · Last pushed over 2 years ago
Metadata Files
Readme Citation

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 :-------------------------:|:-------------------------: Original Mask | Original Mask

10% | 20% :-------------------------:|:-------------------------: Original Mask | Original Mask

Owner

  • Name: Thibault Clérice
  • Login: PonteIneptique
  • Kind: user
  • Location: Chantilly, France
  • Company: PSL ENS - Lattice

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
enhancement (4) optional (2) required (2) hacktober (1)
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

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 9 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 20.3%
Dependent repos count: 21.6%
Average: 25.5%
Forks count: 29.8%
Downloads: 45.7%
Maintainers (1)
Last synced: 10 months ago

Dependencies

requirements.txt pypi
  • 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
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
setup.py pypi