aboutsummaryrefslogtreecommitdiff
path: root/nerv/examples/lmptb/lmptb/lmvocab.lua
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2016-02-17 20:14:06 +0800
committerDeterminant <ted.sybil@gmail.com>2016-02-17 20:14:06 +0800
commit0ee43c21af4fcd3aed070b1f5ad1eb9feb2ad159 (patch)
treeceb1d38328767fb657bc0d37ec6e513b08a86277 /nerv/examples/lmptb/lmptb/lmvocab.lua
parent490a10c2130773bd022f05513fa2905b6a6c6e91 (diff)
try to merge manually
Diffstat (limited to 'nerv/examples/lmptb/lmptb/lmvocab.lua')
-rw-r--r--nerv/examples/lmptb/lmptb/lmvocab.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/nerv/examples/lmptb/lmptb/lmvocab.lua b/nerv/examples/lmptb/lmptb/lmvocab.lua
index 0e7ef3e..38bb18e 100644
--- a/nerv/examples/lmptb/lmptb/lmvocab.lua
+++ b/nerv/examples/lmptb/lmptb/lmvocab.lua
@@ -2,8 +2,6 @@ require 'lmptb.lmutil'
local Vocab = nerv.class("nerv.LMVocab")
-local printf = nerv.printf
-
local mysplit = function(inputstr, sep)
if sep == nil then
sep = "%s"
@@ -106,7 +104,7 @@ end
--fn: string
--Add all words in fn to the vocab
function Vocab:build_file(fn)
- printf("%s Vocab building on file %s...\n", self.log_pre, fn)
+ nerv.printf("%s Vocab building on file %s...\n", self.log_pre, fn)
local file = io.open(fn, "r")
while (true) do
local list = nerv.LMUtil.read_line(file)
@@ -119,7 +117,7 @@ function Vocab:build_file(fn)
end
end
file:close()
- printf("%s Building finished, vocab size now is %d.\n", self.log_pre, self:size())
+ nerv.printf("%s Building finished, vocab size now is %d.\n", self.log_pre, self:size())
end
--[[test