Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
text-similarity
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
ani
text-similarity
Commits
33078cd9
Commit
33078cd9
authored
Aug 20, 2018
by
Anirudha Pimpale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit test left
parent
61431537
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
2 deletions
+5
-2
.gitignore
.gitignore
+3
-0
predictCall.cpython-36.pyc
lib/__pycache__/predictCall.cpython-36.pyc
+0
-0
trainCall.cpython-36.pyc
lib/__pycache__/trainCall.cpython-36.pyc
+0
-0
predictCall.py
lib/predictCall.py
+1
-1
trainCall.py
lib/trainCall.py
+1
-1
No files found.
.gitignore
0 → 100644
View file @
33078cd9
testModel.model
testModel.model.trainables.syn1neg.npy
testModel.model.wv.vectors.npy
lib/__pycache__/predictCall.cpython-36.pyc
View file @
33078cd9
No preview for this file type
lib/__pycache__/trainCall.cpython-36.pyc
View file @
33078cd9
No preview for this file type
lib/predictCall.py
View file @
33078cd9
...
@@ -10,7 +10,7 @@ def predict():
...
@@ -10,7 +10,7 @@ def predict():
tokens
=
"alzheimer's"
.
split
()
tokens
=
"alzheimer's"
.
split
()
new_vector
=
old_model
.
infer_vector
(
tokens
)
new_vector
=
old_model
.
infer_vector
(
tokens
)
print
(
tokens
)
# print(old_model.docvecs.most_similar("ball"))
# print(old_model.docvecs.most_similar("ball"))
# print(old_model.most_similar([new_vector]))
# print(old_model.most_similar([new_vector]))
# print(old_model.docvecs.offset2doctag([new_vector]))
# print(old_model.docvecs.offset2doctag([new_vector]))
...
...
lib/trainCall.py
View file @
33078cd9
...
@@ -48,7 +48,7 @@ def train():
...
@@ -48,7 +48,7 @@ def train():
model
=
gensim
.
models
.
Doc2Vec
(
size
=
300
,
min_count
=
0
,
alpha
=
0.025
,
min_alpha
=
0.025
)
model
=
gensim
.
models
.
Doc2Vec
(
size
=
300
,
min_count
=
0
,
alpha
=
0.025
,
min_alpha
=
0.025
)
model
.
build_vocab
(
dataset
)
model
.
build_vocab
(
dataset
)
for
epoch
in
range
(
100
):
for
epoch
in
range
(
100
00
):
print
(
'iteration'
+
str
(
epoch
+
1
))
print
(
'iteration'
+
str
(
epoch
+
1
))
model
.
train
(
dataset
,
epochs
=
model
.
iter
,
total_examples
=
model
.
corpus_count
)
model
.
train
(
dataset
,
epochs
=
model
.
iter
,
total_examples
=
model
.
corpus_count
)
model
.
alpha
-=
0.002
model
.
alpha
-=
0.002
...
...
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