File tree Expand file tree Collapse file tree 6 files changed +375
-218
lines changed Expand file tree Collapse file tree 6 files changed +375
-218
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
All notable changes to this project will be documented in this file.
3
3
4
+ ## [ 0.7.0] - 2019-04-16
5
+ ### Added
6
+ - Add API to prepend entity values [ #31 ] ( https://github.com/snipsco/gazetteer-entity-parser/pull/31 )
7
+ - Add matched value in API output [ #32 ] ( https://github.com/snipsco/gazetteer-entity-parser/pull/32 )
8
+
4
9
## [ 0.6.0] - 2018-11-09
5
10
### Changed
6
- - Optimize memory usage
7
- - Simpler pattern for errors
11
+ - Optimize memory usage [ # 27 ] ( https://github.com/snipsco/gazetteer-entity-parser/pull/27 )
12
+ - Simpler pattern for errors [ # 27 ] ( https://github.com/snipsco/gazetteer-entity-parser/pull/27 )
8
13
9
14
## [ 0.5.1] - 2018-10-15
10
15
### Changed
11
- - Fix bug affecting the backward expansion of possible matches starting with stop words
16
+ - Fix bug affecting the backward expansion of possible matches starting with stop words [ # 25 ] ( https://github.com/snipsco/gazetteer-entity-parser/pull/25 )
12
17
13
18
## [ 0.5.0] - 2018-10-01
14
19
### Changed
15
20
- Clearer ` ParserBuilder ` 's API
16
21
22
+ [ 0.7.0 ] : https://github.com/snipsco/gazetteer-entity-parser/compare/0.6.0...0.7.0
17
23
[ 0.6.0 ] : https://github.com/snipsco/gazetteer-entity-parser/compare/0.5.1...0.6.0
18
24
[ 0.5.1 ] : https://github.com/snipsco/gazetteer-entity-parser/compare/0.5.0...0.5.1
19
25
[ 0.5.0 ] : https://github.com/snipsco/gazetteer-entity-parser/compare/0.4.2...0.5.0
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " gazetteer-entity-parser"
3
- version = " 0.6 .0"
3
+ version = " 0.7 .0"
4
4
authors = [" Alaa Saade <alaa.saade@snips.ai>" ]
5
5
6
6
[profile .bench ]
Original file line number Diff line number Diff line change @@ -42,19 +42,21 @@ Example
42
42
.build()
43
43
.unwrap();
44
44
45
- let sentence = "My favourite artists are the stones and the fab four";
45
+ let sentence = "My favourite artists are the stones and the amazing fab four";
46
46
let extracted_entities = parser.run(sentence).unwrap();
47
47
assert_eq!(extracted_entities,
48
48
vec![
49
49
ParsedValue {
50
50
raw_value: "the stones".to_string(),
51
+ matched_value: "the rolling stones".to_string(),
51
52
resolved_value: "The Rolling Stones".to_string(),
52
53
range: 25..35,
53
54
},
54
55
ParsedValue {
55
- raw_value: "the fab four".to_string(),
56
+ raw_value: "fab four".to_string(),
57
+ matched_value: "the fab four".to_string(),
56
58
resolved_value: "The Beatles".to_string(),
57
- range: 40..52 ,
59
+ range: 52..60 ,
58
60
}]);
59
61
}
60
62
Original file line number Diff line number Diff line change @@ -28,18 +28,20 @@ fn main() {
28
28
. build ( )
29
29
. unwrap ( ) ;
30
30
31
- let sentence = "My favourite artists are the stones and the fab four" ;
31
+ let sentence = "My favourite artists are the stones and fab four" ;
32
32
let extracted_entities = parser. run ( sentence) . unwrap ( ) ;
33
33
assert_eq ! ( extracted_entities,
34
34
vec![
35
35
ParsedValue {
36
36
raw_value: "the stones" . to_string( ) ,
37
37
resolved_value: "The Rolling Stones" . to_string( ) ,
38
38
range: 25 ..35 ,
39
+ matched_value: "the rolling stones" . to_string( )
39
40
} ,
40
41
ParsedValue {
41
- raw_value: "the fab four" . to_string( ) ,
42
+ raw_value: "fab four" . to_string( ) ,
42
43
resolved_value: "The Beatles" . to_string( ) ,
43
- range: 40 ..52 ,
44
+ range: 40 ..48 ,
45
+ matched_value: "the fab four" . to_string( ) ,
44
46
} ] ) ;
45
47
}
Original file line number Diff line number Diff line change 53
53
//! vec![ParsedValue {
54
54
//! raw_value: "the stones".to_string(),
55
55
//! resolved_value: "The Rolling Stones".to_string(),
56
+ //! matched_value: "the rolling stones".to_string(),
56
57
//! range: 20..30,
57
58
//! }]
58
59
//! );
64
65
//! vec![ParsedValue {
65
66
//! raw_value: "brel".to_string(),
66
67
//! resolved_value: "Jacques Brel".to_string(),
68
+ //! matched_value: "jacques brel".to_string(),
67
69
//! range: 20..24,
68
70
//! }]
69
71
//! );
You can’t perform that action at this time.
0 commit comments