I know there is the CLucene project, which is a port of Lucene from Java to C. But is there a Lucene wrapper in C/Objective-C similar to PyLucene that uses JNI and and embeds a JavaVM with Lucene in a separate process?
I explored this in some depth after asking this similar question a while back. The answer appears to be "no." I found CLucene as you did. It's got problems. I also found something called LuceneKit which was also mostly a mess. For my project I just mangled up the code from PyLucene just enough to get it working, and then moved on to another project. Unless something else has come along since then, I feel confident saying that No, there's not a pre-existing, serviceable Lucene wrapper out there. Sorry.
You can also look on Ferret - it is ruby wrapper and pure c library for full text searching. Ferret is similar to lucene but it uses own file format for indexing.
Since the answer seems to be 'No' I have been looking for different options.
There seems to be an alternative (free for non-commercial apps; $1000k per app for commercial projects).
http://www.locayta.com/iOS-search-engine/locayta-search-mobile/
I have not used it but I just run into it and saw some comments praising this solution.
You can take a look at Lucy, which seems to be exactly what you are looking for:
http://lucy.apache.org/
Related
Xcode 4 has a very nice built-in help/documentation that you can access e.g. by alt-clicking an identifier in the code, or by opening the help panel in the right sidebar. However, this only works for classes and methods provided by Apple. Is there a way to write some kind of documentation comments (e.g. like the Javadoc comments in Java) in your own code to make Xcode display them in those documentation panels?
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html
It's maintained by Apple so it should be well supported. I never actually used it, may try it later.
Ok, it looks like there's no good tool really... there are a few different ones, but they're imperfect and difficult to configure. I couldn't get Doxygen or Appledoc to work, and the tool mentioned by Avizzv92 is referred to as "a pile of poo" elsewhere, so I'd rather not try it... :)
Info that I've found:
How do you document your source code in Xcode?
http://wangling.me/2010/07/documentation-set-generation-tool-in-xcode-is-wanted/
http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
http://www.gentlebytes.com/home/appledocapp/
http://lists.apple.com/archives/xcode-users/2011/Apr/msg00238.html
In Lua-scripting I found wxWidgets (wxLua) library very useful, so I'd wanted to found binding for Ada and GNAT Programming Studio 2010 (4.4.1) - does it exist at all and maybe somebody know how to link it with GNAT?
Only one I found is wxAda, which is about 5 years old and without any hyperlinks to load it.
I'm the author of wxAda and tbh, it's a dead duck as it currently stands. I am looking at the moment at a revival by generating the source automatically.
Luke.
Well, the URL you are probably looking for is wxada.tigris.org, but it says right there it is incomplete. Most likely that's the best you are going to get without doing the work yourself.
From the discussion of his problems here it looks like he had solvable issues.
I know the ESC key does code completion, but is there a way to get a pop-up(tool-tip I guess) that shows you all the possible choices for a piece of code? As an example, it would be nice when writing Javascript to get a list of available actions. Other apps I've used like Coda do this. I'd like to check out Textmate but I have a hard time getting past this missing feature which I find pretty valuable, particularly as a fairly new programmer who likes to see what options are there as it's a bit of a learning tool for me also. I thought I had found a plugin like what I'm looking for, Dialog2, but it seems to have disappeared as it was meant to be built-in to the never-released TM2.
I've looked around a fair bit for the answer to this question and figured this was my next best option. Thanks.
I don't have Textmate available to try it out, but I believe that option-Esc is supposed to show you the list of possible code completions.
Check out subtleGradient's tmbundle: https://github.com/subtleGradient/javascript.tmbundle
It knows how to auto-wrap for arrays, and objects. Documentation look-up too.
I'm planning to do a Cocoa app that requires code syntax to be colored (in all common languages). Instead of writing my own code highlighter/parser, are there any pre-made solutions available?
Thanks
You might be able to use something like Geshi, but there're also the resources listed here: http://www.cocoadev.com/index.pl?SyntaxHighlighting
Edit
More links:
Syntax Highlighting in Cocoa TextView? Experiences? Suggestions? Ideas?
http://parsekit.com/okudakit/
An excellent solution is Uli Kusterer's UKSyntaxColoredTextDocument. It is fast and has several built-in syntax parsers. It's easy to add new languages.
It's free for non-commercial use and very cheap if you want it for a commercial app.
You can also use the JavaScript library SyntaxHighlighter and embed it into a WebView into your app.
After quite a bit of research trying to solve a similar problem, the simplest approach I found by far is to use a JavaScript library for syntax highlighting combined with a WebView. Spending time writing a syntax highlighter, a fairly complex task, is probably not what you'd want to spend time on.
I settled on using the popular CodeMirror and wrote an open source wrapper for Cocoa: https://github.com/swisspol/CodeMirrorView. You can use similar approaches to wrap other JavaScript based code editors in Cocoa apps.
You can use highlight that is used in QLColorCode :) (however, it's not a Framework that you include in your code, but a command-line utility)
EDIT: Ah yeah, use Geshi, it's probably better :D
Lucene has quite poor support for Russian language.
RussianAnalyzer (part of lucene-contrib) is of very low quality.
RussianStemmer module for Snowball is even worse. It does not recognize Russian text in Unicode strings, apparently assuming that some bizarre mix of Unicode and KOI8-R must be used instead.
Do you know any better solutions?
My answer is probably too late, but for the record, I've found analyzers from AOT project much better then those shipped with Lucene.
I used http://code.google.com/p/russianmorphology/
If all else fails, use Sphinx
Project http://code.google.com/p/russianmorphology/ moved to https://github.com/AKuznetsov/russianmorphology. Please take into account the new hosting of this project.
That's the beauty of open source. You have the source code, so if the current implementations don't work for you, you can always create your own or even better, extend the existing ones.
A good start would be the "Lucene in Action" book.