Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Quick search for Chinese characters
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.55 suggestions (English) Printable version
View previous topic :: View next topic  
Author Message
Shanny
Member
Member


Joined: 24 Feb 2003
Posts: 123

PostPosted: Tue May 26, 2009 9:57 am    Post subject: Quick search for Chinese characters Reply with quote

2ghisler(Author)

I'm the author of QuickSearchPro, an enhanced quick search tool to support first letter of PinYin search in Chinese.
Here http://www.ghisler.ch/board/viewtopic.php?t=22112&postdays=0&postorder=asc&start=15
I leart that you'll develop "separate phonetic searches for Chinese" soon, I think the related source code of QuickSearchPro maybe useful for this feature, it supports multi-pronunciation PinYin search, and I beleive its PinYin search algorithm is faster than almost all of others.
If you need, I'd like to provide the source code to you unconditionally, or if you have no time, I think I can help to implement the wcmd_chn.dll if you tell me the interface.

Btw: I'm also the auther of F4Menu, will you consider to integrate such F4Menu feature in TC? If yes, I can provide source code as well. Smile
_________________
TCEE, TCPP, F4Menu -- Shanny
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 17794
Location: Switzerland

PostPosted: Tue May 26, 2009 10:33 am    Post subject: Reply with quote

Thanks very much for your offer!

I have already written such a dll for beta 4, and it is very fast. Smile

The source will be public, so if your method is faster you can write a faster dll.

Regarding F4Menu: Unfortunately I don't currently have the time to write a similar function, or integrate your solution. The main problem is that it would need additional translations.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Shanny
Member
Member


Joined: 24 Feb 2003
Posts: 123

PostPosted: Tue May 26, 2009 7:52 pm    Post subject: Reply with quote

Great! looking forward to beta4, when will it be released?
_________________
TCEE, TCPP, F4Menu -- Shanny
Back to top
View user's profile Send private message Send e-mail
WatchUer
Senior Member
Senior Member


Joined: 22 Feb 2003
Posts: 238
Location: China

PostPosted: Wed May 27, 2009 2:47 am    Post subject: Reply with quote

I guess tomorrow. Wink
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 17794
Location: Switzerland

PostPosted: Wed May 27, 2009 4:47 am    Post subject: Reply with quote

Probably yes, if all goes well.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 17794
Location: Switzerland

PostPosted: Thu May 28, 2009 2:30 pm    Post subject: Reply with quote

OK, here is the PinYin search (first character only) for TC 7.5 beta 4 now:

Auto-installing dll:
http://ghisler.fileburst.com/chinese/PinYinQuickSearch.zip

Source:
http://ghisler.fileburst.com/chinese/PinYinQuickSearch_src.zip

IMPORTANT NOTE: You need to close and restart Total Commander after installing the search tool to use it.

I'm using a binary table created from the "Unicode Pinyin table" available here:
http://kanji.zinbun.kyoto-u.ac.jp/~yasuoka/ftp/CJKtable/Uni2Pinyin.Z

To rebuild the table tcmatch.tbl, you need to delete tcmatch.tbl, then unpack Uni2Pinyin.Z (with Z plugin) to TC dir, and rename the file to tcmatch.txt.

Then restart TC and search for some Chinese character. The addon will then automatically rebuild the table.

I have no idea how well it works, it worked OK with all the Chinese characters I tried. The tcmatch.tbl supports up to 3 variations per character. The few characters with more than 3 are handled internally by tcmatch.dll.

The dll interface is very simple:
BOOL __stdcall MatchFileW(WCHAR* Filter,WCHAR* FileName);
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
zhv
Junior Member
Junior Member


Joined: 11 Mar 2006
Posts: 73

PostPosted: Thu May 28, 2009 11:21 pm    Post subject: Reply with quote

That's great! Thanks a lot, Mr Ghisler, and Shanny!

It workd fine so far here.

But I suggest the search box could automatically disapear after a short period(which can be configured by the user), just like the QuickSearchPro way!
Back to top
View user's profile Send private message
Samuel
Power Member
Power Member


Joined: 29 Aug 2003
Posts: 1297
Location: Brandenburg, Germany

PostPosted: Fri May 29, 2009 9:12 am    Post subject: Reply with quote

I wonder if this new search could also be used for something like excluding punctuations:
Code:
Search for: one two

Find Files: one, two.txt one - two.txt


Or for a search like google:
Code:
Search for: one two

Find Files:
one tree two.txt
two tree.one


That would be gr8!
_________________
QuickSearch eXtended | ButtonBar eXtended | www.SamuelPlentz.de.vu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
softy
Junior Member
Junior Member


Joined: 12 Jan 2005
Posts: 6
Location: China

PostPosted: Fri May 29, 2009 9:16 am    Post subject: Reply with quote

旺德福
wonderful
_________________
My English is very poor ,I hope you can understand……
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 17794
Location: Switzerland

PostPosted: Fri May 29, 2009 9:22 am    Post subject: Reply with quote

2Samuel
The search dll is for quick search and quick filter only - but you can now write your own search dll for whatever you need!

2zhv
2softy
Thanks for trying it!

Quote:
But I suggest the search box could automatically disapear after a short period

Hmm, interesting idea, I will consider it as an option. Currently you need to press ESC or start some operation with the file, like ENTER, F3, F4, F5, F6, F8/Del etc.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Csharp
Junior Member
Junior Member


Joined: 22 Dec 2003
Posts: 14

PostPosted: Fri May 29, 2009 10:02 am    Post subject: about tcmatch.dll with pinying Reply with quote

Quote:
The tcmatch.tbl supports up to 3 variations per character. The few characters with more than 3 are handled internally by tcmatch.dll.


...first variation work well.. but the second and third can't work.

if you can test, try this chinese

4E80 gui1 jun1 qiu1

the chinese is 亀
Back to top
View user's profile Send private message
Shanny
Member
Member


Joined: 24 Feb 2003
Posts: 123

PostPosted: Fri May 29, 2009 10:52 am    Post subject: Reply with quote

2ghisler(Author)
Great thanks!
All Chinese users would thank you for this great feature:)

However, you made a very small mistake, hence it cannot work with all multi-pronunciation chars.
I corrected it and now it works fine

fixed code:
http://www.shanny.com.cn/download/PinYinQuickSearch_src_fixed_by_shanny.zip

Auto-installing dll:
http://www.shanny.com.cn/download/PinYinQuickSearch_fixed_by_shanny.zip
_________________
TCEE, TCPP, F4Menu -- Shanny
Back to top
View user's profile Send private message Send e-mail
Samuel
Power Member
Power Member


Joined: 29 Aug 2003
Posts: 1297
Location: Brandenburg, Germany

PostPosted: Fri May 29, 2009 4:24 pm    Post subject: Reply with quote

Edit: There is probably a bug in it. The funktion "BOOL __stdcall MatchFileW(WCHAR* Filter,WCHAR* FileName);" is only called for all files that doesnt already fit to the filter. For example:

Code:
Filelist:
a.txt
b.txt
c.txt <- cursor
d.txt
e.txt

Filter: "a"

MatchFileW is called with:
c.txt <- because of cursor position
b.txt
c.txt
d.txt
e.txt


Strange: For the file "a.txt" MatchFileW is not called (with filter "a").
(I think its design, but would be a better and more general to call for all files.)

Strange: Why is it called with the file under cursor two times?
Also called for ".." if cursor is on that item although it could not be filtered.

Created a Google-like Quicksearch. Can be downloaded here.

Bug: There are Problems using an Auto-installing dll:
The file could not be overwritten, because TC uses it. Could it be unloaded?
_________________
QuickSearch eXtended | ButtonBar eXtended | www.SamuelPlentz.de.vu


Last edited by Samuel on Fri May 29, 2009 7:03 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cheming
Member
Member


Joined: 07 May 2004
Posts: 143
Location: China

PostPosted: Fri May 29, 2009 6:52 pm    Post subject: Reply with quote

2ghisler:

I have tried that feature and it works well for me.

Thank you very very very very much!
Back to top
View user's profile Send private message
fenix_productions
Power Member
Power Member


Joined: 07 Aug 2005
Posts: 1661
Location: Poland

PostPosted: Fri May 29, 2009 8:08 pm    Post subject: Reply with quote

2ghisler(Author)
Are there real chances to extend MatchFileW method a little bit or add another one?

Currently it gives filter and file name but it would be also great to get visible columns content somehow too.

That way it would be very easy to create something to fit my idea from the past.
_________________
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
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    Total Commander Forum Index -> TC7.55 suggestions (English) All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group