Skip to content

Commit

Permalink
(added a log message)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankseide committed Nov 30, 2015
1 parent aeb281b commit 56a565d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions DataReader/LUSequenceReader/LUSequenceParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ template class LUSequenceParser<double, std::wstring>;
template<class NumType, class LabelType>
long BatchLUSequenceParser<NumType, LabelType>::Parse(size_t recordsRequested, std::vector<long> *labels, std::vector<vector<long>> *input, std::vector<SequencePosition> *seqPos, const map<wstring, long>& inputlabel2id, const map<wstring, long>& outputlabel2id, bool canMultiplePassData)
{
fprintf(stderr, "BatchLUSequenceParser: Parsing input data...\n");

// transfer to member variables
m_inputs = input;
m_labels = labels;
Expand All @@ -58,16 +60,15 @@ long BatchLUSequenceParser<NumType, LabelType>::Parse(size_t recordsRequested, s
long lineCount = 0;
bool bAtEOS = false; /// whether the reader is at the end of sentence position
SequencePosition sequencePositionLast(0, 0, 0);
/// get line
wstring ch;

wstring ch;
while (lineCount < recordsRequested && mFile.good())
{
getline(mFile, ch);
ch = wtrim(ch);

if (mFile.eof())
{
{
if (canMultiplePassData)
{
ParseReset(); /// restart from the corpus begining
Expand Down

0 comments on commit 56a565d

Please sign in to comment.