Skip to content

Commit

Permalink
review example code's header to adjust to the new structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneplus committed Sep 16, 2014
1 parent 78d7b85 commit 047eb50
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ multi_pos_cmdline: multi_pos_cmdline.cpp

ner: ner.cpp
g++ -o ner ner.cpp -I./ \
-I../src/ner/ \
-I../include \
-L../lib/ -lner

par: par.cpp
g++ -o par par.cpp -I./ \
-I../src/parser/ \
-I../include \
-L../lib -lparser
srl: srl.cpp
g++ -o srl srl.cpp -I./ \
-I../src/srl/ \
-I../include \
-L../lib -lsrl

.PHONY: clean
Expand Down
2 changes: 1 addition & 1 deletion examples/cws.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>
#include <string>
#include "segment_dll.h"
#include "ltp/segment_dll.h"

int main(int argc, char * argv[]) {
if (argc < 2) {
Expand Down
2 changes: 1 addition & 1 deletion examples/cws_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <string>
#include <sys/time.h>
#include <sys/types.h>
#include "segment_dll.h"
#include "ltp/segment_dll.h"

double get_time(void) {
struct timeval tv;
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_cws_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include <sys/types.h>
#include <cstdlib>

#include "segment_dll.h"
#include "tinythread.h"
#include "fast_mutex.h"
#include "ltp/segment_dll.h"

using namespace std;
using namespace tthread;
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_pos_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <sys/time.h>
#include <sys/types.h>

#include "postag_dll.h"
#include "tinythread.h"
#include "fast_mutex.h"
#include "ltp/postag_dll.h"

using namespace std;
using namespace tthread;
Expand Down
2 changes: 1 addition & 1 deletion examples/ner.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <vector>

#include "ner_dll.h"
#include "ltp/ner_dll.h"

int main(int argc, char * argv[]) {
if (argc < 2) {
Expand Down
2 changes: 1 addition & 1 deletion examples/par.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <vector>

#include "parser_dll.h"
#include "ltp/parser_dll.h"

int main(int argc, char * argv[]) {
if (argc < 2) {
Expand Down
2 changes: 1 addition & 1 deletion examples/pos.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <vector>

#include "postag_dll.h"
#include "ltp/postag_dll.h"

int main(int argc, char * argv[]) {
if (argc < 1) {
Expand Down
4 changes: 2 additions & 2 deletions examples/pos_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string>
#include <sys/time.h>
#include <sys/types.h>
#include "postag_dll.h"
#include "ltp/postag_dll.h"

double get_time(void) {
struct timeval tv;
Expand All @@ -27,7 +27,7 @@ double get_time(void) {
}

int main(int argc, char * argv[]) {
if (argc < 1 || (0 == strcmp(argv[1], "-h"))) {
if (argc < 2 || (0 == strcmp(argv[1], "-h"))) {
std::cerr << "Example: ./pos_cmdline [model path]" << std::endl;
std::cerr << std::endl;
std::cerr << "This program recieve input word sequence from stdin." << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions examples/srl.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <vector>

#include "SRL_DLL.h"
#include "ltp/SRL_DLL.h"

int main(int argc, char * argv[]) {
if (argc < 2) {
Expand All @@ -25,7 +25,7 @@ int main(int argc, char * argv[]) {
for(int i = 0;i<srl.size();++i) {
std::cout<<srl[i].first<<":"<<std::endl;
for(int j = 0;j<srl[i].second.size();++j) {
std::cout<<" tpye = "<<srl[i].second[j].first
std::cout<<"\ttype = "<<srl[i].second[j].first
<<" beg = "<<srl[i].second[j].second.first
<<" end = "<<srl[i].second[j].second.second
<<std::endl;
Expand Down

0 comments on commit 047eb50

Please sign in to comment.