Kochat
μ±λ΄ λΉλλ μ±μ μμ°¨κ³ , μμ λ§μ λ₯λ¬λ μ±λ΄ μ ν리μΌμ΄μ
μ λ§λμκ³ μΆμΌμ κ°μ?
Kochatμ μ΄μ©νλ©΄ μμ½κ² μμ λ§μ λ₯λ¬λ μ±λ΄ μ ν리μΌμ΄μ
μ λΉλν μ μμ΅λλ€.
# 1. λ°μ΄ν°μ
κ°μ²΄ μμ±
dataset = Dataset (ood = True )
# 2. μλ² λ© νλ‘μΈμ μμ±
emb = GensimEmbedder (model = embed .FastText ())
# 3. μλ(Intent) λΆλ₯κΈ° μμ±
clf = DistanceClassifier (
model = intent .CNN (dataset .intent_dict ),
loss = CenterLoss (dataset .intent_dict )
)
# 4. κ°μ²΄λͺ
(Named Entity) μΈμκΈ° μμ±
rcn = EntityRecognizer (
model = entity .LSTM (dataset .entity_dict ),
loss = CRFLoss (dataset .entity_dict )
)
# 5. λ₯λ¬λ μ±λ΄ RESTful API νμ΅ & λΉλ
kochat = KochatApi (
dataset = dataset ,
embed_processor = (emb , True ),
intent_classifier = (clf , True ),
entity_recognizer = (rcn , True ),
scenarios = [
weather , dust , travel , restaurant
]
)
# 6. View μμ€νμΌκ³Ό μ°κ²°
@kochat .app .route ('/' )
def index ():
return render_template ("index.html" )
# 7. μ±λ΄ μ ν리μΌμ΄μ
μλ² κ°λ
if __name__ == '__main__' :
kochat .app .template_folder = kochat .root_dir + 'templates'
kochat .app .static_folder = kochat .root_dir + 'static'
kochat .app .run (port = 8080 , host = '0.0.0.0' )
Why Kochat?
νκ΅μ΄λ₯Ό μ§μνλ μ΅μ΄μ μ€νμμ€ λ₯λ¬λ μ±λ΄ νλ μμν¬μ
λλ€. (λΉλμλ λ€λ¦
λλ€.)
λ€μν Pre built-in λͺ¨λΈκ³Ό Lossν¨μλ₯Ό μ§μν©λλ€. NLPλ₯Ό μ λͺ°λΌλ μ±λ΄μ λ§λ€ μ μμ΅λλ€.
μμ λ§μ 컀μ€ν
λͺ¨λΈ, Lossν¨μλ₯Ό μ μ©ν μ μμ΅λλ€. NLP μ λ¬Έκ°μκ² λμ± μ μ©ν©λλ€.
μ±λ΄μ νμν λ°μ΄ν° μ μ²λ¦¬, λͺ¨λΈ, νμ΅ νμ΄νλΌμΈ, RESTful APIκΉμ§ λͺ¨λ λΆλΆμ μ 곡ν©λλ€.
κ°κ²© λ±μ μ κ²½μΈ νμ μμΌλ©°, μμΌλ‘λ μ μ€νμμ€ νλ‘μ νΈλ‘ μ 곡ν μμ μ
λλ€.
μλμ κ°μ λ€μν μ±λ₯ νκ° λ©νΈλ¦κ³Ό κ°λ ₯ν μκ°ν κΈ°λ₯μ μ 곡ν©λλ€.
Documentation
Kochatμ΄λ?
About Chatbot
Getting Started
Usage
Visualization Support
Performance Issue
Demo
Reference
License
Copyright 2020 Hyunwoong Ko.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.