From 0de361cd00f7a841b112457f07800a110073bf77 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 20 Jun 2020 18:31:07 +0200 Subject: [PATCH] Draft Corpus class for DocBin --- spacy/gold/corpus_docbin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/gold/corpus_docbin.py b/spacy/gold/corpus_docbin.py index 3ebaa7376..a9562944c 100644 --- a/spacy/gold/corpus_docbin.py +++ b/spacy/gold/corpus_docbin.py @@ -5,7 +5,7 @@ from .example import Example from ..tokens import DocBin -class GoldCorpus(object): +class Corpus: """An annotated corpus, using the JSON file format. Manages annotations for tagging, dependency parsing and NER. @@ -38,7 +38,7 @@ class GoldCorpus(object): continue elif path.is_dir(): paths.extend(path.iterdir()) - elif path.parts[-1].endswith(".spacy") + elif path.parts[-1].endswith(".spacy"): locs.append(path) return locs