diff --git a/Makefile b/Makefile index b9da1561f..cfa6b6c68 100644 --- a/Makefile +++ b/Makefile @@ -780,6 +780,7 @@ HTKDESERIALIZERS_SRC =\ $(SOURCEDIR)/Readers/HTKDeserializers/ConfigHelper.cpp \ $(SOURCEDIR)/Readers/HTKDeserializers/Exports.cpp \ $(SOURCEDIR)/Readers/HTKDeserializers/HTKDeserializer.cpp \ + $(SOURCEDIR)/Readers/HTKDeserializers/LatticeDeserializer.cpp \ $(SOURCEDIR)/Readers/HTKDeserializers/HTKMLFReader.cpp \ $(SOURCEDIR)/Readers/HTKDeserializers/MLFDeserializer.cpp \ $(SOURCEDIR)/Readers/HTKDeserializers/MLFIndexBuilder.cpp \ diff --git a/Source/Readers/HTKDeserializers/Exports.cpp b/Source/Readers/HTKDeserializers/Exports.cpp index 1eb247925..5cd450c5d 100644 --- a/Source/Readers/HTKDeserializers/Exports.cpp +++ b/Source/Readers/HTKDeserializers/Exports.cpp @@ -15,6 +15,7 @@ #include "HTKMLFReader.h" #include "HeapMemoryProvider.h" #include "HTKDeserializer.h" +#include "LatticeDeserializer.h" #include "MLFDeserializer.h" #include "StringUtil.h" #include "V2Dependencies.h" @@ -65,6 +66,10 @@ extern "C" DATAREADER_API bool CreateDeserializer(DataDeserializerPtr& deseriali { deserializer = make_shared(corpus, deserializerConfig, primary); } + else if (type == L"LatticeDeserializer") + { + deserializer = make_shared(corpus, deserializerConfig, primary); + } else { // Unknown type. diff --git a/Source/Readers/HTKDeserializers/HTKDeserializers.vcxproj.filters b/Source/Readers/HTKDeserializers/HTKDeserializers.vcxproj.filters index 64bac8d52..4ad610793 100644 --- a/Source/Readers/HTKDeserializers/HTKDeserializers.vcxproj.filters +++ b/Source/Readers/HTKDeserializers/HTKDeserializers.vcxproj.filters @@ -18,7 +18,9 @@ MLF - + + Lattice + @@ -64,7 +66,9 @@ MLF - + + Lattice + @@ -79,5 +83,8 @@ {c786b890-c7e4-4617-b5df-e2fdef2291ad} + + {f6fe345a-e603-491c-b9ed-8b46d01c070c} + \ No newline at end of file diff --git a/Source/Readers/HTKDeserializers/LatticeDeserializer.cpp b/Source/Readers/HTKDeserializers/LatticeDeserializer.cpp index 5bbfd6feb..603e2e639 100644 --- a/Source/Readers/HTKDeserializers/LatticeDeserializer.cpp +++ b/Source/Readers/HTKDeserializers/LatticeDeserializer.cpp @@ -4,7 +4,7 @@ // #include "stdafx.h" -#include "HTKDeserializer.h" +#include "LatticeDeserializer.h" #include "ConfigHelper.h" #include "Basics.h" #include "StringUtil.h" @@ -14,12 +14,9 @@ namespace CNTK { using namespace Microsoft::MSR::CNTK; -std::unordered_map htkfeatreader::parsedpath::archivePathStringMap; -std::vector htkfeatreader::parsedpath::archivePathStringVector; - using namespace std; -HTKDeserializer::HTKDeserializer( +LatticeDeserializer::LatticeDeserializer( CorpusDescriptorPtr corpus, const ConfigParameters& cfg, bool primary) @@ -27,9 +24,6 @@ HTKDeserializer::HTKDeserializer( m_verbosity(0), m_corpus(corpus) { - // TODO: This should be read in one place, potentially given by SGD. - m_frameMode = (ConfigValue)cfg("frameMode", "true"); - m_verbosity = cfg(L"verbosity", 0); ConfigParameters input = cfg(L"input"); diff --git a/Source/Readers/HTKDeserializers/LatticeDeserializer.h b/Source/Readers/HTKDeserializers/LatticeDeserializer.h index ca794fb91..7ee8510a5 100644 --- a/Source/Readers/HTKDeserializers/LatticeDeserializer.h +++ b/Source/Readers/HTKDeserializers/LatticeDeserializer.h @@ -62,9 +62,6 @@ private: // General configuration int m_verbosity; - // Flag that indicates whether a single speech frames should be exposed as a sequence. - bool m_frameMode; - // Used to correlate a sequence key with the sequence inside the chunk when deserializer is running not in primary mode. // , sorted by key to be able to retrieve by binary search. std::vector> m_keyToChunkLocation; @@ -79,6 +76,4 @@ private: bool m_expandToPrimary; }; -typedef std::shared_ptr HTKDeserializerPtr; - }