As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I would like to know if there is any dictionary library for C. A dictionary library, literally (It has nothing to do with python dictionaries (hashmaps)). With all the words of the english language, and with tools like...
"I want to print all words that begins with C and end with Y".
I'll not google it, because I really want to know your opinion, if there is any that is specifically good.
Thank you!
You might want to start by looking at Aspell. While it mostly functions as a spell-checker, Aspell also has support for using multiple dictionaries at once and intelligently handling personal dictionaries when more than one Aspell process is open at once. I don't believe you have to be connected to the Internet to use it as well.
Wiktionary might also be of any help. There are a lot of localized variations to support different languages and there will probably be a way to ask them to support your language of interest, if it is not already there.
There's amazing Wordnik API, if you don't mind using Internet for this task. The API is fairly easy and supports regex search. The method you are looking for is /words.{format}/search/{query}
It also has methods to retrieve meanings (/word.{format}/{word}/definitions), synonyms (/word.{format}/{word}/relatedWords), and many other things.
There currently are no C wrappers, although it's very easy to use API directly with libcurl and any JSON or XML parser.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Recently I learned Lua, we need it to co-work with existed C code(HTTP server).
From Lua books, we know that there maybe to way to make them co-working:
From Lua, you can wrap C code in share library(xxx.so) that Lua use require to import them.
From C, you can use existed Lua API to operate on lua_state, it's some trick but it works well.
I adopt both of them and everything seems great, by using Lua we can save a lot of time to implement our business logic. But I'm quite nervous about current architecture, although there was no serious problem in it, I always worried about it, if there was some thing happened, for example, serious performance bottleneck, memory related and so on.
Is anyone got rich experience in this, please give some some advice. Thanks.
Lua is designed to work well with both C and C++. The C API is meant for that.
You don't need to create and use shared libraries to extend Lua. It is the easiest way to extend the standard command line interpreter but it should be easy (if not easier) to link static C libraries for Lua in your own application.
If you want to see some examples of C libraries for Lua, see mine. There are many others.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
So I want to create a web crawler in C. There are hardly any libraries to support this.
I can use libtidy to convert HTML to XHTML and get the HTML files using libcurl (which has decent documentation).
My problem is parsing the HTML files and getting all the links present in it. I know libxml2
is there but its extremely hard to understand because there is no good documentation for its API.
Should I even do this in C or go with another language like Java ?
Or are there any good alternatives to libxml2 ?
Parsing HTML requires basically just string manipulation.
But it's quite hard to do without an HTML or XML (if it's XHTML) parser.
As for the second part of the question I woudn't choose C for such task because even basic string operations are much complex than many other languages that support them natively.
I would go for a scripting lanuguage such Python, JavaScript, PHP...
Instead of using libcurl you'll invoke curl as a command line tool.
Btw: libcurl documentation is very good (in my opinion).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to build (hire someone to build) a program for windows. This program has to save some data of a single web page like name of the website, product name and product price on a command (under right-click or keyboard shortcuts) in a local database. Which programming language can I chose best? The amount of (affordable) programmers and the possibility to add some extra functionalities in the future is also important.
I found for example that python, Java, Ruby and XPath are used for this job.
Thank You.
Java, python and ruby are all good choices. Xpath is not a programming language, it's a query specification that allows you to extract the data you want from xml or html. No matter which language you choose you will need to also use xpath (all 3 have xpath libraries available).
Python seems to be the most popular but the future of it's libraries
is also the most uncertain (nobody has bothered to port mechanize to
python3 yet, beautiful soup has died and then come back).
Java's biggest strength may be that it's already installed on most
windows machines, but it's also the only one of the three that is not
a scripting language and therefore development time will likely be
longer.
Ruby is a good choice with excellent scraping libs and plenty of
programmers using it.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there a good guide or tutorial for people who need to programmatically interact with dynamic websites? There's been a rash of Perl questions about that lately, and I haven't found a good resource to point people toward. I'm asking not because I need one but because I don't want to waste my time writing it if it already exists. Although I'm most interested in Perl, the extra tools and techniques are mostly the same.
Typically, I see see these problems in people's questions:
Handling, setting, and saving cookies
Finding and interacting with forms
Handling JavaScript inside your user-agent
especially things like onLoad, onSumbit, and Ajax
Using HTTP sniffer tools
Using Web developer plugins in interactive browsers
Interacting with DOM, screen scraping, etc.
If there's no good tutorial, I'll add it to my list of things to do (unless someone else wants to do it). Along the way, if you don't have a suggestion for an existing tutorial, please suggest the things that you think should be in a new one, including links, your favorite tools, and your own user-agent development experiences. I don't care about the particular language you use.
The best I've seen is a Defcon presentation video.
Look at perl library of libraries. Some html parsing libraries should be made for talking to dynamic websites.
Like:
http://metacpan.org/pod/HTML::DOM
But do you want to use web-browser enhanced by perl. Or perl stand alone app?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
We have to add a new interface to our existing C application. The new interface system requests to our C application and responses to interface will be XML files. We need find a way to read and write XML files. It seems there are many mapping tools available for Java and C++. I did not find anyone for C.
Please let me know if there is anyone suitable for C. We will be okay if it's commercial API as well.
Thanks
One of the most widely used is libxml2. You can take a look here.
It's been a while since I did anything in anger with XML in C but at the time the best offering was the Gnome XML library - libxml from www.xmlsoft.org.
Should be worth a look.
Cheers,
Dan
I've used Expat for some time now, which is great if you need a very fast streaming parser for C. I believe there are DOM and SAX extentions if you need them.