Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm-text-miner
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
gm-text-miner
Commits
1e5e7374
Commit
1e5e7374
authored
Jan 07, 2021
by
crazyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text miner
parent
d898fad8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
filter.py
build/lib/preprocesser/filter.py
+1
-1
filter.py
preprocesser/filter.py
+1
-1
No files found.
build/lib/preprocesser/filter.py
View file @
1e5e7374
...
@@ -22,7 +22,7 @@ class StopwordsFilter(Filter):
...
@@ -22,7 +22,7 @@ class StopwordsFilter(Filter):
super
(
StopwordsFilter
,
self
)
.
__init__
(
file_path
,
encoding
)
super
(
StopwordsFilter
,
self
)
.
__init__
(
file_path
,
encoding
)
self
.
init
()
self
.
init
()
def
remove_irregular_chars
(
self
,
corpus
:
str
):
def
remove_irregular_chars
(
self
,
corpus
):
return
re
.
sub
(
u"([^
\u4e00
-
\u9fa5\u0030
-
\u0039\u0041
-
\u005a\u0061
-
\u007a
])"
,
""
,
corpus
)
return
re
.
sub
(
u"([^
\u4e00
-
\u9fa5\u0030
-
\u0039\u0041
-
\u005a\u0061
-
\u007a
])"
,
""
,
corpus
)
def
init
(
self
):
def
init
(
self
):
...
...
preprocesser/filter.py
View file @
1e5e7374
...
@@ -22,7 +22,7 @@ class StopwordsFilter(Filter):
...
@@ -22,7 +22,7 @@ class StopwordsFilter(Filter):
super
(
StopwordsFilter
,
self
)
.
__init__
(
file_path
,
encoding
)
super
(
StopwordsFilter
,
self
)
.
__init__
(
file_path
,
encoding
)
self
.
init
()
self
.
init
()
def
remove_irregular_chars
(
self
,
corpus
:
str
):
def
remove_irregular_chars
(
self
,
corpus
):
return
re
.
sub
(
u"([^
\u4e00
-
\u9fa5\u0030
-
\u0039\u0041
-
\u005a\u0061
-
\u007a
])"
,
""
,
corpus
)
return
re
.
sub
(
u"([^
\u4e00
-
\u9fa5\u0030
-
\u0039\u0041
-
\u005a\u0061
-
\u007a
])"
,
""
,
corpus
)
def
init
(
self
):
def
init
(
self
):
...
...
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