aboutsummaryrefslogtreecommitdiff
path: root/nerv/examples/lmptb/lmptb/lmvocab.lua
diff options
context:
space:
mode:
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