Forum: CAT Tools Technical Help
Topic: TMLookup
Poster: FarkasAndras
Post title: details
[quote]Michael Beijer wrote:
Hmm, just had a closer look at your suggestion, but this isn't quite what I'd need: I don't always necessarily know the name of the exact TMX that I want to "narrow down on". Actually, I would probably more often want to use this potential new feature to do the reverse.
[/quote]
Well, if you get one hit from that TMX, then its name is in the table.
[quote]Michael Beijer wrote:
E.g., I just ran a few searches today when translating and noticed that I was getting a lot of noise from a particular set of parent very large TMXs (specifically: OpenSubtitles2013_en-nl.tmx, which is huge, and contains a lot of garbage). I would like to use this feature in such cases to quickly remove these results. As far as I can tell, there would be two ways to quickly remove specific unwanted results:
1. By implementing some kind of negative filter
[/quote]
Negative source filtering is a problem in the current program. You can do negative searches, but a negative term can't be the first in the search expression. So there is no practical way to do this unless all the TMXes you want results from start with a common word or letter. Then you can do tm NOT tm_full_of_junk.tmx (you could list all the letters of the alphabet but the search would probably take ages to run: a OR b OR c OR d ... NOT Opensubtitles).
As I said before this might be rectified in FTS5 but I wouldn't hold my breath.
[quote]Michael Beijer wrote:
2. Or, by implementing a filter as I suggested originally, where I can just filter on a particular column, and thus just ignore the offending results by scrolling past them
[/quote]
You can already filter on a particular column. With the seach box. You just can't filter with a negative expression only. I'm getting severe deja vu... But you seem to mean alphabetical sorting, which is a completely different concept. You can sort hits based on the last column. The setting is in the setup file so you have to manually edit the setup file and restart. Maybe I will add a menu option or some other kind of runtime switch. Clickable column headers would be the fanciest/most obvious but it would take a bit of fiddling and I doubt I will have the motivation to do it. I can add a menu entry in 15 minutes if there are no unexpected road bumps.
[quote]Michael Beijer wrote:
What exactly does that new code of yours do?
[/quote]
It adds two buttons alongside the highlight box. One hides all hits that fail to match a (regex-enabled) filter expression, the other hides all that do match it. So you can use it to hide all your opensubtitles hits. It looks at all the displayed columns indiscriminately.
Topic: TMLookup
Poster: FarkasAndras
Post title: details
[quote]Michael Beijer wrote:
Hmm, just had a closer look at your suggestion, but this isn't quite what I'd need: I don't always necessarily know the name of the exact TMX that I want to "narrow down on". Actually, I would probably more often want to use this potential new feature to do the reverse.
[/quote]
Well, if you get one hit from that TMX, then its name is in the table.
[quote]Michael Beijer wrote:
E.g., I just ran a few searches today when translating and noticed that I was getting a lot of noise from a particular set of parent very large TMXs (specifically: OpenSubtitles2013_en-nl.tmx, which is huge, and contains a lot of garbage). I would like to use this feature in such cases to quickly remove these results. As far as I can tell, there would be two ways to quickly remove specific unwanted results:
1. By implementing some kind of negative filter
[/quote]
Negative source filtering is a problem in the current program. You can do negative searches, but a negative term can't be the first in the search expression. So there is no practical way to do this unless all the TMXes you want results from start with a common word or letter. Then you can do tm NOT tm_full_of_junk.tmx (you could list all the letters of the alphabet but the search would probably take ages to run: a OR b OR c OR d ... NOT Opensubtitles).
As I said before this might be rectified in FTS5 but I wouldn't hold my breath.
[quote]Michael Beijer wrote:
2. Or, by implementing a filter as I suggested originally, where I can just filter on a particular column, and thus just ignore the offending results by scrolling past them
[/quote]
You can already filter on a particular column. With the seach box. You just can't filter with a negative expression only. I'm getting severe deja vu... But you seem to mean alphabetical sorting, which is a completely different concept. You can sort hits based on the last column. The setting is in the setup file so you have to manually edit the setup file and restart. Maybe I will add a menu option or some other kind of runtime switch. Clickable column headers would be the fanciest/most obvious but it would take a bit of fiddling and I doubt I will have the motivation to do it. I can add a menu entry in 15 minutes if there are no unexpected road bumps.
[quote]Michael Beijer wrote:
What exactly does that new code of yours do?
[/quote]
It adds two buttons alongside the highlight box. One hides all hits that fail to match a (regex-enabled) filter expression, the other hides all that do match it. So you can use it to hide all your opensubtitles hits. It looks at all the displayed columns indiscriminately.