Skip to content

Commit 615b5dc

Browse files
authored
Merge pull request #102154 from aahill/ta-temp-fix
[CogSvcs] Updating credential var
2 parents 1a77333 + e60c53d commit 615b5dc

File tree

1 file changed

+6
-6
lines changed
  • articles/cognitive-services/text-analytics/includes/quickstarts/v3

1 file changed

+6
-6
lines changed

articles/cognitive-services/text-analytics/includes/quickstarts/v3/python-sdk.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def sentiment_analysis_example(endpoint, key):
7979

8080
document = "I had the best day of my life. I wish you were there with me."
8181

82-
response = single_analyze_sentiment(endpoint=endpoint, key=key, input_text=document)
82+
response = single_analyze_sentiment(endpoint=endpoint, credential=key, input_text=document)
8383
print("Document Sentiment: {}".format(response.sentiment))
8484
print("Overall scores: positive={0:.3f}; neutral={1:.3f}; negative={2:.3f} \n".format(
8585
response.document_scores.positive,
@@ -133,7 +133,7 @@ from azure.ai.textanalytics import single_detect_language
133133
def language_detection_example(endpoint, key):
134134
try:
135135
document = "Ce document est rédigé en Français."
136-
response = single_detect_language(endpoint=endpoint, key=key, input_text= document)
136+
response = single_detect_language(endpoint=endpoint, credential=key, input_text= document)
137137
print("Language: ", response.primary_language.name)
138138

139139
except Exception as err:
@@ -162,7 +162,7 @@ def entity_recognition_example(endpoint, key):
162162

163163
try:
164164
document = "I had a wonderful trip to Seattle last week."
165-
result = single_recognize_entities(endpoint=endpoint, key=key, input_text= document)
165+
result = single_recognize_entities(endpoint=endpoint, credential=key, input_text= document)
166166

167167
print("Named Entities:\n")
168168
for entity in result.entities:
@@ -202,7 +202,7 @@ def entity_pii_example(endpoint, key):
202202
document = "Insurance policy for SSN on file 123-12-1234 is here by approved."
203203

204204

205-
result = single_recognize_pii_entities(endpoint=endpoint, key=key, input_text= document)
205+
result = single_recognize_pii_entities(endpoint=endpoint, credential=key, input_text= document)
206206

207207
print("Personally Identifiable Information Entities: ")
208208
for entity in result.entities:
@@ -235,7 +235,7 @@ def entity_linking_example(endpoint, key):
235235
During his career at Microsoft, Gates held the positions of chairman,
236236
chief executive officer, president and chief software architect,
237237
while also being the largest individual shareholder until May 2014."""
238-
result = single_recognize_linked_entities(endpoint=endpoint, key=key, input_text= document)
238+
result = single_recognize_linked_entities(endpoint=endpoint, credential=key, input_text= document)
239239

240240
print("Linked Entities:\n")
241241
for entity in result.entities:
@@ -312,7 +312,7 @@ def key_phrase_extraction_example(endpoint, key):
312312
try:
313313
document = "My cat might need to see a veterinarian."
314314

315-
response = single_extract_key_phrases(endpoint=endpoint, key=key, input_text= document)
315+
response = single_extract_key_phrases(endpoint=endpoint, credential=key, input_text= document)
316316

317317
if not response.is_error:
318318
print("\tKey Phrases:")

0 commit comments

Comments
 (0)