{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/vnd.plotly.v1+html": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import plotly.offline as py\n", "from visual import *\n", "\n", "py.init_notebook_mode(connected=True)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "section, year = \"astro-ph\", 17\n", "volume = \"{}.{}\".format(section, str(year).zfill(2))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "# model = Word2Vec.load(\"../stat/word_vec/{}\".format(volume))\n", "# terms = get_lines(\"../topics/{}.txt\".format(section))\n", "# extented_terms = closest_keys(terms, model)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "data": [ { "marker": { "color": "orange" }, "name": "topic #1", "orientation": "h", "type": "bar", "x": [ 0.005, 0.005, 0.006, 0.006, 0.006, 0.009 ], "xaxis": "x1", "y": [ "dust", "particle", "surface", "core", "mass_loss", "abundance" ], "yaxis": "y1" }, { "marker": { "color": "orange" }, "name": "topic #2", "orientation": "h", "type": "bar", "x": [ 0.007, 0.007, 0.007, 0.008, 0.009, 0.009 ], "xaxis": "x2", "y": [ "accretion", "luminosity", "spin", "black_hole", "light_curve", "outburst" ], "yaxis": "y2" }, { "marker": { "color": "orange" }, "name": "topic #3", "orientation": "h", "type": "bar", "x": [ 0.006, 0.006, 0.008, 0.008, 0.009, 0.012 ], "xaxis": "x3", "y": [ "solar", "frequency", "flare", "magnetic_field", "radio", "image" ], "yaxis": "y3" }, { "marker": { "color": "orange" }, "name": "topic #4", "orientation": "h", "type": "bar", "x": [ 0.004, 0.005, 0.005, 0.01, 0.01, 0.011 ], "xaxis": "x4", "y": [ "neutrino", "experiment", "dark_matter", "event", "detector", "signal" ], "yaxis": "y4" }, { "marker": { "color": "orange" }, "name": "topic #5", "orientation": "h", "type": "bar", "x": [ 0.005, 0.005, 0.006, 0.006, 0.006, 0.016 ], "xaxis": "x5", "y": [ "magnitude", "filter", "spectra", "pixel", "survey", "image" ], "yaxis": "y5" }, { "marker": { "color": "orange" }, "name": "topic #6", "orientation": "h", "type": "bar", "x": [ 0.004, 0.004, 0.005, 0.005, 0.007, 0.008 ], "xaxis": "x6", "y": [ "axion", "black_hole", "particle", "matter", "mode", "solution" ], "yaxis": "y6" }, { "marker": { "color": "orange" }, "name": "topic #7", "orientation": "h", "type": "bar", "x": [ 0.005, 0.006, 0.006, 0.011, 0.011, 0.02 ], "xaxis": "x7", "y": [ "magnetic", "particle", "flow", "disc", "magnetic_field", "disk" ], "yaxis": "y7" }, { "marker": { "color": "orange" }, "name": "topic #8", "orientation": "h", "type": "bar", "x": [ 0.007, 0.007, 0.008, 0.016, 0.018, 0.023 ], "xaxis": "x8", "y": [ "stellar_mass", "metallicity", "star_formation", "galaxy", "halo", "galaxie" ], "yaxis": "y8" }, { "marker": { "color": "orange" }, "name": "topic #9", "orientation": "h", "type": "bar", "x": [ 0.005, 0.005, 0.005, 0.008, 0.008, 0.026 ], "xaxis": "x9", "y": [ "kepler", "transit", "light_curve", "orbit", "period", "planet" ], "yaxis": "y9" }, { "marker": { "color": "orange" }, "name": "topic #10", "orientation": "h", "type": "bar", "x": [ 0.007, 0.007, 0.008, 0.011, 0.014, 0.017 ], "xaxis": "x10", "y": [ "luminosity", "optical", "spectral", "absorption", "quasar", "spectra" ], "yaxis": "y10" }, { "marker": { "color": "orange" }, "name": "topic #11", "orientation": "h", "type": "bar", "x": [ 0.006, 0.006, 0.008, 0.009, 0.012, 0.021 ], "xaxis": "x11", "y": [ "star_formation", "filament", "molecular", "clump", "dust", "cloud" ], "yaxis": "y11" }, { "marker": { "color": "orange" }, "name": "topic #12", "orientation": "h", "type": "bar", "x": [ 0.007, 0.007, 0.007, 0.008, 0.008, 0.012 ], "xaxis": "x12", "y": [ "pulsar", "photon", "burst", "electron", "magnetic_field", "shock" ], "yaxis": "y12" }, { "marker": { "color": "orange" }, "name": "topic #13", "orientation": "h", "type": "bar", "x": [ 0.005, 0.006, 0.006, 0.006, 0.007, 0.007 ], "xaxis": "x13", "y": [ "universe", "redshift", "cosmological", "matter", "power_spectrum", "constraint" ], "yaxis": "y13" }, { "marker": { "color": "orange" }, "name": "topic #14", "orientation": "h", "type": "bar", "x": [ 0.006, 0.006, 0.007, 0.009, 0.01, 0.044 ], "xaxis": "x14", "y": [ "galaxy", "population", "profile", "halo", "group", "cluster" ], "yaxis": "y14" }, { "marker": { "color": "orange" }, "name": "topic #15", "orientation": "h", "type": "bar", "x": [ 0.005, 0.006, 0.008, 0.019, 0.023, 0.041 ], "xaxis": "x15", "y": [ "image", "luminosity", "survey", "redshift", "galaxy", "galaxie" ], "yaxis": "y15" } ], "layout": { "annotations": [ { "font": { "size": 16 }, "showarrow": false, "text": "abundance", "x": 0.11666666666666665, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "light_curve", "x": 0.49999999999999994, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "image", "x": 0.8833333333333333, "xanchor": "center", "xref": "paper", "y": 1, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "signal", "x": 0.11666666666666665, "xanchor": "center", "xref": "paper", "y": 0.79, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "image", "x": 0.49999999999999994, "xanchor": "center", "xref": "paper", "y": 0.79, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "solution", "x": 0.8833333333333333, "xanchor": "center", "xref": "paper", "y": 0.79, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "disk", "x": 0.11666666666666665, "xanchor": "center", "xref": "paper", "y": 0.5800000000000001, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "galaxie", "x": 0.49999999999999994, "xanchor": "center", "xref": "paper", "y": 0.5800000000000001, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "planet", "x": 0.8833333333333333, "xanchor": "center", "xref": "paper", "y": 0.5800000000000001, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "spectra", "x": 0.11666666666666665, "xanchor": "center", "xref": "paper", "y": 0.37, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "cloud", "x": 0.49999999999999994, "xanchor": "center", "xref": "paper", "y": 0.37, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "shock", "x": 0.8833333333333333, "xanchor": "center", "xref": "paper", "y": 0.37, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "power_spectrum", "x": 0.11666666666666665, "xanchor": "center", "xref": "paper", "y": 0.16, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "cluster", "x": 0.49999999999999994, "xanchor": "center", "xref": "paper", "y": 0.16, "yanchor": "bottom", "yref": "paper" }, { "font": { "size": 16 }, "showarrow": false, "text": "galaxie", "x": 0.8833333333333333, "xanchor": "center", "xref": "paper", "y": 0.16, "yanchor": "bottom", "yref": "paper" } ], "height": 750, "margin": { "t": 120 }, "showlegend": false, "title": "", "width": 750, "xaxis1": { "anchor": "y1", "domain": [ 0, 0.2333333333333333 ], "showticklabels": false }, "xaxis10": { "anchor": "y10", "domain": [ 0, 0.2333333333333333 ], "showticklabels": false }, "xaxis11": { "anchor": "y11", "domain": [ 0.3833333333333333, 0.6166666666666666 ], "showticklabels": false }, "xaxis12": { "anchor": "y12", "domain": [ 0.7666666666666666, 0.9999999999999999 ], "showticklabels": false }, "xaxis13": { "anchor": "y13", "domain": [ 0, 0.2333333333333333 ], "showticklabels": false }, "xaxis14": { "anchor": "y14", "domain": [ 0.3833333333333333, 0.6166666666666666 ], "showticklabels": false }, "xaxis15": { "anchor": "y15", "domain": [ 0.7666666666666666, 0.9999999999999999 ], "showticklabels": false }, "xaxis2": { "anchor": "y2", "domain": [ 0.3833333333333333, 0.6166666666666666 ], "showticklabels": false }, "xaxis3": { "anchor": "y3", "domain": [ 0.7666666666666666, 0.9999999999999999 ], "showticklabels": false }, "xaxis4": { "anchor": "y4", "domain": [ 0, 0.2333333333333333 ], "showticklabels": false }, "xaxis5": { "anchor": "y5", "domain": [ 0.3833333333333333, 0.6166666666666666 ], "showticklabels": false }, "xaxis6": { "anchor": "y6", "domain": [ 0.7666666666666666, 0.9999999999999999 ], "showticklabels": false }, "xaxis7": { "anchor": "y7", "domain": [ 0, 0.2333333333333333 ], "showticklabels": false }, "xaxis8": { "anchor": "y8", "domain": [ 0.3833333333333333, 0.6166666666666666 ], "showticklabels": false }, "xaxis9": { "anchor": "y9", "domain": [ 0.7666666666666666, 0.9999999999999999 ], "showticklabels": false }, "yaxis1": { "anchor": "x1", "domain": [ 0.8400000000000001, 1 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis10": { "anchor": "x10", "domain": [ 0.21000000000000002, 0.37 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis11": { "anchor": "x11", "domain": [ 0.21000000000000002, 0.37 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis12": { "anchor": "x12", "domain": [ 0.21000000000000002, 0.37 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis13": { "anchor": "x13", "domain": [ 0, 0.16 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis14": { "anchor": "x14", "domain": [ 0, 0.16 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis15": { "anchor": "x15", "domain": [ 0, 0.16 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis2": { "anchor": "x2", "domain": [ 0.8400000000000001, 1 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis3": { "anchor": "x3", "domain": [ 0.8400000000000001, 1 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis4": { "anchor": "x4", "domain": [ 0.63, 0.79 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis5": { "anchor": "x5", "domain": [ 0.63, 0.79 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis6": { "anchor": "x6", "domain": [ 0.63, 0.79 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis7": { "anchor": "x7", "domain": [ 0.42000000000000004, 0.5800000000000001 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis8": { "anchor": "x8", "domain": [ 0.42000000000000004, 0.5800000000000001 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 }, "yaxis9": { "anchor": "x9", "domain": [ 0.42000000000000004, 0.5800000000000001 ], "tickfont": { "color": "lightgrey", "size": 11 }, "ticklen": 3 } } }, "text/html": [ "
" ], "text/vnd.plotly.v1+html": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "lda_topics(volume)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "\n", "| Topic title | Articles |\n", "| --- | --- |\n", "| abundance, surface | [1709.00595](https://arxiv.org/pdf/1709.00595.pdf) [1705.06235](https://arxiv.org/pdf/1705.06235.pdf) [1702.02844](https://arxiv.org/pdf/1702.02844.pdf) [1708.00633](https://arxiv.org/pdf/1708.00633.pdf) [1701.05189](https://arxiv.org/pdf/1701.05189.pdf) |\n", "| light_curve, outburst | [1712.02571](https://arxiv.org/pdf/1712.02571.pdf) [1705.06795](https://arxiv.org/pdf/1705.06795.pdf) [1707.07356](https://arxiv.org/pdf/1707.07356.pdf) [1704.02628](https://arxiv.org/pdf/1704.02628.pdf) [1711.07672](https://arxiv.org/pdf/1711.07672.pdf) |\n", "| image, radio | [1706.02836](https://arxiv.org/pdf/1706.02836.pdf) [1705.06795](https://arxiv.org/pdf/1705.06795.pdf) [1709.08574](https://arxiv.org/pdf/1709.08574.pdf) [1707.00414](https://arxiv.org/pdf/1707.00414.pdf) [1705.10493](https://arxiv.org/pdf/1705.10493.pdf) |\n", "| signal, event | [1711.07421](https://arxiv.org/pdf/1711.07421.pdf) [1701.03952](https://arxiv.org/pdf/1701.03952.pdf) [1712.04979](https://arxiv.org/pdf/1712.04979.pdf) [1705.10944](https://arxiv.org/pdf/1705.10944.pdf) [1709.01877](https://arxiv.org/pdf/1709.01877.pdf) |\n", "| image, spectra | [1708.04685](https://arxiv.org/pdf/1708.04685.pdf) [1709.03531](https://arxiv.org/pdf/1709.03531.pdf) [1709.04045](https://arxiv.org/pdf/1709.04045.pdf) [1703.02305](https://arxiv.org/pdf/1703.02305.pdf) [1703.08410](https://arxiv.org/pdf/1703.08410.pdf) |\n", "| solution, mode | [1701.03168](https://arxiv.org/pdf/1701.03168.pdf) [1707.00414](https://arxiv.org/pdf/1707.00414.pdf) [1711.00835](https://arxiv.org/pdf/1711.00835.pdf) [1709.08574](https://arxiv.org/pdf/1709.08574.pdf) [1707.00701](https://arxiv.org/pdf/1707.00701.pdf) |\n", "| disk, disc | [1701.03152](https://arxiv.org/pdf/1701.03152.pdf) [1708.01275](https://arxiv.org/pdf/1708.01275.pdf) [1708.05388](https://arxiv.org/pdf/1708.05388.pdf) [1704.06317](https://arxiv.org/pdf/1704.06317.pdf) [1704.08962](https://arxiv.org/pdf/1704.08962.pdf) |\n", "| galaxie, halo | [1709.07881](https://arxiv.org/pdf/1709.07881.pdf) [1708.01615](https://arxiv.org/pdf/1708.01615.pdf) [1702.08614](https://arxiv.org/pdf/1702.08614.pdf) [1707.01106](https://arxiv.org/pdf/1707.01106.pdf) [1703.08410](https://arxiv.org/pdf/1703.08410.pdf) |\n", "| planet, orbit | [1706.09849](https://arxiv.org/pdf/1706.09849.pdf) [1710.08295](https://arxiv.org/pdf/1710.08295.pdf) [1708.01275](https://arxiv.org/pdf/1708.01275.pdf) [1705.04460](https://arxiv.org/pdf/1705.04460.pdf) [1708.00693](https://arxiv.org/pdf/1708.00693.pdf) |\n", "| spectra, quasar | [1706.01635](https://arxiv.org/pdf/1706.01635.pdf) [1701.00922](https://arxiv.org/pdf/1701.00922.pdf) [1706.09759](https://arxiv.org/pdf/1706.09759.pdf) [1703.03051](https://arxiv.org/pdf/1703.03051.pdf) [1708.06155](https://arxiv.org/pdf/1708.06155.pdf) |\n", "| cloud, dust | [1708.08149](https://arxiv.org/pdf/1708.08149.pdf) [1703.09709](https://arxiv.org/pdf/1703.09709.pdf) [1702.02844](https://arxiv.org/pdf/1702.02844.pdf) [1706.07164](https://arxiv.org/pdf/1706.07164.pdf) [1706.05107](https://arxiv.org/pdf/1706.05107.pdf) |\n", "| shock, electron | [1703.09311](https://arxiv.org/pdf/1703.09311.pdf) [1711.01279](https://arxiv.org/pdf/1711.01279.pdf) [1707.07511](https://arxiv.org/pdf/1707.07511.pdf) [1709.08574](https://arxiv.org/pdf/1709.08574.pdf) [1705.06795](https://arxiv.org/pdf/1705.06795.pdf) |\n", "| power_spectrum, constraint | [1701.06102](https://arxiv.org/pdf/1701.06102.pdf) [1702.08855](https://arxiv.org/pdf/1702.08855.pdf) [1711.01051](https://arxiv.org/pdf/1711.01051.pdf) [1706.06913](https://arxiv.org/pdf/1706.06913.pdf) [1704.07830](https://arxiv.org/pdf/1704.07830.pdf) |\n", "| cluster, group | [1704.03529](https://arxiv.org/pdf/1704.03529.pdf) [1709.01289](https://arxiv.org/pdf/1709.01289.pdf) [1704.07843](https://arxiv.org/pdf/1704.07843.pdf) [1705.07344](https://arxiv.org/pdf/1705.07344.pdf) [1703.07365](https://arxiv.org/pdf/1703.07365.pdf) |\n", "| galaxie, galaxy | [1704.07830](https://arxiv.org/pdf/1704.07830.pdf) [1704.03529](https://arxiv.org/pdf/1704.03529.pdf) [1701.02427](https://arxiv.org/pdf/1701.02427.pdf) [1701.06102](https://arxiv.org/pdf/1701.06102.pdf) [1702.08614](https://arxiv.org/pdf/1702.08614.pdf) |\n" ], "text/plain": [ "