Skip to content

Commit a1e79b7

Browse files
authored
Merge pull request #33 from snipsco/release/0.7.0
Release 0.7.0
2 parents 6cbc956 + ee6015b commit a1e79b7

File tree

6 files changed

+375
-218
lines changed

6 files changed

+375
-218
lines changed

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

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+
49
## [0.6.0] - 2018-11-09
510
### 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)
813

914
## [0.5.1] - 2018-10-15
1015
### 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)
1217

1318
## [0.5.0] - 2018-10-01
1419
### Changed
1520
- Clearer `ParserBuilder`'s API
1621

22+
[0.7.0]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.6.0...0.7.0
1723
[0.6.0]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.5.1...0.6.0
1824
[0.5.1]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.5.0...0.5.1
1925
[0.5.0]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.4.2...0.5.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gazetteer-entity-parser"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors = ["Alaa Saade <alaa.saade@snips.ai>"]
55

66
[profile.bench]

README.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,21 @@ Example
4242
.build()
4343
.unwrap();
4444
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";
4646
let extracted_entities = parser.run(sentence).unwrap();
4747
assert_eq!(extracted_entities,
4848
vec![
4949
ParsedValue {
5050
raw_value: "the stones".to_string(),
51+
matched_value: "the rolling stones".to_string(),
5152
resolved_value: "The Rolling Stones".to_string(),
5253
range: 25..35,
5354
},
5455
ParsedValue {
55-
raw_value: "the fab four".to_string(),
56+
raw_value: "fab four".to_string(),
57+
matched_value: "the fab four".to_string(),
5658
resolved_value: "The Beatles".to_string(),
57-
range: 40..52,
59+
range: 52..60,
5860
}]);
5961
}
6062

examples/entity_parsing_from_scratch.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,20 @@ fn main() {
2828
.build()
2929
.unwrap();
3030

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";
3232
let extracted_entities = parser.run(sentence).unwrap();
3333
assert_eq!(extracted_entities,
3434
vec![
3535
ParsedValue {
3636
raw_value: "the stones".to_string(),
3737
resolved_value: "The Rolling Stones".to_string(),
3838
range: 25..35,
39+
matched_value: "the rolling stones".to_string()
3940
},
4041
ParsedValue {
41-
raw_value: "the fab four".to_string(),
42+
raw_value: "fab four".to_string(),
4243
resolved_value: "The Beatles".to_string(),
43-
range: 40..52,
44+
range: 40..48,
45+
matched_value: "the fab four".to_string(),
4446
}]);
4547
}

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
//! vec![ParsedValue {
5454
//! raw_value: "the stones".to_string(),
5555
//! resolved_value: "The Rolling Stones".to_string(),
56+
//! matched_value: "the rolling stones".to_string(),
5657
//! range: 20..30,
5758
//! }]
5859
//! );
@@ -64,6 +65,7 @@
6465
//! vec![ParsedValue {
6566
//! raw_value: "brel".to_string(),
6667
//! resolved_value: "Jacques Brel".to_string(),
68+
//! matched_value: "jacques brel".to_string(),
6769
//! range: 20..24,
6870
//! }]
6971
//! );

0 commit comments

Comments
 (0)