Skip to main content

No project description provided

Project description

Europarser

PyPI - Version PyPI - Python Version

Parsing d'articles de presse pour extraire le contenu et le transformer en des formats d'analyse comme TXM ou Iramuteq.

This readme is also available in English


Table des matières

Installation

Vous aurez besoin soit de python soit de docker pour pouvoir utiliser Europarser sur votre ordinateur.

Python

Europarser est disponible sur PyPi, vous pouvez l'installer avec pip à l'aide de la commande suivante:

pip install europarser

Vous pouvez ensuite vérifier que l'installation s'est bien passée en lançant europarser à l'aide de europarser --api

Docker

docker run -p 8000:8000 --name europarser ceressorbonne/europarser

Le serveur sera accessible sur localhost:8000, vous pouvez également spécifier un autre port de la manière suivante:

docker run -p [port souhaité]:8000 --name europarser ceressorbonne/europarser

Développement

Pour installer Europarser en mode développement, vous pouvez cloner le dépôt git et installer les dépendances avec pip:

git clone https://github.com/CERES-Sorbonne/EuropressParser.git
cd EuropressParser
pip install -e .

Usages

Usage basique

from pathlib import Path

from europarser.main import main
from europarser.models import Params

folder = Path('/path/to/your/articles')
# As a list, you can choose between "json", "txm", "iramuteq", "csv", "stats", "processed_stats", "plots", "markdown" or any combination of them
outputs = ["json", "txm", "iramuteq", "csv", "stats", "processed_stats", "plots", "markdown"]
params = Params(
    minimal_support_kw=5,
    minimal_support_authors=2,
    minimal_support_journals=8,
    minimal_support_dates=3,
)

main(folder, outputs, params=params)

Usage sous forme d'API web

  1. Installez le package

    pip install europarser
    
  2. Lancez le serveur avec la commande suivante

    europarser --api [--host HOST] [--port PORT]
    
  3. Allez sur localhost:8000 (par défaut) pour accéder à l'interface de l'API

Usage en ligne de commande

  1. Installez le package

    pip install europarser
    
  2. Utilisez la commande suivante pour parser un dossier

    europarser --folder /path/to/your/articles --output [one of "json", "txm", "iramuteq", "csv", "stats", "processed_stats", "plots", "markdown"] [--output other_output] [--minimal-support-kw 5] [--minimal-support-authors 2] [--minimal-support-journals 8] [--minimal-support-dates 3]
    

Exemple

europarser --folder /path/to/your/articles --output json --output txm --minimal-support-kw 5 --minimal-support-authors 2 --minimal-support-journals 8 --minimal-support-dates 3

License

europarser est distribué sous les termes de la licence AGPLv3.

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

europarser-0.3.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

europarser-0.3.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file europarser-0.3.0.tar.gz.

File metadata

  • Download URL: europarser-0.3.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for europarser-0.3.0.tar.gz
Algorithm Hash digest
SHA256 aa232c10480291dbe89eb08095e287fc1409803fd3ce4924045ac66e74d433bb
MD5 d374c57fae4e192a65defdb5d1bb5637
BLAKE2b-256 c9229ad1101c5576fa633ad916566cff967900e5c0c2e6cddca1ae88198332db

See more details on using hashes here.

Provenance

The following attestation bundles were made for europarser-0.3.0.tar.gz:

Publisher: hatch-build-and-publish.yml on CERES-Sorbonne/EuroParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file europarser-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: europarser-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for europarser-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 062a66270cdc75f8f481c27961268d76e3072967efb442e59ece1e0b33c8571f
MD5 fac1d4ad774af710822ae02599c9eef9
BLAKE2b-256 ccd786d7ca00b1b21a69b5eac111678ede556911342a0f9b73676b2088d70358

See more details on using hashes here.

Provenance

The following attestation bundles were made for europarser-0.3.0-py3-none-any.whl:

Publisher: hatch-build-and-publish.yml on CERES-Sorbonne/EuroParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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