-
Notifications
You must be signed in to change notification settings - Fork 22
Model Server API
Lee Dong Ho edited this page Jul 24, 2019
·
17 revisions
AlpacaTag:
+ alpaca_client:
- __init__.py
- setup.py
- alpaca_server
- annotation
The best way to install the client is via setup.py install. move into alpaca_client directory and enter the command:
python setup.py install
Method | Description |
---|---|
.initiate(project_id) |
Model Initiate: If the model of same project id already exists in the directory, this method loads the model. If not, initiates the model |
.online_initiate(sentences, predefined_label) |
If the model is firstly initialized, it needs to make mappings of words, chars and labels to feature indices. (word_vocab, char_vocab, label_vocab) |
.online_learning(sentences, labels, epoch, batch) |
feeds annotated sentences into the model with specified epoch and batch size. |
.active_learning(sentences, acquire) |
Feeds the sentences into the model and get the most ambiguous instances by size of acquire |
.predict(sentences) |
Feeds the sentences and get the prediction |