Skip to content

Reference

run(input_path, output_path, output_filename=OUTPUT_FILE, embeddings_path=MODELS_FOLDER)

Run extra-model on a csv file and write the results to a csv file.

The output directory is created if it doesn't already exist.

Parameters:

Name Type Description Default
input_path Path

path to the input csv file. It must have a CommentId and a Comments column, spelled exactly that way.

required
output_path Path

path to the directory the results are written to.

required
output_filename Path

name of the results file, written inside output_path. The .csv extension is not enforced.

OUTPUT_FILE
embeddings_path Path

path to the directory holding the embeddings files.

MODELS_FOLDER

Raises:

Type Description
ExtraModelError

if the input file is missing the required columns.

entrypoint(input_path, output_path, output_filename, embeddings_path, debug=False)

Run the Extra algorithm for unsupervised topic extraction.

INPUT_PATH (required) is the path to the input csv file with the user generated texts. It must contain CommentId and Comments columns that are spelled exactly this way.

OUTPUT_PATH (option) is the path to the output directory. Default is /io.

OUTPUT_FILENAME (option) is the filename of the output file. Default is result.csv. The .csv file extension is not enforced. Please take care of this accordingly.

EMBEDDINGS_PATH (option) is the path where the extra model will load the embeddings from. defaults to /embeddings.