This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import boto3 | |
import pprint as pp | |
from linebot import (LineBotApi, WebhookHandler) | |
from linebot.models import (MessageEvent, TextMessage, TextSendMessage,) | |
from linebot.exceptions import (LineBotApiError, InvalidSignatureError) | |
events_client = boto3.client('events') | |
events_name = '<your events name>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
0.PKE実行に必要なライブラリのインストール | |
""" | |
# !pip install ginza nltk ja-ginza -q | |
# !pip install git+https://github.com/boudinfl/pke.git -q | |
""" | |
1.歌詞データ取得 | |
以下のサイト参照 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import pandas as pd | |
import base64 | |
df = pd.DataFrame([['東京', 'とうきょう'], ['大阪', 'おおさか'], ['北海道', 'ほっかいどう']],columns=['漢字', 'ひらがな']) | |
st.table(df) | |
csv = df.to_csv(index=False) | |
# utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
1.歌詞データ取得 | |
以下のサイト参照 | |
https://qiita.com/nekoumei/items/b1afca7cfb9e54303ab4 | |
""" | |
""" | |
2. 類似度算出 | |
""" | |
import tensorflow_hub as hub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
pd.set_option('display.max_rows', None) | |
""" | |
1.アクセス情報/パラメータ | |
""" | |
business_account_id = '<user_business_account_id>' | |
token = '<your_token>' | |
username = '<username>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
from oauth2client.service_account import ServiceAccountCredentials | |
import gspread | |
import json | |
import datetime as dt | |
from gspread_dataframe import get_as_dataframe, set_with_dataframe | |
import os | |
from google.oauth2 import service_account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
pd.set_option('display.max_rows', None) | |
import json | |
def main(): | |
# アクセス情報 | |
business_account_id = '<user_business_account_id>' | |
token = '<your_token>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylab import rcParams | |
import requests | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
pd.set_option('display.max_rows', None) | |
# アクセス情報 | |
business_account_id = '<user_business_account_id>' | |
token = '<your_token>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
pd.set_option('display.max_rows', None) | |
# アクセス情報 | |
business_account_id = '<user_business_account_id>' | |
token = '<your_token>' | |
username = '<username>' | |
fields = 'name,username,biography,follows_count,followers_count,media_count' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
1.歌詞データ取得 | |
以下のサイト参照 | |
https://qiita.com/nekoumei/items/b1afca7cfb9e54303ab4 | |
""" | |
""" | |
2. コーパス作成 | |
""" |
NewerOlder