News:

Wondering if this will always be free?  See why free is better.

Main Menu

Filter results from dict.org

Started by Tomer, July 17, 2005, 12:27:13 PM

Previous topic - Next topic

Tomer

I need to filter the word definition results that are retrieved via cURL from dict.org

Basically - This is what my script gives me from dict.org for a search for "people":

Quote
    220 aspen.miranda.org dictd 1.9.15/rf on Linux 2.4.27-2-k7 <[email protected]> 250 ok 150 2 definitions retrieved 151 "People" gcide "The Collaborative International Dictionary of English v.0.48" People \Peo"ple\ (p[=e]"p'l), n. [OE. peple, people, OF. pueple, F. peuple, fr. L. populus. Cf. {Populage}, {Public}, {Pueblo}.] 1. The body of persons who compose a community, tribe, nation, or race; an aggregate of individuals forming a whole; a community; a nation. [1913 Webster] Unto him shall the gathering of the people be. --Gen. xlix. 10. [1913 Webster] The ants are a people not strong. --Prov. xxx. 25. [1913 Webster] Before many peoples, and nations, and tongues. --Rev. x. 11. [1913 Webster] Earth's monarchs are her peoples. --Whitter. [1913 Webster] A government of all the people, by all the people, for all the people. --T. Parker. [1913 Webster] Note: Peopleis a collective noun, generally construed with a plural verb, and only occasionally used in the plural form (peoples), in the sense of nations or races. [1913 Webster] 2. Persons, generally; an indefinite number of men and women; folks; population, or part of population; as, country people; -- sometimes used as an indefinite subject or verb, like on in French, and man in German; as, people in adversity. [1913 Webster] People were tempted to lend by great premiums. --Swift. [1913 Webster] People have lived twenty-four days upon nothing but water. --Arbuthnot. [1913 Webster] 3. The mass of community as distinguished from a special class; the commonalty; the populace; the vulgar; the common crowd; as, nobles and people. [1913 Webster] And strive to gain his pardon from the people. --Addison. [1913 Webster] 4. With a possessive pronoun: (a) One's ancestors or family; kindred; relations; as, my people were English. (b) One's subjects; fellow citizens; companions; followers. "You slew great number of his people." --Shak. [1913 Webster] Syn: {People}, {Nation}. Usage: When speaking of a state, we use people for the mass of the community, as distinguished from their rulers, and nation for the entire political body, including the rulers. In another sense of the term, nation describes those who are descended from the same stock; and in this sense the Germans regard themselves as one nation, though politically subject to different forms of government. [1913 Webster] . 151 "People" gcide "The Collaborative International Dictionary of English v.0.48" People \Peo"ple\ (p[=e]"p'l), v. t. [imp. & p. p. {Peopled} (p[=e]"p'ld) p. pr. & vb. n.; {Peopling} (p[=e]"p'l[i^]ng).] [Cf. OF. popler, puepler, F. puepler. Cf. {Populate}.] To stock with people or inhabitants; to fill as with people; to populate. "Peopled heaven with angels." --Dryden. [1913 Webster] As the gay motes that people the sunbeams. --Milton. [1913 Webster] . 250 ok [d/m/c = 2/0/20; 0.000r 0.000u 0.000s] 221 bye [d/m/c = 0/0/0; 0.000r 0.000u 0.000s]

So I need to filter the raw data into readable format, not sure how to seperate the data, any ideas?

Thanks

- Tomer

[Unknown]

You may wish to first check what it looks like, raw (this looks like an HTML view of plain text.)  Then try to use a regualr expression on it.

-[Unknown]

Tomer

Yes it's raw text [output from cURL]. How would I easily format this raw data into readable format?

The problem with the formatting, is that every word description has *different* results - Not only content difference, but also structure difference.

Any help is appreciated.

- Tomer

Advertisement: