Skip to main content

Classifier for institution and scholar data

Project description

eric_chen_forward

To train the model:

from eric_chen_forward.model import Classifier

model = Classifier()

# option 1
# text files of labels and passages respectively, separated by newlines
model.train("labels_file_path", "passages_file_path")

# option 2
# csv file with a 'label' column and 'passage' column, the column names are hardcoded
model.train(csv_file="csv_file_path")

To use the saved model in code:

with open('model.pkl', 'rb') as f:
    model = pickle.load(f)

To run the classifier demo:

from eric_chen_forward import url_classifier_demo

url_classifier_demo.Demo('file path of model.pkl')

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

eric_chen_forward-0.0.6.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

eric_chen_forward-0.0.6-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page