Looking for someone to help code a Trade Chat Filter
I'd like to find someone to help implement a Trade chat filter addon idea I have. I'm not sure I can get the GUI part done in a reasonable amount of time.
I want to use a Bayesian algorithm to classify trade chat into multiple buckets. The SpamBayes addon uses a modified algorithm that only does 3 buckets. I'd like to use the algorithm implemented in Perl by POPFile that can be trained for a large number of categories. Each category (including "unclassified") needs GUI to display the chat in that category with the ability to re-classify each chat to any other category. Each category also needs to toggle show or not show in the regular chat window. What will be unique about this addon is that I envision classifying trade chat into categories such as Trade, LookingFor, GoldSpam, GuildAds and once trained, leaving Trade and LookingFor turned on and turning off GoldSpam and "unclassified" which should contain almost all of the gossip, trolling, trash, etc. It would be desireable to have the ability to report players in each category which can be turned on only for GoldSpam. I have attempted to train the Spambayes for WoW addon but my "undesireable" trade chat covers too wide a range to successfully train on it. On the other hand, I believe I can train on the "desireable" trade chat and turn off all the rest. While turned off, it still needs to be captured (in a circular buffer) so that training can still occur. If Blizzard increased the size of the ignore list by an order of magnitude, then I might be able to get some peace. I don't want to turn Trade off completely because I like to respond to trade/profession requests. I believe this addon could actually return "my" Trade chat to what I believe was originally intended. |
Quote:
Here's an example of a public channel ignore filter. Code:
local IgnoreList={ See WoWPedia:Events/Communication for a list of events and the arguments they supply. |
Slightly off-topic, what is more efficient:
1. Code:
local t = { Code:
local t = { |
Thanks for the input. What I didn't express in the original post was that while a huge ignore list would certianly help, it isn't ideal because some of these habitual motor-mouths occasionally say something trade-appropriate, and their gold is just as good as anyone elses.
So while implementing a larger ignore list is possible, I still prefer my original approach. |
If you could post a link to sorce code that uses such algorithms, it would be helpful. I'll have to analyze it to get an idea of specificly how the algorithm works and what it exactly does.
|
Quote:
|
Quote:
|
Thanks for the replies on the efficiency matter.
Just out of curiosity, how would one go about to benchmark using the WoW client? I mean, GetTime() is the only API returning milliseconds so basically call that right before and after and subtract the time difference -right? :) |
Quote:
|
This is what I found, obviously the built in code handles it much faster.
The code I used: http://pastebin.com/Xfc2wgpF 1. There are over 10k names and the code picks 1/10th random names from the whole table, and makes sure they are not duplicates. 2. The function runs, either method 1 or 2, (1) find by key (2) traverse and match. 3. They return the time the finding of the names took, i.e. not the whole but only the matching parts that found the names in the huge table(s). 4. The times are compared and printed, the print lines while the tests ran are rounded down so not accurate, the final number is on the other hand. Code:
[13:31:18] [1] 6810.301 to 6810.301 (0.000 ms) - 1024/1024 of 10239 |
Quote:
It is possible to download and install POPfile without hooking into your email client. You can then browse through the user interface. The online documentation is also excellent. |
Quote:
For future reference, I'd suggest using debugprofilestart() and debugprofilestop() to benchmark CPU time spent. debugprofilestop() returns the time from when debugprofilestart() was last called with much higher precision than comparing timestamps from GetTime(). This lack in precision is what's causing the 0 ms readings and happens a lot when trying to compare Lua C functions and internal Lua processing. The limit on GetTime() precision is because it's merely a Lua wrapper for the C function gettickcount() from the system kernel that returns an integer describing system uptime in milliseconds. GetTime() simply returns this integer divided by 1000. |
All times are GMT -6. The time now is 07:37 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI