Skip to content

Instantly share code, notes, and snippets.

@netj
Created March 24, 2016 23:03
Show Gist options
  • Save netj/5bd566d16534191e952d to your computer and use it in GitHub Desktop.
Save netj/5bd566d16534191e952d to your computer and use it in GitHub Desktop.
title: Mindtagger task for labeling whole documents
items: {
file: sampled_documents.csv
key_columns: [doc_id]
grouping_columns: [doc_id]
}
template: template.html
doc_id json preds
doc1 ["a","b"] {0}
<mindtagger mode="recall">
<template for="each-item">
<span ng-show="true"><div><strong>note id: {{item.doc_id}}</strong></div></span>
<big mindtagger-word-array="item.json" array-format="json">
<span mindtagger-highlight-words index-arrays="tag.nnpm" with-style="background-color: magenta;"></span>
<mindtagger-highlight-words index-array="item.preds" array-format="postgres" with-style="background-color: cyan;"/>
<span mindtagger-selectable-words index-array="cursor.selection"></span>
<span mindtagger-highlight-words index-array="cursor.selection" with-style="border-bottom: 2px solid;"></span>
<span mindtagger-highlight-words index-array="item.positions" array-format="postgres" with-style="background-color: yellow;"></span>
</big>
<br>
</template>
<template for="tags">
<div ng-init="
MindtaggerTask.defineTags(
{ nnpm: { type: 'parametric', multiple: false }
})
">
<span mindtagger-parametric-tags
with-value="cursor.selection"
render-each-value="item.words | filterArrayByIndexes:value:'postgres'"></span>
</div>
</template>
</mindtagger>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment