Hey folks.
So here is my problem. I need to create php script where will be checked documents nr.
For example user x requesting document nr 235, but for real he need 233. I need give out message like this: document nr 235 not found and make "suggestion" to look at 233.
I hear it kinda can be done vs hamming code, but its can correct only 1 number mistake for example 235 to 234 :confused:. Maybe there is some other method to use at this point?!
ty for any response :cool:
Documents number check and correction if possible.
Started by Sephy, May 13 2008 11:35 PM
8 replies to this topic
#1
Posted 13 May 2008 - 11:35 PM
|
|
|
#2
Guest_Jordan_*
Posted 14 May 2008 - 04:21 AM
Guest_Jordan_*
My first question: How do you know (as a human) that the user needs nr 233? Walk me through the steps.
#3
Posted 14 May 2008 - 05:38 AM
Well i got web page where user stores some documents: for example user stores on my web page documents vs number 200, 220, 233.
When he asks some document he can forgot or misspell(for example number can be much longer like 2345653 or sumthing) documents number. So i will give him closes number who can be hes wanted :)
When he asks some document he can forgot or misspell(for example number can be much longer like 2345653 or sumthing) documents number. So i will give him closes number who can be hes wanted :)
#4
Posted 14 May 2008 - 07:56 AM
Is there a reason why user can't be offered a drop-down to select the document from?
#5
Posted 14 May 2008 - 12:53 PM
Sephy said:
Well i got web page where user stores some documents: for example user stores on my web page documents vs number 200, 220, 233.
When he asks some document he can forgot or misspell(for example number can be much longer like 2345653 or sumthing) documents number. So i will give him closes number who can be hes wanted :)
When he asks some document he can forgot or misspell(for example number can be much longer like 2345653 or sumthing) documents number. So i will give him closes number who can be hes wanted :)
How does he "ask" for the document? By keyword's inside the document or the number? And if you can explicitly define "close," I can try to create a regular expression. Does close mean +/-5% in the last document number? +/- 5% in all numbers?
#6
Posted 15 May 2008 - 12:42 AM
I got better details for my tast :D
So here is my REAL task. I need some algorithm for my documents code. Something similar to algorithm used in credit cards(Luhn algorithm - Wikipedia, the free encyclopedia). I could use this one but i need something so i can use error correction too as i mention before. For correction i will need store some check code for each user. I need this because i want my system could work off-line(for example credit cards are valid when formula for calculation gives out 0).
example: user gives 123456789(his real number is 123456788). I check it vs my algorithm correct and give out: correct is 123456788 and there where mistake in 9 position.
So here is my REAL task. I need some algorithm for my documents code. Something similar to algorithm used in credit cards(Luhn algorithm - Wikipedia, the free encyclopedia). I could use this one but i need something so i can use error correction too as i mention before. For correction i will need store some check code for each user. I need this because i want my system could work off-line(for example credit cards are valid when formula for calculation gives out 0).
example: user gives 123456789(his real number is 123456788). I check it vs my algorithm correct and give out: correct is 123456788 and there where mistake in 9 position.
#7
Posted 15 May 2008 - 10:42 PM
bump?! :confused:
#9
Posted 20 May 2008 - 11:09 PM
I know which is right because my ALGORITHM.
Example: if in my big number(123456788) symbols sum end like this 123, then that number is correct.(warning this example is wrong :D)
And my problem i need to find any algorithm which can be checked like this. Of coarse i dont 123 at end but i need anything to know my number according to my algorithm is right or not :cool:
Example: if in my big number(123456788) symbols sum end like this 123, then that number is correct.(warning this example is wrong :D)
And my problem i need to find any algorithm which can be checked like this. Of coarse i dont 123 at end but i need anything to know my number according to my algorithm is right or not :cool:


Sign In
Create Account

Back to top









