Repository navigation
Expand file tree
/
Copy pathBiLstmCrfNer.cs
More file actions
57 lines (49 loc) · 1.5 KB
/
Copy pathBiLstmCrfNer.cs
File metadata and controls
57 lines (49 loc) · 1.5 KB
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
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Tensorflow;
using Tensorflow.Estimator;
using static Tensorflow.Python;
namespace TensorFlowNET.Examples
{
/// <summary>
/// Bidirectional LSTM-CRF Models for Sequence Tagging
/// https://github.com/guillaumegenthial/tf_ner/tree/master/models/lstm_crf
/// </summary>
public class BiLstmCrfNer : IExample
{
public bool Enabled { get; set; } = true;
public bool IsImportingGraph { get; set; } = false;
public string Name => "bi-LSTM + CRF NER";
public bool Run()
{
PrepareData();
return false;
}
public void PrepareData()
{
var hp = new HyperParams("BiLstmCrfNer");
hp.filepath_words = Path.Combine(hp.data_root_dir, "vocab.words.txt");
hp.filepath_chars = Path.Combine(hp.data_root_dir, "vocab.chars.txt");
hp.filepath_tags = Path.Combine(hp.data_root_dir, "vocab.tags.txt");
hp.filepath_glove = Path.Combine(hp.data_root_dir, "glove.npz");
}
public Graph ImportGraph()
{
throw new NotImplementedException();
}
public Graph BuildGraph()
{
throw new NotImplementedException();
}
public bool Train()
{
throw new NotImplementedException();
}
public bool Predict()
{
throw new NotImplementedException();
}
}
}