Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Créer un scénario pour intégrer pdfalto #17

Open
alix-tz opened this issue Feb 11, 2021 · 5 comments
Open

Créer un scénario pour intégrer pdfalto #17

alix-tz opened this issue Feb 11, 2021 · 5 comments

Comments

@alix-tz
Copy link
Owner

alix-tz commented Feb 11, 2021

Il s'agirait d'utiliser Aspyre pour créer un système de conversion pour passer des ALTO XML (3) produits par le script pdfalto en intégrant les modifications nécessaires (schéma, filename, ...) et la question de l'homothétie (qui se pose aussi pour les ALTO de Limb (#15).

<?xml version="1.0" encoding="UTF-8"?>
<!-- added manually for compatibility with eScriptorium -->
<alto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://www.loc.gov/standards/alto/ns-v2#"
      xmlns:page="http://schema.primaresearch.org/PAGE/gts/pagecontent/2013-07-15"
      xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v2# http://www.loc.gov/standards/alto/alto.xsd">
<!-- end of added -->
<!--<alto xmlns="http://www.loc.gov/standards/alto/ns-v3#">-->
<Description>
<MeasurementUnit>pixel</MeasurementUnit>
<sourceImageInformation>
	<!-- <fileName>test_aspyre/1903 159_258 3.pdf</fileName> -->
	<!-- added manually for compatibility with eScriptorium -->
	<fileName>Annuaire_1903 161.tif</fileName>
	<!-- end of added -->
</sourceImageInformation>
<OCRProcessing ID="IdOcr">
...

Autre modification: pdfalto met des float dans les attributs comme "HEIGHT", "WIDTH", "HPOS" etc, au lieu de int.


Cette feature est une solution pour répondre à https://gitlab.inria.fr/scripta/escriptorium/-/issues/331

@alix-tz
Copy link
Owner Author

alix-tz commented Feb 11, 2021

Exemple de problème d'homothetie :
image

@alix-tz
Copy link
Owner Author

alix-tz commented Mar 18, 2021

L'idée initiale était de permettre d'exécuter pdfalto via Aspyre (on charge un PDF, on récupère des paies image/XML ALTO prêtes à être chargées dans eScriptorium).
Mais on va découper en deux temps :

  • modifier grâce à Aspyre des XML ALTO générés par PDFALTO prêt à être chargés dans eScriptorium
  • dans un second temps seulement voir s'il est possible de gérer la partie exécution de pdfalto

Dans le scénario 1, l'utilisateur charge des images et des XML créés par PDFALTO exécuté en amont, hors Aspyre.
Dans le scénario 2, l'utilisateur charge un PDF sans avoir eu à exécuter PDFALTO avant.

@alix-tz
Copy link
Owner Author

alix-tz commented Mar 19, 2021

#21

@alix-tz
Copy link
Owner Author

alix-tz commented Mar 19, 2021

Il y a un problème au niveau de la position des baselines, mais il ne semble pas y avoir assez d'information dans le fichier XML ALTO pour pouvoir replacer la ligne en partie basse...

image

@alix-tz
Copy link
Owner Author

alix-tz commented Mar 22, 2021

Problème résolu avec l'option --vpadding (#23 )

Ex : -vp 70

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant