Commit ca25c64a authored by 段英荣's avatar 段英荣

Merge branch 'only_no_see' into 'master'

modify

See merge request alpha/physical!116
parents 4b4410b2 f4b4fc63
......@@ -6,6 +6,7 @@ import logging
import traceback
from libs.tools import tzlc
import time
import re
class TopicTransfer(object):
......@@ -39,8 +40,21 @@ class TopicTransfer(object):
res["offline_score"] = instance.get_topic_offline_score()
res["manual_score"] = instance.drop_score
res["has_image"] = instance.topic_has_image()
# 片假名
re_jp_pian_words = re.compile(u"[\u30a0-\u30ff]+")
m_pian = re_jp_pian_words.search(instance.content, 0)
# 平假名
re_jp_ping_words = re.compile(u"[\u3040-\u309f]+")
m_ping = re_jp_ping_words.search(instance.content, 0)
if m_pian or m_ping:
res["language_type"] = 10
else:
res["language_type"] = instance.language_type
create_time = instance.create_time
tzlc_create_time = tzlc(create_time)
res["create_time"] = tzlc_create_time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment