From a2a0af1c70aa399f3397578ad1c1e94968d3e748 Mon Sep 17 00:00:00 2001 From: Franck Dary <franck.dary@lis-lab.fr> Date: Sun, 21 Mar 2021 19:20:25 +0100 Subject: [PATCH] Allow blank line to be commented in tsv --- common/src/util.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/util.cpp b/common/src/util.cpp index 26356d5..a274723 100644 --- a/common/src/util.cpp +++ b/common/src/util.cpp @@ -394,7 +394,7 @@ std::vector<std::vector<std::string>> util::readTSV(std::string_view tsvFilename if (line.back() == '\n') line.pop_back(); - if (line.size() < 3) + if (line.size() == 0) { if (!inputHasBeenRead) continue; @@ -420,8 +420,7 @@ std::vector<std::vector<std::string>> util::readTSV(std::string_view tsvFilename if (not mcdLine.empty()) for (auto & sentence : sentences) sentence.insert(sentence.begin(), mcdLine); - + return sentences; } - -- GitLab