├── .gitignore ├── inference ├── cc │ ├── www │ │ ├── __init__.py │ │ ├── log │ │ │ └── __init__.py │ │ ├── handlers │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── index.py │ │ ├── static │ │ │ ├── img │ │ │ │ └── README │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ ├── css │ │ │ │ └── dashboard.css │ │ │ └── js │ │ │ │ └── application.js │ │ ├── templates │ │ │ ├── error.html │ │ │ ├── _hcheck.hdn │ │ │ ├── index.html │ │ │ └── layout.html │ │ ├── env.sh │ │ ├── stop.sh │ │ ├── start.sh │ │ └── etagger_dm.py │ ├── src │ │ ├── Config.cc │ │ ├── inference_iris.cc │ │ ├── inference.cc │ │ ├── Vocab.cc │ │ ├── inference_example.cc │ │ ├── TFUtil.cc │ │ ├── Input.cc │ │ └── Etagger.cc │ ├── include │ │ ├── result_obj.h │ │ ├── Config.h │ │ ├── Etagger.h │ │ ├── TFUtil.h │ │ ├── Vocab.h │ │ └── Input.h │ ├── wrapper │ │ ├── Etagger.py │ │ └── inference.py │ └── CMakeLists.txt ├── python │ ├── www │ │ ├── __init__.py │ │ ├── log │ │ │ └── __init__.py │ │ ├── static │ │ │ ├── img │ │ │ │ └── README │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ ├── css │ │ │ │ └── dashboard.css │ │ │ └── js │ │ │ │ └── application.js │ │ ├── handlers │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── index.py │ │ ├── templates │ │ │ ├── error.html │ │ │ ├── _hcheck.hdn │ │ │ ├── index.html │ │ │ └── layout.html │ │ ├── env.sh │ │ ├── stop.sh │ │ ├── start.sh │ │ └── etagger_dm.py │ ├── inference_example.py │ ├── inference_iris.py │ ├── inference.py │ └── inference_trt.py ├── train_example.py ├── export.py ├── train_iris.py ├── etc │ └── iris.txt └── freeze.py ├── requirements.txt ├── etc ├── graph-2.png ├── graph-3.png ├── graph-4.png ├── graph-5.png ├── graph-6.png ├── warmup-1.png ├── warmup-2.png ├── webapi-1.png ├── webapi-2.png ├── test_flair.py ├── conv.py ├── inspect.py ├── repair.py ├── test_spacy.py ├── chunk_eval.py └── token_eval.py ├── data └── config.json ├── early_stopping.py ├── test_berttok.py ├── test_bilm.py ├── progbar.py ├── inference.py ├── feed.py ├── embvec.py └── config.py /.gitignore: -------------------------------------------------------------------------------- 1 | embeddings 2 | -------------------------------------------------------------------------------- /inference/cc/www/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/cc/www/log/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/python/www/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/cc/www/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/cc/www/static/img/README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/python/www/log/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/python/www/static/img/README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inference/python/www/handlers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | seqeval 3 | tornado 4 | -------------------------------------------------------------------------------- /etc/graph-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/graph-2.png -------------------------------------------------------------------------------- /etc/graph-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/graph-3.png -------------------------------------------------------------------------------- /etc/graph-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/graph-4.png -------------------------------------------------------------------------------- /etc/graph-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/graph-5.png -------------------------------------------------------------------------------- /etc/graph-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/graph-6.png -------------------------------------------------------------------------------- /etc/warmup-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/warmup-1.png -------------------------------------------------------------------------------- /etc/warmup-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/warmup-2.png -------------------------------------------------------------------------------- /etc/webapi-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/webapi-1.png -------------------------------------------------------------------------------- /etc/webapi-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/etc/webapi-2.png -------------------------------------------------------------------------------- /inference/cc/www/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | ERROR 4 | 5 | -------------------------------------------------------------------------------- /inference/python/www/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | ERROR 4 | 5 | -------------------------------------------------------------------------------- /inference/cc/www/templates/_hcheck.hdn: -------------------------------------------------------------------------------- 1 | 2 | 3 | HealthCheck OK 4 | 5 | -------------------------------------------------------------------------------- /inference/python/www/templates/_hcheck.hdn: -------------------------------------------------------------------------------- 1 | 2 | 3 | HealthCheck OK 4 | 5 | -------------------------------------------------------------------------------- /inference/cc/www/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/inference/cc/www/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /inference/cc/www/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/inference/cc/www/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /inference/cc/www/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/inference/cc/www/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /inference/python/www/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/inference/python/www/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /inference/python/www/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/inference/python/www/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /inference/python/www/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsindex/etagger/HEAD/inference/python/www/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /inference/cc/src/Config.cc: -------------------------------------------------------------------------------- 1 | #include "Config.h" 2 | 3 | /* 4 | * public methods 5 | */ 6 | 7 | Config::Config() 8 | { 9 | } 10 | 11 | Config::Config(int word_length) 12 | { 13 | this->word_length = word_length; 14 | } 15 | 16 | Config::~Config() 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /inference/cc/include/result_obj.h: -------------------------------------------------------------------------------- 1 | #ifndef RESULT_OBJ 2 | #define RESULT_OBJ 3 | 4 | #define MAX_WORD 64 5 | #define MAX_POS 64 6 | #define MAX_CHK 64 7 | #define MAX_TAG 64 8 | struct result_obj { 9 | char word[MAX_WORD]; 10 | char pos[MAX_POS]; 11 | char chk[MAX_CHK]; 12 | char tag[MAX_TAG]; 13 | char predict[MAX_TAG]; 14 | }; 15 | #endif 16 | -------------------------------------------------------------------------------- /inference/cc/include/Config.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | class Config { 5 | 6 | public: 7 | Config(); 8 | Config(int word_length); 9 | void SetClassSize(int class_size) { this->class_size = class_size; } 10 | int GetClassSize() { return class_size; } 11 | int GetWordLength() { return word_length; } 12 | ~Config(); 13 | 14 | private: 15 | int class_size; // assigned after loading vocab 16 | int word_length; 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /inference/cc/www/handlers/base.py: -------------------------------------------------------------------------------- 1 | import tornado.web 2 | import logging 3 | 4 | class BaseHandler(tornado.web.RequestHandler): 5 | @property 6 | def log(self): 7 | return self.application.log 8 | @property 9 | def ppid(self): 10 | return self.application.ppid 11 | @property 12 | def Etagger(self): 13 | return self.application.Etagger 14 | @property 15 | def etagger(self): 16 | return self.application.etagger 17 | @property 18 | def nlp(self): 19 | return self.application.nlp 20 | -------------------------------------------------------------------------------- /inference/python/www/handlers/base.py: -------------------------------------------------------------------------------- 1 | import tornado.web 2 | import logging 3 | 4 | class BaseHandler(tornado.web.RequestHandler): 5 | @property 6 | def log(self): 7 | return self.application.log 8 | @property 9 | def ppid(self): 10 | return self.application.ppid 11 | @property 12 | def etagger(self): 13 | return self.application.etagger 14 | @property 15 | def config(self): 16 | return self.application.config 17 | @property 18 | def nlp(self): 19 | return self.application.nlp 20 | -------------------------------------------------------------------------------- /inference/cc/include/Etagger.h: -------------------------------------------------------------------------------- 1 | #ifndef ETAGGER_H 2 | #define ETAGGER_H 3 | 4 | #include "TFUtil.h" 5 | #include "Input.h" 6 | #include "result_obj.h" // for c, python wrapper 7 | 8 | class Etagger { 9 | public: 10 | Etagger(string frozen_graph_fn, string vocab_fn, int word_length, bool lowercase, bool is_memmapped, int num_threads); 11 | int Analyze(vector