Azure-sdk-for-java: [BUG] Fix Nightly tests for Text Analytics

Created on 31 Dec 2019  路  9Comments  路  Source: Azure/azure-sdk-for-java

Client Cognitive - Text Analytics Service Attention test bug

All 9 comments

Turned out the endpoint value is wrong. But we still need to change
AZURE_TEXT_ANALYTICS_ENDPOINT: $(java-azure-textanalytics-sdk-endpoint)
to
AZURE_TEXT_ANALYTICS_ENDPOINT: $(java-textanalytics-sdk-endpoint)
PR is comming soon

@assafi
Inconsistent Service behavior.

List<String> inputs = Arrays.asList(
        "I had a wonderful trip to Seattle last week.",
        "I work at Microsoft.");

client.recognizeBatchLinkedEntities(inputs);

Initially, the service responded with 1 identified linked entities for each of the texts, recording.

Output:
"documents": [{
    "id": "0",
    "entities": [{
      "name": "Seattle",
      "matches": [{
        "text": "Seattle",
        "offset": 26,
        "length": 7,
        "score": 0.15046201222847677
      }],
      "language": "en",
      "id": "Seattle",
      "url": "https://en.wikipedia.org/wiki/Seattle",
      "dataSource": "Wikipedia"
    }]
  }, {
    "id": "1",
      "name": "Seattle",
      "matches": [{
        "text": "Microsoft",
        "offset": 10,
        "length": 9,
        "score": 0.18693659716732069
      }],
      "language": "en",
      "id": "Microsoft",
      "url": "https://en.wikipedia.org/wiki/Microsoft",
      "dataSource": "Wikipedia"
  }],
  "errors": [],
  "modelVersion": "2019-10-01"

Two entities: Seattle and Microsoft for model version "2019-10-01" .

But recently, it started returning a different result for the same input.`recording-live-tests.

"documents": [{
    "id": "1",
    "entities": [{
      "name": "Seattle",
      "matches": [{
        "text": "Seattle",
        "offset": 26,
        "length": 7,
        "score": 0.15046201222847677
      }],
      "language": "en",
      "id": "Seattle",
      "url": "https://en.wikipedia.org/wiki/Seattle",
      "dataSource": "Wikipedia"
    }]
  }, {
    "id": "2",
    "entities": []
  }],
  "errors": [],
  "modelVersion": "2019-10-01"

Is this service beahvior expected/known to the service team?

@samvaity Yes, this is a known regression in the model. We're working on a fix with the DS team.

@mssfang could you try again?
Looks like latest version includes the change.

Running your input in .NET, I get:

{
    "documents": [
        {
            "id": "0",
            "entities": [
                {
                    "name": "Seattle",
                    "matches": [
                        {
                            "text": "Seattle",
                            "offset": 26,
                            "length": 7,
                            "score": 0.15046201222847677
                        }
                    ],
                    "language": "en",
                    "id": "Seattle",
                    "url": "https://en.wikipedia.org/wiki/Seattle",
                    "dataSource": "Wikipedia"
                }
            ]
        },
        {
            "id": "1",
            "entities": [
                {
                    "name": "Microsoft",
                    "matches": [
                        {
                            "text": "Microsoft",
                            "offset": 10,
                            "length": 9,
                            "score": 0.18693659716732069
                        }
                    ],
                    "language": "en",
                    "id": "Microsoft",
                    "url": "https://en.wikipedia.org/wiki/Microsoft",
                    "dataSource": "Wikipedia"
                }
            ]
        }
    ],
    "errors": [],
    "modelVersion": "2020-02-01"
}

I get the same output.

Great! so, is there any work remaining here? or can we close

@maririos Merging this PR should be able to close this issue

Was this page helpful?
0 / 5 - 0 ratings