11# anaGo
2- anaGo is a state-of-the-art library for sequence labeling using Keras.
2+ *** anaGo*** is a state-of-the-art library for sequence labeling using Keras.
33
44anaGo can performs named-entity recognition (NER), part-of-speech tagging (POS tagging), semantic role labeling (SRL) and so on.
55
@@ -76,7 +76,7 @@ Now we are ready for training :)
7676
7777
7878### Training a model
79- Let's train a model. For training a model, we can use * Trainer* .
79+ Let's train a model. For training a model, we can use *** Trainer** * .
8080Trainer manages everything about training.
8181Prepare an instance of Trainer class and give train data and valid data to train method:
8282```
@@ -103,7 +103,7 @@ Epoch 5/15
103103
104104
105105### Evaluation for a model
106- To evaluate the trained model, we can use * Evaluator* .
106+ To evaluate the trained model, we can use *** Evaluator** * .
107107Evaluator performs evaluation.
108108Prepare an instance of Evaluator class and give test data to eval method:
109109
@@ -112,7 +112,7 @@ p = WordPreprocessor.load(os.path.join(SAVE_ROOT, 'preprocessor.pkl'))
112112model_config.vocab_size = len(p.vocab_word)
113113model_config.char_vocab_size = len(p.vocab_char)
114114
115- weights = os.path.join(SAVE_ROOT, '../logs/model_weights_00_0.85 .h5')
115+ weights = os.path.join(SAVE_ROOT, 'model_weights .h5')
116116
117117evaluator = anago.Evaluator(model_config, weights, save_path=SAVE_ROOT, preprocessor=p)
118118evaluator.eval(x_test, y_test)
@@ -124,14 +124,14 @@ After evaluation, F1 value is output:
124124```
125125
126126### Tagging a sentence
127- To tag any text, we can use * Tagger* .
127+ To tag any text, we can use *** Tagger** * .
128128Prepare an instance of Tagger class and give text to tag method:
129129```
130130p = WordPreprocessor.load(os.path.join(SAVE_ROOT, 'preprocessor.pkl'))
131131model_config.vocab_size = len(p.vocab_word)
132132model_config.char_vocab_size = len(p.vocab_char)
133133
134- weights = os.path.join(SAVE_ROOT, '../logs/model_weights_00_0.85 .h5')
134+ weights = os.path.join(SAVE_ROOT, 'model_weights .h5')
135135
136136tagger = anago.Tagger(model_config, weights, save_path=SAVE_ROOT, preprocessor=p)
137137```
0 commit comments