internal static SentenceTarget DeserializeSentenceTarget(JsonElement element)
        {
            string sentiment = default;
            TargetConfidenceScoreLabel confidenceScores = default;
            int    offset = default;
            int    length = default;
            string text   = default;
            IReadOnlyList <TargetRelation> relations = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("sentiment"))
                {
                    sentiment = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("confidenceScores"))
                {
                    confidenceScores = TargetConfidenceScoreLabel.DeserializeTargetConfidenceScoreLabel(property.Value);
                    continue;
                }
                if (property.NameEquals("offset"))
                {
                    offset = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("length"))
                {
                    length = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("text"))
                {
                    text = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("relations"))
                {
                    List <TargetRelation> array = new List <TargetRelation>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(TargetRelation.DeserializeTargetRelation(item));
                    }
                    relations = array;
                    continue;
                }
            }
            return(new SentenceTarget(sentiment, confidenceScores, offset, length, text, relations));
        }
        internal static SentenceAssessment DeserializeSentenceAssessment(JsonElement element)
        {
            string sentiment = default;
            TargetConfidenceScoreLabel confidenceScores = default;
            int    offset    = default;
            int    length    = default;
            string text      = default;
            bool   isNegated = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("sentiment"))
                {
                    sentiment = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("confidenceScores"))
                {
                    confidenceScores = TargetConfidenceScoreLabel.DeserializeTargetConfidenceScoreLabel(property.Value);
                    continue;
                }
                if (property.NameEquals("offset"))
                {
                    offset = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("length"))
                {
                    length = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("text"))
                {
                    text = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("isNegated"))
                {
                    isNegated = property.Value.GetBoolean();
                    continue;
                }
            }
            return(new SentenceAssessment(sentiment, confidenceScores, offset, length, text, isNegated));
        }