amitamb / NaturalJS

https://github.com/NaturalNode/natural in client side.
11 stars 13 forks source link

running in a browser #1

Closed tansaku closed 11 years ago

tansaku commented 12 years ago

Apologies for the noob question :-) I know JavaScript, but am not so familiar with node.js etc If I want to use this library in a client side JavaScript application can I just point to a library somewhere? I'm not familiar with these npm install things.

Like could we get some examples running in a browser that just pulled in NaturalJS with a script tag?

Many thanks in advance

tansaku commented 12 years ago

okay sorry I think I got confused clicking through to the Natural Readme again and thinking it was for this project, so it looks like I could do something like this:

script src="https://raw.github.com/amitamb/NaturalJS/master/natural.js"

would be great to wrap this in some unit tests. I've been playing with QUnit

http://tansaku.github.com/faqbot/

would it be helpful to get some QUnit tests wrapped around this ...? on that note I just put together a test based on the example in your README, but it seems to be failing. I'm probably doing something obviously stupid:

https://github.com/tansaku/faqbot/blob/master/index.html

many thanks in advance

amitamb commented 12 years ago

Second case will fail as this library doesn't support it. But please see following working example

http://jsbin.com/olizaq/1/

Although, I think SoundEx should match "phone" and "fone", it is not working.

tansaku commented 12 years ago

thanks for the working example - that works for me too, so at least we have a baseline :-) how's it going with this project? are you planning much work on it? A natural next step for me would be to keep writing unit tests exploring the functionality I want to use ... I guess I should fork and send you pull requests or something?

amitamb commented 12 years ago

Yeah. Pull request would be good.

Since this is port of Natural on Node, porting remaining functionality would be next step. i.e. classifiers and wordnet

I would also like if we can get support for Part of Speech Tagging. Any other ideas?

tansaku commented 11 years ago

Yeah, POS is good - I'm trying to work out how to use the existing sentence analyzer. Ultimately I'd like it to do eveything that the various Python libraries can do. In the first instance I've forked and I'm going to try and wrap a few things in test - will send you a pull request once I've got something sorted

tansaku commented 11 years ago

Hiya, have made a basic start with some unit tests - check out this preview: http://htmlpreview.github.com/?https://github.com/tansaku/NaturalJS/blob/master/index.html