Python library and webapp for matching against standard industry and product classifiers. Comes with NAICS, GS1, and USEEIO built-in.
Install using pip or conda:
conda -c conda-forge -c cmutel perdu
-or-
pip install perdu
Depends on:
- appdirs
- docopt
- flask
- peewee
- rdflib
- rdflib-jsonld
- whoosh
As a webapp:
conda_webapp
As a library:
import perdu
perdu.search_useeio("plastic toy")
Perdu uses whoosh as the search engine. When you first import it, Perdu will import the three built-in catalogues in around one minute.
Currently, the only possibility to upload data to the web interface is via CSV, with the first column being the item name or title, and the second (optional) column being the item description. See perdu.test.fixtures
for examples.
See the files in perdu.extraction
for examples on how to extract data from PDFs (NAICS), XML (GS1), and JSON (USEEIO). Each search catalogue will have its own schema, but Perdu expects these schemas to have at least the columns name
, description
, and code
(see examples in perdu.searching
). New catalogues will need to have suitable functions provided in perdu.webapp.search_mapping
.
In addition to the default search method used in the web interface, Perdu also offers search corrections (search_corrector_gs1
, search_corrector_naics
, and search_corrector_useeio
) and disjunction maximization (search_gs1_disjoint
, search_useeio_disjoint
, and search_naics_disjoint
).