SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot boballoo's Avatar
    Join Date
    Dec 2001
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Text comparison script

    Not sure if this is the right forum or not but here goes anyway.

    I have a few paragraphs of text as the "Initial Value" in a form text field. This is a test for new freelance editors. The user must correct mistakes and make changes to the text and submit it. At this point I want the submitted text to be compared to the "Answer Key" text and the results returned to the user in the form of a percentage mark.

    First things first. Is there a ready made script (Javascript? PHP? ASP? Java? ??) which will accept form submissions and compare the two text files and output the differences to another file which will then be tabulated and scored according to parameters set by me? If not how hard would it be to do this from scratch. I guess I mean how much would it cost to create such script since my programming skills are minimal.

    Is there another way to achieve the end result of a score for the test being returned to the user?
    EditFast
    Any Document --> Any Time!
    Web Site Copy Editing & Proofreading


  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Text comparison script

    Originally posted by boballoo
    according to parameters set by me?
    That's the trick. Depends on how complicated your parameters are as to how complicated the script will be. Personally, I would do this server side (ASP, PHP, etc).

    It also depends on whether you want to learn how to do this for future maintenance and to broaden your skill-set.

    In PHP you have two functions that might meet your straight from the API without too much mucking about.

    similar_text
    www.php.net/similar-text
    which is based on Oliver [1993] algorithm (whatever that is).

    and

    levenshtein
    www.php.net/levenshtein

  3. #3
    SitePoint Zealot boballoo's Avatar
    Join Date
    Dec 2001
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your input.

    After doing a little research into the problem I have come to the conclusion that it is much too complex for my tiny brain. The variables needed become infinite with just a short passage and I was looking at two pages worth. This becomes an artificial intelligence problem which cannot be solved yet, at least not perfectly. I am not into making my marking procedures so complex I can't understand them.

    A better solution would be to use multiple choice questions - easier to create and easier to automatically ckeck and score. That's what I am doing now.
    EditFast
    Any Document --> Any Time!
    Web Site Copy Editing & Proofreading



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •