Github user myui commented on the issue:
https://github.com/apache/incubator-hivemall/pull/66
@takuti What's the usage to predict topics?
```sql
WITH test as (
select
docid,
word,
count(word) as value
from (
select 1 as docid, "Fruits and vegetables are healthy." as doc
union all
select 2 as docid, "I like apples, oranges, and avocados. I do not like
the flu or colds." as doc
) t1 LATERAL VIEW explode(tokenize(doc, true)) t2 as word
where
not is_stopword(word)
group by
docid, word
)
select
docid,
max_label(score, label) as label
from (
select
t.docid,
m.label,
sum(t.value * m.score) as score
from
test t
JOIN lda_model m ON (t.word = m.word)
group by
t.docid, m.label
) t;
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---