How to use the wikiextractor.extract_document function in wikiextractor

To help you get started, we’ve selected a few wikiextractor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nournia / wikifier / wikiextractor / annotated_wikiextractor.py View on Github external
def process_page(page):
    wiki_document = wikiextractor.extract_document(page)
    if not wiki_document: return

    wiki_document = wiki_extractor.extract(wiki_document)
    if not wiki_document: return

    return wiki_document.__str__().encode('utf-8')
github jodaiber / Annotated-WikiExtractor / annotated_wikiextractor / annotated_wikiextractor.py View on Github external
def process_page(page):
    wiki_document = wikiextractor.extract_document(page)
    if not wiki_document: return

    wiki_document = wiki_extractor.extract(wiki_document)
    if not wiki_document: return

    return wiki_document.__str__().encode('utf-8')