Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
python Korean NLP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
최민정
python Korean NLP
Commits
68d2bb04
Commit
68d2bb04
authored
6 years ago
by
KimChiheon
Browse files
Options
Downloads
Patches
Plain Diff
Update Example.md
parent
5d43d5ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
korea_nlp/Example.md
+38
-6
38 additions, 6 deletions
korea_nlp/Example.md
with
38 additions
and
6 deletions
korea_nlp/Example.md
+
38
−
6
View file @
68d2bb04
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
## 주의사항
## 주의사항
-
사용을 원하는 python file과 동일한 폴더에 다운로드 후 import 하셔서 정상 실행이 됩니다.
-
사용을 원하는 python file과 동일한 폴더에 다운로드 후 import 하셔서 정상 실행이 됩니다.
-
Library file에 import를 하시는 경우 korea_nlp_library.py file을 Download 해주세요.
#### 예제
#### 예제
-
위 class 를 import 하여 사용하시면 됩니다.
-
위 class 를 import 하여 사용하시면 됩니다.
...
@@ -52,10 +51,10 @@ kn.tokenize(sentence,scores)
...
@@ -52,10 +51,10 @@ kn.tokenize(sentence,scores)
<br>
<br>
**input**
:
**input**
:
<pre><code>
import korea_nlp
<pre><code>
import korea_nlp
kn = korea_nlp.
noun_extract
()
kn = korea_nlp.
Tokenizer
()
sentence = '김치헌은 바보다.'
sentence = '김치헌은 바보다.'
scores = {}
scores = {}
kn.
tokenize
(sentence,scores)
kn.
noun_extract
(sentence,scores)
</code></pre>
</code></pre>
<br>
<br>
**output**
:
**output**
:
...
@@ -67,10 +66,10 @@ kn.tokenize(sentence,scores)
...
@@ -67,10 +66,10 @@ kn.tokenize(sentence,scores)
<br>
<br>
**input**
:
**input**
:
<pre><code>
import korea_nlp
<pre><code>
import korea_nlp
kn = korea_nlp.
noun_extract
()
kn = korea_nlp.
Tokenizer
()
sentence = '김치헌은 바보다.'
sentence = '김치헌은 바보다.'
scores = {'김치헌':1.0}
scores = {'김치헌':1.0}
kn.
tokenize
(sentence,scores)
kn.
noun_extract
(sentence,scores)
</code></pre>
</code></pre>
<br>
<br>
**output**
:
**output**
:
...
@@ -82,4 +81,37 @@ Score 값을 지정한 '김치헌'이라는 고유명사가 추출됨을 알 수
...
@@ -82,4 +81,37 @@ Score 값을 지정한 '김치헌'이라는 고유명사가 추출됨을 알 수
<br>
<br>
특정 'Noun' 갯수 측정
특정 'Noun' 갯수 측정
-
추가예정
<br>
\ No newline at end of file
**input**
:
<pre><code>
import korea_nlp
kn = korea_nlp.Tokenizer()
sentence = '김치헌은 김치를 좋아한다.'
scores = {}
word = "김치"
kn.noun_counter(sentence,scores,word)
</code></pre>
<br>
**output**
:
<pre><code>
2
</code></pre>
Score 값을 따로 지정해주지 않아서 default 로 지정된 library 자체 data를 기반으로 문장을 token화하여 '김치' 라는 단어의 갯수를 Counting 하여 '2'가 출력됩니다.
<br>
**input**
:
<pre><code>
import korea_nlp
kn = korea_nlp.Tokenizer()
sentence = '김치헌은 김치를 좋아한다.'
scores = {'김치헌':1.0}
word = "김치"
kn.noun_counter(sentence,scores,word)
</code></pre>
<br>
**output**
:
<pre><code>
1
</code></pre>
Score에 '김치헌' 이라는 고유명사를 추출할 수 있도록 지정해주어 '김치' 라는 단어 counting 시 counting 되지 않습니다.
<br>
고유명사를 불필요하게 Counting 하는 경우를 배제합니다.
\ No newline at end of file
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