From: Adam L. <apl...@gm...> - 2009-04-21 23:49:00
|
Hi gang, I'm a school psychologist by day, but a PHP hacker by night. Often, I'm presented with problems that end up being solved much more easily with some programming skill than with anything remotely resembling psychology. I'm working on a tool that will analyze a piece of given text and provide the usual readability statistics, among many other things. The Flesch-Kincaid grade equivalent score was easy to implement, but another one that I would like to use is giving me much more trouble. The Lexile Framework is a leveling system designed to help teachers/parents/kids select books that are at the appropriate reading level, regardless of grade level. The formula for calculating the level is proprietary, from that I can tell. The only place I know of that one can analyze a text and find a level is here: http://www.lexile.com/DesktopDefault.aspx?view=ed&tabindex=2&tabid=16&tabpageid=335 This involves uploading a text document to their server so it can be processed, and then the Lexile level is spit back out. What I'd like is for a user (me) to be able to enter the text into a POSTed form and have that Lexile level be returned on the formatted PDF that I'm creating. This project has done me well for Flesch-Kincaid and Coleman Liau (http://code.google.com/p/php-text-statistics/), but I can't find anything similar for Lexile. Does anyone have any experience with readability in PHP that could help point me in the right direction? An open-source project that calculates the score would be ideal. Otherwise, I'm not sure how I could use the proprietary tool from MetaMetrics to do this on the fly. Thanks for any suggestions you might have. Adam P. Larsen apl...@gm... |
From: Richard L. <ce...@l-...> - 2009-05-17 14:51:02
|
Since nobody else has responded... Perhaps instead of trying to duplicate a close-source proprietary algorithm, you should just use their servers to get the score. You can use PHP to POST the text, and get the number back with http://php.net/curl On Tue, April 21, 2009 6:48 pm, Adam Larsen wrote: > Hi gang, > > I'm a school psychologist by day, but a PHP hacker by night. Often, > I'm presented with problems that end up being solved much more easily > with some programming skill than with anything remotely resembling > psychology. > > I'm working on a tool that will analyze a piece of given text and > provide the usual readability statistics, among many other things. > The Flesch-Kincaid grade equivalent score was easy to implement, but > another one that I would like to use is giving me much more trouble. > The Lexile Framework is a leveling system designed to help > teachers/parents/kids select books that are at the appropriate reading > level, regardless of grade level. The formula for calculating the > level is proprietary, from that I can tell. The only place I know of > that one can analyze a text and find a level is here: > http://www.lexile.com/DesktopDefault.aspx?view=ed&tabindex=2&tabid=16&tabpageid=335 > > This involves uploading a text document to their server so it can be > processed, and then the Lexile level is spit back out. What I'd like > is for a user (me) to be able to enter the text into a POSTed form and > have that Lexile level be returned on the formatted PDF that I'm > creating. This project has done me well for Flesch-Kincaid and > Coleman Liau (http://code.google.com/p/php-text-statistics/), but I > can't find anything similar for Lexile. > > Does anyone have any experience with readability in PHP that could > help point me in the right direction? An open-source project that > calculates the score would be ideal. Otherwise, I'm not sure how I > could use the proprietary tool from MetaMetrics to do this on the fly. > > Thanks for any suggestions you might have. > > Adam P. Larsen > apl...@gm... > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch |
From: Adam L. <apl...@gm...> - 2009-05-18 15:11:53
|
I actually got this going soon after I posted here. A few weeks prior, I had attempted a similar solution but never got it to work because I was forgetting to log in and save the cookies first. On my browser, it didn't look like I needed to log in, but that was because I had already logged in to their site once, and my browser had saved the cookies. Duh. It looks like a decent implementation of cURL's cookiejar/cookiefile, along with uploading user input text as a file. If anyone would like to see it, I can e-mail it directly to you. I'd rather not post it here, as it is abusing someone else's server with every request. Thanks for the reply and the suggestion. That's exactly how it ended up working. Adam P. Larsen apl...@gm... On Sun, May 17, 2009 at 9:50 AM, Richard Lynch <ce...@l-...> wrote: > Since nobody else has responded... > > Perhaps instead of trying to duplicate a close-source proprietary > algorithm, you should just use their servers to get the score. > > You can use PHP to POST the text, and get the number back with > http://php.net/curl > > On Tue, April 21, 2009 6:48 pm, Adam Larsen wrote: >> Hi gang, >> >> I'm a school psychologist by day, but a PHP hacker by night. Often, >> I'm presented with problems that end up being solved much more easily >> with some programming skill than with anything remotely resembling >> psychology. >> >> I'm working on a tool that will analyze a piece of given text and >> provide the usual readability statistics, among many other things. >> The Flesch-Kincaid grade equivalent score was easy to implement, but >> another one that I would like to use is giving me much more trouble. >> The Lexile Framework is a leveling system designed to help >> teachers/parents/kids select books that are at the appropriate reading >> level, regardless of grade level. The formula for calculating the >> level is proprietary, from that I can tell. The only place I know of >> that one can analyze a text and find a level is here: >> http://www.lexile.com/DesktopDefault.aspx?view=ed&tabindex=2&tabid=16&tabpageid=335 >> >> This involves uploading a text document to their server so it can be >> processed, and then the Lexile level is spit back out. What I'd like >> is for a user (me) to be able to enter the text into a POSTed form and >> have that Lexile level be returned on the formatted PDF that I'm >> creating. This project has done me well for Flesch-Kincaid and >> Coleman Liau (http://code.google.com/p/php-text-statistics/), but I >> can't find anything similar for Lexile. >> >> Does anyone have any experience with readability in PHP that could >> help point me in the right direction? An open-source project that >> calculates the score would be ideal. Otherwise, I'm not sure how I >> could use the proprietary tool from MetaMetrics to do this on the fly. >> >> Thanks for any suggestions you might have. >> >> Adam P. Larsen >> apl...@gm... >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and >> around Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. >> Use priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> chiPHPug-discuss mailing list >> chi...@li... >> https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss >> > > > -- > Some people ask for gifts here. > I just want you to buy an Indie CD for yourself: > http://cdbaby.com/search/from/lynch > > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss > |