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 scrapy | |
from scrapy.http import safeurl | |
class Spider(scrapy.Spider): | |
name = 'loremipsum' | |
start_urls = ('https://www.lipsum.com',) | |
def parse(self, response): |
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
#!/usr/bin/env python2 | |
# coding: utf-8 | |
import nltk | |
def get_available_corpora(): | |
for element in dir(nltk.corpus): | |
if element[0] == '_': | |
continue | |
elements_type = str(type(getattr(nltk.corpus, element))) |