Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 15,
- "metadata": {},
- "outputs": [],
- "source": [
- "sb_fname = 'tb_log/sb_3000/topics_epoch50.txt'\n",
- "sb_os_fname = 'tb_log/sb_os_1386/topics_epoch50.txt'\n",
- "cmt_fname = 'tb_log/cmt2000/topics_epoch100.txt'\n",
- "hashtag_fname = 'topics/test/topics_epoch100.txt'"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 2,
- "metadata": {},
- "outputs": [],
- "source": [
- "def open_text(fname):\n",
- " with open(fname, 'r') as f:\n",
- " return f.readlines()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 16,
- "metadata": {},
- "outputs": [],
- "source": [
- "sb = open_text(sb_fname)\n",
- "sb_os = open_text(sb_os_fname)\n",
- "cmt = open_text(cmt_fname)\n",
- "hashtag = open_text(hashtag_fname)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {},
- "outputs": [],
- "source": [
- "classes = [\n",
- " 'stmt', 'stmt-opinion', 'appreciation', 'agree', 'reject', 'dispreferred', 'offer',\n",
- " 'ack', 'opening', 'closing', 'thanking', 'sympathy', 'hedge', 'rh-q', 'non-understanding',\n",
- " 'apology', 'wh-q', 'yes/no-q', 'backchannel-q', 'tag-q',\n",
- "]"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## DA-Word distribution"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 35,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "<stmt>\n",
- "Default: gotten federal during started everywhere cold itself sitting comfortable changed younger miss finding hang new gone busy wo relatively general\n",
- "Oversampled: likes went moved had classical traveling ours stopped figured fourth told ended sat and our occasionally thought playing three stayed\n",
- "\n",
- "<stmt-opinion>\n",
- "Default: because some there be much over we seems would say will us could in guess more maybe if from need\n",
- "Oversampled: especially need nowadays gives paying relaxing seems quickly sooner complicated dangerous certain think committed boring overall unfortunate hire lot their\n",
- "\n",
- "<appreciation>\n",
- "Default: my interesting sounds wonderful great bad amazing gorgeous cute bet imagine fantastic surprised understand awful good funny cool be pretty\n",
- "Oversampled: darned hilarious holy understandable neat fantastic frightening odd great gracious darn fascinating unusual understand imagine bet sounds poor wild super\n",
- "\n",
- "<agree>\n",
- "Default: absolutely right exactly sure am will true does much definitely with is there too would certainly probably guess tend unpopular\n",
- "Oversampled: agree true voted definitely top sooner exactly burned fabulous probably awesome admit fourth tend think pleased stuck eventually lot ran\n",
- "\n",
- "<reject>\n",
- "Default: tell not eighty based large relatively gets occur passed miss rich spend less yet anywhere disagree federal high among change\n",
- "Oversampled: acquainted widespread comfy continues gory hilly wide communist refuted vegan jamming notice specifically searching mail fished divide diving adopt mobile\n",
- "\n",
- "<dispreferred>\n",
- "Default: depends itself react actually south handle part limited disagree occur everywhere based able less miss played turned rich come negotiated\n",
- "Oversampled: wealthy layed statistical till entertained sail spoon unsmashed peripheral favorable formed fixed affect circular freeze exclude administrating de claiming thaw\n",
- "\n",
- "<offer>\n",
- "Default: rich everywhere cost teach stay realize relatively miss since ago lost occur finding among made least twelve busy stuck create\n",
- "Oversampled: switch let press sometime reword punch repealed clears head damn contact drink pressurized softly explain encourage look push ask cleaner\n",
- "\n",
- "<ack>\n",
- "Default: four hear keeps fast grow each upon rich central miss relatively occur camping based thirty hang eighteen see both among\n",
- "Oversampled: watchi damp hurtle senior african see coarse yellow rub brand mexican dark dying visit secret sharing breaking chop type mumblex\n",
- "\n",
- "<opening>\n",
- "Default: itself based rich teach supposed everywhere keeps lost comfortable sitting second relatively handle putting buying among today covered younger unfortunate\n",
- "Oversampled: fine visiting chat doing today from my welcome in this live certainly calling are and good said is how mumblex\n",
- "\n",
- "<closing>\n",
- "Default: talk talking enjoyed later talked anyway bless met been motivated nice over with too throughout finding cooking again from enjoy\n",
- "Oversampled: talking enjoyed ge pair thrown practically meet repairing paged covered distracted covers slowly exhausted talked nice cross pleasant talks wrap\n",
- "\n",
- "<thanking>\n",
- "Default: involved tell rich based stay cost keeps change lot past relatively miss hang second sitting unfortunate expensive fortunate happen occur\n",
- "Oversampled: noticing thank punching participating for you helpful much very an being appreciate calling so the on all and watchi pair\n",
- "\n",
- "<sympathy>\n",
- "Default: everywhere wants went keeps finding perhaps private hang needs along sitting miss relatively comfortable younger recycle among catch apparently stop\n",
- "Oversampled: must hard sad real bad better terrible her blame too get been hope that so have about sorry what watchi\n",
- "\n",
- "<hedge>\n",
- "Default: do call n't helpful cruel obviously profound don sort relatively sure miss maybe misuse bottomed tries knows bear stressful though\n",
- "Oversampled: invading know shou hesitate don wonde do kn n't but face died publicized kno gather cruel unusual differently though say\n",
- "\n",
- "<rh-q>\n",
- "Default: voting why over capital accused dead us miss doing knows wind increased who handle cost convict writes getting high lost\n",
- "Oversampled: awol bitty net iffy voting croak checked who cares sour tests evil invest fascinated warlike pattern compromise impartial rectify insane\n",
- "\n",
- "<non-understanding>\n",
- "Default: ago during busy miss private finding hang twelve occur beg comfortable recycle realize general among unless unfortunate looked wind capital\n",
- "Oversampled: lax rolly polly howl deduct steamed ending lock unsweetened regards criminal ar beyond vote saying what pick say rid eighty\n",
- "\n",
- "<apology>\n",
- "Default: based after everywhere cost rich cold hang relatively suppose miss since stuck perhaps teach change ... younger lost concerned recycle\n",
- "Oversampled: dropped apologize clear primarily interrupted roped strongly waiting coughing cut upset until got am on keep hate home these anyway\n",
- "\n",
- "<wh-q>\n",
- "Default: where from old are your did feel lately long about spend what far you in favorite first why wh do\n",
- "Oversampled: sending whereabouts what spell wh old overseas which feel your yourself mini providing main favorite long handling supporting yours about\n",
- "\n",
- "<yes/no-q>\n",
- "Default: did there are any does you in or she is go over from with work first your have exercise had\n",
- "Oversampled: ever native subscribe have invaded standard y'all special near ready certain exercise served tested still active participate specific train watch\n",
- "\n",
- "<backchannel-q>\n",
- "Default: itself everywhere occur spend worth keeps capital such hang rough rich busy lost made large unfortunate comfortable private recycle perhaps\n",
- "Oversampled: remain blue communicate recent missing japanese kidding did ski are is serious you rough deserve rid while amazing scary does\n",
- "\n",
- "<tag-q>\n",
- "Default: federal during based cut everywhere cost wants started comfortable private cold working sitting hang miss relatively younger finding sound capital\n",
- "Oversampled: does he down correct it by did they she n't is you would are do mean right awol net iffy\n",
- "\n"
- ]
- }
- ],
- "source": [
- "for cls, w1, w2 in zip(classes, sb, sb_os):\n",
- " print(f'<{cls}>')\n",
- " print('Default:', w1, end='')\n",
- " print('Oversampled:', w2)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Topic-Word distribution"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 18,
- "metadata": {},
- "outputs": [],
- "source": [
- "import random\n",
- "\n",
- "def random_topic():\n",
- " idx = random.randint(0, 100)\n",
- " print('Hashtag:', hashtag[idx], end='')\n",
- " print('Comment:', cmt[idx])"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 36,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Hashtag: eye_spy_birds bird kings_birds feather_perfection birds_adored bestbirdshots macro birdphotography best_birds_of_ig birdfreaks\n",
- "Comment: macro owl bird dank photographed capture bee wel finland muito\n",
- "\n",
- "Hashtag: sexy beard modeling boy instagay youtuber actress models blackgirlmagic memories\n",
- "Comment: smile hermosa beard baby lady photoshoot girl hair linda party\n",
- "\n",
- "Hashtag: manhattan citylife travel_drops thisislondon newyorker cityscape kings_villages theprettycities living_destinations hello_worldpics\n",
- "Comment: edinburgh london york vienna europe street mark scotland boston italy\n",
- "\n",
- "Hashtag: oilpainting streetart modernart realism abstractpainting watercolour originalart painter artlife watercolorpainting\n",
- "Comment: watercolour painting canvas artwork cm progress oil print etsy dm\n",
- "\n",
- "Hashtag: mondaymotivation girlpower sports body sport girlswholift humpday gymmotivation healthylifestyle bikini\n",
- "Comment: fitness body week gym workout yoga football lol kick goal\n",
- "\n",
- "Hashtag: sexy beard modeling boy instagay youtuber actress models blackgirlmagic memories\n",
- "Comment: smile hermosa beard baby lady photoshoot girl hair linda party\n",
- "\n",
- "Hashtag: lmao nichememes selfcarethreads humor bangtanboys jungkook sad taehyung the100 comedy\n",
- "Comment: blackpink dt jennie sc bias ib rm ac deleted ily\n",
- "\n",
- "Hashtag: travelmore bali traveldiary travelbug thailand surf traveldiaries exploring beautifulplace globetrotter\n",
- "Comment: beaches thailand destinations travels adventures dubai philippines wow vietnam desert\n",
- "\n",
- "Hashtag: mondaymotivation girlpower sports body sport girlswholift humpday gymmotivation healthylifestyle bikini\n",
- "Comment: fitness body week gym workout yoga football lol kick goal\n",
- "\n",
- "Hashtag: wanderer dametraveler wearetravelgirls travelmore doyoutravel bali travelgirl hotel visiting goexplore\n",
- "Comment: hotels bucket trip greece resort exploring vacation hotel places mykonos\n",
- "\n",
- "Hashtag: likeforlike f4f follow4follow followforfollow shoutout chandigarh pic tamil lover modeling\n",
- "Comment: pic page kya admin ji pics hai ur ka bhi\n",
- "\n",
- "Hashtag: tiktok cardib kiss lfl funnyvideos lmao iloveyou kyliejenner humor comedy\n",
- "Comment: tiktok omgpage fuck underrated edit kiss reaction netflix sm hahaha\n",
- "\n",
- "Hashtag: technology tech america engineering videogames xbox fortnitememes pc pubg apple\n",
- "Comment: iphone fortnite squad wtf dm law mates twitter issues inquiries\n",
- "\n",
- "Hashtag: southafrica africanamazing elephant animalsofinstagram conservation bigcats wildlife_seekers animalphotography leopard wildlifeaddicts\n",
- "Comment: lion caption leopard pictures videos promotions accessories mum monkey mom\n",
- "\n",
- "Hashtag: portraits photos moment pics followforfollow pictures follow4follow portraiture toptags capture\n",
- "Comment: globe model frame pc photographer portraits editing india mua superb\n",
- "\n",
- "Hashtag: creativeoptic urbanandstreet enter_imagination streets_vision creative_ace milliondollarvisuals citykillerz weekly_feature urbanromantix all2epic\n",
- "Comment: affiliated lightroom presets shots chanel op chance tones ps ace\n",
- "\n",
- "Hashtag: america custom aviation fly bikelife flying avgeek mercedes airplane bmw\n",
- "Comment: custom machine crew coolest model ass lol kit repost badass\n",
- "\n",
- "Hashtag: urbanromantix creativeoptic streets_vision visualmobs urbanandstreet milliondollarvisuals thecreatorclass citykillerz all2epic enter_imagination\n",
- "Comment: bnw thanks team composition merci shadows presents hubs night bravo\n",
- "\n",
- "Hashtag: bhghome interiorstyle homestyle modernfarmhouse instahome interior4all kitchen bedroom livingroom dreamhome\n",
- "Comment: room tile chairs chair kitchen table space fireplace wall yay\n",
- "\n",
- "Hashtag: skyporn special_shots ig_shotz colors_of_day longexposure_shots longexpoelite sunsetlovers sunsets landscape_lovers landscapelovers\n",
- "Comment: serenity stolen exposure sunset raf finland night nature location reflect\n",
- "\n"
- ]
- }
- ],
- "source": [
- "for _ in range(0, 20):\n",
- " random_topic()"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.6.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement