mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
init demo and add jieba.dict.gbk
This commit is contained in:
parent
ade85484f6
commit
d15c7dd75c
@ -2,7 +2,7 @@ CXX := g++
|
|||||||
LD := g++
|
LD := g++
|
||||||
AR := ar rc
|
AR := ar rc
|
||||||
|
|
||||||
INCS := -I. -I./cppcommon
|
INCS :=
|
||||||
|
|
||||||
DEBUG_CXXFLAGS := -g -Wall -DDEBUG
|
DEBUG_CXXFLAGS := -g -Wall -DDEBUG
|
||||||
RELEASE_CXXFLAGS := -Wall -O3
|
RELEASE_CXXFLAGS := -Wall -O3
|
||||||
@ -20,7 +20,7 @@ DOPACK := $(AR)
|
|||||||
SOURCES := $(wildcard *.cpp)
|
SOURCES := $(wildcard *.cpp)
|
||||||
OBJS := $(patsubst %.cpp,%.o,$(SOURCES))
|
OBJS := $(patsubst %.cpp,%.o,$(SOURCES))
|
||||||
|
|
||||||
SRCDIR = ./src
|
SRCDIR = ../src
|
||||||
SRCLIB = $(SRCDIR)/libcppjieba.a
|
SRCLIB = $(SRCDIR)/libcppjieba.a
|
||||||
|
|
||||||
# remove the objs after compilation
|
# remove the objs after compilation
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "src/KeyWordExt.h"
|
#include "../src/headers.h"
|
||||||
#include "src/cppcommon/str_functs.h"
|
|
||||||
#include "src/cppcommon/vec_functs.h"
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
using namespace CppJieba;
|
using namespace CppJieba;
|
||||||
|
|
||||||
@ -18,7 +14,7 @@ int main(int argc, char ** argv)
|
|||||||
KeyWordExt ext;
|
KeyWordExt ext;
|
||||||
ext.init();
|
ext.init();
|
||||||
|
|
||||||
if(!ext.loadSegDict("./dicts/segdict.gbk.v3.0"))
|
if(!ext.loadSegDict("../dicts/jieba.dict.utf8"))
|
||||||
{
|
{
|
||||||
cerr<<"1"<<endl;
|
cerr<<"1"<<endl;
|
||||||
return 1;
|
return 1;
|
||||||
|
348982
dicts/jieba.dict.gbk
Normal file
348982
dicts/jieba.dict.gbk
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user