title: Python: classify text into the categories
body: <p>I have a part of training set</p>
  
  <pre><code>url  category
  ebay.com/sch/Mens-Clothing-/1059/i.html?_from=R40&amp;LH_BIN=1&amp;Bottoms%2520Size%2520%2528Men%2527s%2529=33&amp;Size%2520Type=Regular&amp;_nkw=Джинсы&amp;_dcat=11483&amp;Inseam=33&amp;rt=nc&amp;_trksid=p2045573.m1684 Онлайн-магазин
  google.ru/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=%D0%BA%D0%BA%D1%83%D0%BF%D0%BE%D0%BD%D1%8B%20aliexpress%202016  Search
  google.ru/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#newwindow=1&amp;q=%D0%BA%D1%83%D0%BF%D0%BE%D0%BD%D1%8B+aliexpress+2016    Search
  google.ru/search?q=авито&amp;oq=авито&amp;aqs=chrome..69i57j0l5.1608j0j7&amp;sourceid=chrome&amp;es_sm=122&amp;ie=UTF-8 Search
  irecommend.ru/content/kogda-somnenii-byt-ne-mozhet-tolko-klear-blyu-pomozhet    Форумы и отзывы
  ebay.com/sch/Mens-Clothing-/1059/i.html?_from=R40&amp;LH_BIN=1&amp;Bottoms%2520Size%2520%2528Men%2527s%2529=33&amp;Size%2520Type=Regular&amp;_dcat=11483&amp;Inseam=33&amp;_nkw=Джинсы&amp;_sop=15  Онлайн-магазин
  ebay.com/sch/Mens-Clothing-/1059/i.html?_from=R40&amp;LH_BIN=1&amp;Bottoms%2520Size%2520%2528Men%2527s%2529=33&amp;Size%2520Type=Regular&amp;_dcat=11483&amp;Inseam=33&amp;_nkw=Джинсы&amp;_sop=15  Онлайн-магазин
  irecommend.ru/content/gramotnyi-razvod-na-dengi-bolshe-ne-kuplyu-vret   Форумы и отзывы
  google.ru/search?q=яндекс&amp;oq=яндекс&amp;aqs=chrome..69i57j69i61l3j69i59l2.1383j0j1&amp;sourceid=chrome&amp;es_sm=93&amp;ie=UTF-8    Search
  google.ru/search?q=авито&amp;oq=авито&amp;aqs=chrome..69i57j69i59j69i60.1095j0j1&amp;sourceid=chrome&amp;es_sm=93&amp;ie=UTF-8  Search
  otzovik.com/review_1399716.html#debug   Форумы и отзывы
  svyaznoy.ru Онлайн-магазин
  mvideo.ru/smartfony-sotovye-telefony/apple-iphone-2927  Онлайн-магазин
  mvideo.ru/promo/rassrochka-0-0-12-mark24197850/f/category=iphone-914?sort=priceLow&amp;_=1453896710474&amp;categoryId=10    Онлайн-магазин
  svyaznoy.ru/catalog/phone/224/tag/windows-phone Онлайн-магазин
  google.it/webhp?sourceid=chrome-instant&amp;ion=1&amp;espv=2&amp;ie=UTF-8#q=%D0%B5%D0%B2%D1%80%D0%BE%D1%81%D0%B5%D1%82%D1%8C    Search
  vk.com   Social network
  </code></pre>
  
  <p>it's a connection between <code>url</code> and <code>category</code>
  And also I have test set and I need to get category to every url.</p>
  
  <pre><code>url    
  vk.com/topic-102849764_32295213
  stats.stackexchange.com/questions/19048/what-is-the-difference-between-test-set-and-validation-set
  google.ru/search?q=learning+sample&amp;oq=learning+sample&amp;aqs=chrome..69i57.4063j0j1&amp;sourceid=chrome&amp;ie=UTF-8#newwindow=1&amp;q=machine+learning+test+and+learn
  facebook.com
  locals.ru
  tvzvezda.ru/news/vstrane_i_mire/content/201609261038-k6n1.htm
  </code></pre>
  
  <p>I don't know, what algorithm should I use to solve this task.
  I need the best way to get the most accuracy.
  And I think it's a problem, that I have multiple categories.</p>
  
  <p>I try first parse html tag <code>title</code>, because I think, that I can's determine category only with <code>url</code>.</p>