Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
strategy_embedding
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
0
Merge Requests
0
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
strategy_embedding
Commits
70208d2e
Commit
70208d2e
authored
Jan 14, 2021
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get first 15 lines
parent
5acbb892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tractate_sentence_similary.py
tractate_sentence_similary.py
+1
-1
No files found.
tractate_sentence_similary.py
View file @
70208d2e
...
...
@@ -53,6 +53,7 @@ def get_tractate_vector(sentence_lst, all_keywords_set, model):
if
s
in
all_keywords_set
:
tmp_lst
.
append
(
s
)
word_list
.
append
(
tmp_lst
)
word_list
=
word_list
[:
15
]
count
=
0
res
=
{}
for
lst
in
word_list
:
...
...
@@ -80,7 +81,6 @@ def save_tractate_vector_to_redis(all_keywords_set, model):
vec
=
get_tractate_vector
(
sentences
,
all_keywords_set
,
model
)
redis_key
=
"rims:tractate:sentense:vector:"
+
str
(
id
)
if
vec
:
vec
=
vec
[:
15
]
print
(
count
,
id
,
len
(
vec
))
redis_client5
.
set
(
redis_key
,
json
.
dumps
(
vec
))
# TODO remove
...
...
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