This commit is contained in:
Vadim Mazalov 2017-11-24 17:25:58 -08:00
Родитель 0b76ebc8c6
Коммит 2758a8c15d
5 изменённых файлов: 17 добавлений и 15 удалений

Просмотреть файл

@ -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 \

Просмотреть файл

@ -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<MLFDeserializer>(corpus, deserializerConfig, primary);
}
else if (type == L"LatticeDeserializer")
{
deserializer = make_shared<LatticeDeserializer>(corpus, deserializerConfig, primary);
}
else
{
// Unknown type.

Просмотреть файл

@ -18,7 +18,9 @@
<ClCompile Include="MLFIndexBuilder.cpp">
<Filter>MLF</Filter>
</ClCompile>
<ClCompile Include="LatticeDeserializer.cpp" />
<ClCompile Include="LatticeDeserializer.cpp">
<Filter>Lattice</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
@ -64,7 +66,9 @@
<ClInclude Include="MLFIndexBuilder.h">
<Filter>MLF</Filter>
</ClInclude>
<ClInclude Include="LatticeDeserializer.h" />
<ClInclude Include="LatticeDeserializer.h">
<Filter>Lattice</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Common">
@ -79,5 +83,8 @@
<Filter Include="HTK">
<UniqueIdentifier>{c786b890-c7e4-4617-b5df-e2fdef2291ad}</UniqueIdentifier>
</Filter>
<Filter Include="Lattice">
<UniqueIdentifier>{f6fe345a-e603-491c-b9ed-8b46d01c070c}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

Просмотреть файл

@ -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<std::string, unsigned int> htkfeatreader::parsedpath::archivePathStringMap;
std::vector<std::wstring> 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");

Просмотреть файл

@ -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.
// <key, chunkid, offset inside chunk>, sorted by key to be able to retrieve by binary search.
std::vector<std::tuple<size_t, ChunkIdType, uint32_t>> m_keyToChunkLocation;
@ -79,6 +76,4 @@ private:
bool m_expandToPrimary;
};
typedef std::shared_ptr<HTKDeserializer> HTKDeserializerPtr;
}