Quick search for Chinese characters
Moderators: white, Hacker, petermad, Stefan2
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.
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
- ghisler(Author)
- Site Admin
- Posts: 48138
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
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
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48138
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 48138
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, here is the PinYin search (first character only) for TC 7.5 beta 4 now:
Auto-installing dll:
https://plugins.ghisler.com/chinese/PinYinQuickSearch.zip
Source:
https://plugins.ghisler.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);
Auto-installing dll:
https://plugins.ghisler.com/chinese/PinYinQuickSearch.zip
Source:
https://plugins.ghisler.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
https://www.ghisler.com
https://www.ghisler.com
- Samuel
- Power Member
- Posts: 1930
- Joined: 2003-08-29, 15:44 UTC
- Location: Germany, Brandenburg an der Havel
- Contact:
I wonder if this new search could also be used for something like excluding punctuations:
Or for a search like google:
That would be gr8!
Code: Select all
Search for: one two
Find Files: one, two.txt one - two.txt
Code: Select all
Search for: one two
Find Files:
one tree two.txt
two tree.one
- ghisler(Author)
- Site Admin
- Posts: 48138
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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!
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!
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.But I suggest the search box could automatically disapear after a short period
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
about tcmatch.dll with pinying
...first variation work well.. but the second and third can't work.The tcmatch.tbl supports up to 3 variations per character. The few characters with more than 3 are handled internally by tcmatch.dll.
if you can test, try this chinese
4E80 gui1 jun1 qiu1
the chinese is 亀
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
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
- Samuel
- Power Member
- Posts: 1930
- Joined: 2003-08-29, 15:44 UTC
- Location: Germany, Brandenburg an der Havel
- Contact:
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:
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?
Code: Select all
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
(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?
Last edited by Samuel on 2009-05-30, 01:03 UTC, edited 1 time in total.
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
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.
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
#128099