Skip to content

Commit

Permalink
serializer fix (#9335)
Browse files Browse the repository at this point in the history
  • Loading branch information
annelo-msft authored Jan 7, 2020
1 parent 02c143c commit bd5bd73
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private static NamedEntity ReadNamedEntity(JsonElement entityElement)
{
string text = default;
string type = default;
string subType = default;
string subtype = default;
int offset = default;
int length = default;
double score = default;
Expand All @@ -302,16 +302,16 @@ private static NamedEntity ReadNamedEntity(JsonElement entityElement)
text = textValue.GetString();
if (entityElement.TryGetProperty("type", out JsonElement typeValue))
type = typeValue.ToString();
if (entityElement.TryGetProperty("subType", out JsonElement subTypeValue))
subType = subTypeValue.ToString();
if (entityElement.TryGetProperty("subtype", out JsonElement subTypeValue))
subtype = subTypeValue.ToString();
if (entityElement.TryGetProperty("offset", out JsonElement offsetValue))
offsetValue.TryGetInt32(out offset);
if (entityElement.TryGetProperty("length", out JsonElement lengthValue))
lengthValue.TryGetInt32(out length);
if (entityElement.TryGetProperty("score", out JsonElement scoreValue))
scoreValue.TryGetDouble(out score);

return new NamedEntity(text, type, subType, offset, length, score);
return new NamedEntity(text, type, subtype, offset, length, score);
}

#endregion Recognize Entities
Expand Down

0 comments on commit bd5bd73

Please sign in to comment.