mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
update cppcommon -> limonp
This commit is contained in:
parent
b30605e410
commit
2e22f6ed9d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
tags
|
tags
|
||||||
|
*.demo
|
||||||
*swp
|
*swp
|
||||||
*.out
|
*.out
|
||||||
*.o
|
*.o
|
||||||
|
@ -18,32 +18,23 @@ endif
|
|||||||
DOLINK := $(LD) $(LDFLAGS)
|
DOLINK := $(LD) $(LDFLAGS)
|
||||||
SOURCES := $(wildcard *.cpp)
|
SOURCES := $(wildcard *.cpp)
|
||||||
OBJS := $(patsubst %.cpp,%.o,$(SOURCES))
|
OBJS := $(patsubst %.cpp,%.o,$(SOURCES))
|
||||||
|
DEMOS := $(patsubst %.cpp,%.demo,$(SOURCES))
|
||||||
|
|
||||||
CPPJIEBADIR = ../cppjieba
|
CPPJIEBADIR := ../cppjieba
|
||||||
LIBCPPJIEBA = $(CPPJIEBADIR)/libcppjieba.a
|
LIBCPPJIEBA := $(CPPJIEBADIR)/libcppjieba.a
|
||||||
|
|
||||||
# remove the objs after compilation
|
|
||||||
.PHONY: clean $(LIBCPPJIEBA)
|
.PHONY: clean $(LIBCPPJIEBA)
|
||||||
|
|
||||||
# Main Targets
|
all: $(DEMOS)
|
||||||
all: keywordext_demo segment_demo
|
|
||||||
|
|
||||||
# This is a suffix rule
|
%.demo: %.cpp $(LIBCPPJIEBA)
|
||||||
#.c.o:
|
$(CXX) -o $@ $(CXXFLAGS) $^ $(INCS)
|
||||||
%.o: %.cpp
|
|
||||||
$(CXX) -c $(CXXFLAGS) $<
|
|
||||||
|
|
||||||
keywordext_demo: keywordext_demo.o $(LIBCPPJIEBA)
|
|
||||||
$(DOLINK) -o $@ $^
|
|
||||||
|
|
||||||
segment_demo: segment_demo.o $(LIBCPPJIEBA)
|
|
||||||
$(DOLINK) -o $@ $^
|
|
||||||
|
|
||||||
$(LIBCPPJIEBA):
|
$(LIBCPPJIEBA):
|
||||||
cd $(CPPJIEBADIR) && $(MAKE)
|
cd $(CPPJIEBADIR) && $(MAKE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.ut *.d *.d.* keywordext_demo segment_demo
|
rm -f *.o *.ut *.d *.d.* $(DEMOS)
|
||||||
cd $(CPPJIEBADIR) && make clean
|
cd $(CPPJIEBADIR) && make clean
|
||||||
|
|
||||||
sinclude $(SOURCES:.cpp=.d)
|
sinclude $(SOURCES:.cpp=.d)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
./segment_demo testlines.utf8 --dictpath ../dicts/jieba.dict.utf8
|
./segment.demo testlines.utf8 --dictpath ../dicts/jieba.dict.utf8
|
||||||
./segment_demo testlines.utf8 --modelpath ../dicts/hmm_model.utf8 --algorithm cutHMM
|
./segment.demo testlines.utf8 --modelpath ../dicts/hmm_model.utf8 --algorithm cutHMM
|
||||||
./segment_demo testlines.utf8 --algorithm cutMix
|
./segment.demo testlines.utf8 --algorithm cutMix
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <ArgvContext.hpp>
|
||||||
#include "../cppjieba/headers.h"
|
#include "../cppjieba/headers.h"
|
||||||
|
|
||||||
using namespace CppJieba;
|
using namespace CppJieba;
|
@ -1,5 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <ArgvContext.hpp>
|
||||||
#include "../cppjieba/headers.h"
|
#include "../cppjieba/headers.h"
|
||||||
|
|
||||||
using namespace CppJieba;
|
using namespace CppJieba;
|
Loading…
x
Reference in New Issue
Block a user