-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
52 lines (47 loc) · 2.13 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Guesses the category of a given article, depending from previously parsed articles
Decission is determined from parsed articles from www.a1.com.mk
Instalation:
Get the project
git clone git://github.com/bobanj/article_categorizer_mk.git
Create your database.yml into the config dir.
Install needed libs for Nokogiri
Linux:
install these libs: libxslt1-dev libxml2-dev
install gem with: gem install nokogiri
Windows:
install with: gem install nokogiri -s http://tenderlovemaking.com/
Install the other gems by running:
rake gems:install
Prepare the database:
rake db:create
rake db:migrate
rake db:seed;
Get the articles:
First make sure that http://www.a1.com.mk is alive :)
You can run one rake process to get all the articles if you dont mind waiting
the rake task to parse all the articles with:
rake media:get_articles #(better use start and count params because the training is done
# after getting the articles - due to performance)
Or you can run multiple rake tasks to get all the data faster by setting a start and cont parameters
rake media:get_articles start=50 count=10000
where start is the newsid from a1 and count is the number of articles that will be parsed
so you can run multiple rake tasks to get more articles at the same time:
rake media:get_articles start=10000 count=9999
rake media:get_articles start=20000 count=9999
rake media:get_articles start=30000 count=9999
(you get the point)
Dont worry if there is an overlap, one article cant be inserted multiple times
After getting all the articles you need to start the training:
Training
rake media:train_all #Please be patient
After the training is finished you can set a crone task to get new articles every day and train with them
rake media:get_articles train=true
Create manualy one account # I'll change this in future commits
User.create :email => your_email, :password => your_pass, :password_confirmation => your_pass
Start the server
#########
# TO DO #
#########
- Manage Users ?
- Write learining in db ?
- New layout