Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dictionaries

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Suggested Improvements
View previous topic :: View next topic  
Author Message
pickle9000



Joined: 01 Jan 2012
Posts: 2
Location: Canada

PostPosted: Sun Jan 01, 2012 8:31 pm    Post subject: Dictionaries Reply with quote

I haven't been able to find any renamer that can use dictionaries. I have searched here as well with no luck. Here is what I am interested in.

I have a bunch of music files, images and so on from Japan, China and Korea. Of course the filenames are in the language of that country. I don't have the ability to read the languages and would like to get them in a more readable state.

There was a program that used google translate and was targeted at just translation. Great! Nope, google translate can not be used by stand alone software any more without paying. Bing also has a translate function but I'm told by the author of the program everyone is expecting them to follow suit in fairly short order. He decided to let the program die.

There are many simple (word to word or word to kanji) translation dictionaries around for all languages. . Do you have a plugin that would allow a dictionary to do word to word translations? I realize this would not be a true translation but it would not be bad. It could do other things as well.

Here is what I am thinking.

You get a csv dictionary (available for free all over). Typically the first line will be the language to and from info the rest is the dictionary. The program simply id's individual words and replaces them with another from the list. Not a true translation but more than enough for a filename.

Other uses,
- Replacing non text characters with a word equivalent or vice-versa.
-shortening long words or names to an abbreviation

Thanks for listening.

...mike
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Mon Jan 02, 2012 5:22 pm    Post subject: Reply with quote

This can actually be done with Pfrank in a roundabout way.

If you use the mouse to do a block copy of the following text:

Row: 1
Search: ' et '
Replace: ' and '
Row: 2
Search: ' tu '
Replace: ' you '

Then select the main window of PFrank and type CTRL-F2, The search and replace information will be inserted to the top of the PFrank custom renaming creator.
I added this featureso that people could take the information from the PFrank summary window and allow it to be imported to the custom renaming window.
If you had a text file with the above format, then it could be imported the same way by selecting all the text in the file, selecting the Pfrank main window, and typing Ctrl-F2..
The Row numbers do not have to be unique. The same trick will work with:

Row: 1
Search: ' et '
Replace: ' and '
Row: 1
Search: ' tu '
Replace: ' you '
Row: 1
Search: ' vous '
Replace: ' you '

Therefore if you had a list of translation pairs in a csv file, you could export it to a text file. Then find a text editor (like emacs) that has a macro feature to convert the line pairs to the above format.

Let me know if you have any trouble.

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pickle9000



Joined: 01 Jan 2012
Posts: 2
Location: Canada

PostPosted: Tue Jan 03, 2012 1:01 am    Post subject: Reply with quote

That sounds easy enough.

- Is there a limit on the amount of info that can be pasted? Assuming 2500 items in a typical dictionary 2 words per line as well as row search info then I should expect 7500 plus lines to be pasted. I can write a small program to convert the dictionaries to that kind of format.

- Are there any control characters that I will need to trap (so the program does not have a fit)?

Thanks for the reply.

...mike
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Wed Jan 04, 2012 4:23 am    Post subject: Reply with quote

The limit will be based on the number of search/replace rows. ie. 3 lines of pasted info = 1 row to be inserted. I don't think I limited the size in the code so if there is a limitation it is likely dependent on the python library.

I don't know what will happen with control characters. But I don't think control characters can be part of a valid Windows filename so it probably won't be an issue.

The best thing to do would be to create a dummy file with say 1000 copies of the same Row/Search/Replace lines and see if they can all be pasted and appear in the custom renaming creator list.

Peter.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Suggested Improvements All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com