Function 조금, Cognitive service 조금
2019 3 8일 금요일
오전 8:33
Function 조금, Cognitive service 조금

Cognitive service  한글은 계획이 엄꼬.

시스템 설계 시 참고할만 한 정도의 내용 
핵심은. 아래와 같은 구조를 서비스형태로 가져다 쓸 수 있음. SaaS
굳이 텍스트 감정검색이 아니라도. 직접 개발된 로직을 써도됨.
앞뒤로 큐를 놓고, 큐 뒤에 또 function을 둘수있음.(트리거는 마찬가지로 신규 데이터in )
피드백 정렬 아키텍처의 개념적 다이어그램
 
 
Cognitive Services 디렉터리
 
 
마켓플레이스 - 텍스트분석 찾아서 생성, 그리고 키 생성함.
대한민국 중부 리전이 있으나, 한글은 지원안함. 언어를 en으로 지정하면 에러는 나지 않지만.. 제대로 되지 않음
Supplied language is not supported. Pass in one of: ar,da,de,el,en,es,fi,fr,it,ja,nl,no,pl,pt-PT,ru,sv,tr,zh-Hans.
 
 
아래 개발 API안내 URL로 가서, 해당 생성된 키를 입력하여 테스트 가능.
텍스트 분석 API에서 호출할 수 있는 POST 메서드
이러한 엔드포인트는 언어 검색엔터티핵심 문구  감정


감정
 
아래와 같이 POST send 할 수 있음.
 

Content-Type: application/json
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
{
 "documents": [
    {
      "language": "en",
      "id": "1",
      "text": "i can not make love."
    },
    {
      "language": "ko",
      "id": "2",
      "text": "아프다 너도 아프냐"
    },
    {
      "language": "es",
      "id": "3",
      "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer."
    }
 ]
}
 

결과Response
Transfer-Encoding: chunked
x-ms-transaction-count: 2
CSP-Billing-Usage: CognitiveServices.TextAnalytics.BatchScoring|2
x-aml-ta-request-id: cd6f5fde-c872-4afd-bf73-c0dda5f22070
X-Content-Type-Options: nosniff
apim-request-id: 62d92304-b7cf-4182-8d47-19de15955aef
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Date: Mon, 04 Mar 2019 23:02:21 GMT
Content-Type: application/json; charset=utf-8

{
 "documents": [{
    "id": "1",
    "score": 0.11315375566482544
 }, {
    "id": "3",
    "score": 0.334433376789093
 }],
 "errors": [{
    "id": "2",
    "message": "Supplied language is not supported. Pass in one of: ar,da,de,el,en,es,fi,fr,it,ja,nl,no,pl,pt-PT,ru,sv,tr,zh-Hans. Seehttps://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview for the complete list of support languages."
 }]
}
 
 
 
Pricing tier
5K 9/30N Entity Extraction 0.00 S Standard Calls per minute Entity Extraction 2.00 usonooo TEXT RE. so 25K Entity Extraction 300USD/1K 74.71
 
100K Entity Extraction 250USD/1K 249.86 500K 9/30N Entity Extraction 200USD/1K 999.75 2.5M Entity Extraction 1 musD/1K 2499.84
 
10M Entity Extraction o_50USD/1K 4,999.99
 
 
 
 
혹시 지원되는 언어라면 아래와 같은 서버리스 리소스를 이용 구성가능
 Azure Queue Storage, Azure Functions, Azure Cognitive Services 사용
 
피드백 정렬 아키텍처의 개념적 다이어그램
 
 
 
Function의 트리거가  앞단 큐에 데이터가 들어왔을 때
 
Function의 로직은 아래와 같음
감정에 따라 텍스트 문서를 출력 큐로 정렬하는 Azure 함수 내부의 논리 순서도.
 
 
Function 만들고 -> 함수 추가
템플릿 더보기 선택 -> 템플릿 완료 후 보기 선택
-> Queue Trigger 추가 하니, 확장설치하라함.
Timer trigger 자접된 팉접으트 실할三Ⅰ든 함수입LⅠ二\Ⅰ Azure Qu은u은 Storage tngger 자접된 之」•든 호:r트;든 「화시iⅠ가 즈가들 :수二卜二\ 슽 는 할수힡니二卜Ⅰ A간」r은 Queue 5t0드§e trigger 확장이 설치되지 않았 습니다. 이 원들릿하는 二卜을의 화장이 들요합Ll二卜l Mi그050t 쏠지 확장 혈지 문제 하결를 자Ail즤 할아보려 여기를 클릭하kl요l
 
 
A간」r은 Queue 5t0드§e trigger 확장을 설치 했습니다. 계속 Timer trigger 자접된 팉접으트 실할三Ⅰ든 함수입LⅠ二\Ⅰ Azure Qu은u은 Storage tngger 자접된 之」•든 호:r트;든 「화시iⅠ가 즈가들 :수二卜二\ 슽 는 할수힡LⅠ二卜Ⅰ
 
Microsoft OneNote 2016에서 작성




+ Recent posts