This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from evalmodel import test_eval_model | |
| dico, df_metrics = test_eval_model("ner_models/mytrainedmodel", TEST_DATA) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import unicode_literals, print_function | |
| import re | |
| import spacy | |
| import pandas as pd | |
| from spacy import displacy | |
| import os | |
| from collections import defaultdict | |
| import itertools | |
| import plac | |
| import random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import libraries | |
| from bs4 import BeautifulSoup | |
| import requests | |
| import re | |
| import pandas as pd | |
| import json | |
| class ArticleTable(object): | |
| """From medium page with listing of articles get links and then extract info from each article""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # import custom modules | |
| import html_file_parsing as hfp | |
| # define listing sources | |
| Tech_Topics=[ | |
| 'https://medium.com/topic/artificial-intelligence', | |
| 'https://medium.com/topic/blockchain', | |
| 'https://medium.com/topic/cryptocurrency', | |
| 'https://medium.com/topic/data-science', | |
| 'https://medium.com/topic/machine-learning', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import spacy | |
| from spacy import displacy | |
| # install spacy model | |
| #! pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.2.0/en_core_web_md-2.2.0.tar.gz | |
| nlp = spacy.load("en_core_web_md") | |
| doc = nlp("I think Barack Obama met founder of Facebook at occasion of a release of a new NLP algorithm.") | |
| displacy.render(doc, style="dep") # (1) | |
| displacy.render(doc, style="ent") # (2) |
NewerOlder