It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to test drive Naïve string search algorithm.
http://en.wikipedia.org/wiki/String_searching_algorithm
Can someone shed some light on how I could approach the issue.
should my tests only be testing outside behaviour? (i.e. the pattern occuring indexes irrespective of the algorithm used? )
Or should I be algorithm specific and test drive algorithm specific implementations?
Or should I be algorithm specific and test drive algorithm specific implementations?
This largely depends on how your class will be used. Testing public contract is usually the way to go (and it's fairly easy to write decent tests for that), so unless your clients can somehow use implementation details knowledge, I'd stick to that.
Note that having specific algorithm on paper could help pinpointing few basic tests, without writing strictly implementation related tests, like:
invalid input (empty strings, nulls)
input being too large/too small (like, pattern exceeding searched string length - what do you do then?)
valid input, yet matching nothing
This should give you basic entry point for more implementation specific testing. Keep in mind that utilizing data driven testing can help you avoid the need of having implementation level knowledge altogether, and with large enough data set might be just enough to verify algorithm correctness aswell.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want to research some algorithms for dynamic heightmap generation but I'm not familiar with any. Getting even more dynamic. Whats some theory on how multi-dimensional heightmaps work? i.e. Caves and overhangs. Should I use multiple heightmap images or complex algorithms?
For simple 2D heightmaps the Diamond-square algorithm produces reasonable results, and is fast. There are a few things you can apply over the top of that to make it look more realistic, such as simple erosion, while still being very fast.
For more interesting features... if you want fast results, I'd stick with a 2D heightmap and then add secondary feature entities (i.e. boulders and holes), rather than try to generate a true 3D environment; but of course whether that comes close to being enough depends entirely on what you want to achieve.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I've a book review site, where readers can write reviews about books, other users can post comments. I wanted to know following things automatically whenever new review publish or new comment published.
(1) whether book review is positive or not? How much % positive / negative?
(2) whether comment made by particular user is positive or not? How much % positive / negative?
(3) I want to read Tweets about particular book and wanted to check whether the tweet is positive or not?
bottom line, I want some tool suggestions (opensource), which I can use for my website. Website is written in PHP and I'm looking for some semantic analysis tool which I can customize to meet my need or which best fit my need.
if not, I want to know if its easy to build one with minimal requirements. I know PHP, Perl, Shell Script. I can learn Python. I know C++, Java may be right language to start from scratch; but don't have much experience.
There is an open source semantic analyses engine incubated in the Apache Software Foundation, currently, called Stanbol. It provides APIs to interface with it over HTTP as well as through a Java API if needed. It's pretty advanced, but generally speaking if your needs are simpler you can always try some SaS solution like uClassify.
In response to your first request, I'd suggest you create a form where the user has a voting option (such as a x/5 star rating, etc) then you would calculate the average from all of the reviews.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I was wondering if folks use VHDL/FPGAs in scientific computing.
An example scenario that I was thinking off was say:
Construct an arbitrary precision floating point adder
Configure an FPGA board to then add such numbers
So I was looking for references (example code) where VHDL/FPGAs have been used in scientific computing.
Thanks in advance.
There are several vendors who build heterogeneous computing systems using FPGAs. I doubt you'll find complete source code for such systems.
SRC Computing
Convey Computer
Mitrionics. A reseller of other systems.
Novo-G. An academic project.
Look into radio astronomy. With arrays such as the VLA and ALMA, the massively parallel correlator is the part that could be considered most important. These typically use FPGAs but could use custom-designed chips for extreme performance at higher cost.
Some fine reading:
https://science.nrao.edu/facilities/cdl/digital-signal-processing
http://web.njit.edu/~gary/728/Lecture8.html
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to implement a "text" suggestion.
I have a huge number of data, how I can implement an efficient and scalable auto-complete?
Edit 1:
i have a mysql table with one client per row and a 'name' column, i want to create a suggest in order to search client name (like google suggest but instead of queries it is client name) - I have a huge numbers of rows, how I can design an efficient suggest?
When user will start typing inside an "input text", I want to display possible client names
OK, I think I understand what you're looking for and here are some possible solutions for you:
What is the best autocomplete/suggest algorithm,datastructure [C++/C] (the answers are generic enough despite the fact that it's a C/C++ question)
How to implement autocomplete on a massive dataset
Autocomplete using a trie
Algorithm for autocomplete?
Trie based addressbook and efficient search by name and contact number
How do you autocomplete names containing spaces?
Essentially, it seems like you're looking for auto-complete functionality (if I understood your question correctly). Along those lines, the above questions and their answers also provide a lot of references on how to do more complex suggestions (i.e. based on content, semantics, intent, etc.).
This will probably not address your question if you're looking for an algorithm that makes "related" suggestions, e.g.:
"water" may suggest kool-aid, gatorade, vitamin water.
"sea" may suggest ocean, lake, river
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to know if is there any specific algorithm that can be followed to understand the meaning of a word/sentence/paragraph. Basically, I want to write a program that will take text/paragraph as input and try to find out what its meaning is. And thereby highlight the emotions within the text.
Also, if there is an algorithm to understand things, can the same algorithm be applied to itself? It reduces the quest further to a point where we become interested in knowing meaning of meaning OR rather definition of definition.
You want Natural Language Processing and Semantic Technology. This is still a flourishing area in computer science. Look at things such as a Semantic Reasoner. You can start with Jena. There are also other things you can look at such as Academic Thesis papers.