Permalink
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (33 sloc) 707 Bytes
metadata:
title: Classify
example start: 2
example end: 5
documentation: "https://docassemble.org/docs/ml.html#save"
---
modules:
- docassemble.base.util
---
code: |
ml = SimpleTextMachineLearner(group_id='demo')
---
initial: True
code: |
if defined('classification'):
entry_to_classify.classify(classification)
del classification
entry_to_classify = ml.one_unclassified_entry()
if entry_to_classify is not None:
need(classification)
---
question: |
How should this be classified?
subquestion: |
> ${ entry_to_classify.independent }
fields:
- no label: classification
---
mandatory: True
question: |
There is nothing left to classify.
buttons:
- Check again: refresh