Skip to content

Commit

Permalink
Merge pull request #33 from snipsco/release/0.7.0
Browse files Browse the repository at this point in the history
Release 0.7.0
  • Loading branch information
adrienball authored Apr 16, 2019
2 parents 6cbc956 + ee6015b commit a1e79b7
Show file tree
Hide file tree
Showing 6 changed files with 375 additions and 218 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Changelog
All notable changes to this project will be documented in this file.

## [0.7.0] - 2019-04-16
### Added
- Add API to prepend entity values [#31](https://github.com/snipsco/gazetteer-entity-parser/pull/31)
- Add matched value in API output [#32](https://github.com/snipsco/gazetteer-entity-parser/pull/32)

## [0.6.0] - 2018-11-09
### Changed
- Optimize memory usage
- Simpler pattern for errors
- Optimize memory usage [#27](https://github.com/snipsco/gazetteer-entity-parser/pull/27)
- Simpler pattern for errors [#27](https://github.com/snipsco/gazetteer-entity-parser/pull/27)

## [0.5.1] - 2018-10-15
### Changed
- Fix bug affecting the backward expansion of possible matches starting with stop words
- Fix bug affecting the backward expansion of possible matches starting with stop words [#25](https://github.com/snipsco/gazetteer-entity-parser/pull/25)

## [0.5.0] - 2018-10-01
### Changed
- Clearer `ParserBuilder`'s API

[0.7.0]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.6.0...0.7.0
[0.6.0]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.5.1...0.6.0
[0.5.1]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.5.0...0.5.1
[0.5.0]: https://github.com/snipsco/gazetteer-entity-parser/compare/0.4.2...0.5.0
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gazetteer-entity-parser"
version = "0.6.0"
version = "0.7.0"
authors = ["Alaa Saade <alaa.saade@snips.ai>"]

[profile.bench]
Expand Down
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ Example
.build()
.unwrap();
let sentence = "My favourite artists are the stones and the fab four";
let sentence = "My favourite artists are the stones and the amazing fab four";
let extracted_entities = parser.run(sentence).unwrap();
assert_eq!(extracted_entities,
vec![
ParsedValue {
raw_value: "the stones".to_string(),
matched_value: "the rolling stones".to_string(),
resolved_value: "The Rolling Stones".to_string(),
range: 25..35,
},
ParsedValue {
raw_value: "the fab four".to_string(),
raw_value: "fab four".to_string(),
matched_value: "the fab four".to_string(),
resolved_value: "The Beatles".to_string(),
range: 40..52,
range: 52..60,
}]);
}
Expand Down
8 changes: 5 additions & 3 deletions examples/entity_parsing_from_scratch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ fn main() {
.build()
.unwrap();

let sentence = "My favourite artists are the stones and the fab four";
let sentence = "My favourite artists are the stones and fab four";
let extracted_entities = parser.run(sentence).unwrap();
assert_eq!(extracted_entities,
vec![
ParsedValue {
raw_value: "the stones".to_string(),
resolved_value: "The Rolling Stones".to_string(),
range: 25..35,
matched_value: "the rolling stones".to_string()
},
ParsedValue {
raw_value: "the fab four".to_string(),
raw_value: "fab four".to_string(),
resolved_value: "The Beatles".to_string(),
range: 40..52,
range: 40..48,
matched_value: "the fab four".to_string(),
}]);
}
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
//! vec![ParsedValue {
//! raw_value: "the stones".to_string(),
//! resolved_value: "The Rolling Stones".to_string(),
//! matched_value: "the rolling stones".to_string(),
//! range: 20..30,
//! }]
//! );
Expand All @@ -64,6 +65,7 @@
//! vec![ParsedValue {
//! raw_value: "brel".to_string(),
//! resolved_value: "Jacques Brel".to_string(),
//! matched_value: "jacques brel".to_string(),
//! range: 20..24,
//! }]
//! );
Expand Down
Loading

0 comments on commit a1e79b7

Please sign in to comment.