# Recategorizar automaticamente tópicos de um fórum importado detectando palavras-chave nos títulos?

**URL:** <https://meta.discourse.org/t/automatically-re-categorize-topics-from-an-imported-forum-by-targeting-keywords-in-titles/164663>\
**Category:** Migration\
**Created:** [20 Setembro , 2020 23:40 UTC](https://meta.discourse.org/t/automatically-re-categorize-topics-from-an-imported-forum-by-targeting-keywords-in-titles/164663 "2020-09-20T23:40:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [21 Setembro , 2020 16:45 UTC](https://meta.discourse.org/t/automatically-re-categorize-topics-from-an-imported-forum-by-targeting-keywords-in-titles/164663/4 "2020-09-21T16:45:40Z")

</div>

Isso é interessante!

Provavelmente não terei tempo nem habilidades para tentar essa abordagem (o fórum está fora do ar há mais de um mês, e ainda tenho muito trabalho a fazer!).

Após uma primeira tentativa, escolher palavras-chave manualmente parece ter resultados bastante bons, embora eu ainda não tenha recategorizado e apenas tenha brincado com consultas SQL.

```sql
select title from topics
where category_id = 10
and lower(title) not like '%saddle%'
and lower(title) not like '%crank%'
and lower(title) not like '%pedal%'
and lower(title) not like '%rim%'
and lower(title) not like '%carbon%'
and lower(title) not like '%spoke%'
and lower(title) not like '%wheel%'
and lower(title) not like '%frame%'
and lower(title) not like '%hub%'
and lower(title) not like '%tubeless%'
and lower(title) not like '%disk%'
and lower(title) not like '%hydraulic%'
and lower(title) not like '%duro%'
and lower(title) not like '%dominator%'
and lower(title) not like '%torker%'
and lower(title) not like '%nimbus%'
and lower(title) not like '%bearing%'
and lower(title) not like '%pad%'
and lower(title) not like '%repair%'
and lower(title) not like '%handlebar%'
and lower(title) not like '%kh%'
and lower(title) not like '%kris holm%'
and lower(title) not like '%coker%'
and lower(title) not like '%tube%'
and lower(title) not like '%build%'
and lower(title) not like '%29er%'
and lower(title) not like '%36er%'

and lower(title) not like '%backwards%'
and lower(title) not like '%riding%'
and lower(title) not like '%foot%'
and lower(title) not like '%train%'
and lower(title) not like '%training%'
and lower(title) not like '%learn%'
and lower(title) not like '%learning%'
and lower(title) not like '%dismount%'
and lower(title) not like '%habit%'
and lower(title) not like '%idle%'
and lower(title) not like '%idling%'
and lower(title) not like '%freemount%'
and lower(title) not like '%free mount%'
and lower(title) not like '%free mounting%'

```

Essa consulta retorna 33.000 tópicos de 52.000 da categoria principal que poderiam ser recategorizados. O número parece realista, mas eu provavelmente ainda preciso adicionar mais palavras-chave.

O método parece confiável o suficiente.

---

_[View the full topic](https://meta.discourse.org/t/automatically-re-categorize-topics-from-an-imported-forum-by-targeting-keywords-in-titles/164663)._
