Failed

tests.test_api.test_document (from pytest)

Failing for the past 2 builds (Since #103 )
Took 9 ms.

This test is unclaimed

Error Message

AttributeError: module 'cophi.text.model' has no attribute 'filepath'

Stacktrace

tmpdir = local('/tmp/pytest-of-jenkins/pytest-23/test_document0')

    def test_document(tmpdir):
        filepath = make_file(tmpdir, "document.txt", DOCUMENT)
>       document = cophi.document(str(filepath), token_pattern=r"\w")

tests/test_api.py:23: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

filepath = '/tmp/pytest-of-jenkins/pytest-23/test_document0/sub/document.txt'
lemma = False, pos = None, jar = 'ddw-0.4.6.jar', language = 'de'
kwargs = {'token_pattern': '\\w'}

    def document(filepath, lemma=False, pos=None, jar="ddw-0.4.6.jar",
                 language="de", **kwargs):
        """Read a text file and create a Document object.
    
        Parameter:
            filepath (str): Path to the text file.
            lemma (bool): If True, lemmatize text (optional).
            pos (list): If not None, filter POS tags (optional).
            jar (str): Path to DARIAH-DKPro-Wrapper JAR file (optional).
            language (str): Language of text (optional).
            title (str): Describing title for the document (optional).
            lowercase (bool): If True, writes all letters in lowercase (optional).
            n (int): Number of tokens per ngram (optional).
            token_pattern (str): Regex pattern for one token (optional).
            maximum (int): Stop tokenizing after that much tokens (optional).
    
        Returns:
            A Document object.
        """
        if lemma or pos:
            return dkpro.pipe(filepath, jar, language, lemma, pos, **kwargs)
        else:
>           filepath = text.model.filepath(filepath)
E           AttributeError: module 'cophi.text.model' has no attribute 'filepath'

src/cophi/api.py:42: AttributeError