Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
softwareprojektws17
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Steffen Knapp
softwareprojektws17
Commits
31d61457
Commit
31d61457
authored
7 years ago
by
blunck
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
08e8a4d2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
training_testing.py
+2
-2
2 additions, 2 deletions
training_testing.py
with
2 additions
and
2 deletions
training_testing.py
+
2
−
2
View file @
31d61457
...
...
@@ -8,14 +8,14 @@ from sklearn.tree import DecisionTreeClassifier
import
postagger
def
create_vector
(
corpus_instance
,
vocabulary
=
None
):
def
create_vector
(
corpus_instance
,
vocabulary
=
None
,
pos_
vocabulary
=
None
):
"""
Calls all feature extraction programms and combines
resulting arrays to a single input vector (for a
single corpus instance)
"""
f1
=
ngram_feature
.
extract
(
corpus_instance
,
vocabulary
)
# f2 = postagger.to_bigram_vector(corpus_instance, pos_vocab)
# f2 = postagger.to_bigram_vector(corpus_instance, pos_vocab
ulary
)
f4
=
sent_rating_feature
.
extract
(
corpus_instance
)
return
np
.
concatenate
((
f1
,
f4
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment