| View previous topic :: View next topic |
| Author |
Message |
Shanny Member


Joined: 24 Feb 2003 Posts: 123
|
Posted: Tue May 26, 2009 9:57 am Post subject: Quick search for Chinese characters |
|
|
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.  _________________ TCEE, TCPP, F4Menu -- Shanny |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 17794 Location: Switzerland
|
Posted: Tue May 26, 2009 10:33 am Post subject: |
|
|
Thanks very much for your offer!
I have already written such a dll for beta 4, and it is very fast.
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 |
|
 |
Shanny Member


Joined: 24 Feb 2003 Posts: 123
|
Posted: Tue May 26, 2009 7:52 pm Post subject: |
|
|
Great! looking forward to beta4, when will it be released? _________________ TCEE, TCPP, F4Menu -- Shanny |
|
| Back to top |
|
 |
WatchUer Senior Member


Joined: 22 Feb 2003 Posts: 238 Location: China
|
Posted: Wed May 27, 2009 2:47 am Post subject: |
|
|
I guess tomorrow.  |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 17794 Location: Switzerland
|
Posted: Wed May 27, 2009 4:47 am Post subject: |
|
|
Probably yes, if all goes well. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 17794 Location: Switzerland
|
Posted: Thu May 28, 2009 2:30 pm Post subject: |
|
|
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 |
|
 |
zhv Junior Member


Joined: 11 Mar 2006 Posts: 73
|
Posted: Thu May 28, 2009 11:21 pm Post subject: |
|
|
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 |
|
 |
Samuel Power Member


Joined: 29 Aug 2003 Posts: 1297 Location: Brandenburg, Germany
|
Posted: Fri May 29, 2009 9:12 am Post subject: |
|
|
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 |
|
 |
softy Junior Member

Joined: 12 Jan 2005 Posts: 6 Location: China
|
Posted: Fri May 29, 2009 9:16 am Post subject: |
|
|
旺德福
wonderful _________________ My English is very poor ,I hope you can understand…… |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 17794 Location: Switzerland
|
Posted: Fri May 29, 2009 9:22 am Post subject: |
|
|
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 |
|
 |
Csharp Junior Member

Joined: 22 Dec 2003 Posts: 14
|
Posted: Fri May 29, 2009 10:02 am Post subject: about tcmatch.dll with pinying |
|
|
| 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 |
|
 |
Shanny Member


Joined: 24 Feb 2003 Posts: 123
|
|
| Back to top |
|
 |
Samuel Power Member


Joined: 29 Aug 2003 Posts: 1297 Location: Brandenburg, Germany
|
Posted: Fri May 29, 2009 4:24 pm Post subject: |
|
|
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 |
|
 |
cheming Member

Joined: 07 May 2004 Posts: 143 Location: China
|
Posted: Fri May 29, 2009 6:52 pm Post subject: |
|
|
2ghisler:
I have tried that feature and it works well for me.
Thank you very very very very much! |
|
| Back to top |
|
 |
fenix_productions Power Member


Joined: 07 Aug 2005 Posts: 1661 Location: Poland
|
Posted: Fri May 29, 2009 8:08 pm Post subject: |
|
|
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 |
|
 |
|