forked from arronzhang/mmseg-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmmseg.h
More file actions
46 lines (36 loc) · 948 Bytes
/
mmseg.h
File metadata and controls
46 lines (36 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef MMSEG_H
#define MMSEG_H
#include <node.h>
#include <v8.h>
#include <fstream>
#include <string>
#include <cstring>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <stdio.h>
#include <stdexcept>
#include "SegmenterManager.h"
#include "Segmenter.h"
using namespace node;
using namespace v8;
class mmseg: ObjectWrap
{
public:
static void Initialize(Handle<Object> target);
protected:
static Persistent<FunctionTemplate> constructor_template;
static Handle<Value> New (const Arguments& args);
static Handle<Value> SegmentSync (const Arguments& args);
static Handle<Value> ComplexSegmentSync (const Arguments& args);
static Handle<Value> Close (const Arguments& args);
mmseg () : ObjectWrap() {
};
~mmseg (){};
private:
static int init(char *path);
static Local<Array> segmentSync(char *f_words);
static Local<Array> complexSegmentSync(char *f_words);
static void destroy();
};
#endif