Skip to content

Commit 4b39875

Browse files
author
Adam Soos
committed
WS-3317: new url and header
1 parent 50cddc6 commit 4b39875

28 files changed

+58
-58
lines changed

events.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Oscar flew to Moscow last Thursday."}' \
7-
"https://api.rosette.com/rest/v1/events"
7+
"https://analytics.babelstreet.com/rest/v1/events"

events_negation.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Anna attended the marketing meeting earlier today. She did not attend the subsequent meeting afterwards.", "options": {"negation": "BOTH"}}' \
7-
"https://api.rosette.com/rest/v1/events"
7+
"https://analytics.babelstreet.com/rest/v1/events"

examples/address_similarity.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
@@ -12,4 +12,4 @@ curl -s -X POST \
1212
},
1313
"address2": "160 Pennsilvana Avenue, Washington, D.C., 20500"
1414
}' \
15-
"https://api.rosette.com/rest/v1/address-similarity"
15+
"https://analytics.babelstreet.com/rest/v1/address-similarity"

examples/categories.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "If you are a fan of the British television series Downton Abbey and you are planning to be in New York anytime before April 2nd, there is a perfect stop for you while in town." }' \
7-
"https://api.rosette.com/rest/v1/categories"
7+
"https://analytics.babelstreet.com/rest/v1/categories"

examples/entities.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "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." }' \
7-
"https://api.rosette.com/rest/v1/entities"
7+
"https://analytics.babelstreet.com/rest/v1/entities"

examples/info.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
curl -s -X GET \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
6-
"https://api.rosette.com/rest/v1/info/"
6+
"https://analytics.babelstreet.com/rest/v1/info/"

examples/language.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Por favor Señorita, says the man." }' \
7-
"https://api.rosette.com/rest/v1/language"
7+
"https://analytics.babelstreet.com/rest/v1/language"

examples/language_multilingual.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "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 موقوفين من منظمة \"د هـ ك ب ج\" الذين كانت قد أوقفتهم الشرطة اليونانية في وقت سابق كانوا يخططون لاغتيال الرئيس التركي رجب طيب أردوغان.", "options": {"multilingual": true}}' \
7-
"https://api.rosette.com/rest/v1/language"
7+
"https://analytics.babelstreet.com/rest/v1/language"

examples/morphology_complete.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "The quick brown fox jumped over the lazy dog. 👍🏾 Yes he did. B)"}' \
7-
"https://api.rosette.com/rest/v1/morphology/complete"
7+
"https://analytics.babelstreet.com/rest/v1/morphology/complete"
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Rechtsschutzversicherungsgesellschaften"}' \
7-
"https://api.rosette.com/rest/v1/morphology/compound-components"
7+
"https://analytics.babelstreet.com/rest/v1/morphology/compound-components"

examples/morphology_han-readings.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "北京大学生物系主任办公室内部会议"}' \
7-
"https://api.rosette.com/rest/v1/morphology/han-readings"
7+
"https://analytics.babelstreet.com/rest/v1/morphology/han-readings"

examples/morphology_lemmas.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "The fact is that the geese just went back to get a rest and I\u0027m not banking on their return soon"}' \
7-
"https://api.rosette.com/rest/v1/morphology/lemmas"
7+
"https://analytics.babelstreet.com/rest/v1/morphology/lemmas"
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "The fact is that the geese just went back to get a rest and I\u0027m not banking on their return soon"}' \
7-
"https://api.rosette.com/rest/v1/morphology/parts-of-speech"
7+
"https://analytics.babelstreet.com/rest/v1/morphology/parts-of-speech"

examples/name_deduplication.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"names": [{"text": "Alice Terry"},{"text": "Alice Thierry"},{"text": "Betty Grable"},{"text": "Betty Gable"},{"text": "Norma Shearer"},{"text": "Norm Shearer"},{"text": "Brigitte Helm"},{"text": "Bridget Helem"},{"text": "Judy Holliday"},{"text": "Julie Halliday"}] , "threshold": 0.75 }' \
7-
"https://api.rosette.com/rest/v1/name-deduplication"
7+
"https://analytics.babelstreet.com/rest/v1/name-deduplication"

examples/name_similarity.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"name1": {"text": "Michael Jackson"}, "name2": {"text": "迈克尔·杰克逊"} }' \
7-
"https://api.rosette.com/rest/v1/name-similarity"
7+
"https://analytics.babelstreet.com/rest/v1/name-similarity"

examples/name_translation.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"name": "معمر محمد أبو منيار القذاف", "targetLanguage": "eng", "targetScript": "Latn"}' \
7-
"https://api.rosette.com/rest/v1/name-translation"
7+
"https://analytics.babelstreet.com/rest/v1/name-translation"

examples/ping.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
curl -s -X GET \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
6-
"https://api.rosette.com/rest/v1/ping"
6+
"https://analytics.babelstreet.com/rest/v1/ping"

examples/record_similarity.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"fields":{"dob2":{"type":"rni_date","weight":0.1},"primaryName":{"type":"rni_name","weight":0.5},"dob":{"type":"rni_date","weight":0.2},"addr":{"type":"rni_address","weight":0.5}},"properties":{"threshold":0.7,"includeExplainInfo":true},"records":{"left":[{"dob2":{"date":"1993/04/16"},"primaryName":{"text":"Ethan R","entityType":"PERSON","language":"eng","languageOfOrigin":"eng","script":"Latn"},"dob":"1993-04-16","addr":"123 Roadlane Ave"},{"primaryName":{"text":"Evan R"},"dob":{"date":"1993-04-16"}}],"right":[{"primaryName":{"text":"Seth R","language":"eng"},"dob":{"date":"1993-04-16"}},{"dob2":{"date":"1993/04/16"},"primaryName":"Ivan R","dob":{"date":"1993-04-16"},"addr":{"address":"123 Roadlane Ave"}}]}}' \
7-
"https://api.rosette.com/rest/v1/record-similarity"
7+
"https://analytics.babelstreet.com/rest/v1/record-similarity"

examples/relationships.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "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."}' \
7-
"https://api.rosette.com/rest/v1/relationships"
7+
"https://analytics.babelstreet.com/rest/v1/relationships"

examples/semantic_vectors.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Cambridge, Massachusetts" }' \
7-
"https://api.rosette.com/rest/v1/semantics/vector"
7+
"https://analytics.babelstreet.com/rest/v1/semantics/vector"

examples/sentences.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "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." }' \
7-
"https://api.rosette.com/rest/v1/sentences"
7+
"https://analytics.babelstreet.com/rest/v1/sentences"

examples/sentiment.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "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.”" }' \
7-
"https://api.rosette.com/rest/v1/sentiment"
7+
"https://analytics.babelstreet.com/rest/v1/sentiment"

examples/similar_terms.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "spy", "options": {"resultLanguages": ["spa", "deu", "jpn"]}}' \
7-
"https://api.rosette.com/rest/v1/semantics/similar"
7+
"https://analytics.babelstreet.com/rest/v1/semantics/similar"

examples/syntax_dependencies.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday." }' \
7-
"https://api.rosette.com/rest/v1/syntax/dependencies"
7+
"https://analytics.babelstreet.com/rest/v1/syntax/dependencies"

examples/tokens.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "北京大学生物系主任办公室内部会议"}' \
7-
"https://api.rosette.com/rest/v1/tokens"
7+
"https://analytics.babelstreet.com/rest/v1/tokens"

examples/topics.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "Lily Collins is in talks to join Nicholas Hoult in Chernin Entertainment and Fox Searchlight\u0027s 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."}' \
7-
"https://api.rosette.com/rest/v1/topics"
7+
"https://analytics.babelstreet.com/rest/v1/topics"

examples/transliteration.curl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
curl -s -X POST \
2-
-H "X-RosetteAPI-Key: your_api_key" \
2+
-H "X-BabelStreetAPI-Key: your_api_key" \
33
-H "Content-Type: application/json" \
44
-H "Accept: application/json" \
55
-H "Cache-Control: no-cache" \
66
-d '{"content": "ana r2ye7 el gam3a el sa3a 3 el 3asr" }' \
7-
"https://api.rosette.com/rest/v1/transliteration"
7+
"https://analytics.babelstreet.com/rest/v1/transliteration"

run-examples.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
service_url="https://api.rosette.com/rest/v1"
3+
service_url="https://analytics.babelstreet.com/rest/v1"
44
retcode=0
55
errors=( "Exception" "processingFailure" "badRequest" )
66

@@ -29,7 +29,7 @@ function cleanURL() {
2929

3030
function checkAPIKey() {
3131
output_file=check_key_out.log
32-
http_status_code=$(curl -s -o "${output_file}" -w "%{http_code}" -H "X-RosetteAPI-Key: ${API_KEY}" "${service_url}/ping")
32+
http_status_code=$(curl -s -o "${output_file}" -w "%{http_code}" -H "X-BabelStreetAPI-Key: ${API_KEY}" "${service_url}/ping")
3333
if [ "${http_status_code}" = "403" ]; then
3434
echo -e "\nInvalid Rosette API key. Output is:\n"
3535
cat "${output_file}"
@@ -42,7 +42,7 @@ function checkAPIKey() {
4242

4343
function validateURL() {
4444
output_file=validate_url_out.log
45-
http_status_code=$(curl -s -o "${output_file}" -w "%{http_code}" -H "X-RosetteAPI-Key: ${API_KEY}" "${service_url}/ping")
45+
http_status_code=$(curl -s -o "${output_file}" -w "%{http_code}" -H "X-BabelStreetAPI-Key: ${API_KEY}" "${service_url}/ping")
4646
if [ "${http_status_code}" != "200" ]; then
4747
echo -e "\n${service_url} server not responding. Output is:\n"
4848
cat "${output_file}"
@@ -58,7 +58,7 @@ function runExample() {
5858
result=""
5959
script="$(sed s/your_api_key/${API_KEY}/ < ./${1})" #replacing your_api_key with actual key
6060
if [ ! -z ${ALT_URL} ]; then
61-
script=$(echo "${script}" | sed "s#https://api.rosette.com/rest/v1#${service_url}#") #replacing api url with alt URL if provided
61+
script=$(echo "${script}" | sed "s#https://analytics.babelstreet.com/rest/v1#${service_url}#") #replacing api url with alt URL if provided
6262
fi
6363
script=$(echo "${script}" | sed 's~\\$~~g' )
6464
echo $script #curl -x etc etc

0 commit comments

Comments
 (0)