Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 re | |
from typing import List | |
import spacy | |
from spacy.tokens import Doc | |
from tqdm import tqdm | |
class SpacyPreprocessor: | |
def __init__( |
This file contains 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
#!/usr/bin/env python | |
import plac | |
import re | |
import random | |
import json | |
import pandas as pd | |
from pathlib import Path | |
from collections import Counter | |
import thinc.extra.datasets | |
import spacy |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 time | |
import urllib2 | |
import threading | |
from Queue import Queue | |
from random import choice | |
def get_random_article(namespace=None): | |
""" Download a random wikipiedia article""" | |
try: |