|
I'd break it down into units/chunks of work, each unit/chunk exploring one small aspect
your first one may be to be able to use a html query to a website like http://dictionary-api.cambridge.org/index.php/help/resources#c#[^] to get a definition for a word and display it - could be console or forms based
Once you know how the data comes back, you then have to be able to parse/render it into a form you can use for matching - and possibly store it in memory
btw, I showed the c# api for that dictionary - 'better programming language' ? I don't know - there's this big thing about abstraction and using the right language/tool for the job - sometimes like this dictionary api, you may not find an api for your language - that doesn't stop you from having a mixed component approach - I think c# would also be ok for this project - it'll just take you longer to do 'this bit' in c++ since they don't supply an api - so you'd have to model the java or Objective-C one.
So, I'd start in an 'agile' frame of mind, small steps, refined, combined - I don't think the big issue here is getting the dictionary definitions, its the matching - so you may need to think about storing dictionary results in memory or some other appropriate form so you can develop an algorithm for matching and/or retrieving more dictionary entries - and also 'backtracking' if you come to a dead end
|
|
|
|
|
So on my quest, I downloaded WordWeb, to see if I could dissect it's files and source code to give me a hint or a database to use, but I couldn't find a way to accomplish this on Ubuntu.
So my question is, could I somehow tell my program to use word web, and find the path between two words? I'm not asking you to write the algorithm for me, just wondering if there is a way to tell my program to run an executable file and use it, while the code is running. Thanks!
(Also I plan to use linux terminal as the interface)
|
|
|
|
|
yikes - I guess this is what you meant by posting on multiple forums which is cough, a no no ... but as it is, I assumed you were on windows - if I had to do it this way in windows, I would create a process with a hidden window perhaps to run Word Web - but on Ubuntu ? I guessing (depending on what language you are using) there's a way of doing it, but I'd have to 'JFGI' .. [J]ust [F]arken [G]oogle [I]t
Even on Ubuntu, using something like Perl would work with that dictionary I suggested - or any other language capable of sending a HTTP request to a server - I wouldn't use the 'start another program' method unless there was absolutely no other way
|
|
|
|
|
haha sorry, I just wanted the answer asap... Okay thanks for your help
|
|
|
|
|
Also In a way that the user can't notice word web working in the background
|
|
|
|
|
(My internet connection is a bit 'flaky')
I'd do some test results on getting dictionary results, look at the results, print them out etc and do a lot of sketches on paper on how to match them
Keep a notebook - write down your ideas, what works, what hasn't, so you can go back a step if you need - or show mates/the teacher if you need help on 'thought processes'
you said you didn't know how to start ? you already have - you've looked at a task and started breaking it down into do-able steps - that's the way its done in the real world too (along with study, research, persererance ...)
have fun
|
|
|
|
|
Thank you thank you! No one else would reply to me on any other forum's, You are awesome! You beautiful person you
|
|
|
|
|
Craig McRae wrote: The goal of the program would be to find and display the shortest possible path from one word to another.
There is a whole area of math devoted to the study of this.
Craig McRae wrote: So I would classify myslef somewhere in-between beginner and average.
Excluding the above I would expect that you are going to get more out of this just by doing it yourself. There is a lot of 'ideas' to be explored, for example
- Where do you get the dictionary
- Can there be more than one dictionary
- Is it legal to use the dictionary
- How to access the dictionary
- How do you make sure it doesn't take 'too long'.
|
|
|
|
|
We have a modern name for this game its call "the six degrees of Kevin Bacon"
You will find the background to the game by a simple google search that you can link Kevin Bacon to any other actor/actress in Holywood by no more than six films they have all acted in.
You will also find extensive lists on computer programming student assignments of how to program it and strategies as it is quite a common teaching game.
|
|
|
|
|
I am assigning double like this
double i = 3.34;
am getting value into i is 3.3399999999999
if i assign
double j = 6.24;
am getting value intio j is 6.240000000002
any reason?
|
|
|
|
|
|
Floating point numbers used by computers can be only rational (have a limited number of digits). When storing irrational numbers, the stored value must be rounded. Numbers are also stored internally with base 2. So not all decimal numbers (base 10) can be represented as identical base 2 numbers (while the decimal number is rational, the converted base 2 number may be irrational).
See the section 'Representable numbers, conversion and rounding' in the Floating point[^] Wikipedia article for a more detailed explanation.
|
|
|
|
|
I mean, at run time, an exe file is loaded into memory.
then a MFC program's resources, like string tables, bmp pictures,user-defined text files are they allocated memory space address statically? and loaded/linked into process/program address space?
|
|
|
|
|
|
Hey there,
I have a MFC app that has a CDHtmlDialog embedded in it. During run time i update the HTML content from the C++ code. There's a IMAGE tag in the content and the SRC for the tag is updated multiple times in a second to show different images.
Basically i go over a WHILE loop in the C++ and call a JavaScript function to update the "src" for the "img" tag.
The issue am seeing is that, after running this code for a while the application kinda hangs and the system takes up lot's of memory.
I have no idea how to solve this, as all the code that's in the browser side of app is HTML & JavaScript. I looked through the C++ code plugged all memory leaks there.
Any suggestions on how to fix this?
Thanks in advance.
|
|
|
|
|
When you run the program in the debugger, if you exit the program normally, then the Output window in Visual Studio should show you a list of memory leaks that it finds. This may be helpful in tracking it down.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Hi, now I need to create a dictionary in an application.
The dictionary likes a text file,contains about 800 items, what I mean it likes a text file is that it don't need to change, once it be created, just like a configuration file.
Program need to read it, index one item and show a string linked to the item.
So I figure it be better to use a string table resource. but unfortunately, the index ID is beyond 65535. (given by others, and it is a standard) . I know I can decode the index ID to 0-800 range.
So I think maybe I can use a CMAP, but I wonder if CMAP is suitable, since CMAP every time program start, I need to create an object.
Appreciate any advices.
|
|
|
|
|
|
|
You might
or
- Prefix each string in the string table with the hexadecimal representation of its index.
Don't know which one is the ugliest...
Veni, vidi, vici.
|
|
|
|
|
Thanks,HEX is a good idea;
and could you explain the reason to Serialize it ?
|
|
|
|
|
Because you need to persist it. Unless you want to read the original text file all the times.
Veni, vidi, vici.
|
|
|
|
|
|
You are welcome.
Veni, vidi, vici.
|
|
|
|
|
Where I will find codes to make windows app with C++ involving DirectX and Xaml
Kishan Kumar
|
|
|
|