A good strategy that has worked for me thus far is to parse out the
text based on paragraph breaks. The likelihood of over 5,000
characters in a single paragraph is pretty low.

To do this in PHP, when parsing a .txt file for instance:

$text = preg_split('/\r\n|\r|\n/', file_get_contents($file_tmp));

This uses a regular expression to look for *nix-Style and Windows-
Style carriage returns and newlines. The resulting array can then be
sent off to Google via a foreach loop.

Hope this helps you!

Andrew Steele
www.SteeleMacGregor.com - Website Design/Development and Tech Support

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to