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

Uploaded Python 3

File details

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

File metadata

  • Download URL: europarser-0.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3e22116f283311f1565a931762bd98409ae21336b0935198a3aa184a5bd41935
MD5 4a60f06aaf7394dc69764f98b4d49a16
BLAKE2b-256 ced87c9594385a329c5ad983f4f6fabd7d1fd9a5b609c1263e5e176510bdfb36

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: europarser-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 077f032a6c141bde5105da6a023c9c6cd4bf6ed1710cc14a9cecb2cd3db10f02
MD5 bcdb3dcd5bf11d9a38c0750756ab1dff
BLAKE2b-256 ab33b641513d48c8826d8df21d96846f26199dd5c6f1189e8b05a4d57877fc90

See more details on using hashes here.

Provenance

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