# Buggy code
def analyze(self, text: str) -> Doc:
    """The primary method for the NLP object, to which raw text strings are passed.

    >>> from cltkv1 import NLP
    >>> from cltkv1.languages.example_texts import get_example_text
    >>> from cltkv1.core.data_types import Doc
    >>> cltk_nlp = NLP(language="lat")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("lat"))
    >>> isinstance(cltk_doc, Doc)
    True
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='Gallia', pos='NOUN', lemma='mallis', scansion=None, xpos='A1|grn1|casA|gen2', upos='NOUN', dependency_relation='nsubj', governor=3, features={'Case': 'Nom', 'Degree': 'Pos', 'Gender': 'Fem', 'Number': 'Sing'}, embedding=..., stop=False, named_entity=True)

    >>> from cltkv1.languages.example_texts import get_example_text
    >>> cltk_nlp = NLP(language="grc")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("grc"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='ὅτι', pos='ADV', lemma='ὅτι', scansion=None, xpos='Df', upos='ADV', dependency_relation='advmod', governor=6, features={}, embedding=..., stop=True, named_entity=False)

    >>> cltk_nlp = NLP(language="chu")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("chu"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='отьчє', pos='NOUN', lemma='отьць', scansion=None, xpos='Nb', upos='NOUN', dependency_relation='vocative', governor=7, features={'Case': 'Voc', 'Gender': 'Masc', 'Number': 'Sing'}, embedding=None, stop=None, named_entity=None)

    >>> cltk_nlp = NLP(language="fro")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("fro"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='Une', pos='DET', lemma=None, scansion=None, xpos='DETndf', upos='DET', dependency_relation=None, governor=-1, features={'Definite': 'Ind', 'PronType': 'Art'}, embedding=None, stop=False, named_entity=False)

    >>> cltk_nlp = NLP(language="got")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("got"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='swa', pos='ADV', lemma='swa', scansion=None, xpos='Df', upos='ADV', dependency_relation='advmod', governor=1, features={}, embedding=..., stop=None, named_entity=None)
    >>> len(cltk_doc.sentences)
    3

    >>> cltk_nlp = NLP(language="cop")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("cop"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='ⲧⲏⲛ', pos='VERB', lemma='ⲧⲏⲛ', scansion=None, xpos='VSTAT', upos='VERB', dependency_relation='root', governor=-1, features={'VerbForm': 'Fin'}, embedding=None, stop=None, named_entity=None)

    >>> cltk_nlp = NLP(language="lzh")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("lzh"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='黃', pos='NOUN', lemma='黃', scansion=None, xpos='n,名詞,描写,形質', upos='NOUN', dependency_relation='nmod', governor=1, features={}, embedding=None, stop=None, named_entity=None)
    """
    doc = Doc(language=self.language.iso_639_3_code, raw=text)

    for process in self.pipeline.processes:
        a_process = process(input_doc=doc, language=self.language.iso_639_3_code)
        a_process.run()
        doc = a_process.output_doc

    return doc


# Traceback (TypeError)
In [1]: from cltk.corpus.utils.importer import CorpusImporter

In [2]: corpus_importer = CorpusImporter('latin')

In [3]: corpus_importer.
corpus_importer.import_corpus  corpus_importer.list_corpora
corpus_importer.language

In [3]: corpus_importer.
corpus_importer.import_corpus  corpus_importer.list_corpora
corpus_importer.language

In [3]: corpus_importer.list_corpora
Out[3]:
['latin_text_perseus',
'latin_treebank_perseus',
'latin_text_lacus_curtius',
'latin_text_latin_library',
'phi5',
'phi7',
'latin_proper_names',
'cltk_linguistic_data',
'latin_pos']

In [4]: corpus_importer.import_corpus('phi5', '/Users/kyle/Downloads/corpora/PH/')
/Users/kyle/Downloads/corpora/PHI5/  /Users/kyle/Downloads/corpora/PHI7/

In [4]: corpus_importer.import_corpus('phi5', '/Users/kyle/Downloads/corpora/PHI/')
/Users/kyle/Downloads/corpora/PHI5/  /Users/kyle/Downloads/corpora/PHI7/

In [4]: corpus_importer.import_corpus('phi5', '/Users/kyle/Downloads/corpora/PHI/')
/Users/kyle/Downloads/corpora/PHI5/  /Users/kyle/Downloads/corpora/PHI7/

In [4]: corpus_importer.import_corpus('phi5', '/Users/kyle/Downloads/corpora/PHI5/')
--- Logging error ---
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 971, in emit
msg = self.format(record)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 821, in format
return fmt.format(record)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 558, in format
record.message = record.getMessage()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", line 321, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/Users/kyle/Downloads/cltk/venv/bin/ipython", line 11, in <module>
sys.exit(start_ipython())
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/config/application.py", line 564, in launch_instance
app.start()
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/terminal/ipapp.py", line 371, in start
self.shell.mainloop()
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/terminal/interactiveshell.py", line 443, in mainloop
self.interact(display_banner=display_banner)
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/terminal/interactiveshell.py", line 567, in interact
self.run_cell(source_raw, store_history=True)
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2741, in run_cell
interactivity=interactivity, compiler=compiler)
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2833, in run_ast_nodes
if self.run_code(code):
File "/Users/kyle/Downloads/cltk/venv/lib/python3.4/site-packages/IPython/core/interactiveshell.py", line 2883, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-4-b2bc3206f5ea>", line 1, in <module>
corpus_importer.import_corpus('phi5', '/Users/kyle/Downloads/corpora/PHI5/')
File "/Users/kyle/Downloads/cltk/cltk/corpus/utils/importer.py", line 188, in import_corpus
logger.info('Incoming path:', path)
Message: 'Incoming path:'
Arguments: ('/Users/kyle/Downloads/corpora/PHI5/',)

# Fixed code
def analyze(self, text: str) -> Doc:
    """The primary method for the NLP object, to which raw text strings are passed.

    >>> from cltkv1 import NLP
    >>> from cltkv1.languages.example_texts import get_example_text
    >>> from cltkv1.core.data_types import Doc
    >>> cltk_nlp = NLP(language="lat")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("lat"))
    >>> isinstance(cltk_doc, Doc)
    True
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='Gallia', pos='NOUN', lemma='mallis', scansion=None, xpos='A1|grn1|casA|gen2', upos='NOUN', dependency_relation='nsubj', governor=3, features={'Case': 'Nom', 'Degree': 'Pos', 'Gender': 'Fem', 'Number': 'Sing'}, embedding=..., stop=False, named_entity=True)

    >>> from cltkv1.languages.example_texts import get_example_text
    >>> cltk_nlp = NLP(language="grc")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("grc"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='ὅτι', pos='ADV', lemma='ὅτι', scansion=None, xpos='Df', upos='ADV', dependency_relation='advmod', governor=6, features={}, embedding=..., stop=True, named_entity=False)

    >>> cltk_nlp = NLP(language="chu")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("chu"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='отьчє', pos='NOUN', lemma='отьць', scansion=None, xpos='Nb', upos='NOUN', dependency_relation='vocative', governor=7, features={'Case': 'Voc', 'Gender': 'Masc', 'Number': 'Sing'}, embedding=None, stop=None, named_entity=None)

    >>> cltk_nlp = NLP(language="fro")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("fro"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='Une', pos='DET', lemma=None, scansion=None, xpos='DETndf', upos='DET', dependency_relation=None, governor=-1, features={'Definite': 'Ind', 'PronType': 'Art'}, embedding=None, stop=False, named_entity=False)

    >>> cltk_nlp = NLP(language="got")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("got"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='swa', pos='ADV', lemma='swa', scansion=None, xpos='Df', upos='ADV', dependency_relation='advmod', governor=1, features={}, embedding=..., stop=None, named_entity=None)
    >>> len(cltk_doc.sentences)
    3

    # >>> cltk_nlp = NLP(language="cop")
    # >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("cop"))
    # >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    # Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='ⲧⲏⲛ', pos='VERB', lemma='ⲧⲏⲛ', scansion=None, xpos='VSTAT', upos='VERB', dependency_relation='root', governor=-1, features={'VerbForm': 'Fin'}, embedding=None, stop=None, named_entity=None)

    >>> cltk_nlp = NLP(language="lzh")
    >>> cltk_doc = cltk_nlp.analyze(text=get_example_text("lzh"))
    >>> cltk_doc.words[0] # doctest: +ELLIPSIS
    Word(index_char_start=None, index_char_stop=None, index_token=0, index_sentence=0, string='黃', pos='NOUN', lemma='黃', scansion=None, xpos='n,名詞,描写,形質', upos='NOUN', dependency_relation='nmod', governor=1, features={}, embedding=None, stop=None, named_entity=None)
    """
    doc = Doc(language=self.language.iso_639_3_code, raw=text)

    for process in self.pipeline.processes:
        a_process = process(input_doc=doc, language=self.language.iso_639_3_code)
        a_process.run()
        doc = a_process.output_doc

    return doc