Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mentha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
mentha
Commits
32b8b51c
Commit
32b8b51c
authored
Feb 05, 2021
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_highlight_v2
parent
e8648681
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
transfer.py
data_sync/answer/transfer.py
+5
-1
No files found.
data_sync/answer/transfer.py
View file @
32b8b51c
...
...
@@ -17,6 +17,7 @@ import datetime
from
django.conf
import
settings
import
redis
import
logging
import
re
from
algorithm.text_classifical.base
import
model
as
alo_model
from
gm_types.doris
import
SELECTED_CONTENT_TYPE
...
...
@@ -44,7 +45,10 @@ def get_answers(pks):
item
[
'title'
]
=
answer
.
question
.
title
item
[
'desc'
]
=
answer
.
question
.
content
item
[
'question_type'
]
=
answer
.
question
.
question_type
item
[
'answer'
]
=
answer
.
content
ss
=
answer
.
content
.
encode
(
'utf-16'
,
'surrogatepass'
)
.
decode
(
'utf-16'
)
dr
=
re
.
compile
(
r"<[^>]+>"
,
re
.
S
)
str_re
=
dr
.
sub
(
""
,
ss
)
item
[
'answer'
]
=
str_re
item
[
'keynote_sentence'
]
=
get_keynote_sentence
(
answer
.
content
)
if
int
(
float
(
answer
.
level
))
>=
3
else
""
item
[
'content_length'
]
=
len
(
item
[
'answer'
])
item
[
'has_picture'
]
=
answer
.
get_has_picture
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment