summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2025-11-10 17:03:31 +0800
committerPeng Wu <alexepico@gmail.com>2025-11-10 18:03:30 +0800
commit366666137cc34ac69b28bcb4d87cf99ec16e7f02 (patch)
treeb8de3c906e2da701edeaf62ea88b038dbf8ae9cc /src
parent6255064409b9cf07bba90e688d115ffec51d805a (diff)
downloadlibpinyin-366666137cc34ac69b28bcb4d87cf99ec16e7f02.tar.gz
libpinyin-366666137cc34ac69b28bcb4d87cf99ec16e7f02.tar.xz
libpinyin-366666137cc34ac69b28bcb4d87cf99ec16e7f02.zip
Fix some typos
Diffstat (limited to 'src')
-rw-r--r--src/storage/flexible_ngram.h4
-rw-r--r--src/storage/flexible_ngram_kyotodb.h4
-rw-r--r--src/storage/punct_table.h4
-rw-r--r--src/storage/punct_table_tkrzwdb.cpp6
-rw-r--r--src/storage/punct_table_tkrzwdb.h2
-rw-r--r--src/storage/tkrzwdb_utils.h5
6 files changed, 18 insertions, 7 deletions
diff --git a/src/storage/flexible_ngram.h b/src/storage/flexible_ngram.h
index a80baa3..0c27697 100644
--- a/src/storage/flexible_ngram.h
+++ b/src/storage/flexible_ngram.h
@@ -39,4 +39,8 @@
#include "flexible_ngram_kyotodb.h"
#endif
+#ifdef HAVE_TKRZW
+#include "flexible_ngram_tkrzwdb.h"
+#endif
+
#endif
diff --git a/src/storage/flexible_ngram_kyotodb.h b/src/storage/flexible_ngram_kyotodb.h
index b12fa42..b2a1906 100644
--- a/src/storage/flexible_ngram_kyotodb.h
+++ b/src/storage/flexible_ngram_kyotodb.h
@@ -120,10 +120,10 @@ public:
/**
* FlexibleBigram::attach:
* @dbfile: the path name of the flexible bi-gram.
- * @flags: the attach flags for the Berkeley DB.
+ * @flags: the attach flags for the Kyoto Cabinet.
* @returns: whether the attach operation is successful.
*
- * Attach Berkeley DB on filesystem for training purpose.
+ * Attach Kyoto Cabinet on filesystem for training purpose.
*
*/
bool attach(const char * dbfile, guint32 flags){
diff --git a/src/storage/punct_table.h b/src/storage/punct_table.h
index b8b84d4..295d6c2 100644
--- a/src/storage/punct_table.h
+++ b/src/storage/punct_table.h
@@ -34,6 +34,10 @@
#include "punct_table_kyotodb.h"
#endif
+#ifdef HAVE_TKRZW
+#include "punct_table_tkrzwdb.h"
+#endif
+
namespace pinyin{
class PunctTable;
diff --git a/src/storage/punct_table_tkrzwdb.cpp b/src/storage/punct_table_tkrzwdb.cpp
index 656c2fe..29e9b80 100644
--- a/src/storage/punct_table_tkrzwdb.cpp
+++ b/src/storage/punct_table_tkrzwdb.cpp
@@ -19,9 +19,9 @@
*/
#include "punct_table.h"
-#include <tkrzw/dbm.h>
-#include <tkrzw/tree_dbm.h>
-#include <tkrzw/file_util.h>
+#include <tkrzw_dbm.h>
+#include <tkrzw_dbm_tree.h>
+#include <tkrzw_file_util.h>
#include <string>
#include <string_view>
#include <memory>
diff --git a/src/storage/punct_table_tkrzwdb.h b/src/storage/punct_table_tkrzwdb.h
index 0c25bcc..4fb73ee 100644
--- a/src/storage/punct_table_tkrzwdb.h
+++ b/src/storage/punct_table_tkrzwdb.h
@@ -23,6 +23,8 @@
#define PUNCT_TABLE_TKRZWDB_H
#include <tkrzw_dbm.h>
+#include <tkrzw_dbm_baby.h>
+#include "novel_types.h"
namespace pinyin{
diff --git a/src/storage/tkrzwdb_utils.h b/src/storage/tkrzwdb_utils.h
index e292e04..a783541 100644
--- a/src/storage/tkrzwdb_utils.h
+++ b/src/storage/tkrzwdb_utils.h
@@ -23,6 +23,7 @@
#include <assert.h>
#include <tkrzw_dbm.h>
+#include <tkrzw_file_util.h>
#include <memory>
#include <string>
@@ -36,10 +37,10 @@ inline int32_t attach_options(guint32 flags, bool & writable) {
if (flags & ATTACH_READWRITE) {
assert( !( flags & ATTACH_READONLY ) );
writable = true;
- options = File::OPEN_DEFAULT;
+ options = tkrzw::File::OPEN_DEFAULT;
}
if ( !(flags & ATTACH_CREATE) )
- options |= File::OPEN_NO_CREATE;
+ options |= tkrzw::File::OPEN_NO_CREATE;
return options;
}