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

Uploaded Python 3

File details

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

File metadata

  • Download URL: europarser-0.3.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.9

File hashes

Hashes for europarser-0.3.3.tar.gz
Algorithm Hash digest
SHA256 743242190e8a8ff331052b9321880b1e98652cb27c74eabad2be8d8dffc977b7
MD5 f93d52df32298bd724b7b3a3960175d6
BLAKE2b-256 abe7e576a3b807edad5e03c43ab0554fc5a780ec76c0b0b6d5aa624d2bfc21a2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: europarser-0.3.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.9

File hashes

Hashes for europarser-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6aae3ab9c051985313b5886903dd41d49fe2f8a0b7ef82b838696337e5ea7b85
MD5 eaf55f57924cf0fb733d60dbad95d3fd
BLAKE2b-256 3b25de56adc95b72b44e2da3bf52bbc8a8344f8e344ee7a90e677e8df25bbde3

See more details on using hashes here.

Provenance

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