public void Profile_Success()
        {
            string contentToProfile = "The IBM Watson™ Personality Insights service provides a Representational State Transfer (REST) Application Programming Interface (API) that enables applications to derive insights from social media, enterprise data, or other digital communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics, including Big Five, Needs, and Values, from digital communications such as email, text messages, tweets, and forum posts. The service can automatically infer, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. The service can report consumption preferences based on the results of its analysis, and for JSON content that is timestamped, it can report temporal behavior.";

            Content content = new Content()
            {
                ContentItems = new List<ContentItem>()
                {
                    new ContentItem()
                    {
                        Contenttype = ContentItem.ContenttypeEnumValue.TEXT_PLAIN,
                        Language = ContentItem.LanguageEnumValue.EN,
                        Content = contentToProfile
                    }
                }
            };

            service.WithHeader("X-Watson-Test", "1");
            var result = service.Profile(
                content: content,
                contentType: "text/plain",
                contentLanguage: "en",
                acceptLanguage: "en",
                rawScores: true,
                consumptionPreferences: true,
                csvHeaders: true
                );

            Assert.IsNotNull(result.Result);
            Assert.IsNotNull(result.Result.Personality);
        }
示例#2
0
 public void TestSetup()
 {
     service.WithHeader("X-Watson-Test", "1");
 }