Skip to content

Instantly share code, notes, and snippets.

Avatar

tagtog-gists

View GitHub Profile
@tagtog-gists
tagtog-gists / tagtog-webhook.py
Last active Feb 12, 2021
Example of how to connect your models to tagtog using webhooks. Find the article explaining this gist's context at https://tagtog.medium.com/connect-your-nlp-models-to-tagtog-using-webhooks-13d422ae4dff
View tagtog-webhook.py
from flask import Flask, request, Response
import json
import spacy
import requests
import os
def get_class_id(label):
"""
Translates the spaCy label id into the tagtog entity type id
- label: spaCy label id
@tagtog-gists
tagtog-gists / tagtog-spaCy.py
Last active Feb 11, 2021
This is a gist to explain how to easily integrate spaCy and tagtog. Find the article that goes through this gist's context at https://tagtog.medium.com/integrating-tagtog-and-spacy-16fb0addeea1
View tagtog-spaCy.py
import spacy
import json
import requests
import os
def get_class_id(label):
"""
Translates the spaCy label id into the tagtog entity type id
- label: spaCy label id
"""