You are not logged in.
I'm not sure if this will be posible but here it goes.
I'll try to be simple
Imagine that I have a text file with names like this
DeviantART
Jennifer Lopez
...
It's any way to compare the the names and for example
Deviant ART > DeviantART
deviant art > DeviantART
deviantart > DeviantART
or
jenniferlopez > Jennifer Lopez
jen n ifer lop e z > Jennifer Lopez
(maybe the key is the a-z characters)
This maybe crazy but... who knows... and I think it would be a nice project to be in the default pascal scripts.
There's no hurry (and maybe neither the posibilty of doing it lol)
If this software has helped you, consider getting your pro version. :)
Offline
Well, there is a function for string compare, which performs alphabetic comparison on the basis of ASCII (Unicode?) values...
Do you want to implement a different comparison method? What are the rules you suggest for doing so? If you can specify the rules, the script shouldn't be difficult. But leaving it ambiguous makes it difficult to know what exactly you want.
Offline
Well, there is a function for string compare, which performs alphabetic comparison on the basis of ASCII (Unicode?) values...
Do you want to implement a different comparison method? What are the rules you suggest for doing so? If you can specify the rules, the script shouldn't be difficult. But leaving it ambiguous makes it difficult to know what exactly you want.
I don't undertand very well :S
I was thinking that, when adding a file to rename, a pascal would search on the diferent lines of the file text, to see if is any concidence even if ther are spaces or other simbols betwen the leters and if finds it, replace with the new one
About de comparison method I can't say anything
Sorry if I'm not expresing properly, my knowledge is limited
If this software has helped you, consider getting your pro version. :)
Offline
Deviant ART > DeviantART
deviant art > DeviantART
deviantart > DeviantARTor
jenniferlopez > Jennifer Lopez
jen n ifer lop e z > Jennifer Lopez
Ok, let's consider the above. When you say Word1 > Word2, what is the exact criteria? Is it only that words shouldn't have spaces in them? That's fine. But now you want some letters capitalised as well, such as only the "D" and the "ART" in "DeviantART". How is the script going to know what is the proper capitalisation for any word? Are you going to specify it for all words? Then you might as well rename manually!
I was thinking that, when adding a file to rename, a pascal would search on the diferent lines of the file text, to see if is any concidence even if ther are spaces or other simbols betwen the leters and if finds it, replace with the new one.
If you don't want spaces then that should be possible. But are you sure there won't be any multiple words at all on a single line? If you're sure, then that makes it easier as all we have to do is remove spaces from every line. But looking at your own example above, it seems you don't want a space in "Deviant ART", but you want one in "Jennifer Lopez". How is the script going to know this?
Offline
I guess I know what SafetyCar need.
He wants the script to check for every given filename if there is something similar in given list (let's name that list "a dictionary"), and if so, to replace old string with the one from dictionary.
Quite a huge task for processor (increasing drammatically with increase of dictionary).
Or even worse, cause I have a feeling that SafetyCar doesn't want checking for whole filename, but for any part of filename, eg.
"1. jennifer l opez - a song" to become "1. Jennifer Lopez - a song"...
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
That's it
And this was the part I was afraid of
Quite a huge task for processor (increasing drammatically with increase of dictionary).
Last edited by SafetyCar (2008-08-16 14:23)
If this software has helped you, consider getting your pro version. :)
Offline
Well, there are dictionary files available out there, but as Konrad rightly pointed out, it's not a trivial job. You might as well search for some dedicated spell checkers/correction programs rather than try to create a script for this. Why reinvent the wheel unnecessarily, right?
Offline
Yes, this can be done using PascalScript, and it shouldn't need huge processing power requirements like krtek have suggested
The idea would be to process every dictionary entry (like "DeviantART" and "Jennifer Lopez") as a sequence of characters, but only alphabetic letters, ignore symbols and spaces. Then, in every filename try to find the exact same sequence of letters, also ignoring symbols and spaces, and remembering the starting and ending positions of those sequences in the filenames. If you get a match, you simply replace it with the correct entry from the dictionary.
I don't have much free time to write it, but it shouldn't be complicated.
Offline
Well... I have mixed feelings re. this.
On one hand, a simple search and replace might not consume much processing power (depends if you want to read parts of the dictionary file into RAM first for speed), but it is certainly likely to take a lot of time, esp. if the file to be checked and the dictionary file are both huge (the latter generally will be). Also Denis, I'm pretty sure no dictionary will include words like "DeviantART" and "Jennifer Lopez"! Thus if the file to be checked doesn't consist only of proper English (or any other language) words, then it won't work.
Finally, stuff like this, while no doubt possible with PascalScript, doesn't sound to me as if it's all that useful for a renaming program. As I said, there are surely freeware/commercial spell-checkers available that'll do a far better job than what a hurriedly hacked together script can do. A Google search should throw up some names for sure.
Of course, if someone wants to spend time writing such a script, be my guest! PascalScript gives you the power, it's up to you to decide how to use it and for what. (With great power comes great responsibility, after all! )
All the best!
Offline
I would try but I don't even know how to start :S
If this software has helped you, consider getting your pro version. :)
Offline