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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for europarser-0.2.3.tar.gz
Algorithm Hash digest
SHA256 91c23c17c5442a4df651d0503c4f534f68a34cf5840f4b98d28d2a65050a3e0a
MD5 be63e54e89e7f03adac5eb39e44a0839
BLAKE2b-256 50883e23ffe7effd34bf3068a326713fd691f0f2896a3b80c7d08f90121e3d8e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: europarser-0.2.3-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.8

File hashes

Hashes for europarser-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c27c8704469b5b4b7f59bc4e7ee354cda1441a0cee4711f06fcc5edd060f9a11
MD5 ab1538bf087ad8bf023f65f110319e1b
BLAKE2b-256 9431dfb31627ee65b244c4b872e470e54938289c8fb88e568e50a0a6d9bc309c

See more details on using hashes here.

Provenance

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