How to filter adult words [duplicate] - user-input

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How do you implement a good profanity filter?
I am developing a web application, and do not want people to publish adult (pornographic) content.
So is there a service or a list of words which are porn related?
Or is there another way to filter adult content?

It can't be done, Disney failed.
If you restrict the words that can be used you'll just see things like this:
I want to stick my long-necked Giraffe up your fluffy white bunny
What you need is a good way for users to flag inappropriate content and a mechanism to deal with it swiftly. One way is to automatically hide/remove content if it's been flagged more than X times.

Just be aware of the medireview problem when filtering ;-) It is quite easy to make a false positive when using simple text filtering algorithms. Maybe it's even worth considering Bayesian statistical classification approach used in spam filters.

Yes, here and here. Read: it cannot be done.

Related

permutations and variations for chatbot user intents

(first time posting, be nice. Also, I'm learning how to code, so I may not ask this question in the right way, be nice) I'm designing a chatbot and I'm having trouble finding a solution that creates all the possible permutations and variations for how a user would ask a question or make a request. For example, if a user wants to know the weather they could ask "Wha't the weather?" or "Will it be sunny tomorrow?" or, or, or. Any resources you could point me to will be appreciated.
This is called natural language processing and is not trivial. I wouldn't recommend working on something as complex as this for a beginner. https://en.wikipedia.org/wiki/Natural_language_processing
I found a couple threads where people wanted to do the same thing.
Any tutorials for developing chatbots?
https://softwareengineering.stackexchange.com/questions/132165/programming-a-chatterbot-understanding-language
But yeah, this isn't easy.

matlab object detection and tracking

I m doing a research project on "Object detection using my a digital camera".
Some suggestion on how to build and program the Matlab code.
In particular, I have a picture of one object, say a screen of my laptop. Than I rotate the laptop and I shot a new picture. I would like to know the difference on the position of the screen. I think I can use the edge detection after a subtraction of the two images but... it is quite difficult for me to implement it.
Some suggestion on how to build and program the matlab code.
That largely depends on the goal you want to achieve. Can you be more specific? Are you streaming the frames or are you tracking offline?
In particular, i have a picture of one object, say a screen of my laptop. Than i rotate the laptop and i shot a new picture. I would like to know the difference on the position of the screen.
There are many ways to do this, and an extensive litterature on the subject. I don't believe anyone would write up the equivalent of a survey paper on the subject as an answer on StackOverflow. Why don't you get started with an object tracking survey paper and then ask a more precise question?
hi, I m doing a reasearch project on "Object detection using my a digital camera". [...] I think i can use the edge detection after a subtraction of the two images but...is quite difficult for me to implement it.
What is your question? Are you asking us if this is a good way to track objects? Are you asking us if this is a new approach and has never been done? Are you asking someone to implement it for you?
Object tracking is a hard problem. I doubt that technique would succeed in any but the most basic scenarios. However, if you look at a survey paper, you might be pointed to a paper that already implemented this an presents results. Finally, I think you should brush up your programming skills because most (successful) object tracking techniques are not trivial to implement. If you don't want to program it yourself, there are online services where you can hire people. StackOverflow is not one of those places.
EDIT: I could deduce that you're new to both programming (in MATLAB) and in object tracking, hence in my answer. Don't mis-understand me, I'm trying to help. Let me re-phrase my suggestions as list:
Your question is far too general. You will get a lot more help from the SO community if you ask more precise questions for two reasons: A) general question result in general answers; and B) the way you asked your question could easily be interpreted as "someone, please do my work for me" even if that's not what you think you're asking.
Get acquainted with the problem domain. To ask more precise questions, you must be close to your answer. For good knowledge on the "object detection and tracking", find a good survey paper. If you're starting off on a research project, people in your lab should be of help to point you to a good one.
Learn to program simple things first. All of the most proficient (effective and efficient) programmers I've ever met struggled with the bubble sort when they were introduced to sorting. None of them would have been able to program an object detection algorithm as a first assignment. Get yourself a good image processing book that has exercises in MATLAB, go through execises one by one. If you can't do them all, choose those that are relevant to what you're trying to accomplish.

How to create a simple document assembly application for Word documents? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to create a simple document assembly application to create Word files. We work with multiple templates, some derivated from others. So, instead of having tons of templates I would like to create something that uses a standard template and allowes me to change the header, footer and different other sections in the document based on my needs.
For example: I will choose a template, then a different introductory paragraph, then a secondary paragraph and so on.
I tried a solution in Infopath, but not sure if this is the simplest one. If you have any suggestions please let me know! (and another thing I am new to this, so no programming clue, but learn quickly)
Thanks,
If your question were programming-related then a tutorial like the following might be relevent: Word automation using C#.
However, because you have "no programing clue" I don't understand what kind of solution you're looking for (and, "Word automation using C#" is probably not it, because it requires a knowledge of programming).
Word automation using Office Interop (COM) is not recommened for server side scenarios (https://support.microsoft.com/en-us/kb/257757).
If you have to create solution for several users, then you will need a toolkit which supports server side installation. You will probably soon realize that free libraries won't meet your needs and will start looking for 3rd party products.
I have experience with one of such toolkits that can solve your document requirements by using subdocuments or by using conditional content. Since you don't have programming experience you can use MS Word for template layout and conditional logic.
You could turn to a program that already allows for that. Pathagoras offers a monthly subscription to lower the need for a large amount of capital upfront.

For a large project, what planning should be done before coding and how should it be approached? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
What is your method of "mapping out" an idea before creating it?
Say I wanted to take on a big project, for example at the scale of a site like Facebook or MySpace. What planning/design steps should I take before I start the actual work?
For example, should I map everything out page by page (their functionalities, data, etc.)?
For a large project first think of a one-liner to description of your site (try to not use any buzzwords here). Next think of three design maxims (rules your design Should never conflict with). Then draw a few views and think up a few user cases (1 day) then work in code for 2 weeks (this will be a throw away prototype so just work as fast as you can forget about bugs and details, don't worry about code smells or design patterns, just make as much as you can), then revaluate all the steps above and throw away your two week prototype, and begin your project in a serious manner applying solid engineering and design. After a month has gone by evaluate your(team) moral and get feedback. If it all seems to be going ok, continue, you got a long ride ahead, otherwise just give up, do a postmortem, and start over with new goals.
I always start with the user interface design. I figure out what the user should be able to do and what controls I will give them to do it. Once I get that laid out in a way I like it, then I start with the code "wiring".
Make a list of all the features that site have.
Make a list of nice to have features.
Make a list of the weakness of the site.
Order that list and prioritize the items that will be built first.
Identify what will be possible to do and what is not.
Meet with your customer and present these results.
Usually I do a mindmap of
problem I am trying to solve,
translated into exact requirements,
then mapping that to user workflows.
The cross linking features of mindmapping softwares make it lot easy. Since mindmapping is 'kind of freeform', I end up concentrating on the 'task' rather than 'representation' (e.g which type of UML diagram should I use to represent this) ?
Once initial ideas are clear then I can work on project plan, spec/design documents using UML for more low level details. This approach usually works well for me.
To see if it works for you or not, you can use FreeMind (opensource mindmaping software, good but currently limited functionality). Then You can try Mindmanager or iMindmap for mindmaping. Both integrate well with other Office products.
Usually I start out by grabbing my scratchbook and just start writing down what I want as in terms of features, this should be quite detailed. And can be quite messy with every thing scrambled together, if so, when you're done make an 'official version' of you're ideas on paper (REAL pen and paper works best for this in my opinion).
Then I start making some scetches of how the pages would look like, what information it must contain and translate that to a global database design. Then work that global design to a more advanced level where all pages come together, with relations between tables and stuff.
After that I build up the most important pages on a code framework (I always make use of a framework, if you don't then forget the framework part), and by 'most important pages' I mean in for example a blog that would be the posts. After that build the not-so-important pages, in case of a blog that could be an archive of posts.
If you have that done, put the code together with a design, or do that while coding if you do not seperate code from HTML/CSS/JS.
Oh and yes, do NOT expand your first idea along the way. Just write that down and implement that afterwards. So if, in case of the blog again, you think half way you want Youtube tags in you're BB-code, write it down. Add that later, offcourse before you're initial site releases.
That's my workflow, at least a basic basic, basic description of it.
Start with "paper prototypes", i. e. take a pencil and sketch each page very roughly. This lets you start from the user perspective, which I think is a good idea.
You can then use the sketches for a first hallway usability test and later as the basis for "wireframes" you would give a web designer to work from.
If you've gone through the complete site once, you probably have a good idea of what the backend should be able to do. You can now use your page sketches and compile a list of the actions a user can trigger by clicking on things. This is the raw material for designing the server-side API that the frontend can call.
Using the calls that need to be served, you can design the backend: What functionalities group nicely, what data needs to be fetched, what do you need to store between page calls (== Session variables) etc.
In this process, I have fared quite well by postponing technology decisions (frameworks, protocols etc.) and even class structure etc., until I've gone through the whole thing once in terms of "what things should do what to what other things" (I guess there's a better term).
I think I would start with an open-source SNS solution that comes close to what you need and then figure out how to add use-specific plug-ins, modules, and themes that achieve your purposes. There are a lot of em out there. Building from scratch is going to take a lot more effort and planning. Most SNS functionality is not worth re-inventing. Focus on what will make your site unique and build upward toward that.
I'm a fairly visual person when it comes to designing software so I sketch out dataflows, class hierarchies, UI and flow charts on whiteboards and paper first.
Butcher paper and colored pens can be particularly fun to use as it's 3 feet wide and comes in 100 foot rolls. When you've got a design that's satisfying or sufficiently complete, tear it off the roll and pin to the wall. Update as necessary.
That technique has worked for some large refactors as well as new projects.
You could start with something very simple and then add features a little at a time. You may reach a point where you want to start over, but the groundwork you did will be beneficial. Or you can try to do the whole thing at once, in which case you'll need the advice already given in the other replies.
One more idea: Specify those features you are not going to include, and other restrictions. These are called constraints, and are as important as the rest of the plan, as it gives you boundaries so you know when you're done planning!
If you work for the same company as this person, start by getting everything in writing so you aren't the one to take the fall when the inevitable happens...

How would I approach building a results predictor for a Football Management sim? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm looking for some food-for-thought on how games like Football Manager and Championship Manager achieve a fairly high level of realism when it comes to simulating realistic scorelines. I am conscious that some of these algorithms would probably fill shelves but I'm looking for a more lucid overview.
Even some pseudocode which outlines how the different player attributes are pitted against each other during the game loop would be very interesting.
I'm looking to do a small project in my spare time for the Windows Mobile platform and would be grateful for any information that would help!
My guess is that such algorithm is a trade secret for game companies like SI Games and such, and you won't find any hint about their algorithm in public places.
You can look at open-source football management games, like bygfoot.
You might want to take a look at my project, which is a football (soccer) match simulation:
http://sourceforge.net/projects/openfootie/
If you are able to collect enough information about the results of the past matches, you could make a simple multiple regression model to predict the scores with reasonable amount of accuracy. You'll have to select your variables carefully though.
Check out this and this for more information on prediction using regression techniques.
Certainly a component of any such algorithm would be analyzing the past X-many years of actual football scores: professional, college, and high-school.
If you were to aggregate the data available on merely active, professional players, then look at the scores of every game they were in, you could start to get one possible approach.
For example, maybe there's a place-kicker who just freezes-up against one team - and therefore the coaches don't put him on the field after that when the two teams are playing each other.
Obviously, such analysis should be done ahead of time and NOT on the Windows Mobile device :)
However, it could be at least a reasonable starting point.
Also, be sure to not rely on pure statistics - it doesn't matter how good you are if Lawrence Taylor breaks Joe Theismann's leg :-\
There are some open source football sim engines you may want to take a look at:
ESMS+
BygFoot
I would say its difficult to determine what is the "correct" method for developing an engine for this type of game. I think its basically how you think it should be determined....obviously having a sneak peek at other people's source code helps :)
I haven't had the time to take a look at BygFoot's yet, however, I have had a look at ESMS and it doesn't look too bad! The main loop is not as big as you would think....
I would say there must be an element of randomness involved, this will allow for "shock" results etc and you should also take into account things like recent form, player morale, fitness, stamina, home/away and provide bonuses to the players accordingly.
Hopefully that helps!