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.5.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.5-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: europarser-0.3.5.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.5.tar.gz
Algorithm Hash digest
SHA256 be512eda8afbaafcbaa7a1f770773a6504bc8cd85bb28e278f1119290ce2ddf5
MD5 c1d409f3b73f6a0f6f9bd9775cf6913c
BLAKE2b-256 020a8fb7ba9dc438b3bf24dea6e4b42aa7f08ad93d64630e7dd45359d1d87525

See more details on using hashes here.

Provenance

The following attestation bundles were made for europarser-0.3.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: europarser-0.3.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3bdb4c88261c7d689d94a7c66983632d4d4a08a4749150b1949ff5cab8c40fdd
MD5 4102cc27fd4554279860d16b3f64bccb
BLAKE2b-256 9c00f488b94f0c260bc819a3c9702bf752c570e7db738b55d0cf42202d288c3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for europarser-0.3.5-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