rosette_api 1.14.3 → 1.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/examples/address_similarity.rb +1 -7
- data/examples/categories.rb +1 -3
- data/examples/entities.rb +1 -9
- data/examples/language_multilingual.rb +1 -9
- data/examples/morphology_complete.rb +1 -2
- data/examples/{morphology_compound_components.rb → morphology_compound-components.rb} +0 -0
- data/examples/{morphology_han_readings.rb → morphology_han-readings.rb} +0 -0
- data/examples/morphology_lemmas.rb +1 -3
- data/examples/{morphology_parts_of_speech.rb → morphology_parts-of-speech.rb} +1 -3
- data/examples/name_deduplication.rb +1 -3
- data/examples/relationships.rb +1 -9
- data/examples/sentences.rb +1 -5
- data/examples/sentiment.rb +1 -7
- data/examples/syntax_dependencies.rb +1 -3
- data/examples/topics.rb +2 -8
- data/examples/transliteration.rb +1 -2
- data/lib/address_similarity_parameters.rb +5 -5
- data/lib/rosette_api.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b38b4872ea8951d43abf562f7feed44bf672e2508ec78e34c6e05327293b8c35
|
4
|
+
data.tar.gz: 5608e8136b43a67a771fe860f51deee5c14da58aefa90211d6bb0be77a14834a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85f6244f0c40958eabe5165b85dc2ee13e849924f9a500404391541bfb490291e46b8461dcc4f3bfd90ca54ff04ba5585d3b9654d4df8b9b3d2d7c72a4f031ae
|
7
|
+
data.tar.gz: 2dea9f348e81a32fa8f6e692f66385fe0b4143b34902d03765d027087f0b83f670bb428845d77afded27a12bfa013a52b806d042e233266e3cd5924a805bcd64
|
@@ -18,13 +18,7 @@ begin
|
|
18
18
|
state: 'DC',
|
19
19
|
post_code: '20500'
|
20
20
|
)
|
21
|
-
address2 =
|
22
|
-
house_number: '160',
|
23
|
-
road: 'Pennsilvana Avenue',
|
24
|
-
city: 'Washington',
|
25
|
-
state: 'D.C.',
|
26
|
-
post_code: '20500'
|
27
|
-
)
|
21
|
+
address2 = '160 Pennsilvana Avenue, Washington, D.C., 20500'
|
28
22
|
params = AddressSimilarityParameters.new(address1, address2)
|
29
23
|
response = rosette_api.get_address_similarity(params)
|
30
24
|
puts JSON.pretty_generate(response)
|
data/examples/categories.rb
CHANGED
@@ -10,9 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
categories_url_data =
|
14
|
-
'https://onlocationvacations.com/2015/03/05/the-new-ghostbusters-movie-' \
|
15
|
-
'begins-filming-in-boston-in-june/'
|
13
|
+
categories_url_data = 'https://onlocationvacations.com/2018/02/06/downton-abbey-exhibition-extended-april-2-nyc/'
|
16
14
|
begin
|
17
15
|
params = DocumentParameters.new(content_uri: categories_url_data)
|
18
16
|
response = rosette_api.get_categories(params)
|
data/examples/entities.rb
CHANGED
@@ -10,15 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
entities_text_data = 'The Securities and Exchange Commission today ' \
|
14
|
-
'announced the leadership of the agency\'s trial unit. Bridget Fitzpatrick ' \
|
15
|
-
'has been named Chief Litigation Counsel of the SEC and David Gottesman ' \
|
16
|
-
'will continue to serve as the agency\'s Deputy Chief Litigation Counsel. ' \
|
17
|
-
'Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as ' \
|
18
|
-
'Co-Acting Chief Litigation Counsel. In that role, they were jointly ' \
|
19
|
-
'responsible for supervising the trial unit at the agency\'s Washington ' \
|
20
|
-
'D.C. headquarters as well as coordinating with litigators in the SEC\'s ' \
|
21
|
-
'11 regional offices around the country.'
|
13
|
+
entities_text_data = 'The Securities and Exchange Commission today announced the leadership of the agency\'s trial unit. Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency\'s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel. In that role, they were jointly responsible for supervising the trial unit at the agency\'s Washington D.C. headquarters as well as coordinating with litigators in the SEC\'s 11 regional offices around the country.'
|
22
14
|
begin
|
23
15
|
params = DocumentParameters.new(content: entities_text_data,
|
24
16
|
genre: 'social-media')
|
@@ -10,15 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
language_multilingual_data = 'On Thursday, as protesters gathered in
|
14
|
-
'Washington D.C., the United States Federal Communications Commission ' \
|
15
|
-
'under Chairman Ajit Pai voted 3-2 to overturn a 2015 decision, commonly ' \
|
16
|
-
'called Net Neutrality, that forbade Internet service providers (ISPs) ' \
|
17
|
-
'such as Verizon, Comcast, and AT&T from blocking individual websites or ' \
|
18
|
-
'charging websites or customers more for faster load times. Quatre ' \
|
19
|
-
'femmes ont été nommées au Conseil de rédaction de la loi du Qatar. Jeudi, ' \
|
20
|
-
'le décret royal du Qatar a annoncé que 28 nouveaux membres ont été nommés ' \
|
21
|
-
'pour le Conseil de la Choura du pays. ذكرت مصادر أمنية يونانية، أن 9 موقوفين من منظمة \"د هـ ك ب ج\" الذين كانت قد أوقفتهم الشرطة اليونانية في وقت سابق كانوا يخططون لاغتيال الرئيس التركي رجب طيب أردوغان.'
|
13
|
+
language_multilingual_data = 'On Thursday, as protesters gathered in Washington D.C., the United States Federal Communications Commission under Chairman Ajit Pai voted 3-2 to overturn a 2015 decision, commonly called Net Neutrality, that forbade Internet service providers (ISPs) such as Verizon, Comcast, and AT&T from blocking individual websites or charging websites or customers more for faster load times. Quatre femmes ont été nommées au Conseil de rédaction de la loi du Qatar. Jeudi, le décret royal du Qatar a annoncé que 28 nouveaux membres ont été nommés pour le Conseil de la Choura du pays. ذكرت مصادر أمنية يونانية، أن 9 موقوفين من منظمة \"د هـ ك ب ج\" الذين كانت قد أوقفتهم الشرطة اليونانية في وقت سابق كانوا يخططون لاغتيال الرئيس التركي رجب طيب أردوغان.'
|
22
14
|
|
23
15
|
begin
|
24
16
|
params = DocumentParameters.new(content: language_multilingual_data)
|
@@ -10,8 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
morphology_complete_data = 'The quick brown fox jumped over the lazy '
|
14
|
-
'dog. 👍🏾 Yes he did. B)'
|
13
|
+
morphology_complete_data = 'The quick brown fox jumped over the lazy dog. 👍🏾 Yes he did. B)'
|
15
14
|
begin
|
16
15
|
params = DocumentParameters.new(content: morphology_complete_data)
|
17
16
|
response = rosette_api.get_morphology_complete(params)
|
File without changes
|
File without changes
|
@@ -10,9 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
morphology_lemmas_data =
|
14
|
-
'The fact is that the geese just went back to get a rest and I\'m not ' \
|
15
|
-
'banking on their return soon'
|
13
|
+
morphology_lemmas_data = 'The fact is that the geese just went back to get a rest and I\'m not banking on their return soon'
|
16
14
|
begin
|
17
15
|
params = DocumentParameters.new(content: morphology_lemmas_data)
|
18
16
|
response = rosette_api.get_lemmas(params)
|
@@ -10,9 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
morphology_parts_of_speech_data =
|
14
|
-
'The fact is that the geese just went back to get a rest and I\'m not ' \
|
15
|
-
'banking on their return soon'
|
13
|
+
morphology_parts_of_speech_data = 'The fact is that the geese just went back to get a rest and I\'m not banking on their return soon'
|
16
14
|
begin
|
17
15
|
params = DocumentParameters.new(content: morphology_parts_of_speech_data)
|
18
16
|
response = rosette_api.get_parts_of_speech(params)
|
@@ -10,9 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
name_dedupe_data = 'Alice Terry,Alice Thierry,Betty Grable,Betty Gable,'
|
14
|
-
'Norma Shearer,Norm Shearer,Brigitte Helm,Bridget Helem,Judy Holliday,' \
|
15
|
-
'Julie Halliday'
|
13
|
+
name_dedupe_data = 'Alice Terry,Alice Thierry,Betty Grable,Betty Gable,Norma Shearer,Norm Shearer,Brigitte Helm,Bridget Helem,Judy Holliday,Julie Halliday'
|
16
14
|
|
17
15
|
threshold = 0.75
|
18
16
|
names = name_dedupe_data.split(',').map { |n| NameParameter.new(n) }
|
data/examples/relationships.rb
CHANGED
@@ -10,15 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
relationships_text_data = 'FLIR Systems is headquartered in Oregon and ' \
|
14
|
-
'produces thermal imaging, night vision, and infrared cameras and sensor ' \
|
15
|
-
'systems. According to the SEC\'s order instituting a settled ' \
|
16
|
-
'administrative proceeding, FLIR entered into a multi-million dollar ' \
|
17
|
-
'contract to provide thermal binoculars to the Saudi government in ' \
|
18
|
-
'November 2008. Timms and Ramahi were the primary sales employees ' \
|
19
|
-
'responsible for the contract, and also were involved in negotiations to ' \
|
20
|
-
'sell FLIR\'s security cameras to the same government officials. At the ' \
|
21
|
-
'time, Timms was the head of FLIR\'s Middle East office in Dubai.'
|
13
|
+
relationships_text_data = 'FLIR Systems is headquartered in Oregon and produces thermal imaging, night vision, and infrared cameras and sensor systems. According to the SEC\'s order instituting a settled administrative proceeding, FLIR entered into a multi-million dollar contract to provide thermal binoculars to the Saudi government in November 2008. Timms and Ramahi were the primary sales employees responsible for the contract, and also were involved in negotiations to sell FLIR\'s security cameras to the same government officials. At the time, Timms was the head of FLIR\'s Middle East office in Dubai.'
|
22
14
|
|
23
15
|
begin
|
24
16
|
params = DocumentParameters.new(content: relationships_text_data)
|
data/examples/sentences.rb
CHANGED
@@ -10,11 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
sentences_data = 'This land is your land. This land is my land, from '
|
14
|
-
'California to the New York island; from the red wood forest to the Gulf ' \
|
15
|
-
'Stream waters. This land was made for you and Me. As I was walking that ' \
|
16
|
-
'ribbon of highway, I saw above me that endless skyway: I saw below me ' \
|
17
|
-
'that golden valley: This land was made for you and me.'
|
13
|
+
sentences_data = 'This land is your land. This land is my land, from California to the New York island; from the red wood forest to the Gulf Stream waters. This land was made for you and Me. As I was walking that ribbon of highway, I saw above me that endless skyway: I saw below me that golden valley: This land was made for you and me.'
|
18
14
|
|
19
15
|
begin
|
20
16
|
params = DocumentParameters.new
|
data/examples/sentiment.rb
CHANGED
@@ -12,13 +12,7 @@ rosette_api = if url
|
|
12
12
|
end
|
13
13
|
|
14
14
|
file = Tempfile.new(%w[foo .html])
|
15
|
-
sentiment_file_data =
|
16
|
-
'<html><head><title>New Ghostbusters Film</title></head><body><p>Original ' \
|
17
|
-
'Ghostbuster Dan Aykroyd, who also co-wrote the 1984 Ghostbusters film, ' \
|
18
|
-
'couldn\'t be more pleased with the new all-female Ghostbusters cast, ' \
|
19
|
-
'telling The Hollywood Reporter, "The Aykroyd family is delighted by this ' \
|
20
|
-
'inheritance of the Ghostbusters torch by these most magnificent women in ' \
|
21
|
-
'comedy."</p></body></html>'
|
15
|
+
sentiment_file_data = '<html><head><title>New Ghostbusters Film</title></head><body><p>Original Ghostbuster Dan Aykroyd, who also co-wrote the 1984 Ghostbusters film, couldn\'t be more pleased with the new all-female Ghostbusters cast, telling The Hollywood Reporter, "The Aykroyd family is delighted by this inheritance of the Ghostbusters torch by these most magnificent women in comedy."</p></body></html>'
|
22
16
|
file.write(sentiment_file_data)
|
23
17
|
file.close
|
24
18
|
begin
|
@@ -10,9 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
syntax_dependencies_data =
|
14
|
-
'Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize ' \
|
15
|
-
'in Physiology or Medicine on Monday.'
|
13
|
+
syntax_dependencies_data = 'Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday.'
|
16
14
|
|
17
15
|
begin
|
18
16
|
params = DocumentParameters.new(content: syntax_dependencies_data)
|
data/examples/topics.rb
CHANGED
@@ -10,14 +10,8 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
topics_data =
|
14
|
-
|
15
|
-
"and Fox Searchlight's J.R.R. Tolkien biopic Tolkien. Anthony Boyle, known " \
|
16
|
-
'for playing Scorpius Malfoy in the British play Harry Potter and the ' \
|
17
|
-
'Cursed Child, also has signed on for the film centered on the famed ' \
|
18
|
-
'author. In Tolkien, Hoult will play the author of the Hobbit and Lord of ' \
|
19
|
-
'the Rings book series that were later adapted into two Hollywood ' \
|
20
|
-
'trilogies from Peter Jackson. Dome Karukoski is directing the project.'
|
13
|
+
topics_data = 'Lily Collins is in talks to join Nicholas Hoult in Chernin Entertainment and Fox Searchlight\'s J.R.R. Tolkien biopic Tolkien. Anthony Boyle, known for playing Scorpius Malfoy in the British play Harry Potter and the Cursed Child, also has signed on for the film centered on the famed author. In Tolkien, Hoult will play the author of the Hobbit and Lord of the Rings book series that were later adapted into two Hollywood trilogies from Peter Jackson. Dome Karukoski is directing the project.'
|
14
|
+
|
21
15
|
begin
|
22
16
|
params = DocumentParameters.new(content: topics_data)
|
23
17
|
response = rosette_api.get_topics(params)
|
data/examples/transliteration.rb
CHANGED
@@ -10,8 +10,7 @@ rosette_api = if url
|
|
10
10
|
RosetteAPI.new(api_key)
|
11
11
|
end
|
12
12
|
|
13
|
-
transliteration_content_data =
|
14
|
-
'Kareem Abdul Jabbar holds the records for most points in the NBA'
|
13
|
+
transliteration_content_data = 'ana r2ye7 el gam3a el sa3a 3 el 3asr'
|
15
14
|
|
16
15
|
begin
|
17
16
|
params = DocumentParameters.new
|
@@ -17,13 +17,13 @@ class AddressSimilarityParameters
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# Validates the parameters by checking if address1 and address2 are instances
|
20
|
-
# of
|
20
|
+
# of AddressParameters or Strings.
|
21
21
|
def validate_params
|
22
|
-
a1_msg = 'address1 option can only be an instance of an AddressParameter'
|
23
|
-
raise BadRequestError.new(a1_msg) if [AddressParameter].none? { |clazz| @address1.is_a? clazz }
|
22
|
+
a1_msg = 'address1 option can only be an instance of an AddressParameter or a String'
|
23
|
+
raise BadRequestError.new(a1_msg) if [String, AddressParameter].none? { |clazz| @address1.is_a? clazz }
|
24
24
|
|
25
|
-
a2_msg = 'address2 option can only be an instance of an AddressParameter'
|
26
|
-
raise BadRequestError.new(a2_msg) if [AddressParameter].none? { |clazz| @address2.is_a? clazz }
|
25
|
+
a2_msg = 'address2 option can only be an instance of an AddressParameter or a String'
|
26
|
+
raise BadRequestError.new(a2_msg) if [String, AddressParameter].none? { |clazz| @address2.is_a? clazz }
|
27
27
|
end
|
28
28
|
|
29
29
|
# Converts this class to Hash with its keys in lower CamelCase.
|
data/lib/rosette_api.rb
CHANGED
@@ -13,7 +13,7 @@ require_relative 'bad_request_format_error'
|
|
13
13
|
# This class allows you to access all Rosette API endpoints.
|
14
14
|
class RosetteAPI
|
15
15
|
# Version of Ruby binding
|
16
|
-
BINDING_VERSION = '1.14.
|
16
|
+
BINDING_VERSION = '1.14.4'
|
17
17
|
# Rosette API language endpoint
|
18
18
|
LANGUAGE_ENDPOINT = '/language'
|
19
19
|
# Rosette API morphology endpoint
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rosette_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Basis Technology Corp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubysl-securerandom
|
@@ -45,10 +45,10 @@ files:
|
|
45
45
|
- examples/language.rb
|
46
46
|
- examples/language_multilingual.rb
|
47
47
|
- examples/morphology_complete.rb
|
48
|
-
- examples/
|
49
|
-
- examples/
|
48
|
+
- examples/morphology_compound-components.rb
|
49
|
+
- examples/morphology_han-readings.rb
|
50
50
|
- examples/morphology_lemmas.rb
|
51
|
-
- examples/
|
51
|
+
- examples/morphology_parts-of-speech.rb
|
52
52
|
- examples/name_deduplication.rb
|
53
53
|
- examples/name_similarity.rb
|
54
54
|
- examples/name_translation.rb
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.
|
96
|
+
rubygems_version: 3.1.2
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: A Ruby interface for Rosette Text Analytics Platform.
|