Extract themes from verbatims
Project description
Matcher-pcx-synomia
Extract themes from verbatims.
Version 1.1
Release date: 2019-08-07
Getting Started
pip install ...
Prerequisites
- flashtext: $ pip install flashtext
Usage
- You would need a lexicon.txt with the following structure:
manque de place=><manque de place;place;-1< personnel désagréable=><personnel désagréable;personnel;-1< train direct=><train direct;train;1<
- Init matcher:
themes_matcher = matcher.ThemesMatcher('lexicon.txt')
- Extract themes from verbatims:
verbatims = ["Le confort et la propreté","Rapidité (Train Direct), mais personnel désagréable","c'est catastrophique… retards chroniques, personnel désagréable","Le manque de place ds le tgv"] vbs2matches = themes_matcher.match(verbatims) print(vbs2matches) {'Rapidité (Train Direct), mais personnel désagréable': [['train direct', 'train', '1'], ['personnel désagréable', 'personnel', '-1']], 'Le confort et la propreté': [], 'Le manque de place ds le tgv': [['manque de place', 'place', '-1']], "c'est catastrophique… retards chroniques, personnel désagréable": [['personnel désagréable', 'personnel', '-1']]}
Authors
- Synomia
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
Built Distribution
Hashes for matcher_pcx_synomia-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90589d60f573555d640478618e00aefb093346f952e992f9d5b522f54e8df07a |
|
MD5 | f253f9b22221b0481be3ab899d929536 |
|
BLAKE2b-256 | 25e7b32b2969a9419fc8b13b539c87e89943b124778b98270287e4e511a81155 |