Text Summary
SkillfulAPI.TextSummarization
SkillfulAPI.TextSummarizationOverview
Class Definition
using SkillfulAI.API;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TextSummarization : MonoBehaviour
{
/// <summary>
/// Unity's Start method, called when the script is initialized. Initiates the text summarization process.
/// </summary>
void Start()
{
SummarizeText();
}
/// <summary>
/// Initiates text summarization based on a specified input text.
/// </summary>
public void SummarizeText()
{
// Input text to be summarized
string inputText = "The cab arrived late. The inside was in as bad of shape as the outside which was concerning, and it didn't appear that it had been cleaned in months. The green tree air-freshener hanging from the rearview mirror was either exhausted of its scent or not strong enough to overcome the other odors emitting from the cab. The correct decision, in this case, was to get the hell out of it and to call another cab, but she was late and didn't have a choice.";
// Perform text summarization on the input text
SkillfulAPI.Summarization(inputText, result =>
{
Debug.Log(result);
});
}
}Detailed Explanation
Usage Example
Conclusion
Last updated