• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
how to summarize using FBC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to summarize using FBC


  • Subject: how to summarize using FBC
  • From: email@hidden
  • Date: Wed, 29 Aug 2001 19:01:53 -0400

Hi,
I am trying to use FindByContent.framework in ApplicationServices.framework to summarize a blob of text. I don't get back any summarized text. Here is the code that I am using, I am hardcoding the strings for testing purposes.

---------------- Start of code -------------------------

char *inBuf, *outBuf;
UInt32 inLength, outLength, numSentences;
OSErr err;

inBuf = (char *) malloc(strlen("Earlier, Israeli troops exchanged fire with Palestinians in Aida refugee camp near Beit Jala, attempting to quell firing targeting Gilo. CNN Correspondent Ben Wedeman reported from near the camp that the Israeli troops were met with gunfire. The boom of tank fire and the crackle of sporadic rifle fire could be heard. The Israel Defense Forces said its troops were shot at and returned fire, including tank shells, but did not enter the camp. In a prior incident, two Palestinians were injured, one seriously, at the refugee camp after being hit by Israeli army fire overnight, according to the Palestine Red Crescent Society Israeli officials also said a mortar had fallen near Gilo Wednesday. No one was injured. It was the fourth mortar to hit near the Jewish neighborhood on the southern edge of Jerusalem since Tuesday.") + 1);

strcpy(inBuf, "Earlier, Israeli troops exchanged fire with Palestinians in Aida refugee camp near Beit Jala, attempting to quell firing targeting Gilo. CNN Correspondent Ben Wedeman reported from near the camp that the Israeli troops were met with gunfire. The boom of tank fire and the crackle of sporadic rifle fire could be heard. The Israel Defense Forces said its troops were shot at and returned fire, including tank shells, but did not enter the camp. In a prior incident, two Palestinians were injured, one seriously, at the refugee camp after being hit by Israeli army fire overnight, according to the Palestine Red Crescent Society Israeli officials also said a mortar had fallen near Gilo Wednesday. No one was injured. It was the fourth mortar to hit near the Jewish neighborhood on the southern edge of Jerusalem since Tuesday.");

outBuf = (char *) malloc(strlen(inBuf) + 1);
inLength = strlen(inBuf);
outLength = inLength;
numSentences = 1;

err = FBCSummarize(inBuf, inLength, outBuf, &outLength, &numSentences);

if (err != noErr) {
NSLog(@"Error calling FBCSummarize");
exit(1);
}

NSLog(@"length of outBuf is %d\n", outLength);

-------------------------- End of code ------------------------------

The length of outBuf is 0. Am I missing something.

Sarat


  • Prev by Date: PPC Assembly in Frameworks
  • Next by Date: Re: Return and Enter keys in NSTextView
  • Previous by thread: Re: PPC Assembly in Frameworks
  • Next by thread: speed daemons
  • Index(es):
    • Date
    • Thread