N-Gram model for ngram lexicon features#

from ekorpkit import eKonf

eKonf.setLogger("WARNING")
print("version:", eKonf.__version__)
print("is notebook?", eKonf.is_notebook())
print("is colab?", eKonf.is_colab())
print("evironment varialbles:")
eKonf.print(eKonf.env().dict())
INFO:ekorpkit.base:IPython version: (6, 9, 0), client: jupyter_client
INFO:ekorpkit.base:Google Colab not detected.
version: 0.1.35+1.gbeed9e1
is notebook? True
is colab? False
evironment varialbles:
{'CUDA_DEVICE_ORDER': None,
 'CUDA_VISIBLE_DEVICES': None,
 'EKORPKIT_CONFIG_DIR': '/workspace/projects/ekorpkit-book/config',
 'EKORPKIT_DATA_DIR': None,
 'EKORPKIT_LOG_LEVEL': 'WARNING',
 'EKORPKIT_PROJECT': 'ekorpkit-book',
 'EKORPKIT_WORKSPACE_ROOT': '/workspace',
 'KMP_DUPLICATE_LIB_OK': 'TRUE',
 'NUM_WORKERS': 230}

Load a ngram model with MPKO lexicon scores#

ngram_cfg = eKonf.compose("model/ngram=mpko_lex")
ngram_cfg.verbose = True
ngram_cfg.auto.load = True
ngram = eKonf.instantiate(ngram_cfg)
INFO:ekorpkit.base:instantiating ekorpkit.models.ngram.ngram.Ngrams...
INFO:ekorpkit.preprocessors.tokenizer:Initializing mecab with {'userdic_path': None, 'backend': 'mecab-python3', 'verbose': False}...
INFO:ekorpkit.preprocessors.tokenizer:instantiating ekorpkit.preprocessors.stopwords.Stopwords...
INFO:ekorpkit.base:Calling load_candidates
INFO:ekorpkit.io.file:Processing [1] files from ['/workspace/projects/ekorpkit/ekorpkit/resources/lexicons/mpko/mp_polarity_lexicon_lex.parquet']
INFO:ekorpkit.io.file:Loading 1 dataframes from ['/workspace/projects/ekorpkit/ekorpkit/resources/lexicons/mpko/mp_polarity_lexicon_lex.parquet']
INFO:ekorpkit.io.file:Loading data from /workspace/projects/ekorpkit/ekorpkit/resources/lexicons/mpko/mp_polarity_lexicon_lex.parquet
INFO:ekorpkit.io.file: >> elapsed time to load data: 0:00:00.035776
INFO:ekorpkit.models.ngram.ngram:loaded 23956 candidates
print(f"Number of candidates: {len(ngram.candidates)}")
Number of candidates: 23956
ngram.export_ngrams(threshold=0.9)
[(('투기/NNG', '억제/NNG'),
  score(word='투기/NNG;억제/NNG', label=1, polarity=0.9984224740344032, intensity=76.89998054169148, pos_score=842.336810100104, neg_score=10.95366740233997)),
 (('금리/NNG', '상승/NNG'),
  score(word='금리/NNG;상승/NNG', label=1, polarity=0.9976489029338528, intensity=74.78067419154141, pos_score=852.2582592674567, neg_score=11.396771538653194)),
 (('채권/NNG', '가격/NNG', '하락/NNG'),
  score(word='채권/NNG;가격/NNG;하락/NNG', label=1, polarity=0.9965068843156996, intensity=71.85459337496019, pos_score=830.1285320910899, neg_score=11.552894437231236)),
 (('인플레이션/NNG', '압력/NNG'),
  score(word='인플레이션/NNG;압력/NNG', label=1, polarity=0.9962771197986816, intensity=71.29298491650549, pos_score=851.9671447928356, neg_score=11.950224075911729)),
 (('물가/NNG', '상승/NNG'),
  score(word='물가/NNG;상승/NNG', label=1, polarity=0.9892951767944276, intensity=57.572641724969934, pos_score=840.8393220118454, neg_score=14.604841758497308)),
 (('부동산/NNG', '가격/NNG', '상승/NNG'),
  score(word='부동산/NNG;가격/NNG;상승/NNG', label=1, polarity=0.9892690707366624, intensity=57.53110616205035, pos_score=850.132566974034, neg_score=14.776920238234757)),
 (('요금/NNG', '인상/NNG'),
  score(word='요금/NNG;인상/NNG', label=1, polarity=0.9226025183563592, intensity=19.822968765773577, pos_score=845.4185241017657, neg_score=42.64843142776217)),
 (('상방/NNG', '압력/NNG'),
  score(word='상방/NNG;압력/NNG', label=1, polarity=0.9205443517087604, intensity=19.41688981090808, pos_score=829.3004950427758, neg_score=42.71026426574706))]
sentence = "투기를 억제하기 위해 금리를 인상해야 한다."
tokens = ngram.tokenize(sentence)
print(tokens)
['투기/NNG', '억제/NNG', '하/XSV', '금리/NNG', '인상/NNG', '해야/XSV']
tokens = ngram.ngramize_sentence(sentence)
print(tokens)
['투기/NNG', '억제/NNG;금리/NNG;인상/NNG', '하/XSV', '해야/XSV']
corpus_cfg = eKonf.compose("corpus")
corpus_cfg.name = "bok_minutes"
corpus_cfg.data_dir = "/workspace/data/datasets/corpus/ekorpkit"
corpus = eKonf.instantiate(corpus_cfg)
corpus.data.tail()
INFO:ekorpkit.datasets.base:Loaded info file: /workspace/data/datasets/corpus/ekorpkit/bok_minutes/info-bok_minutes.yaml
INFO:ekorpkit.io.file:Processing [1] files from ['bok_minutes-train.parquet']
INFO:ekorpkit.io.file:Loading 1 dataframes from ['/workspace/data/datasets/corpus/ekorpkit/bok_minutes/bok_minutes-train.parquet']
INFO:ekorpkit.io.file:Loading data from /workspace/data/datasets/corpus/ekorpkit/bok_minutes/bok_minutes-train.parquet
INFO:ekorpkit.info.column:index: index, index of data: None, columns: ['id', 'text'], id: ['id']
INFO:ekorpkit.info.column:Adding id [split] to ['id']
INFO:ekorpkit.info.column:Added id [split], now ['id', 'split']
INFO:ekorpkit.info.column:Added a column [split] with value [train]
INFO:ekorpkit.io.file:Processing [1] files from ['meta-bok_minutes-train.parquet']
INFO:ekorpkit.io.file:Loading 1 dataframes from ['/workspace/data/datasets/corpus/ekorpkit/bok_minutes/meta-bok_minutes-train.parquet']
INFO:ekorpkit.io.file:Loading data from /workspace/data/datasets/corpus/ekorpkit/bok_minutes/meta-bok_minutes-train.parquet
INFO:ekorpkit.info.column:Added a column [split] with value [train]
INFO:ekorpkit.info.column:No timestamp key found
INFO:ekorpkit.io.file:Concatenating 1 dataframes
id text split
181 181 Economic Situation\n일부 위원은 이번 전망에서 올해 소비자물가 상승... train
182 182 Economic Situation\n일부 위원은 감염병 재확산에도 불구하고 성장경로... train
183 183 Economic Situation\n일부 위원은 이번 전망내용을 보면 성장은 하방리... train
184 184 Economic Situation\n일부 위원은 우크라이나 사태, 공급망 차질, 중... train
185 185 Economic Situation\n일부 위원은 향후 국내외 경제흐름이 인플레이션에... train
ngram._ngram.max_window = 7
ngram._ngram.max_skip = 3
_ngrams = ngram.find_ngrams(
    corpus.data.text[1], ignore_scores=False, strip_pos=False, use_surfaces_to_score=True
)
INFO:ekorpkit.io.file:Concatenating 1 dataframes
INFO:ekorpkit.models.ngram.ngram:found 99 ngrams
_ngrams
Hide code cell output
{'경제/NNG;성장/NNG': {'polarity': 0.5204387993211343, 'count': 1},
 '근원/NNG;인플레이션/NNG;상승/NNG': {'polarity': 0.2543270656612199, 'count': 1},
 '소매/NNG;판매/NNG;부진/NNG': {'polarity': -0.0916732941026204, 'count': 1},
 '하락/NNG': {'polarity': -0.9974931628848912, 'count': 5},
 '가격/NNG;상승/NNG': {'polarity': 0.0582057939293445, 'count': 1},
 '높/VA;경제/NNG;성장/NNG': {'polarity': 0.6785215318580916, 'count': 2},
 '경제/NNG;낮/VA': {'polarity': 0.1811089746302118, 'count': 1},
 '투자/NNG;축소/NNG': {'polarity': -0.0091250155342883, 'count': 1},
 '실적/NNG;예상/NNG;하회/NNG': {'polarity': -0.0633039043188929, 'count': 1},
 '투자/NNG;수요/NNG;부진/NNG': {'polarity': -0.0567764807675792, 'count': 1},
 '실망/NNG': {'polarity': -0.0537436125235228, 'count': 1},
 '고용/NNG;악화/NNG': {'polarity': -0.624421305209124, 'count': 1},
 '실업/NNG;증가/NNG': {'polarity': -0.0971255742845687, 'count': 2},
 '악화/NNG;경제/NNG;성장/NNG': {'polarity': -0.4967007039179579, 'count': 1},
 '예상/NNG;낮/VA': {'polarity': -0.5326471339885891, 'count': 1},
 '성장/NNG;전망/NNG;낙관/NNG': {'polarity': 0.5580236567891682, 'count': 1},
 '생산/NNG;예상/NNG;하회/NNG': {'polarity': -0.0150834451089284, 'count': 1},
 '성장/NNG;효과/NNG': {'polarity': 0.5699464628899542, 'count': 1},
 '전망/NNG;낙관/NNG': {'polarity': 0.2062637762448329, 'count': 1},
 '낮/VA;효과/NNG': {'polarity': -0.5461373569685195, 'count': 1},
 '예상/NNG;좋/VA': {'polarity': -0.0557501757063274, 'count': 1},
 '수출/NNG;호조/NNG': {'polarity': 0.046887575975538, 'count': 2},
 '비관/NNG': {'polarity': -0.8859526730258452, 'count': 1},
 '부진/NNG;둔화/NNG': {'polarity': -0.0912906274268463, 'count': 1},
 '우려/NNG': {'polarity': -0.1406548563507243, 'count': 6},
 '예상/NNG;저조/NNG': {'polarity': -0.1340445578640994, 'count': 1},
 '예상/NNG;수출/NNG;호조/NNG': {'polarity': 0.0810811306501646, 'count': 1},
 '투자/NNG;부진/NNG': {'polarity': -0.0358596445136938, 'count': 1},
 '마이너스/NNG': {'polarity': -0.1030866691840481, 'count': 1},
 '플러스/NNG': {'polarity': 0.0729897565573511, 'count': 1},
 '경상/NNG;수지/NNG;흑자/NNG;축소/NNG': {'polarity': 0.6100019195528328, 'count': 1},
 '절상/NNG;높/VA': {'polarity': 0.2064970496728622, 'count': 1},
 '절상/NNG': {'polarity': 0.2248293260757415, 'count': 2},
 '원화/NNG;절상/NNG': {'polarity': 0.2283740928971028, 'count': 4},
 '경상/NNG;수지/NNG;악화/NNG': {'polarity': 0.4781920955534715, 'count': 1},
 '경제/NNG;호조/NNG': {'polarity': 0.0116789494143074, 'count': 1},
 '경제/NNG;금리/NNG;인상/NNG': {'polarity': 0.5658462544072831, 'count': 1},
 '절하/NNG;압력/NNG': {'polarity': 0.155950847361199, 'count': 1},
 '억제/NNG': {'polarity': 0.326535478405863, 'count': 1},
 '전망/NNG;상방/NNG;위험/NNG': {'polarity': 0.0312150518237321, 'count': 1},
 '하방/NNG': {'polarity': -0.4744352510470996, 'count': 1},
 '위험/NNG': {'polarity': -0.0392922310459082, 'count': 1},
 '부담/NNG': {'polarity': 0.1193824753107514, 'count': 2},
 '채산성/NNG;악화/NNG': {'polarity': -0.0157042395284593, 'count': 1},
 '흡수/NNG': {'polarity': 0.1052117397374828, 'count': 1},
 '유가상승/NNG': {'polarity': 0.1500311576257382, 'count': 1},
 '우려/NNG;장기/NNG;금리/NNG;상승/NNG': {'polarity': 0.0134427632446614, 'count': 1},
 '수요/NNG;우려/NNG': {'polarity': -0.0918677556352442, 'count': 1},
 '전혀/MAG;배제/NNG;없/VA': {'polarity': -0.1933336885173837, 'count': 1},
 '부동산/NNG;완화/NNG': {'polarity': 0.0690010084274728, 'count': 1},
 '하락/NNG;효과/NNG': {'polarity': -0.111084426490321, 'count': 1},
 '성장/NNG': {'polarity': 0.984967006613283, 'count': 2},
 '콜/NNG;금리/NNG;하회/NNG': {'polarity': -0.0961084710137678, 'count': 2},
 '금리/NNG;상승/NNG;압력/NNG': {'polarity': 0.6004337207083972, 'count': 1},
 '예상/NNG;하락/NNG': {'polarity': -0.0506031051653062, 'count': 1},
 '경기/NNG;회복/NNG;약화/NNG': {'polarity': -0.0824761286136887, 'count': 1},
 '금리/NNG;상승/NNG': {'polarity': 0.9976489029338528, 'count': 2},
 '통화/NNG;안정/NNG': {'polarity': 0.1292155158174954, 'count': 2},
 '신용/NNG;위험/NNG': {'polarity': -0.0726718274475546, 'count': 1},
 '개선/NNG;감소/NNG': {'polarity': -0.3814854010419736, 'count': 1},
 '통화/NNG;완화/NNG': {'polarity': -0.4727497709698944, 'count': 1},
 '정책/NNG;금리/NNG;인상/NNG': {'polarity': 0.5521129348341561, 'count': 1},
 '지표/NNG;개선/NNG': {'polarity': -0.0035818427597022, 'count': 1},
 '실물/NNG;지표/NNG;부진/NNG': {'polarity': -0.2066858972925152, 'count': 1},
 '상방/NNG': {'polarity': 0.5519829582971086, 'count': 2},
 '위험/NNG;경기/NNG;회복/NNG': {'polarity': -0.0385253826251357, 'count': 1},
 '악화/NNG;경기/NNG;회복/NNG': {'polarity': -0.617631638579763, 'count': 1},
 '수출/NNG;안정/NNG': {'polarity': 0.0440460547178473, 'count': 1},
 '저조/NNG': {'polarity': 0.0177873650568067, 'count': 1},
 '선행/NNG;지표/NNG;부진/NNG': {'polarity': -0.0199889873426576, 'count': 1},
 '내수/NNG;부진/NNG': {'polarity': -0.1709311969620205, 'count': 2},
 '기업/NNG;경기/NNG;회복/NNG': {'polarity': 0.006634211288978, 'count': 1},
 '원가/NNG;상승/NNG;부담/NNG': {'polarity': 0.1232732711368559, 'count': 1},
 '금리/NNG;축소/NNG': {'polarity': -0.5971977095938265, 'count': 1},
 '감속/NNG': {'polarity': 0.0080444727468427, 'count': 1},
 '실적/NNG;좋/VA': {'polarity': -0.0068061537817557, 'count': 1},
 '실물/NNG;경제/NNG;회복/NNG': {'polarity': -0.0766779037357372, 'count': 3},
 '예상/NNG;위험/NNG': {'polarity': -0.0668915359223978, 'count': 1},
 '경기/NNG;회복/NNG': {'polarity': -0.0735204089304163, 'count': 1},
 '원자재/NNG;가격/NNG;상승/NNG;물가/NNG;상승/NNG': {'polarity': 0.2154711102466537,
  'count': 1},
 '완화/NNG': {'polarity': -0.9865071267692084, 'count': 3},
 '임금/NNG;상승/NNG': {'polarity': 0.251653255581853, 'count': 1},
 '호황/NNG': {'polarity': -0.5670415201898105, 'count': 1},
 '물가/NNG;상승/NNG;압력/NNG;부담/NNG': {'polarity': 0.3241736252714733, 'count': 1},
 '긴축/NNG': {'polarity': 0.9816490650480136, 'count': 1},
 '부작용/NNG': {'polarity': 0.1239555469103132, 'count': 1},
 '우려/NNG;없/VA': {'polarity': -0.0854520733277373, 'count': 1},
 '회복/NNG;부진/NNG': {'polarity': -0.589052894650519, 'count': 1},
 '물가/NNG;상승/NNG;압력/NNG;증대/NNG': {'polarity': 0.3357430815609288, 'count': 1},
 '경제/NNG;안정/NNG': {'polarity': 0.2199968495401089, 'count': 1},
 '당분간/MAG;금융/NNG;완화/NNG': {'polarity': 0.043402847939571, 'count': 1},
 '물가/NNG;불안/NNG': {'polarity': 0.2565098460919433, 'count': 1},
 '인플레이션/NNG;우려/NNG;긴축/NNG': {'polarity': 0.6437711822554745, 'count': 1},
 '노동/NNG;비용/NNG;상승/NNG': {'polarity': 0.1822378047658608, 'count': 1},
 '상방/NNG;위험/NNG;높/VA': {'polarity': 0.0880202683177656, 'count': 1},
 '경제/NNG;경기/NNG;부진/NNG': {'polarity': -0.2716333349372742, 'count': 1},
 '위축/NNG': {'polarity': -0.9964422143950517, 'count': 1},
 '금리/NNG;인상/NNG;강세/NNG': {'polarity': 0.0129134781385689, 'count': 1},
 '금리/NNG;인상/NNG': {'polarity': 0.6994401729370587, 'count': 1}}
_features = ngram.find_features(corpus.data.text[1])
INFO:ekorpkit.io.file:Concatenating 1 dataframes
INFO:ekorpkit.models.ngram.ngram:found 99 ngrams
_features
Hide code cell output
{'경제/NNG;성장/NNG': {'label': 1,
  'polarity': 0.5204387993211343,
  'intensity': 3.261446146626619,
  'pos_score': 53.81467139538686,
  'neg_score': 16.50024834874201,
  'count': 1},
 '근원/NNG;인플레이션/NNG;상승/NNG': {'label': 1,
  'polarity': 0.2543270656612199,
  'intensity': 1.7920432753856634,
  'pos_score': 21.20702197813539,
  'neg_score': 11.8339898759261,
  'count': 1},
 '소매/NNG;판매/NNG;부진/NNG': {'label': -1,
  'polarity': -0.0916732941026204,
  'intensity': 1.3059461234579393,
  'pos_score': 9.189591593573098,
  'neg_score': 12.001111517788454,
  'count': 1},
 '하락/NNG': {'label': -1,
  'polarity': -0.9974931628848912,
  'intensity': 72.9138425756711,
  'pos_score': 11.736812558265145,
  'neg_score': 855.7761032135043,
  'count': 5},
 '가격/NNG;상승/NNG': {'label': 1,
  'polarity': 0.0582057939293445,
  'intensity': 1.2262908563119794,
  'pos_score': 48.02782791432222,
  'neg_score': 39.16511948785461,
  'count': 1},
 '높/VA;경제/NNG;성장/NNG': {'label': 1,
  'polarity': 0.6785215318580916,
  'intensity': 5.199694562432672,
  'pos_score': 73.22699602618275,
  'neg_score': 14.082941824168143,
  'count': 2},
 '경제/NNG;낮/VA': {'label': 1,
  'polarity': 0.1811089746302118,
  'intensity': 1.5501092214953294,
  'pos_score': 21.669653563484243,
  'neg_score': 13.97943658613964,
  'count': 1},
 '투자/NNG;축소/NNG': {'label': -1,
  'polarity': -0.0091250155342883,
  'intensity': 1.1188750598079322,
  'pos_score': 10.458357442455542,
  'neg_score': 11.701595308920178,
  'count': 1},
 '실적/NNG;예상/NNG;하회/NNG': {'label': -1,
  'polarity': -0.0633039043188929,
  'intensity': 1.2380396748705451,
  'pos_score': 9.713568012585942,
  'neg_score': 12.025782584134824,
  'count': 1},
 '투자/NNG;수요/NNG;부진/NNG': {'label': -1,
  'polarity': -0.0567764807675792,
  'intensity': 1.2229774652283765,
  'pos_score': 10.392762753906064,
  'neg_score': 12.71011464949192,
  'count': 1},
 '실망/NNG': {'label': -1,
  'polarity': -0.0537436125235228,
  'intensity': 1.216047806723007,
  'pos_score': 10.346163668657969,
  'neg_score': 12.581429637268782,
  'count': 1},
 '고용/NNG;악화/NNG': {'label': -1,
  'polarity': -0.624421305209124,
  'intensity': 4.3600524860915,
  'pos_score': 10.127504081094196,
  'neg_score': 44.15644934667655,
  'count': 1},
 '실업/NNG;증가/NNG': {'label': -1,
  'polarity': -0.0971255742845687,
  'intensity': 1.3194718505392606,
  'pos_score': 10.05414441207916,
  'neg_score': 13.266160532995055,
  'count': 2},
 '악화/NNG;경제/NNG;성장/NNG': {'label': -1,
  'polarity': -0.4967007039179579,
  'intensity': 3.0682824682654,
  'pos_score': 15.946938520568368,
  'neg_score': 48.92971188516611,
  'count': 1},
 '예상/NNG;낮/VA': {'label': -1,
  'polarity': -0.5326471339885891,
  'intensity': 3.364305915031035,
  'pos_score': 11.779731291822346,
  'neg_score': 39.63061966255409,
  'count': 1},
 '성장/NNG;전망/NNG;낙관/NNG': {'label': 1,
  'polarity': 0.5580236567891682,
  'intensity': 3.6036372579674505,
  'pos_score': 61.81830128426434,
  'neg_score': 17.154418399795194,
  'count': 1},
 '생산/NNG;예상/NNG;하회/NNG': {'label': -1,
  'polarity': -0.0150834451089284,
  'intensity': 1.1313557088355493,
  'pos_score': 9.981679719918851,
  'neg_score': 11.292830334898222,
  'count': 1},
 '성장/NNG;효과/NNG': {'label': 1,
  'polarity': 0.5699464628899542,
  'intensity': 3.723970125561121,
  'pos_score': 49.41961036762734,
  'neg_score': 13.270678523550425,
  'count': 1},
 '전망/NNG;낙관/NNG': {'label': 1,
  'polarity': 0.2062637762448329,
  'intensity': 1.6283551214550651,
  'pos_score': 87.74148702047394,
  'neg_score': 53.88350849541341,
  'count': 1},
 '낮/VA;효과/NNG': {'label': -1,
  'polarity': -0.5461373569685195,
  'intensity': 3.486829016468275,
  'pos_score': 12.007542432500443,
  'neg_score': 41.868247370116606,
  'count': 1},
 '예상/NNG;좋/VA': {'label': -1,
  'polarity': -0.0557501757063274,
  'intensity': 1.2206276635151885,
  'pos_score': 10.829911833706351,
  'neg_score': 13.219289977652473,
  'count': 1},
 '수출/NNG;호조/NNG': {'label': 1,
  'polarity': 0.046887575975538,
  'intensity': 1.2005578436143531,
  'pos_score': 14.679689176358789,
  'neg_score': 12.227390170693218,
  'count': 2},
 '비관/NNG': {'label': -1,
  'polarity': -0.8859526730258452,
  'intensity': 14.32253807263303,
  'pos_score': 58.77991551102222,
  'neg_score': 841.8775778127684,
  'count': 1},
 '부진/NNG;둔화/NNG': {'label': -1,
  'polarity': -0.0912906274268463,
  'intensity': 1.3050027523052066,
  'pos_score': 11.20825418213661,
  'neg_score': 14.626802556224618,
  'count': 1},
 '우려/NNG': {'label': -1,
  'polarity': -0.1406548563507243,
  'intensity': 1.433426758407487,
  'pos_score': 13.79774259344573,
  'neg_score': 19.77805343906382,
  'count': 6},
 '예상/NNG;저조/NNG': {'label': -1,
  'polarity': -0.1340445578640994,
  'intensity': 1.415405971524219,
  'pos_score': 11.3938308957494,
  'neg_score': 16.126896288380845,
  'count': 1},
 '예상/NNG;수출/NNG;호조/NNG': {'label': 1,
  'polarity': 0.0810811306501646,
  'intensity': 1.2801818841583474,
  'pos_score': 16.01598104589441,
  'neg_score': 12.510707458123482,
  'count': 1},
 '투자/NNG;부진/NNG': {'label': -1,
  'polarity': -0.0358596445136938,
  'intensity': 1.1760482096124063,
  'pos_score': 10.476135132730851,
  'neg_score': 12.320439966505749,
  'count': 1},
 '마이너스/NNG': {'label': -1,
  'polarity': -0.1030866691840481,
  'intensity': 1.3344425639455602,
  'pos_score': 10.736145941980764,
  'neg_score': 14.32677011771053,
  'count': 1},
 '플러스/NNG': {'label': 1,
  'polarity': 0.0729897565573511,
  'intensity': 1.260824071955346,
  'pos_score': 14.200712242550363,
  'neg_score': 11.26304022775138,
  'count': 1},
 '경상/NNG;수지/NNG;흑자/NNG;축소/NNG': {'label': 1,
  'polarity': 0.6100019195528328,
  'intensity': 4.178738920458982,
  'pos_score': 103.87449222349149,
  'neg_score': 24.857856449208885,
  'count': 1},
 '절상/NNG;높/VA': {'label': 1,
  'polarity': 0.2064970496728622,
  'intensity': 1.629103182609869,
  'pos_score': 24.457662521938783,
  'neg_score': 15.012960985538632,
  'count': 1},
 '절상/NNG': {'label': 1,
  'polarity': 0.2248293260757415,
  'intensity': 1.6892557023222454,
  'pos_score': 25.892033788702214,
  'neg_score': 15.327480471492889,
  'count': 2},
 '원화/NNG;절상/NNG': {'label': 1,
  'polarity': 0.2283740928971028,
  'intensity': 1.7012059040923952,
  'pos_score': 27.48521557243343,
  'neg_score': 16.156313298887223,
  'count': 4},
 '경상/NNG;수지/NNG;악화/NNG': {'label': 1,
  'polarity': 0.4781920955534715,
  'intensity': 2.932855322012729,
  'pos_score': 91.3427114176571,
  'neg_score': 31.14463599076254,
  'count': 1},
 '경제/NNG;호조/NNG': {'label': 1,
  'polarity': 0.0116789494143074,
  'intensity': 1.1241794102874298,
  'pos_score': 13.337885034388988,
  'neg_score': 11.86455196771373,
  'count': 1},
 '경제/NNG;금리/NNG;인상/NNG': {'label': 1,
  'polarity': 0.5658462544072831,
  'intensity': 3.681884691016604,
  'pos_score': 42.605771658013424,
  'neg_score': 11.571728946853456,
  'count': 1},
 '절하/NNG;압력/NNG': {'label': 1,
  'polarity': 0.155950847361199,
  'intensity': 1.4763779518417686,
  'pos_score': 20.2058156189916,
  'neg_score': 13.68607245440439,
  'count': 1},
 '억제/NNG': {'label': 1,
  'polarity': 0.326535478405863,
  'intensity': 2.0802422997550942,
  'pos_score': 22.594305108083084,
  'neg_score': 10.8613814413557,
  'count': 1},
 '전망/NNG;상방/NNG;위험/NNG': {'label': 1,
  'polarity': 0.0312150518237321,
  'intensity': 1.1658916520421658,
  'pos_score': 14.95827528763208,
  'neg_score': 12.829901699211325,
  'count': 1},
 '하방/NNG': {'label': -1,
  'polarity': -0.4744352510470996,
  'intensity': 2.904251967991333,
  'pos_score': 15.565935574694668,
  'neg_score': 45.20739902643329,
  'count': 1},
 '위험/NNG': {'label': -1,
  'polarity': -0.0392922310459082,
  'intensity': 1.1836132309079384,
  'pos_score': 15.706926885027544,
  'neg_score': 18.59092647802221,
  'count': 1},
 '부담/NNG': {'label': 1,
  'polarity': 0.1193824753107514,
  'intensity': 1.3765025447218744,
  'pos_score': 14.462013361611486,
  'neg_score': 10.506346985746816,
  'count': 2},
 '채산성/NNG;악화/NNG': {'label': -1,
  'polarity': -0.0157042395284593,
  'intensity': 1.1326645045452064,
  'pos_score': 15.067416684170016,
  'neg_score': 17.066328053351608,
  'count': 1},
 '흡수/NNG': {'label': 1,
  'polarity': 0.1052117397374828,
  'intensity': 1.3399319840226835,
  'pos_score': 13.075991433392248,
  'neg_score': 9.758697896094766,
  'count': 1},
 '유가상승/NNG': {'label': 1,
  'polarity': 0.1500311576257382,
  'intensity': 1.459644483090467,
  'pos_score': 18.344871899170798,
  'neg_score': 12.56804113035092,
  'count': 1},
 '우려/NNG;장기/NNG;금리/NNG;상승/NNG': {'label': 1,
  'polarity': 0.0134427632446614,
  'intensity': 1.1278792966071522,
  'pos_score': 11.386901587900123,
  'neg_score': 10.095851233508595,
  'count': 1},
 '수요/NNG;우려/NNG': {'label': -1,
  'polarity': -0.0918677556352442,
  'intensity': 1.3064258280930992,
  'pos_score': 12.209263564394975,
  'neg_score': 15.95049726252161,
  'count': 1},
 '전혀/MAG;배제/NNG;없/VA': {'label': -1,
  'polarity': -0.1933336885173837,
  'intensity': 1.5872556240160312,
  'pos_score': 10.68551836965644,
  'neg_score': 16.960649127763794,
  'count': 1},
 '부동산/NNG;완화/NNG': {'label': 1,
  'polarity': 0.0690010084274728,
  'intensity': 1.251401829605053,
  'pos_score': 11.835969874246365,
  'neg_score': 9.458168906450966,
  'count': 1},
 '하락/NNG;효과/NNG': {'label': -1,
  'polarity': -0.111084426490321,
  'intensity': 1.3548343875629658,
  'pos_score': 14.454222843917568,
  'neg_score': 19.58307815443769,
  'count': 1},
 '성장/NNG': {'label': 1,
  'polarity': 0.984967006613283,
  'intensity': 51.40690016495882,
  'pos_score': 842.3395061901749,
  'neg_score': 16.38572844282002,
  'count': 2},
 '콜/NNG;금리/NNG;하회/NNG': {'label': -1,
  'polarity': -0.0961084710137678,
  'intensity': 1.31693664989185,
  'pos_score': 10.204432310024266,
  'neg_score': 13.438590900411508,
  'count': 2},
 '금리/NNG;상승/NNG;압력/NNG': {'label': 1,
  'polarity': 0.6004337207083972,
  'intensity': 4.062325614818798,
  'pos_score': 43.31227845878329,
  'neg_score': 10.661941598375602,
  'count': 1},
 '예상/NNG;하락/NNG': {'label': -1,
  'polarity': -0.0506031051653062,
  'intensity': 1.2089175938706724,
  'pos_score': 10.85390866198234,
  'neg_score': 13.121481143735744,
  'count': 1},
 '경기/NNG;회복/NNG;약화/NNG': {'label': -1,
  'polarity': -0.0824761286136887,
  'intensity': 1.2834842924386862,
  'pos_score': 11.629648459487758,
  'neg_score': 14.926471124336302,
  'count': 1},
 '금리/NNG;상승/NNG': {'label': 1,
  'polarity': 0.9976489029338528,
  'intensity': 74.78067419154141,
  'pos_score': 852.2582592674567,
  'neg_score': 11.396771538653194,
  'count': 2},
 '통화/NNG;안정/NNG': {'label': 1,
  'polarity': 0.1292155158174954,
  'intensity': 1.402557946927129,
  'pos_score': 18.19379611881449,
  'neg_score': 12.971867692650676,
  'count': 2},
 '신용/NNG;위험/NNG': {'label': -1,
  'polarity': -0.0726718274475546,
  'intensity': 1.2600165993911436,
  'pos_score': 11.76594815221796,
  'neg_score': 14.825289979370185,
  'count': 1},
 '개선/NNG;감소/NNG': {'label': -1,
  'polarity': -0.3814854010419736,
  'intensity': 2.3417715500464165,
  'pos_score': 17.685057124364075,
  'neg_score': 41.41436363478148,
  'count': 1},
 '통화/NNG;완화/NNG': {'label': -1,
  'polarity': -0.4727497709698944,
  'intensity': 2.89237187982404,
  'pos_score': 16.50920582948091,
  'neg_score': 47.7507626994177,
  'count': 1},
 '정책/NNG;금리/NNG;인상/NNG': {'label': 1,
  'polarity': 0.5521129348341561,
  'intensity': 3.546226821494842,
  'pos_score': 44.62936011092256,
  'neg_score': 12.585026947630476,
  'count': 1},
 '지표/NNG;개선/NNG': {'label': -1,
  'polarity': -0.0035818427597022,
  'intensity': 1.1073947464102936,
  'pos_score': 10.6772094134589,
  'neg_score': 11.82388561078692,
  'count': 1},
 '실물/NNG;지표/NNG;부진/NNG': {'label': -1,
  'polarity': -0.2066858972925152,
  'intensity': 1.6293855612816797,
  'pos_score': 10.253607490392032,
  'neg_score': 16.707079995894457,
  'count': 1},
 '상방/NNG': {'label': 1,
  'polarity': 0.5519829582971086,
  'intensity': 3.544980494814778,
  'pos_score': 55.57686459549216,
  'neg_score': 15.677622112952132,
  'count': 2},
 '위험/NNG;경기/NNG;회복/NNG': {'label': -1,
  'polarity': -0.0385253826251357,
  'intensity': 1.1819186254357306,
  'pos_score': 12.70529424149125,
  'neg_score': 15.016623905659843,
  'count': 1},
 '악화/NNG;경기/NNG;회복/NNG': {'label': -1,
  'polarity': -0.617631638579763,
  'intensity': 4.271078956642339,
  'pos_score': 12.83794761673379,
  'neg_score': 54.831887912308346,
  'count': 1},
 '수출/NNG;안정/NNG': {'label': 1,
  'polarity': 0.0440460547178473,
  'intensity': 1.1941905366679304,
  'pos_score': 13.680594215706703,
  'neg_score': 11.455955976572,
  'count': 1},
 '저조/NNG': {'label': 1,
  'polarity': 0.0177873650568067,
  'intensity': 1.1370480237635,
  'pos_score': 14.42350403167657,
  'neg_score': 12.685043841803978,
  'count': 1},
 '선행/NNG;지표/NNG;부진/NNG': {'label': -1,
  'polarity': -0.0199889873426576,
  'intensity': 1.1417418479314083,
  'pos_score': 9.390936181680598,
  'neg_score': 10.722024829877933,
  'count': 1},
 '내수/NNG;부진/NNG': {'label': -1,
  'polarity': -0.1709311969620205,
  'intensity': 1.5195229768755596,
  'pos_score': 12.414048837496496,
  'neg_score': 18.86343244463125,
  'count': 2},
 '기업/NNG;경기/NNG;회복/NNG': {'label': 1,
  'polarity': 0.006634211288978,
  'intensity': 1.1136679199548705,
  'pos_score': 11.902794943942045,
  'neg_score': 10.687921175303662,
  'count': 1},
 '원가/NNG;상승/NNG;부담/NNG': {'label': 1,
  'polarity': 0.1232732711368559,
  'intensity': 1.3867444414893304,
  'pos_score': 15.26778989503723,
  'neg_score': 11.009807891236246,
  'count': 1},
 '금리/NNG;축소/NNG': {'label': -1,
  'polarity': -0.5971977095938265,
  'intensity': 4.0202811335591,
  'pos_score': 8.97710684608576,
  'neg_score': 36.09049328726282,
  'count': 1},
 '감속/NNG': {'label': 1,
  'polarity': 0.0080444727468427,
  'intensity': 1.1165959286727123,
  'pos_score': 15.18652778243845,
  'neg_score': 13.60073719818282,
  'count': 1},
 '실적/NNG;좋/VA': {'label': -1,
  'polarity': -0.0068061537817557,
  'intensity': 1.1140573454235554,
  'pos_score': 10.622596779105454,
  'neg_score': 11.834181969235033,
  'count': 1},
 '실물/NNG;경제/NNG;회복/NNG': {'label': -1,
  'polarity': -0.0766779037357372,
  'intensity': 1.2695470677121787,
  'pos_score': 13.027022085992792,
  'neg_score': 16.53841769029394,
  'count': 3},
 '예상/NNG;위험/NNG': {'label': -1,
  'polarity': -0.0668915359223978,
  'intensity': 1.2464054941783642,
  'pos_score': 18.120859202481878,
  'neg_score': 22.585938469205978,
  'count': 1},
 '경기/NNG;회복/NNG': {'label': -1,
  'polarity': -0.0735204089304163,
  'intensity': 1.262028690856419,
  'pos_score': 12.625816071313652,
  'neg_score': 15.934142127473908,
  'count': 1},
 '원자재/NNG;가격/NNG;상승/NNG;물가/NNG;상승/NNG': {'label': 1,
  'polarity': 0.2154711102466537,
  'intensity': 1.6582092384588167,
  'pos_score': 20.89884086625913,
  'neg_score': 12.603259215756788,
  'count': 1},
 '완화/NNG': {'label': -1,
  'polarity': -0.9865071267692084,
  'intensity': 52.69200707267185,
  'pos_score': 15.989943057821629,
  'neg_score': 842.5421926943574,
  'count': 3},
 '임금/NNG;상승/NNG': {'label': 1,
  'polarity': 0.251653255581853,
  'intensity': 1.7824034161386677,
  'pos_score': 19.75105481210894,
  'neg_score': 11.081136084723676,
  'count': 1},
 '호황/NNG': {'label': -1,
  'polarity': -0.5670415201898105,
  'intensity': 3.690895781961134,
  'pos_score': 13.582274862786392,
  'neg_score': 50.13076100049504,
  'count': 1},
 '물가/NNG;상승/NNG;압력/NNG;부담/NNG': {'label': 1,
  'polarity': 0.3241736252714733,
  'intensity': 2.069877612835401,
  'pos_score': 24.474028414635477,
  'neg_score': 11.823901211777429,
  'count': 1},
 '긴축/NNG': {'label': 1,
  'polarity': 0.9816490650480136,
  'intensity': 47.49363193796548,
  'pos_score': 856.5967773721211,
  'neg_score': 18.03603435700554,
  'count': 1},
 '부작용/NNG': {'label': 1,
  'polarity': 0.1239555469103132,
  'intensity': 1.388549530972376,
  'pos_score': 17.179605625383722,
  'neg_score': 12.37233907914913,
  'count': 1},
 '우려/NNG;없/VA': {'label': -1,
  'polarity': -0.0854520733277373,
  'intensity': 1.2907042758536815,
  'pos_score': 13.242924123126324,
  'neg_score': 17.092698790525013,
  'count': 1},
 '회복/NNG;부진/NNG': {'label': -1,
  'polarity': -0.589052894650519,
  'intensity': 3.92684349653929,
  'pos_score': 11.327536547899486,
  'neg_score': 44.481463224930216,
  'count': 1},
 '물가/NNG;상승/NNG;압력/NNG;증대/NNG': {'label': 1,
  'polarity': 0.3357430815609288,
  'intensity': 2.121325885847345,
  'pos_score': 24.465613653707315,
  'neg_score': 11.533170748036548,
  'count': 1},
 '경제/NNG;안정/NNG': {'label': 1,
  'polarity': 0.2199968495401089,
  'intensity': 1.6731336424466166,
  'pos_score': 20.298009367909096,
  'neg_score': 12.131732249569376,
  'count': 1},
 '당분간/MAG;금융/NNG;완화/NNG': {'label': 1,
  'polarity': 0.043402847939571,
  'intensity': 1.1927543434530097,
  'pos_score': 12.986952121888462,
  'neg_score': 10.888203587916848,
  'count': 1},
 '물가/NNG;불안/NNG': {'label': 1,
  'polarity': 0.2565098460919433,
  'intensity': 1.7999624924381648,
  'pos_score': 22.17223780684725,
  'neg_score': 12.318166572912045,
  'count': 1},
 '인플레이션/NNG;우려/NNG;긴축/NNG': {'label': 1,
  'polarity': 0.6437711822554745,
  'intensity': 4.636171827335574,
  'pos_score': 57.611129302828815,
  'neg_score': 12.42644393875672,
  'count': 1},
 '노동/NNG;비용/NNG;상승/NNG': {'label': 1,
  'polarity': 0.1822378047658608,
  'intensity': 1.5535205446644311,
  'pos_score': 16.585003135718075,
  'neg_score': 10.675753978715823,
  'count': 1},
 '상방/NNG;위험/NNG;높/VA': {'label': 1,
  'polarity': 0.0880202683177656,
  'intensity': 1.29704908247557,
  'pos_score': 16.25718553399367,
  'neg_score': 12.533978670232688,
  'count': 1},
 '경제/NNG;경기/NNG;부진/NNG': {'label': -1,
  'polarity': -0.2716333349372742,
  'intensity': 1.855564639106718,
  'pos_score': 12.474966192540206,
  'neg_score': 23.14810614092938,
  'count': 1},
 '위축/NNG': {'label': -1,
  'polarity': -0.9964422143950517,
  'intensity': 70.3434157525109,
  'pos_score': 12.105451312956726,
  'neg_score': 851.5387945790937,
  'count': 1},
 '금리/NNG;인상/NNG;강세/NNG': {'label': 1,
  'polarity': 0.0129134781385689,
  'intensity': 1.12676768211432,
  'pos_score': 11.815540041518986,
  'neg_score': 10.48622553617064,
  'count': 1},
 '금리/NNG;인상/NNG': {'label': 1,
  'polarity': 0.6994401729370587,
  'intensity': 5.596730769609167,
  'pos_score': 57.26147602559678,
  'neg_score': 10.231236481220892,
  'count': 1}}