From 887ff406b6192f07f0b92ab0a5a58f2fa30499ce Mon Sep 17 00:00:00 2001 From: "Dr. Kashif Rasul" Date: Fri, 20 Dec 2019 11:28:05 +0100 Subject: [PATCH] fix source context --- pts/dataset/file_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pts/dataset/file_dataset.py b/pts/dataset/file_dataset.py index c6c96bf..035c067 100644 --- a/pts/dataset/file_dataset.py +++ b/pts/dataset/file_dataset.py @@ -84,7 +84,7 @@ class FileDataset(Dataset): for path in self.files(): for line in JsonLinesFile(path): data = self.process(line.content) - data["source"] = SourceContext(source=line.span, row=line.span.line) + data["source"] = SourceContext(source=line.span.path, row=line.span.line) yield data def __len__(self):