Dictionary of English Words for a J2ME app - dictionary

I intend to develop a J2ME application, that should be able to read words from the English Dictionary. How do I interface to/and store a Dictionary ? Will I have to create the Dictionary myself, by inserting words, or is there a third party Dictionary available with APIs?

There are several online dictionaries available, but if you want a quick, simple solution and you're running on a *NIX server, then try looking at /usr/share/dict/words, which will be on most servers. It's a list of English words, one per line.

There are definitely free dictionary files, so you don't need to make one yourself!
A good starting point is looking at a Java SE implementation of a spell checker, such as Jazzy on Sourceforge. It has dictionary files included in the project, and by inspecting the code you can get an idea of how to integrate it into your own J2ME app.
Your major challenge will be to be able to search the dictionary in an efficient manner using J2ME since it can be slow in comparison to its desktop coutnerpart.

Try the word-lists detailed in Kevin's Word List; it contains links to many different English language word-lists and related resources.
You can download an appropriate one from the site and use it directly, no need for an API as the content should nominally be just plain-text which you can load into the program or store in a database to allow for fast lookups.

Just download the dictonary created by OpenOffice, it's for free.

Related

How to collect contact information from websites?

Does anyone know a web crawler tool for collecting contact details from a website? Say I have a www.website/contact.. I want to pull out the address, phone number, etc.. There are 2 tools I've been looking at: cralwer4j opensource jar for java and Scrapy opensource in Python. But I am finding it a bit hard to use for my scenario.
Any suggestions would be great. Thanks
You might google for "simple web crawler" to find a solution that fits you best. In the net there are plenty "pure python" based web crawlers. Based on sceleton code you add db wrap up. I think the most problem would be db setting and saving data in it.
What if there are 1000000s of websites to crawl.. Is there a way to crawl all websites in my are?
No problem for scripting. Just put millions addresses in a file (or files), open it for reading in python or other script. Then get link by link from it and crawl/scrape to your pleasure. Result you might also want to save in file (csv, json).
I'd also recommend you a ready simple python crawler.

Is there any .NET standard for dealing with localization yet allowing the users to customize the texts?

We're building an ASP.NET MVC application that is yet not localizable with a lot of Data Annotations DisplayAttribute with hard-coded strings and hard-coded message strings all over the code.
Now we have a requirement that the application must be localizable, but still, we need to allow the users to customize the field displays and the texts.
So far, I'm considering using RESX files with a custom IResourceProvider. Rick Strahl has written a good article about that. In this approach, the application is developed with standard RESX files, but in runtime, when the application need the strings, the custom provider will query the DB looking for customizations and will use them when found.
Even though it seems a good solution, it doesn't seem natural. I wonder if there's some better alternative.
Is there any standard for this?
What's not natural with using static values as defaults and checking database for localized ones? For me it's nice approach, because if someone will mess recources in db and, for example, remove one of them somehow, you'll always have a default text to display.
You can always do it in different way, by using only the db-based texts to not bother about changing defaults in your code and translations in database because it's easy to miss something when resources are in few places. When I was checking code of nopCommerce maybe 2 years ago, I've seen that when they do localization with resources from database only. I'm not sure how it's done now, but you can download source code and check it.
In WinForms app I developed a year ago I was using XML files for different languages because our customer wanted to be able to allow non-technical natives to create new language files. And I created localization tool built-in into app, but for websites it's best to use database, as you already have access to this and can easily manipulate data.
You can read more about this topic in this blog post.

.net localization messages in xml configuration file instead of resources

I am wandering if I use xml configuration files(like castle.windsors component xmls) to store my localization strings and messages instead of resources file for the sake of flexibility. I may need to change messages frequently and getting frequent builds freaks me out. As the size of document I can say that I will have a couple of thousands strings stored in multiple xml files according to the languages. Is it a good practice to do this that way?
You could implement this Globalisation system provided by MVP RIck Strahl should suit your needs nicely and provide a lovely interface at the same time - also uses a DB as backing storage rather than XML files which should be easier to generally keep track of with regard to backing up and such forth.
On NuGet here
https://nuget.org/packages/Westwind.Globalization
Here's the project page and a summary direct from it (See the Data Driven Localization Resource Provider section).
http://www.west-wind.com/westwindwebtoolkit/

Upload file via HTTP from VBA (WinHTTP)

I'm trying to (HTTP) upload a binary file programmatically from within VBA. I intend to put an ASPX page on the server to accept the file and certain additional parameters.
I know there are lots of nice ways to do that (e.g. use web service instead of aspx), but my constraint is that it must run in VBA (in an excel file), and that I cannot install any additional components on the client.
So I guess I'll use WinHTTP, and I've found several examples to post form data, but not to post a binary file. I probably need to base64 the file contents?
So my questions are:
Do I need to do the encoding manually or can I make WinHTTP do that?
Is there a better utility to use than WinHTTP? (Remember I don't want to install any additional software, it must be shipped with WinXP Pro, Office 2007 or a .NET framework, e.g.)
Is there a better way to go, e.g. using ASP.NET web services?
Thx, chiccodoro
You may use base64 but typically writing binary is easier.
The hurdle you have to leap is constructing a valid multi-par/form POST. This is completely possible using WinHTTP, although I have not done it in years and am not tooled to provide sample code, it is not trivial.
You can reference the following articles for examples of how to do this with C# HttpWebRequest. The WinHTTP api is a bit different of course but the salient points to take away from the articles is the structure of the POST body.
C# File Upload with form fields, cookies and headers (by yours truly)
UploadFileEx: C#'s WebClient.UploadFile with more functionality (a bit more procedural and may be easier to suss out the format)
Typically I provide sample code, but as I said, I do not have any stone-age tools set up right now ;-).
HTH

Document Stored in File System Text Searching and Filtering required in ASP .Net Application

We are building a jobsite application in which we will store resumes of all the candidates, which is planned to store on file system.
Now We need to search inside that file and provide the result to the user, we need to provide that what is the best solution to implement text searching.
I have just tried to identify it and got some reference like IFilter (API or interface) and Lucene.Net (open source), but not sure that is it a right solution.
In initial phase it is expected to be around 50,000 resumes and it should be scalable enough if number increases.
I just want some case study or some analysis or your suggestions that which is the best method to handle this requirement (Technology ASP .Net)
Thanks
You can use Microsoft Search Server. There is a free version, so you can try it before buy it (or never buy, if it meets your requirements).
If, later, you do want to integrate that documents into a Sharepoint portal, Enterprise Search can also integrate with it.
One possibility would be to use the FILESTREAM feature in SQL Server 2008, combined with database-level full text index / search.
That would allow you to keep the files in the filesystem, while also providing transactional integrity and search.
SQL Express supports FILESTREAM, and the 4GB size limit doesn't apply for the files (although it does apply to the size of a full text index).
This might be naive since I'm unfamiliar with off-the-shelf search products but if nothing pre-build fit the bill I would build a simple service that crawls and indexes (or several instances to crawl different directories to increase speed) and updates a database. If the files were accessed regularly you could build a layer of isolation to prevent collisions.
Rodney

Resources