[
  {
    "path": ".gitignore",
    "content": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\npip-wheel-metadata/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n*.py,cover\n.hypothesis/\n.pytest_cache/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\ndb.sqlite3-journal\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pyenv\n.python-version\n\n# pipenv\n#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.\n#   However, in case of collaboration, if having platform-specific dependencies or dependencies\n#   having no cross-platform support, pipenv may install dependencies that don't work, or not\n#   install all needed dependencies.\n#Pipfile.lock\n\n# PEP 582; used by e.g. github.com/David-OConnor/pyflow\n__pypackages__/\n\n# Celery stuff\ncelerybeat-schedule\ncelerybeat.pid\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "# NLP Essentials\n\nEssential and Fundametal aspects of Natural Language Processing with hands-on examples and case-studies\n"
  },
  {
    "path": "notebooks/01_Text_Wrangling_Examples.ipynb",
    "content": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"accelerator\": \"GPU\",\n    \"anaconda-cloud\": {},\n    \"colab\": {\n      \"name\": \"01 - Text Wrangling Examples.ipynb\",\n      \"provenance\": [],\n      \"collapsed_sections\": []\n    },\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.7.6\"\n    }\n  },\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"NtCf5TIaJpEr\"\n      },\n      \"source\": [\n        \"# Install Dependencies\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ceSG71XiJoka\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 185\n        },\n        \"outputId\": \"c1fa4f8d-9143-42bc-ef76-07166fc0710c\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"nltk.download('punkt')\\n\",\n        \"nltk.download('wordnet')\\n\",\n        \"nltk.download('stopwords')\\n\",\n        \"nltk.download('averaged_perceptron_tagger')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"[nltk_data] Downloading package punkt to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping tokenizers/punkt.zip.\\n\",\n            \"[nltk_data] Downloading package wordnet to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping corpora/wordnet.zip.\\n\",\n            \"[nltk_data] Downloading package stopwords to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping corpora/stopwords.zip.\\n\",\n            \"[nltk_data] Downloading package averaged_perceptron_tagger to\\n\",\n            \"[nltk_data]     /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"True\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 1\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"AgeSwPsGJFWj\"\n      },\n      \"source\": [\n        \"# Case Conversion\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"OQp382lJJFWp\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"199a9b30-a3ae-414b-def0-4166e17b7ab8\"\n      },\n      \"source\": [\n        \"text = 'The quick brown fox jumped over The Big Dog'\\n\",\n        \"text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The quick brown fox jumped over The Big Dog'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 2\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"FaAwb7HZJFWz\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"e2c4bc72-3743-4176-a42b-9720354716b8\"\n      },\n      \"source\": [\n        \"text.lower()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'the quick brown fox jumped over the big dog'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 3\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ihX9LwVuJFW4\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"34f136ca-0ea5-4531-e206-2c981ae6d6e3\"\n      },\n      \"source\": [\n        \"text.upper()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'THE QUICK BROWN FOX JUMPED OVER THE BIG DOG'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 4\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"U24TBZ82JFW8\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"e3fc2b71-b4f1-4ba4-93e9-7581c85d7566\"\n      },\n      \"source\": [\n        \"text.title()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The Quick Brown Fox Jumped Over The Big Dog'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 5\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"V3GzHq46JFW_\"\n      },\n      \"source\": [\n        \"# Tokenization\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"zIiPr5JBJFXA\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 54\n        },\n        \"outputId\": \"02958ece-7022-4a28-9591-d8caef757b87\"\n      },\n      \"source\": [\n        \"sample_text = (\\\"US unveils world's most powerful supercomputer, beats China. \\\" \\n\",\n        \"               \\\"The US has unveiled the world's most powerful supercomputer called 'Summit', \\\" \\n\",\n        \"               \\\"beating the previous record-holder China's Sunway TaihuLight. With a peak performance \\\"\\n\",\n        \"               \\\"of 200,000 trillion calculations per second, it is over twice as fast as Sunway TaihuLight, \\\"\\n\",\n        \"               \\\"which is capable of 93,000 trillion calculations per second. Summit has 4,608 servers, \\\"\\n\",\n        \"               \\\"which reportedly take up the size of two tennis courts.\\\")\\n\",\n        \"sample_text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"\\\"US unveils world's most powerful supercomputer, beats China. The US has unveiled the world's most powerful supercomputer called 'Summit', beating the previous record-holder China's Sunway TaihuLight. With a peak performance of 200,000 trillion calculations per second, it is over twice as fast as Sunway TaihuLight, which is capable of 93,000 trillion calculations per second. Summit has 4,608 servers, which reportedly take up the size of two tennis courts.\\\"\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 6\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"i2m8nEPmJFXD\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 84\n        },\n        \"outputId\": \"83fe372f-8901-43d1-d6f5-fed5ee27cd91\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"\\n\",\n        \"nltk.sent_tokenize(sample_text)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"[\\\"US unveils world's most powerful supercomputer, beats China.\\\",\\n\",\n              \" \\\"The US has unveiled the world's most powerful supercomputer called 'Summit', beating the previous record-holder China's Sunway TaihuLight.\\\",\\n\",\n              \" 'With a peak performance of 200,000 trillion calculations per second, it is over twice as fast as Sunway TaihuLight, which is capable of 93,000 trillion calculations per second.',\\n\",\n              \" 'Summit has 4,608 servers, which reportedly take up the size of two tennis courts.']\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 7\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"KjVNIwLoJFXG\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 54\n        },\n        \"outputId\": \"093b33f0-6449-4fd0-c1ed-1dfc9bb6e318\"\n      },\n      \"source\": [\n        \"print(nltk.word_tokenize(sample_text))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"['US', 'unveils', 'world', \\\"'s\\\", 'most', 'powerful', 'supercomputer', ',', 'beats', 'China', '.', 'The', 'US', 'has', 'unveiled', 'the', 'world', \\\"'s\\\", 'most', 'powerful', 'supercomputer', 'called', \\\"'Summit\\\", \\\"'\\\", ',', 'beating', 'the', 'previous', 'record-holder', 'China', \\\"'s\\\", 'Sunway', 'TaihuLight', '.', 'With', 'a', 'peak', 'performance', 'of', '200,000', 'trillion', 'calculations', 'per', 'second', ',', 'it', 'is', 'over', 'twice', 'as', 'fast', 'as', 'Sunway', 'TaihuLight', ',', 'which', 'is', 'capable', 'of', '93,000', 'trillion', 'calculations', 'per', 'second', '.', 'Summit', 'has', '4,608', 'servers', ',', 'which', 'reportedly', 'take', 'up', 'the', 'size', 'of', 'two', 'tennis', 'courts', '.']\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ZjhORAuPJFXL\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import spacy\\n\",\n        \"nlp = spacy.load('en')\\n\",\n        \"\\n\",\n        \"text_spacy = nlp(sample_text)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"DR6LA_YHJFXN\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 84\n        },\n        \"outputId\": \"630d9f19-8658-4b3b-bbd8-069fb3594601\"\n      },\n      \"source\": [\n        \"[obj.text for obj in text_spacy.sents]\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"[\\\"US unveils world's most powerful supercomputer, beats China.\\\",\\n\",\n              \" \\\"The US has unveiled the world's most powerful supercomputer called 'Summit', beating the previous record-holder China's Sunway TaihuLight.\\\",\\n\",\n              \" 'With a peak performance of 200,000 trillion calculations per second, it is over twice as fast as Sunway TaihuLight, which is capable of 93,000 trillion calculations per second.',\\n\",\n              \" 'Summit has 4,608 servers, which reportedly take up the size of two tennis courts.']\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 10\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"DBuAHdR8JFXQ\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 54\n        },\n        \"outputId\": \"f6acbbf6-e500-42c4-f06d-f1f8942ec548\"\n      },\n      \"source\": [\n        \"print([obj.text for obj in text_spacy])\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"['US', 'unveils', 'world', \\\"'s\\\", 'most', 'powerful', 'supercomputer', ',', 'beats', 'China', '.', 'The', 'US', 'has', 'unveiled', 'the', 'world', \\\"'s\\\", 'most', 'powerful', 'supercomputer', 'called', \\\"'\\\", 'Summit', \\\"'\\\", ',', 'beating', 'the', 'previous', 'record', '-', 'holder', 'China', \\\"'s\\\", 'Sunway', 'TaihuLight', '.', 'With', 'a', 'peak', 'performance', 'of', '200,000', 'trillion', 'calculations', 'per', 'second', ',', 'it', 'is', 'over', 'twice', 'as', 'fast', 'as', 'Sunway', 'TaihuLight', ',', 'which', 'is', 'capable', 'of', '93,000', 'trillion', 'calculations', 'per', 'second', '.', 'Summit', 'has', '4,608', 'servers', ',', 'which', 'reportedly', 'take', 'up', 'the', 'size', 'of', 'two', 'tennis', 'courts', '.']\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"fhxnJkIsJFXS\"\n      },\n      \"source\": [\n        \"# Removing HTML tags & noise\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"E3qV1WOpJFXT\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 470\n        },\n        \"outputId\": \"82fbdc9e-df22-410d-bd33-1096b34647e6\"\n      },\n      \"source\": [\n        \"import requests\\n\",\n        \"\\n\",\n        \"data = requests.get('http://www.gutenberg.org/cache/epub/8001/pg8001.html')\\n\",\n        \"content = data.text\\n\",\n        \"print(content[2745:3948])\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"<p id=\\\"id00011\\\" style=\\\"margin-top: 2em\\\">*** START OF THE PROJECT GUTENBERG EBOOK, THE BIBLE, KING JAMES, BOOK 1***</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00012\\\" style=\\\"margin-top: 4em\\\">This eBook was produced by David Widger\\r\\n\",\n            \"with the help of Derek Andrew's text from January 1992\\r\\n\",\n            \"and the work of Bryan Taylor in November 2002.</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<h1 id=\\\"id00013\\\" style=\\\"margin-top: 5em\\\">Book 01        Genesis</h1>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00014\\\">01:001:001 In the beginning God created the heaven and the earth.</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00015\\\" style=\\\"margin-left: 0%; margin-right: 0%\\\">01:001:002 And the earth was without form, and void; and darkness was\\r\\n\",\n            \"           upon the face of the deep. And the Spirit of God moved upon\\r\\n\",\n            \"           the face of the waters.</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00016\\\">01:001:003 And God said, Let there be light: and there was light.</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00017\\\">01:001:004 And God saw the light, that it was good: and God divided the<br/>\\r\\n\",\n            \"\\r\\n\",\n            \"           light from the darkness.<br/>\\r\\n\",\n            \"</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00018\\\">01:001:005 And God called the light Day, and the darkness he called<br/>\\r\\n\",\n            \"\\r\\n\",\n            \"           Night. And the evening and the morning were the first day.<br/>\\r\\n\",\n            \"</p>\\r\\n\",\n            \"\\r\\n\",\n            \"<p id=\\\"id00019\\\">01:001:006 And God said, Let there be a firmament in the mi\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"E6UAz3mjJFXY\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 269\n        },\n        \"outputId\": \"0549c5a6-1814-4e82-8046-d32b40647d1f\"\n      },\n      \"source\": [\n        \"import re\\n\",\n        \"from bs4 import BeautifulSoup\\n\",\n        \"\\n\",\n        \"def strip_html_tags(text):\\n\",\n        \"    soup = BeautifulSoup(text, \\\"html.parser\\\")\\n\",\n        \"    [s.extract() for s in soup(['iframe', 'script'])]\\n\",\n        \"    stripped_text = soup.get_text()\\n\",\n        \"    stripped_text = re.sub(r'[\\\\r|\\\\n|\\\\r\\\\n]+', '\\\\n', stripped_text)\\n\",\n        \"    return stripped_text\\n\",\n        \"\\n\",\n        \"clean_content = strip_html_tags(content)\\n\",\n        \"print(clean_content[1163:1957])\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"*** START OF THE PROJECT GUTENBERG EBOOK, THE BIBLE, KING JAMES, BOOK 1***\\n\",\n            \"This eBook was produced by David Widger\\n\",\n            \"with the help of Derek Andrew's text from January 1992\\n\",\n            \"and the work of Bryan Taylor in November 2002.\\n\",\n            \"Book 01        Genesis\\n\",\n            \"01:001:001 In the beginning God created the heaven and the earth.\\n\",\n            \"01:001:002 And the earth was without form, and void; and darkness was\\n\",\n            \"           upon the face of the deep. And the Spirit of God moved upon\\n\",\n            \"           the face of the waters.\\n\",\n            \"01:001:003 And God said, Let there be light: and there was light.\\n\",\n            \"01:001:004 And God saw the light, that it was good: and God divided the\\n\",\n            \"           light from the darkness.\\n\",\n            \"01:001:005 And God called the light Day, and the darkness he called\\n\",\n            \"           Night. And the evening and the morning were the first day.\\n\",\n            \"\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"9fJi5YyKJFXc\"\n      },\n      \"source\": [\n        \"# Removing Accented Characters\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Ps9wmhv9JFXd\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import unicodedata\\n\",\n        \"\\n\",\n        \"def remove_accented_chars(text):\\n\",\n        \"    text = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore').decode('utf-8', 'ignore')\\n\",\n        \"    return text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Mc7JR8CQJFXh\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"392b46f9-4945-47e0-b942-9d50de2fb3ff\"\n      },\n      \"source\": [\n        \"s = 'Sómě Áccěntěd těxt'\\n\",\n        \"s\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'Sómě Áccěntěd těxt'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 15\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"I6a-e-mVJFXm\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"9073d7d9-198f-4c5c-9de9-2539cda1adcd\"\n      },\n      \"source\": [\n        \"remove_accented_chars(s)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'Some Accented text'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 16\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"gj8CyGmPJFXr\"\n      },\n      \"source\": [\n        \"# Removing Special Characters, Numbers and Symbols\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"1dkc4ESDJFXs\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import re\\n\",\n        \"\\n\",\n        \"def remove_special_characters(text, remove_digits=False):\\n\",\n        \"    pattern = r'[^a-zA-Z0-9\\\\s]' if not remove_digits else r'[^a-zA-Z\\\\s]'\\n\",\n        \"    text = re.sub(pattern, '', text)\\n\",\n        \"    return text\\n\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"XUwKvQ-1JFXx\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"deb1477f-9de1-44fc-801b-f80d0930624f\"\n      },\n      \"source\": [\n        \"s = \\\"Well this was fun! See you at 7:30, What do you think!!? #$@@9318@ 🙂🙂🙂\\\"\\n\",\n        \"s\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'Well this was fun! See you at 7:30, What do you think!!? #$@@9318@ 🙂🙂🙂'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 18\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Sy9x4XFyJFYL\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"01596e65-1935-4095-b91a-1cd14da1ef48\"\n      },\n      \"source\": [\n        \"remove_special_characters(s, remove_digits=True)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'Well this was fun See you at  What do you think  '\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 19\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"s2vT0GK5JFYQ\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"e8763d3d-6f64-4308-f39d-8487a97ffcf2\"\n      },\n      \"source\": [\n        \"remove_special_characters(s)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'Well this was fun See you at 730 What do you think 9318 '\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 20\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"ho6h68QbJFYX\"\n      },\n      \"source\": [\n        \"# Expanding Contractions\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"mgGTT1URJFYY\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 353\n        },\n        \"outputId\": \"2aa9f59a-9d7a-4436-9f90-0ba12a1b6016\"\n      },\n      \"source\": [\n        \"!pip install contractions\\n\",\n        \"!pip install textsearch\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Collecting contractions\\n\",\n            \"  Downloading https://files.pythonhosted.org/packages/85/41/c3dfd5feb91a8d587ed1a59f553f07c05f95ad4e5d00ab78702fbf8fe48a/contractions-0.0.24-py2.py3-none-any.whl\\n\",\n            \"Collecting textsearch\\n\",\n            \"  Downloading https://files.pythonhosted.org/packages/42/a8/03407021f9555043de5492a2bd7a35c56cc03c2510092b5ec018cae1bbf1/textsearch-0.0.17-py2.py3-none-any.whl\\n\",\n            \"Collecting pyahocorasick\\n\",\n            \"\\u001b[?25l  Downloading https://files.pythonhosted.org/packages/f4/9f/f0d8e8850e12829eea2e778f1c90e3c53a9a799b7f412082a5d21cd19ae1/pyahocorasick-1.4.0.tar.gz (312kB)\\n\",\n            \"\\u001b[K     |████████████████████████████████| 317kB 3.8MB/s \\n\",\n            \"\\u001b[?25hCollecting Unidecode\\n\",\n            \"\\u001b[?25l  Downloading https://files.pythonhosted.org/packages/d0/42/d9edfed04228bacea2d824904cae367ee9efd05e6cce7ceaaedd0b0ad964/Unidecode-1.1.1-py2.py3-none-any.whl (238kB)\\n\",\n            \"\\u001b[K     |████████████████████████████████| 245kB 15.6MB/s \\n\",\n            \"\\u001b[?25hBuilding wheels for collected packages: pyahocorasick\\n\",\n            \"  Building wheel for pyahocorasick (setup.py) ... \\u001b[?25l\\u001b[?25hdone\\n\",\n            \"  Created wheel for pyahocorasick: filename=pyahocorasick-1.4.0-cp36-cp36m-linux_x86_64.whl size=81699 sha256=b766a035314d66115551991c1220d24c4a42480cc3e1f4b7ae56a50ba5e9f62a\\n\",\n            \"  Stored in directory: /root/.cache/pip/wheels/0a/90/61/87a55f5b459792fbb2b7ba6b31721b06ff5cf6bde541b40994\\n\",\n            \"Successfully built pyahocorasick\\n\",\n            \"Installing collected packages: pyahocorasick, Unidecode, textsearch, contractions\\n\",\n            \"Successfully installed Unidecode-1.1.1 contractions-0.0.24 pyahocorasick-1.4.0 textsearch-0.0.17\\n\",\n            \"Requirement already satisfied: textsearch in /usr/local/lib/python3.6/dist-packages (0.0.17)\\n\",\n            \"Requirement already satisfied: Unidecode in /usr/local/lib/python3.6/dist-packages (from textsearch) (1.1.1)\\n\",\n            \"Requirement already satisfied: pyahocorasick in /usr/local/lib/python3.6/dist-packages (from textsearch) (1.4.0)\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"5xWsgO-jJFYc\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"b02a9709-8e7e-4174-d46c-769d73aeadda\"\n      },\n      \"source\": [\n        \"s = \\\"Y'all can't expand contractions I'd think! You wouldn't be able to. How'd you do it?\\\"\\n\",\n        \"s\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"\\\"Y'all can't expand contractions I'd think! You wouldn't be able to. How'd you do it?\\\"\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 22\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"S2QTF2HFJFYi\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 185\n        },\n        \"outputId\": \"d01e87fb-cc90-4f97-e01c-f8a76d2e1c60\"\n      },\n      \"source\": [\n        \"import contractions\\n\",\n        \"\\n\",\n        \"list(contractions.contractions_dict.items())[:10]\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"[(\\\"ain't\\\", 'are not'),\\n\",\n              \" (\\\"aren't\\\", 'are not'),\\n\",\n              \" (\\\"can't\\\", 'can not'),\\n\",\n              \" (\\\"can't've\\\", 'can not have'),\\n\",\n              \" (\\\"'cause\\\", 'because'),\\n\",\n              \" (\\\"could've\\\", 'could have'),\\n\",\n              \" (\\\"couldn't\\\", 'could not'),\\n\",\n              \" (\\\"couldn't've\\\", 'could not have'),\\n\",\n              \" (\\\"didn't\\\", 'did not'),\\n\",\n              \" (\\\"doesn't\\\", 'does not')]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 23\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"KoIGJXqCJFYo\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"1cae6a7b-d520-46eb-ce81-ec50089f7ab3\"\n      },\n      \"source\": [\n        \"contractions.fix(s)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'you all can not expand contractions I would think! You would not be able to. how did you do it?'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 24\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"EeUHPmhDJFZC\"\n      },\n      \"source\": [\n        \"# Stemming\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"8ndJ4XOKJFZD\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"fb53058e-bbdf-489b-f57d-fbdb7e7395c7\"\n      },\n      \"source\": [\n        \"# Porter Stemmer\\n\",\n        \"from nltk.stem import PorterStemmer\\n\",\n        \"ps = PorterStemmer()\\n\",\n        \"\\n\",\n        \"ps.stem('jumping'), ps.stem('jumps'), ps.stem('jumped')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"('jump', 'jump', 'jump')\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 25\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"CmWLISH-JFZG\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"4e8dcb51-121a-4f3b-8522-a7db0cf81357\"\n      },\n      \"source\": [\n        \"ps.stem('lying')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'lie'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 26\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Q7KRj1jtJFZJ\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"a1944d27-3e35-4a4e-dc10-41f0b15384bc\"\n      },\n      \"source\": [\n        \"ps.stem('strange')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'strang'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 27\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"cQNUmpfLJFZu\"\n      },\n      \"source\": [\n        \"# Lemmatization\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"16ygP7t1JFZv\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"from nltk.stem import WordNetLemmatizer\\n\",\n        \"wnl = WordNetLemmatizer()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"AieUIjYaJFZ3\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 84\n        },\n        \"outputId\": \"09dc4df1-9ff9-48d4-f11a-cf63cbf6f3d9\"\n      },\n      \"source\": [\n        \"help(wnl.lemmatize)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Help on method lemmatize in module nltk.stem.wordnet:\\n\",\n            \"\\n\",\n            \"lemmatize(word, pos='n') method of nltk.stem.wordnet.WordNetLemmatizer instance\\n\",\n            \"\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"_ZPcwz44JFZ7\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 50\n        },\n        \"outputId\": \"c0b18e8d-d034-4241-fac2-53ff4ef56d1c\"\n      },\n      \"source\": [\n        \"# lemmatize nouns\\n\",\n        \"print(wnl.lemmatize('cars', 'n'))\\n\",\n        \"print(wnl.lemmatize('boxes', 'n'))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"car\\n\",\n            \"box\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"KJN-uQ28JFZ_\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 50\n        },\n        \"outputId\": \"49826ee7-990d-44ee-c0d2-09b58e10fdb4\"\n      },\n      \"source\": [\n        \"# lemmatize verbs\\n\",\n        \"print(wnl.lemmatize('running', 'v'))\\n\",\n        \"print(wnl.lemmatize('ate', 'v'))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"run\\n\",\n            \"eat\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"L0u5uZeoJFaF\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 50\n        },\n        \"outputId\": \"f7cc036f-5b61-4b0d-9ed2-7af8391851b9\"\n      },\n      \"source\": [\n        \"# lemmatize adjectives\\n\",\n        \"print(wnl.lemmatize('saddest', 'a'))\\n\",\n        \"print(wnl.lemmatize('fancier', 'a'))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"sad\\n\",\n            \"fancy\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"NhKXkdckJFaN\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 67\n        },\n        \"outputId\": \"cd37a4a9-c4b2-48a5-a486-869ad8b8fea1\"\n      },\n      \"source\": [\n        \"# ineffective lemmatization\\n\",\n        \"print(wnl.lemmatize('ate', 'n'))\\n\",\n        \"print(wnl.lemmatize('fancier', 'v'))\\n\",\n        \"print(wnl.lemmatize('fancier'))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"ate\\n\",\n            \"fancier\\n\",\n            \"fancier\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Z4g85bOGJFaQ\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"s = 'The brown foxes are quick and they are jumping over the sleeping lazy dogs!'\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"NQ1S2ngz7B84\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"### Tokenize\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"0l372SiEJFaU\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"cd2a469c-26ed-4d06-cce1-91b6e29650af\"\n      },\n      \"source\": [\n        \"tokens = nltk.word_tokenize(s)\\n\",\n        \"print(tokens)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"['The', 'brown', 'foxes', 'are', 'quick', 'and', 'they', 'are', 'jumping', 'over', 'the', 'sleeping', 'lazy', 'dogs', '!']\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"s1FHAghFJFaX\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"765ad93e-2a6a-4666-c649-3c529d8cdf95\"\n      },\n      \"source\": [\n        \"lemmatized_text = ' '.join(wnl.lemmatize(token) for token in tokens)\\n\",\n        \"lemmatized_text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The brown fox are quick and they are jumping over the sleeping lazy dog !'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 44\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"d0-fgmbi7E5_\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"### POS Tagging\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"UDffFU3gJFaZ\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 54\n        },\n        \"outputId\": \"fcfbd8a2-dc38-4578-c479-b4672b58cde3\"\n      },\n      \"source\": [\n        \"tagged_tokens = nltk.pos_tag(tokens)\\n\",\n        \"print(tagged_tokens)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"[('The', 'DT'), ('brown', 'JJ'), ('foxes', 'NNS'), ('are', 'VBP'), ('quick', 'JJ'), ('and', 'CC'), ('they', 'PRP'), ('are', 'VBP'), ('jumping', 'VBG'), ('over', 'IN'), ('the', 'DT'), ('sleeping', 'VBG'), ('lazy', 'JJ'), ('dogs', 'NNS'), ('!', '.')]\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"9STnRHVt7HRG\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"### Tag conversion to WordNet Tags\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"2S9kS_xPJFaf\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"from nltk.corpus import wordnet\\n\",\n        \"\\n\",\n        \"def pos_tag_wordnet(tagged_tokens):\\n\",\n        \"    tag_map = {'j': wordnet.ADJ, 'v': wordnet.VERB, 'n': wordnet.NOUN, 'r': wordnet.ADV}\\n\",\n        \"    new_tagged_tokens = [(word, tag_map.get(tag[0].lower(), wordnet.NOUN))\\n\",\n        \"                            for word, tag in tagged_tokens]\\n\",\n        \"    return new_tagged_tokens\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"TbijTK6YJFaj\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 54\n        },\n        \"outputId\": \"c97e38b3-8b0f-43ee-848b-bbbf9449ebfb\"\n      },\n      \"source\": [\n        \"wordnet_tokens = pos_tag_wordnet(tagged_tokens)\\n\",\n        \"print(wordnet_tokens)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"[('The', 'n'), ('brown', 'a'), ('foxes', 'n'), ('are', 'v'), ('quick', 'a'), ('and', 'n'), ('they', 'n'), ('are', 'v'), ('jumping', 'v'), ('over', 'n'), ('the', 'n'), ('sleeping', 'v'), ('lazy', 'a'), ('dogs', 'n'), ('!', 'n')]\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"qKia_-ov7KLH\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"### Effective Lemmatization\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"tNOpTLDTJFal\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"575e08b1-a48d-40a8-abde-363fd671fa93\"\n      },\n      \"source\": [\n        \"lemmatized_text = ' '.join(wnl.lemmatize(word, tag) for word, tag in wordnet_tokens)\\n\",\n        \"lemmatized_text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The brown fox be quick and they be jump over the sleep lazy dog !'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 50\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"9zisZIs1JFan\"\n      },\n      \"source\": [\n        \"### Your turn: Define a function such that you put all the above steps together so that it does the following\\n\",\n        \"\\n\",\n        \"- Function name is __`wordnet_lemmatize_text(...)`__\\n\",\n        \"- Input is a variable __`text`__ which should take in a document (bunch of words)\\n\",\n        \"- Call the earlier defined functions and utilize them\\n\",\n        \"- Return lemmatized text as the output (as a string)\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"I6LditBNJFao\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"wnl = WordNetLemmatizer()\\n\",\n        \"\\n\",\n        \"def wordnet_lemmatize_text(text):\\n\",\n        \"    tagged_tokens = nltk.pos_tag(nltk.word_tokenize(text))\\n\",\n        \"    wordnet_tokens = pos_tag_wordnet(tagged_tokens)\\n\",\n        \"    lemmatized_text = ' '.join(wnl.lemmatize(word, tag) for word, tag in wordnet_tokens)\\n\",\n        \"    return lemmatized_text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"UWQeSVxGJFap\"\n      },\n      \"source\": [\n        \"### Your Turn: Now call the function on the below sentence and test it\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"FUvJQk-eJFaq\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"41276cb8-3c6e-4382-9f25-2516899052e2\"\n      },\n      \"source\": [\n        \"s\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The brown foxes are quick and they are jumping over the sleeping lazy dogs!'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 52\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"7xE0WwbJJFas\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"638b66b3-02b5-41ff-ec4e-6a2deff153d9\"\n      },\n      \"source\": [\n        \"wordnet_lemmatize_text(s)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The brown fox be quick and they be jump over the sleep lazy dog !'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 53\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"KgQJp2SH7OC_\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Lemmatization with Spacy\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"3N2ExlFqJFaw\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import spacy\\n\",\n        \"nlp = spacy.load('en', parse=False, tag=False, entity=False)\\n\",\n        \"\\n\",\n        \"def spacy_lemmatize_text(text):\\n\",\n        \"    text = nlp(text)\\n\",\n        \"    text = ' '.join([word.lemma_ if word.lemma_ != '-PRON-' else word.text for word in text])\\n\",\n        \"    return text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ga-E47JKJFaz\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"76333567-ae35-46ee-fdf9-260b3926cc31\"\n      },\n      \"source\": [\n        \"s\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The brown foxes are quick and they are jumping over the sleeping lazy dogs!'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 55\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Bb-PrIeqJFa5\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"b5b00364-7d85-4240-cf55-21f8fef8fa5d\"\n      },\n      \"source\": [\n        \"spacy_lemmatize_text(s)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'the brown fox be quick and they be jump over the sleep lazy dog !'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 56\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"aQsKAXlvJFa7\"\n      },\n      \"source\": [\n        \"# Stopword Removal\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"VkJLKKxrJFa7\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"def remove_stopwords(text, is_lower_case=False, stopwords=None):\\n\",\n        \"    if not stopwords:\\n\",\n        \"        stopwords = nltk.corpus.stopwords.words('english')\\n\",\n        \"    tokens = nltk.word_tokenize(text)\\n\",\n        \"    tokens = [token.strip() for token in tokens]\\n\",\n        \"    \\n\",\n        \"    if is_lower_case:\\n\",\n        \"        filtered_tokens = [token for token in tokens if token not in stopwords]\\n\",\n        \"    else:\\n\",\n        \"        filtered_tokens = [token for token in tokens if token.lower() not in stopwords]\\n\",\n        \"    \\n\",\n        \"    filtered_text = ' '.join(filtered_tokens)    \\n\",\n        \"    return filtered_text\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"veJLEhzKJFa-\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"3272c105-0664-4349-8f42-637cadd56727\"\n      },\n      \"source\": [\n        \"stop_words = nltk.corpus.stopwords.words('english')\\n\",\n        \"print(stop_words[:10])\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"['i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves', 'you', \\\"you're\\\"]\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ycusSsPBJFbA\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"186389a0-7131-45eb-a876-6dde01d91fe9\"\n      },\n      \"source\": [\n        \"s\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The brown foxes are quick and they are jumping over the sleeping lazy dogs!'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 59\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"oWKjTPnzJFbD\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"16fe7d8e-8248-4415-9ec8-902bd718295c\"\n      },\n      \"source\": [\n        \"remove_stopwords(s, is_lower_case=False)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'brown foxes quick jumping sleeping lazy dogs !'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 60\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"4bcnWSnAJFbG\"\n      },\n      \"source\": [\n        \"### Your turn: Remove the words 'the' and 'brown' from the stop_words list and call the function with this new list\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"rPAM2rNZJFbH\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"stop_words.remove('the')\\n\",\n        \"stop_words.append('brown')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"qk2Y-nbZJFbJ\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"a433ccad-6e6a-4671-b4b7-9723f45153af\"\n      },\n      \"source\": [\n        \"remove_stopwords(s, is_lower_case=False, stopwords=stop_words)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'The foxes quick jumping the sleeping lazy dogs !'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 62\n        }\n      ]\n    }\n  ]\n}"
  },
  {
    "path": "notebooks/02_Text_Representation_Statistical_Models.ipynb",
    "content": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"02-Text Representation - Statistical Models.ipynb\",\n      \"provenance\": [],\n      \"collapsed_sections\": []\n    },\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.7.6\"\n    }\n  },\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"-dWlnZ1vRP6H\"\n      },\n      \"source\": [\n        \"# Text Representation with Feature Engineering\\n\",\n        \"\\n\",\n        \"### Exploring Traditional Statistical Models\\n\",\n        \"\\n\",\n        \"Feature Engineering is often known as the secret sauce to creating superior and better performing machine learning models. Just one excellent feature could be your ticket to winning a Kaggle challenge! The importance of feature engineering is even more important for unstructured, textual data because we need to convert free flowing text into some numeric representations which can then be understood by machine learning algorithms. \\n\",\n        \"\\n\",\n        \"Here we will explore the following feature engineering techniques:\\n\",\n        \"\\n\",\n        \"- Bag of Words Model (TF)\\n\",\n        \"- Bag of N-grams Model\\n\",\n        \"- TF-IDF Model\\n\",\n        \"- Similarity Features\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"NYC_RfbeRP6J\"\n      },\n      \"source\": [\n        \"# Prepare a Sample Corpus\\n\",\n        \"\\n\",\n        \"Let’s now take a sample corpus of documents on which we will run most of our analyses in this article. A corpus is typically a collection of text documents usually belonging to one or more subjects or domains.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"6xn8eDqARP6J\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 284\n        },\n        \"outputId\": \"8ee06c2b-ddf7-4e5a-a23c-9b8038d3d9b2\"\n      },\n      \"source\": [\n        \"import pandas as pd\\n\",\n        \"import numpy as np\\n\",\n        \"\\n\",\n        \"pd.options.display.max_colwidth = 200\\n\",\n        \"\\n\",\n        \"corpus = ['The sky is blue and beautiful.',\\n\",\n        \"          'Love this blue and beautiful sky!',\\n\",\n        \"          'The quick brown fox jumps over the lazy dog.',\\n\",\n        \"          \\\"A king's breakfast has sausages, ham, bacon, eggs, toast and beans\\\",\\n\",\n        \"          'I love green eggs, ham, sausages and bacon!',\\n\",\n        \"          'The brown fox is quick and the blue dog is lazy!',\\n\",\n        \"          'The sky is very blue and the sky is very beautiful today',\\n\",\n        \"          'The dog is lazy but the brown fox is quick!'    \\n\",\n        \"]\\n\",\n        \"labels = ['weather', 'weather', 'animals', 'food', 'food', 'animals', 'weather', 'animals']\\n\",\n        \"\\n\",\n        \"corpus = np.array(corpus)\\n\",\n        \"corpus_df = pd.DataFrame({'Document': corpus, \\n\",\n        \"                          'Category': labels})\\n\",\n        \"corpus_df = corpus_df[['Document', 'Category']]\\n\",\n        \"corpus_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Document</th>\\n\",\n              \"      <th>Category</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>The sky is blue and beautiful.</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>Love this blue and beautiful sky!</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>The quick brown fox jumps over the lazy dog.</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>A king's breakfast has sausages, ham, bacon, eggs, toast and beans</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>I love green eggs, ham, sausages and bacon!</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>The brown fox is quick and the blue dog is lazy!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>The sky is very blue and the sky is very beautiful today</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>The dog is lazy but the brown fox is quick!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                             Document Category\\n\",\n              \"0                                      The sky is blue and beautiful.  weather\\n\",\n              \"1                                   Love this blue and beautiful sky!  weather\\n\",\n              \"2                        The quick brown fox jumps over the lazy dog.  animals\\n\",\n              \"3  A king's breakfast has sausages, ham, bacon, eggs, toast and beans     food\\n\",\n              \"4                         I love green eggs, ham, sausages and bacon!     food\\n\",\n              \"5                    The brown fox is quick and the blue dog is lazy!  animals\\n\",\n              \"6            The sky is very blue and the sky is very beautiful today  weather\\n\",\n              \"7                         The dog is lazy but the brown fox is quick!  animals\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 1\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"QOMGTkvCRP6N\"\n      },\n      \"source\": [\n        \"You can see that we have taken a few sample text documents belonging to different categories for our toy corpus. Before we talk about feature engineering, as always, we need to do some data pre-processing or wrangling to remove unnecessary characters, symbols and tokens.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"nAcT9NHkRP6O\"\n      },\n      \"source\": [\n        \"# Simple Text Pre-processing\\n\",\n        \"\\n\",\n        \"Since the focus of this unit is on feature engineering, we will build a simple text pre-processor which focuses on removing special characters, extra whitespaces, digits, stopwords and lower casing the text corpus.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"vSIxl_PUSCvj\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 101\n        },\n        \"outputId\": \"6477f365-d714-461e-bac4-cf4bc17705f5\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"nltk.download('stopwords')\\n\",\n        \"nltk.download('punkt')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"[nltk_data] Downloading package stopwords to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping corpora/stopwords.zip.\\n\",\n            \"[nltk_data] Downloading package punkt to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping tokenizers/punkt.zip.\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"True\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 2\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"OElcyG9WRP6P\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 118\n        },\n        \"outputId\": \"fcfae9fa-349d-4e77-9f75-e5f241dfe5d9\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"import re\\n\",\n        \"\\n\",\n        \"stop_words = nltk.corpus.stopwords.words('english')\\n\",\n        \"\\n\",\n        \"def normalize_document(doc):\\n\",\n        \"    # lower case and remove special characters\\\\whitespaces\\n\",\n        \"    doc = re.sub(r'[^a-zA-Z\\\\s]', '', doc, re.I|re.A)\\n\",\n        \"    doc = doc.lower()\\n\",\n        \"    doc = doc.strip()\\n\",\n        \"    # tokenize document\\n\",\n        \"    tokens = nltk.word_tokenize(doc)\\n\",\n        \"    # filter stopwords out of document\\n\",\n        \"    filtered_tokens = [token for token in tokens if token not in stop_words]\\n\",\n        \"    # re-create document from filtered tokens\\n\",\n        \"    doc = ' '.join(filtered_tokens)\\n\",\n        \"    return doc\\n\",\n        \"\\n\",\n        \"normalize_corpus = np.vectorize(normalize_document)\\n\",\n        \"\\n\",\n        \"norm_corpus = normalize_corpus(corpus)\\n\",\n        \"norm_corpus\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"array(['sky blue beautiful', 'love blue beautiful sky',\\n\",\n              \"       'quick brown fox jumps lazy dog',\\n\",\n              \"       'kings breakfast sausages ham bacon eggs toast beans',\\n\",\n              \"       'love green eggs ham sausages bacon',\\n\",\n              \"       'brown fox quick blue dog lazy', 'sky blue sky beautiful today',\\n\",\n              \"       'dog lazy brown fox quick'], dtype='<U51')\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 3\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"MMBWGlKTRP6T\"\n      },\n      \"source\": [\n        \"# Bag of Words Model - TF\\n\",\n        \"\\n\",\n        \"This is perhaps the most simple vector space representational model for unstructured text. A vector space model is simply a mathematical model to represent unstructured text (or any other data) as numeric vectors, such that each dimension of the vector is a specific feature\\\\attribute. The bag of words model represents each text document as a numeric vector where each dimension is a specific word from the corpus and the value could be its frequency in the document, occurrence (denoted by 1 or 0) or even weighted values. The model’s name is such because each document is represented literally as a ‘bag’ of its own words, disregarding word orders, sequences and grammar.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"d7mAqxTlRP6U\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 151\n        },\n        \"outputId\": \"f771b092-0d12-48c5-9182-5beb92643376\"\n      },\n      \"source\": [\n        \"from sklearn.feature_extraction.text import CountVectorizer\\n\",\n        \"\\n\",\n        \"cv = CountVectorizer(min_df=0., max_df=1.)\\n\",\n        \"cv_matrix = cv.fit_transform(norm_corpus)\\n\",\n        \"cv_matrix = cv_matrix.toarray()\\n\",\n        \"cv_matrix\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"array([[0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],\\n\",\n              \"       [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0],\\n\",\n              \"       [0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0],\\n\",\n              \"       [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0],\\n\",\n              \"       [1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0],\\n\",\n              \"       [0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0],\\n\",\n              \"       [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1],\\n\",\n              \"       [0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0]])\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 4\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"lPp6Bzs7RP6W\"\n      },\n      \"source\": [\n        \"Thus you can see that our documents have been converted into numeric vectors such that each document is represented by one vector (row) in the above feature matrix. The following code will help represent this in a more easy to understand format.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"FVsdSiwARP6W\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 284\n        },\n        \"outputId\": \"03bf4798-1714-41d8-fc3c-6a93d003c393\"\n      },\n      \"source\": [\n        \"# get all unique words in the corpus\\n\",\n        \"vocab = cv.get_feature_names()\\n\",\n        \"# show document feature vectors\\n\",\n        \"pd.DataFrame(cv_matrix, columns=vocab)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <th>today</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   bacon  beans  beautiful  blue  breakfast  ...  quick  sausages  sky  toast  today\\n\",\n              \"0      0      0          1     1          0  ...      0         0    1      0      0\\n\",\n              \"1      0      0          1     1          0  ...      0         0    1      0      0\\n\",\n              \"2      0      0          0     0          0  ...      1         0    0      0      0\\n\",\n              \"3      1      1          0     0          1  ...      0         1    0      1      0\\n\",\n              \"4      1      0          0     0          0  ...      0         1    0      0      0\\n\",\n              \"5      0      0          0     1          0  ...      1         0    0      0      0\\n\",\n              \"6      0      0          1     1          0  ...      0         0    2      0      1\\n\",\n              \"7      0      0          0     0          0  ...      1         0    0      0      0\\n\",\n              \"\\n\",\n              \"[8 rows x 20 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 5\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"A_1k60ZERP6Z\"\n      },\n      \"source\": [\n        \"This should make things more clearer! You can clearly see that each column or dimension in the feature vectors represents a word from the corpus and each row represents one of our documents. The value in any cell, represents the number of times that word (represented by column) occurs in the specific document (represented by row). Hence if a corpus of documents consists of N unique words across all the documents, we would have an N-dimensional vector for each of the documents.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"0DfPJwSsRP6Z\"\n      },\n      \"source\": [\n        \"# Bag of N-Grams Model\\n\",\n        \"\\n\",\n        \"A word is just a single token, often known as a unigram or 1-gram. We already know that the Bag of Words model doesn’t consider order of words. But what if we also wanted to take into account phrases or collection of words which occur in a sequence? N-grams help us achieve that. An N-gram is basically a collection of word tokens from a text document such that these tokens are contiguous and occur in a sequence. Bi-grams indicate n-grams of order 2 (two words), Tri-grams indicate n-grams of order 3 (three words), and so on. The Bag of N-Grams model is hence just an extension of the Bag of Words model so we can also leverage N-gram based features. The following example depicts bi-gram based features in each document feature vector.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"4n1N32JyRP6a\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 321\n        },\n        \"outputId\": \"5c091718-a76c-448c-add9-311f32486230\"\n      },\n      \"source\": [\n        \"# you can set the n-gram range to 1,2 to get unigrams as well as bigrams\\n\",\n        \"bv = CountVectorizer(ngram_range=(2,2))\\n\",\n        \"bv_matrix = bv.fit_transform(norm_corpus)\\n\",\n        \"\\n\",\n        \"bv_matrix = bv_matrix.toarray()\\n\",\n        \"vocab = bv.get_feature_names()\\n\",\n        \"pd.DataFrame(bv_matrix, columns=vocab)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>bacon eggs</th>\\n\",\n              \"      <th>beautiful sky</th>\\n\",\n              \"      <th>beautiful today</th>\\n\",\n              \"      <th>blue beautiful</th>\\n\",\n              \"      <th>blue dog</th>\\n\",\n              \"      <th>blue sky</th>\\n\",\n              \"      <th>breakfast sausages</th>\\n\",\n              \"      <th>brown fox</th>\\n\",\n              \"      <th>dog lazy</th>\\n\",\n              \"      <th>eggs ham</th>\\n\",\n              \"      <th>eggs toast</th>\\n\",\n              \"      <th>fox jumps</th>\\n\",\n              \"      <th>fox quick</th>\\n\",\n              \"      <th>green eggs</th>\\n\",\n              \"      <th>ham bacon</th>\\n\",\n              \"      <th>ham sausages</th>\\n\",\n              \"      <th>jumps lazy</th>\\n\",\n              \"      <th>kings breakfast</th>\\n\",\n              \"      <th>lazy brown</th>\\n\",\n              \"      <th>lazy dog</th>\\n\",\n              \"      <th>love blue</th>\\n\",\n              \"      <th>love green</th>\\n\",\n              \"      <th>quick blue</th>\\n\",\n              \"      <th>quick brown</th>\\n\",\n              \"      <th>sausages bacon</th>\\n\",\n              \"      <th>sausages ham</th>\\n\",\n              \"      <th>sky beautiful</th>\\n\",\n              \"      <th>sky blue</th>\\n\",\n              \"      <th>toast beans</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   bacon eggs  beautiful sky  ...  sky blue  toast beans\\n\",\n              \"0           0              0  ...         1            0\\n\",\n              \"1           0              1  ...         0            0\\n\",\n              \"2           0              0  ...         0            0\\n\",\n              \"3           1              0  ...         0            1\\n\",\n              \"4           0              0  ...         0            0\\n\",\n              \"5           0              0  ...         0            0\\n\",\n              \"6           0              0  ...         1            0\\n\",\n              \"7           0              0  ...         0            0\\n\",\n              \"\\n\",\n              \"[8 rows x 29 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 6\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"bW6F4h8QRP6c\"\n      },\n      \"source\": [\n        \"This gives us feature vectors for our documents, where each feature consists of a bi-gram representing a sequence of two words and values represent how many times the bi-gram was present for our documents.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"pPwKOnnkRP6d\"\n      },\n      \"source\": [\n        \"# TF-IDF Model\\n\",\n        \"\\n\",\n        \"There are some potential problems which might arise with the Bag of Words model when it is used on large corpora. Since the feature vectors are based on absolute term frequencies, there might be some terms which occur frequently across all documents and these may tend to overshadow other terms in the feature set. The TF-IDF model tries to combat this issue by using a scaling or normalizing factor in its computation. ___TF-IDF___ stands for __Term Frequency-Inverse Document Frequency__, which uses a combination of two metrics in its computation, namely: ___term frequency (tf)___ and ___inverse document frequency (idf)___. This technique was developed for ranking results for queries in search engines and now it is an indispensable model in the world of information retrieval and NLP.\\n\",\n        \"\\n\",\n        \"Mathematically, we can define TF-IDF as ___tfidf = tf x idf___, which can be expanded further to be represented as follows.\\n\",\n        \"\\n\",\n        \"![](https://github.com/dipanjanS/nlp_workshop_odsc19/blob/master/Module04%20-%20Text%20Representation/tfidf_eq.png?raw=1)\\n\",\n        \"\\n\",\n        \"Here, ___tfidf(w, D)___ is the TF-IDF score for word __w__ in document __D__. \\n\",\n        \"- The term ___tf(w, D)___ represents the term frequency of the word __w__ in document __D__, which can be obtained from the Bag of Words model. \\n\",\n        \"- The term ___idf(w, D)___ is the inverse document frequency for the term __w__, which can be computed as the log transform of the total number of documents in the corpus __C__ divided by the document frequency of the word __w__, which is basically the frequency of documents in the corpus where the word __w__ occurs. \\n\",\n        \"\\n\",\n        \"There are multiple variants of this model but they all end up giving quite similar results. Let’s apply this on our corpus now!\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"sFp9zDbgRP6d\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 284\n        },\n        \"outputId\": \"009f142f-1b99-4bfd-9e78-2bbf9db03807\"\n      },\n      \"source\": [\n        \"from sklearn.feature_extraction.text import TfidfVectorizer\\n\",\n        \"\\n\",\n        \"tv = TfidfVectorizer(min_df=0., max_df=1., use_idf=True)\\n\",\n        \"tv_matrix = tv.fit_transform(norm_corpus)\\n\",\n        \"tv_matrix = tv_matrix.toarray()\\n\",\n        \"\\n\",\n        \"vocab = tv.get_feature_names()\\n\",\n        \"pd.DataFrame(np.round(tv_matrix, 2), columns=vocab)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <th>today</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.60</td>\\n\",\n              \"      <td>0.53</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.60</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.49</td>\\n\",\n              \"      <td>0.43</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.57</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.49</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.53</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>0.32</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.32</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.32</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.32</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.38</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>0.39</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.39</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.47</td>\\n\",\n              \"      <td>0.39</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.39</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.39</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.37</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.42</td>\\n\",\n              \"      <td>0.42</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.42</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.42</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.42</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.36</td>\\n\",\n              \"      <td>0.32</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.72</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.5</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.45</td>\\n\",\n              \"      <td>0.45</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.45</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.45</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.45</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.00</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   bacon  beans  beautiful  blue  ...  sausages   sky  toast  today\\n\",\n              \"0   0.00   0.00       0.60  0.53  ...      0.00  0.60   0.00    0.0\\n\",\n              \"1   0.00   0.00       0.49  0.43  ...      0.00  0.49   0.00    0.0\\n\",\n              \"2   0.00   0.00       0.00  0.00  ...      0.00  0.00   0.00    0.0\\n\",\n              \"3   0.32   0.38       0.00  0.00  ...      0.32  0.00   0.38    0.0\\n\",\n              \"4   0.39   0.00       0.00  0.00  ...      0.39  0.00   0.00    0.0\\n\",\n              \"5   0.00   0.00       0.00  0.37  ...      0.00  0.00   0.00    0.0\\n\",\n              \"6   0.00   0.00       0.36  0.32  ...      0.00  0.72   0.00    0.5\\n\",\n              \"7   0.00   0.00       0.00  0.00  ...      0.00  0.00   0.00    0.0\\n\",\n              \"\\n\",\n              \"[8 rows x 20 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 7\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"0jvKPWIwRP6g\"\n      },\n      \"source\": [\n        \"The TF-IDF based feature vectors for each of our text documents show scaled and normalized values as compared to the raw Bag of Words model values. \"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"7xzqFWAkRP6h\"\n      },\n      \"source\": [\n        \"# Document Similarity\\n\",\n        \"\\n\",\n        \"Document similarity is the process of using a distance or similarity based metric that can be used to identify how similar a text document is with any other document(s) based on features extracted from the documents like bag of words or tf-idf.\\n\",\n        \"\\n\",\n        \"Thus you can see that we can build on top of the tf-idf based features we engineered in the previous section and use them to generate new features which can be useful in domains like search engines, document clustering and information retrieval by leveraging these similarity based features.\\n\",\n        \"\\n\",\n        \"Pairwise document similarity in a corpus involves computing document similarity for each pair of documents in a corpus. Thus if you have C documents in a corpus, you would end up with a C x C matrix such that each row and column represents the similarity score for a pair of documents, which represent the indices at the row and column, respectively. There are several similarity and distance metrics that are used to compute document similarity. These include cosine distance/similarity, euclidean distance, manhattan distance, BM25 similarity, jaccard distance and so on. In our analysis, we will be using perhaps the most popular and widely used similarity metric,\\n\",\n        \"cosine similarity and compare pairwise document similarity based on their TF-IDF feature vectors.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"zyToCxp9RP6i\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 284\n        },\n        \"outputId\": \"f9fa6f92-dded-4155-86fe-e6ebc8a5e8a7\"\n      },\n      \"source\": [\n        \"from sklearn.metrics.pairwise import cosine_similarity\\n\",\n        \"\\n\",\n        \"similarity_matrix = cosine_similarity(tv_matrix)\\n\",\n        \"similarity_df = pd.DataFrame(similarity_matrix)\\n\",\n        \"similarity_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <th>7</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.820599</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.192353</td>\\n\",\n              \"      <td>0.817246</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0.820599</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.225489</td>\\n\",\n              \"      <td>0.157845</td>\\n\",\n              \"      <td>0.670631</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.791821</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.850516</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.506866</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.225489</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.506866</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>0.192353</td>\\n\",\n              \"      <td>0.157845</td>\\n\",\n              \"      <td>0.791821</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.115488</td>\\n\",\n              \"      <td>0.930989</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>0.817246</td>\\n\",\n              \"      <td>0.670631</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.115488</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.850516</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.930989</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"          0         1         2  ...         5         6         7\\n\",\n              \"0  1.000000  0.820599  0.000000  ...  0.192353  0.817246  0.000000\\n\",\n              \"1  0.820599  1.000000  0.000000  ...  0.157845  0.670631  0.000000\\n\",\n              \"2  0.000000  0.000000  1.000000  ...  0.791821  0.000000  0.850516\\n\",\n              \"3  0.000000  0.000000  0.000000  ...  0.000000  0.000000  0.000000\\n\",\n              \"4  0.000000  0.225489  0.000000  ...  0.000000  0.000000  0.000000\\n\",\n              \"5  0.192353  0.157845  0.791821  ...  1.000000  0.115488  0.930989\\n\",\n              \"6  0.817246  0.670631  0.000000  ...  0.115488  1.000000  0.000000\\n\",\n              \"7  0.000000  0.000000  0.850516  ...  0.930989  0.000000  1.000000\\n\",\n              \"\\n\",\n              \"[8 rows x 8 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 8\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"Uq737P7GRP6l\"\n      },\n      \"source\": [\n        \"Cosine similarity basically gives us a metric representing the cosine of the angle between the feature vector representations of two text documents. Lower the angle between the documents, the closer and more similar they are as depicted in the following figure.\\n\",\n        \"\\n\",\n        \"![](https://github.com/dipanjanS/nlp_workshop_odsc19/blob/master/Module04%20-%20Text%20Representation/cosine_depiction.png?raw=1)\\n\",\n        \"\\n\",\n        \"Looking closely at the similarity matrix clearly tells us that documents (0, 1 and 6), (2, 5 and 7) are very similar to one another and documents 3 and 4 are slightly similar to each other but the magnitude is not very strong, however still stronger than the other documents. This must indicate these similar documents have some similar features. This is a perfect example of grouping or clustering that can be solved by unsupervised learning especially when you are dealing with huge corpora of millions of text documents.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"vh3zF8lKRP6n\"\n      },\n      \"source\": [\n        \"# Bonus: Clustering using Document Similarity Features\\n\",\n        \"\\n\",\n        \"We will use a very popular partition based clustering method, K-means clustering to cluster or group these documents based on their similarity based feature representations. In K-means clustering, we have an input parameter k, which specifies the number of clusters it will output using the document features. This clustering method is a centroid based clustering method, where it tries to cluster these documents into clusters of equal variance. It tries to create these clusters by minimizing the within-cluster sum of squares measure, also known as inertia. \"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"l5ff9gMZRP6o\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 284\n        },\n        \"outputId\": \"865209d2-1755-4cda-82f3-669c7e4e224d\"\n      },\n      \"source\": [\n        \"from sklearn.cluster import KMeans\\n\",\n        \"\\n\",\n        \"km = KMeans(n_clusters=3, random_state=0)\\n\",\n        \"km.fit_transform(similarity_matrix)\\n\",\n        \"cluster_labels = km.labels_\\n\",\n        \"cluster_labels = pd.DataFrame(cluster_labels, columns=['ClusterLabel'])\\n\",\n        \"pd.concat([corpus_df, cluster_labels], axis=1)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Document</th>\\n\",\n              \"      <th>Category</th>\\n\",\n              \"      <th>ClusterLabel</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>The sky is blue and beautiful.</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>Love this blue and beautiful sky!</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>The quick brown fox jumps over the lazy dog.</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>A king's breakfast has sausages, ham, bacon, eggs, toast and beans</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>I love green eggs, ham, sausages and bacon!</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>The brown fox is quick and the blue dog is lazy!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>The sky is very blue and the sky is very beautiful today</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>The dog is lazy but the brown fox is quick!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                             Document  ... ClusterLabel\\n\",\n              \"0                                      The sky is blue and beautiful.  ...            2\\n\",\n              \"1                                   Love this blue and beautiful sky!  ...            2\\n\",\n              \"2                        The quick brown fox jumps over the lazy dog.  ...            1\\n\",\n              \"3  A king's breakfast has sausages, ham, bacon, eggs, toast and beans  ...            0\\n\",\n              \"4                         I love green eggs, ham, sausages and bacon!  ...            0\\n\",\n              \"5                    The brown fox is quick and the blue dog is lazy!  ...            1\\n\",\n              \"6            The sky is very blue and the sky is very beautiful today  ...            2\\n\",\n              \"7                         The dog is lazy but the brown fox is quick!  ...            1\\n\",\n              \"\\n\",\n              \"[8 rows x 3 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 9\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"S-NsBGloRP6q\"\n      },\n      \"source\": [\n        \"We can see from the above output that our documents were correctly assigned to the right clusters!\"\n      ]\n    }\n  ]\n}"
  },
  {
    "path": "notebooks/03_Text_Representation_Embedding_Models.ipynb",
    "content": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"colab\": {\n      \"name\": \"03 -Text Representation - Embedding Models.ipynb\",\n      \"provenance\": [],\n      \"collapsed_sections\": []\n    },\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.7.6\"\n    }\n  },\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"JS9QXHRoRiqc\"\n      },\n      \"source\": [\n        \"# Text Representation with Feature Engineering\\n\",\n        \"\\n\",\n        \"### Exploring Word Embeddings with New Deep Learning Models\\n\",\n        \"\\n\",\n        \"We have discussed in the previous sub-unit that Feature Engineering is the secret sauce to creating superior and better performing machine learning models. \\n\",\n        \"\\n\",\n        \"Traditional (count-based) feature engineering strategies for textual data involve models belonging to a family of models popularly known as the Bag of Words model. This includes term frequencies, TF-IDF (term frequency-inverse document frequency), N-grams and so on. While they are effective methods for extracting features from text, due to the inherent nature of the model being just a bag of unstructured words, we lose additional information like the semantics, structure, sequence and context around nearby words in each text document. \\n\",\n        \"\\n\",\n        \"This forms as enough motivation for us to explore more sophisticated models which can capture this information and give us features which are vector representation of words, popularly known as embeddings.\\n\",\n        \"\\n\",\n        \"Here we will explore the following feature engineering techniques:\\n\",\n        \"\\n\",\n        \"- Word2Vec\\n\",\n        \"- GloVe\\n\",\n        \"- FastText\\n\",\n        \"\\n\",\n        \"Predictive methods like Neural Network based language models try to predict words from its neighboring words looking at word sequences in the corpus and in the process it learns distributed representations giving us dense word embeddings. We will be focusing on these predictive methods in this article.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"wYUGSn3dRiqd\"\n      },\n      \"source\": [\n        \"# Prepare a Sample Corpus\\n\",\n        \"\\n\",\n        \"Let’s now take a sample corpus of documents on which we will run most of our analyses in this article. A corpus is typically a collection of text documents usually belonging to one or more subjects or domains.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"KH4ZwBgtRiqe\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 284\n        },\n        \"outputId\": \"c285dcff-5578-4fa8-9ecf-63dba9b4f7ca\"\n      },\n      \"source\": [\n        \"import pandas as pd\\n\",\n        \"import numpy as np\\n\",\n        \"\\n\",\n        \"pd.options.display.max_colwidth = 200\\n\",\n        \"\\n\",\n        \"corpus = ['The sky is blue and beautiful.',\\n\",\n        \"          'Love this blue and beautiful sky!',\\n\",\n        \"          'The quick brown fox jumps over the lazy dog.',\\n\",\n        \"          \\\"A king's breakfast has sausages, ham, bacon, eggs, toast and beans\\\",\\n\",\n        \"          'I love green eggs, ham, sausages and bacon!',\\n\",\n        \"          'The brown fox is quick and the blue dog is lazy!',\\n\",\n        \"          'The sky is very blue and the sky is very beautiful today',\\n\",\n        \"          'The dog is lazy but the brown fox is quick!'    \\n\",\n        \"]\\n\",\n        \"labels = ['weather', 'weather', 'animals', 'food', 'food', 'animals', 'weather', 'animals']\\n\",\n        \"\\n\",\n        \"corpus = np.array(corpus)\\n\",\n        \"corpus_df = pd.DataFrame({'Document': corpus, \\n\",\n        \"                          'Category': labels})\\n\",\n        \"corpus_df = corpus_df[['Document', 'Category']]\\n\",\n        \"corpus_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Document</th>\\n\",\n              \"      <th>Category</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>The sky is blue and beautiful.</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>Love this blue and beautiful sky!</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>The quick brown fox jumps over the lazy dog.</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>A king's breakfast has sausages, ham, bacon, eggs, toast and beans</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>I love green eggs, ham, sausages and bacon!</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>The brown fox is quick and the blue dog is lazy!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>The sky is very blue and the sky is very beautiful today</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>The dog is lazy but the brown fox is quick!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                             Document Category\\n\",\n              \"0                                      The sky is blue and beautiful.  weather\\n\",\n              \"1                                   Love this blue and beautiful sky!  weather\\n\",\n              \"2                        The quick brown fox jumps over the lazy dog.  animals\\n\",\n              \"3  A king's breakfast has sausages, ham, bacon, eggs, toast and beans     food\\n\",\n              \"4                         I love green eggs, ham, sausages and bacon!     food\\n\",\n              \"5                    The brown fox is quick and the blue dog is lazy!  animals\\n\",\n              \"6            The sky is very blue and the sky is very beautiful today  weather\\n\",\n              \"7                         The dog is lazy but the brown fox is quick!  animals\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 1\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"FLojJzK0Riqi\"\n      },\n      \"source\": [\n        \"Let's go ahead and pre-process our text data now\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"7KR8w3qbRiqi\"\n      },\n      \"source\": [\n        \"# Simple Text Pre-processing\\n\",\n        \"\\n\",\n        \"Since the focus of this unit is on feature engineering, we will build a simple text pre-processor which focuses on removing special characters, extra whitespaces, digits, stopwords and lower casing the text corpus.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"5YHHrL7VRiqj\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 185\n        },\n        \"outputId\": \"114e4855-473e-45da-a614-88cc52a190a3\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"import re\\n\",\n        \"\\n\",\n        \"nltk.download('stopwords')\\n\",\n        \"nltk.download('punkt')\\n\",\n        \"\\n\",\n        \"stop_words = nltk.corpus.stopwords.words('english')\\n\",\n        \"\\n\",\n        \"def normalize_document(doc):\\n\",\n        \"    # lower case and remove special characters\\\\whitespaces\\n\",\n        \"    doc = re.sub(r'[^a-zA-Z\\\\s]', '', doc, re.I|re.A)\\n\",\n        \"    doc = doc.lower()\\n\",\n        \"    doc = doc.strip()\\n\",\n        \"    # tokenize document\\n\",\n        \"    tokens = nltk.word_tokenize(doc)\\n\",\n        \"    # filter stopwords out of document\\n\",\n        \"    filtered_tokens = [token for token in tokens if token not in stop_words]\\n\",\n        \"    # re-create document from filtered tokens\\n\",\n        \"    doc = ' '.join(filtered_tokens)\\n\",\n        \"    return doc\\n\",\n        \"\\n\",\n        \"normalize_corpus = np.vectorize(normalize_document)\\n\",\n        \"\\n\",\n        \"norm_corpus = normalize_corpus(corpus)\\n\",\n        \"norm_corpus\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"[nltk_data] Downloading package stopwords to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping corpora/stopwords.zip.\\n\",\n            \"[nltk_data] Downloading package punkt to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping tokenizers/punkt.zip.\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"array(['sky blue beautiful', 'love blue beautiful sky',\\n\",\n              \"       'quick brown fox jumps lazy dog',\\n\",\n              \"       'kings breakfast sausages ham bacon eggs toast beans',\\n\",\n              \"       'love green eggs ham sausages bacon',\\n\",\n              \"       'brown fox quick blue dog lazy', 'sky blue sky beautiful today',\\n\",\n              \"       'dog lazy brown fox quick'], dtype='<U51')\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 2\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"2JCyCJ6GRiql\"\n      },\n      \"source\": [\n        \"# The Word2Vec Model\\n\",\n        \"\\n\",\n        \"This model was created by Google in 2013 and is a predictive deep learning based model to compute and generate high quality, distributed and continuous dense vector representations of words, which capture contextual and semantic similarity. Essentially these are unsupervised models which can take in massive textual corpora, create a vocabulary of possible words and generate dense word embeddings for each word in the vector space representing that vocabulary. \\n\",\n        \"\\n\",\n        \"Usually you can specify the size of the word embedding vectors and the total number of vectors are essentially the size of the vocabulary. This makes the dimensionality of this dense vector space much lower than the high-dimensional sparse vector space built using traditional Bag of Words models.\\n\",\n        \"\\n\",\n        \"There are two different model architectures which can be leveraged by Word2Vec to create these word embedding representations. These include,\\n\",\n        \"\\n\",\n        \"- The Continuous Bag of Words (CBOW) Model\\n\",\n        \"- The Skip-gram Model\\n\",\n        \"\\n\",\n        \"## The Continuous Bag of Words (CBOW) Model\\n\",\n        \"\\n\",\n        \"The CBOW model architecture tries to predict the current target word (the center word) based on the source context words (surrounding words). \\n\",\n        \"\\n\",\n        \"Considering a simple sentence, ___“the quick brown fox jumps over the lazy dog”___, this can be pairs of __(context_window, target_word)__ where if we consider a context window of size 2, we have examples like __([quick, fox], brown)__, __([the, brown], quick)__, __([the, dog], lazy)__ and so on. \\n\",\n        \"\\n\",\n        \"Thus the model tries to predict the __`target_word`__ based on the __`context_window`__ words.\\n\",\n        \"\\n\",\n        \"![](https://github.com/dipanjanS/nlp_workshop_odsc19/blob/master/Module04%20-%20Text%20Representation/cbow_arch.png?raw=1)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"## The Skip-gram Model\\n\",\n        \"\\n\",\n        \"The Skip-gram model architecture usually tries to achieve the reverse of what the CBOW model does. It tries to predict the source context words (surrounding words) given a target word (the center word). \\n\",\n        \"\\n\",\n        \"Considering our simple sentence from earlier, ___“the quick brown fox jumps over the lazy dog”___. If we used the CBOW model, we get pairs of __(context_window, target_word)__ where if we consider a context window of size 2, we have examples like __([quick, fox], brown)__, __([the, brown], quick)__, __([the, dog], lazy)__ and so on. \\n\",\n        \"\\n\",\n        \"Now considering that the skip-gram model’s aim is to predict the context from the target word, the model typically inverts the contexts and targets, and tries to predict each context word from its target word. Hence the task becomes to predict the context __[quick, fox]__ given target word __‘brown’__ or __[the, brown]__ given target word __‘quick’__ and so on. \\n\",\n        \"\\n\",\n        \"Thus the model tries to predict the context_window words based on the target_word.\\n\",\n        \"\\n\",\n        \"![](https://github.com/dipanjanS/nlp_workshop_odsc19/blob/master/Module04%20-%20Text%20Representation/skipgram_arch.png?raw=1)\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"BHD8pUx7Riqm\"\n      },\n      \"source\": [\n        \"# Robust Word2Vec Model with Gensim\\n\",\n        \"\\n\",\n        \"The __`gensim`__ framework, created by Radim Řehůřek consists of a robust, efficient and scalable implementation of the Word2Vec model. We will leverage the same on our sample toy corpus. In our workflow, we will tokenize our normalized corpus and then focus on the following four parameters in the Word2Vec model to build it.\\n\",\n        \"\\n\",\n        \"- __`size`:__ The word embedding dimensionality\\n\",\n        \"- __`window`:__ The context window size\\n\",\n        \"- __`min_count`:__ The minimum word count\\n\",\n        \"- __`sample`:__ The downsample setting for frequent words\\n\",\n        \"- __`sg`:__ Training model, 1 for skip-gram otherwise CBOW\\n\",\n        \"\\n\",\n        \"We will build a simple Word2Vec model on the corpus and visualize the embeddings.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"-tKqisDuRiqm\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"f7106f35-82d8-4e0d-8940-02d524b4879a\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"from gensim.models import word2vec\\n\",\n        \"\\n\",\n        \"tokenized_corpus = [nltk.word_tokenize(doc) for doc in norm_corpus]\\n\",\n        \"\\n\",\n        \"# Set values for various parameters\\n\",\n        \"feature_size = 15    # Word vector dimensionality  \\n\",\n        \"window_context = 20  # Context window size                                                                                    \\n\",\n        \"min_word_count = 1   # Minimum word count                        \\n\",\n        \"sample = 1e-3        # Downsample setting for frequent words\\n\",\n        \"sg = 1               # skip-gram model\\n\",\n        \"\\n\",\n        \"w2v_model = word2vec.Word2Vec(tokenized_corpus, size=feature_size, \\n\",\n        \"                              window=window_context, min_count = min_word_count,\\n\",\n        \"                              sg=sg, sample=sample, iter=5000)\\n\",\n        \"w2v_model\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"<gensim.models.word2vec.Word2Vec at 0x7fa2e347da58>\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 3\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"6NY4l-zaRiqo\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 378\n        },\n        \"outputId\": \"bd4ef9b9-421e-494a-9a0f-8e3985fba0a4\"\n      },\n      \"source\": [\n        \"import matplotlib.pyplot as plt\\n\",\n        \"\\n\",\n        \"%matplotlib inline\\n\",\n        \"\\n\",\n        \"# visualize embeddings\\n\",\n        \"from sklearn.manifold import TSNE\\n\",\n        \"\\n\",\n        \"words = w2v_model.wv.index2word\\n\",\n        \"wvs = w2v_model.wv[words]\\n\",\n        \"\\n\",\n        \"tsne = TSNE(n_components=2, random_state=42, n_iter=5000, perplexity=5)\\n\",\n        \"np.set_printoptions(suppress=True)\\n\",\n        \"T = tsne.fit_transform(wvs)\\n\",\n        \"labels = words\\n\",\n        \"\\n\",\n        \"plt.figure(figsize=(12, 6))\\n\",\n        \"plt.scatter(T[:, 0], T[:, 1], c='orange', edgecolors='r')\\n\",\n        \"for label, x, y in zip(labels, T[:, 0], T[:, 1]):\\n\",\n        \"    plt.annotate(label, xy=(x+1, y+1), xytext=(0, 0), textcoords='offset points')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"display_data\",\n          \"data\": {\n            \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAtEAAAFpCAYAAABauHSCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3Xucz3X+///byyGSU0U60aivHOeA\\nGdkcUiraRGIpbGHxK5FtN9tJrZS2Wvupj1JKIhubXUqlTZtiUaoZzDiEj7RDyRYbMg1leP3+eI/3\\nDhGvDDOT2/Vymcu8X8f34/V+d+lyn6fn6/EKwjBEkiRJ0uErVdQFSJIkSSWNIVqSJEmKyBAtSZIk\\nRWSIliRJkiIyREuSJEkRGaIlSZKkiAzRkiRJUkSGaEmSJCkiQ7QkSZIUkSFakiRJiqhMYZwkCIKq\\nwLNAIyAE+gKrgalAApANdAvDcEsQBAHwv8DPgVygdxiGi3/o/NWqVQsTEhIKo1RJkiTpoBYtWrQ5\\nDMPqh9qvUEI0sVA8KwzDrkEQnABUAO4C3g7D8KEgCO4A7gBuB64A6uT/XAA8lf/7oBISEsjIyCik\\nUiVJkqQDC4Jg3eHsd8TTOYIgqAK0BsYDhGH4XRiGW4FOwPP5uz0PXJ3/uhMwKYx5H6gaBMEZR1qH\\nJEmSdKwUxpzo2sAmYEIQBEuCIHg2C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p599ll27NhBixYt9hm9llSyGaIlHRk7Gfw0HaDzStu//5VpEybw5ZdfAvDVV1/RuHFj/vnP\\nf7Jlyxby8vKYPn16/BTNmzePL7/44ovx9evWraNGjRr079+ffv36xbulRK3p88vXUeH3t9KrVMDQ\\noUPj56lWrRo5OTlMmzYtfmhCQgKLFi0C2Gf9J598wrnnnsstt9xCp06dWLp06UG7vKSlpR30Wi+/\\n/HIef/zx+HJmZiYAa9euJTExkdtvv520tDRDtPQT4r8rSZK+r2DnFYCG0GDATh6YUJHLL7+cPXv2\\nULZsWcaMGcNdd91Fs2bNOOWUU6hXrx5VqlQBYjfX9erVi5EjR9K+ffv4+rlz5/LHP/6RsmXLUrFi\\nxcMfid6vpmUVYOjuHZTq24eyick89dRTzJgxg0aNGnH66aeTlpYWP/S2226jW7duPPPMM1x55ZXx\\n9X/961/585//TNmyZTn99NO56667OOmkkxg7diz169enbt268S4vZ5111kGvdfTo0dx8880kJSWR\\nl5dH69atGTt2LI899hhz5syhVKlSNGzYkCuuuOIIvhRJxYndOSRJ3xeh80pOTg4VK1YkLy+Pzp07\\n07dvXzp37kxubi4nnngiQRDw4osv8pe//CXeyvBo13S0HOxaJf10HG53DkeiJUnfV6cWrF7335Fo\\nOGjnleHDhzN79mx27tzJ5ZdfztVXXw3AokWLGDRoEGEYUrVqVZ577rljVtPRcrBrlXT8cSRakvR9\\ne+cf98mFusTC6oQKRXvjaHGsqRDl5eXZvUMqBhyJliT9eHtD6Yi7Yc362GjvqJFFG1aLY00R3H//\\n/bzwwgtUr16dmjVr0rRpU2bOnElKSgoLFizguuuu4/rrrz/gQ1u++eYbBg8ezPLly9m1axfDhw+n\\nU6dOTJw4kVdffZXc3FzWrl1L586deeSRR4r4SqXjgyFaknRgPXoWv4BaHGs6DHsfwpKVlcWuXbto\\n0qQJTZs2BeC7775j77+29ujRg1tvvZWWLVuyfv162rVrx8qVKxk5ciSXXHIJzz33HFu3bqVZs2Zc\\neumlQKwTyJIlSyhXrhx169Zl8OD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iIpBF5BRpJ5wI3UuxV3wzMydO6Z9KV1RxgU+kCmp2BiFgcEW0RMZbid8SmiLiLBs+ipa9E\\nn8bLwBBgQ96O2xoRD0bEHkmrgL0U2zwW5O0iJD0EfAwMAJZFxJ5qht58JN0KvASMAD6QtDMipjuP\\n6kXEcc91NSS9A0wBLpZ0AHgCeBpYJWk+8CNwR57+ITCD4uHbo8B9dR9wc5sM3A18lXtwAR7HeVRp\\nFLA8P0HoHGBVRKyXtN+RvKMAAABwSURBVBdYKekpYAfFHz/k17cldVA8sDu3ikG3mMdo4Cz8HwvN\\nzMzMzGrk7RxmZmZmZjXyItrMzMzMrEZeRJuZmZmZ1ciLaDMzMzOzGnkRbWZmZmZWIy+izczMzMxq\\n5EW0mZmZmVmNvIg2MzMzM6vRvwEyPu4Vjj3QAAAAAElFTkSuQmCC\\n\",\n            \"text/plain\": [\n              \"<Figure size 864x432 with 1 Axes>\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          }\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"V7h2GmytRiqq\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 85\n        },\n        \"outputId\": \"1a4fac8b-d815-4444-da85-cfbde23d1482\"\n      },\n      \"source\": [\n        \"w2v_model.wv['sky'], w2v_model.wv['sky'].shape\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"(array([-0.8185685 ,  0.3990876 ,  0.02527559, -0.46214026,  0.20842107,\\n\",\n              \"         0.75595075, -0.6801817 , -0.65128547,  0.23382275,  0.45040986,\\n\",\n              \"         0.97311556,  1.0209339 ,  1.1465698 ,  0.6203446 ,  1.0008206 ],\\n\",\n              \"       dtype=float32), (15,))\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 5\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"3INpkJK4Riqs\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 669\n        },\n        \"outputId\": \"bebb8557-724d-40c7-bf92-bbeb5e0bf737\"\n      },\n      \"source\": [\n        \"vec_df = pd.DataFrame(wvs, index=words)\\n\",\n        \"vec_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <th>8</th>\\n\",\n              \"      <th>9</th>\\n\",\n              \"      <th>10</th>\\n\",\n              \"      <th>11</th>\\n\",\n              \"      <th>12</th>\\n\",\n              \"      <th>13</th>\\n\",\n              \"      <th>14</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <td>-0.818569</td>\\n\",\n              \"      <td>0.399088</td>\\n\",\n              \"      <td>0.025276</td>\\n\",\n              \"      <td>-0.462140</td>\\n\",\n              \"      <td>0.208421</td>\\n\",\n              \"      <td>0.755951</td>\\n\",\n              \"      <td>-0.680182</td>\\n\",\n              \"      <td>-0.651285</td>\\n\",\n              \"      <td>0.233823</td>\\n\",\n              \"      <td>0.450410</td>\\n\",\n              \"      <td>0.973116</td>\\n\",\n              \"      <td>1.020934</td>\\n\",\n              \"      <td>1.146570</td>\\n\",\n              \"      <td>0.620345</td>\\n\",\n              \"      <td>1.000821</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <td>-0.347705</td>\\n\",\n              \"      <td>0.484645</td>\\n\",\n              \"      <td>-0.123974</td>\\n\",\n              \"      <td>0.018303</td>\\n\",\n              \"      <td>0.018064</td>\\n\",\n              \"      <td>0.105478</td>\\n\",\n              \"      <td>-0.628725</td>\\n\",\n              \"      <td>-0.625935</td>\\n\",\n              \"      <td>0.337193</td>\\n\",\n              \"      <td>0.179394</td>\\n\",\n              \"      <td>0.567942</td>\\n\",\n              \"      <td>0.625656</td>\\n\",\n              \"      <td>0.772077</td>\\n\",\n              \"      <td>0.308862</td>\\n\",\n              \"      <td>0.901417</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <td>-0.631715</td>\\n\",\n              \"      <td>0.489223</td>\\n\",\n              \"      <td>-0.039816</td>\\n\",\n              \"      <td>-0.560539</td>\\n\",\n              \"      <td>0.027471</td>\\n\",\n              \"      <td>0.600807</td>\\n\",\n              \"      <td>-0.557207</td>\\n\",\n              \"      <td>-0.453279</td>\\n\",\n              \"      <td>0.333005</td>\\n\",\n              \"      <td>0.194662</td>\\n\",\n              \"      <td>0.700585</td>\\n\",\n              \"      <td>1.144448</td>\\n\",\n              \"      <td>1.131276</td>\\n\",\n              \"      <td>0.647305</td>\\n\",\n              \"      <td>0.927159</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <td>-0.377969</td>\\n\",\n              \"      <td>0.875323</td>\\n\",\n              \"      <td>0.505043</td>\\n\",\n              \"      <td>0.503531</td>\\n\",\n              \"      <td>-0.134367</td>\\n\",\n              \"      <td>-0.698876</td>\\n\",\n              \"      <td>-0.583188</td>\\n\",\n              \"      <td>0.053357</td>\\n\",\n              \"      <td>0.380772</td>\\n\",\n              \"      <td>0.780073</td>\\n\",\n              \"      <td>0.057065</td>\\n\",\n              \"      <td>-0.184094</td>\\n\",\n              \"      <td>0.876488</td>\\n\",\n              \"      <td>-0.264486</td>\\n\",\n              \"      <td>1.617072</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <td>-0.426562</td>\\n\",\n              \"      <td>0.552525</td>\\n\",\n              \"      <td>0.424001</td>\\n\",\n              \"      <td>0.568211</td>\\n\",\n              \"      <td>-0.203049</td>\\n\",\n              \"      <td>-0.795935</td>\\n\",\n              \"      <td>-0.452301</td>\\n\",\n              \"      <td>-0.161856</td>\\n\",\n              \"      <td>0.344370</td>\\n\",\n              \"      <td>0.999754</td>\\n\",\n              \"      <td>0.189382</td>\\n\",\n              \"      <td>-0.306823</td>\\n\",\n              \"      <td>0.981535</td>\\n\",\n              \"      <td>-0.455129</td>\\n\",\n              \"      <td>1.527002</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <td>-0.544743</td>\\n\",\n              \"      <td>0.937319</td>\\n\",\n              \"      <td>0.375954</td>\\n\",\n              \"      <td>0.619939</td>\\n\",\n              \"      <td>-0.003503</td>\\n\",\n              \"      <td>-0.792852</td>\\n\",\n              \"      <td>-0.575107</td>\\n\",\n              \"      <td>0.010681</td>\\n\",\n              \"      <td>0.432367</td>\\n\",\n              \"      <td>0.760273</td>\\n\",\n              \"      <td>0.179154</td>\\n\",\n              \"      <td>-0.037524</td>\\n\",\n              \"      <td>0.739188</td>\\n\",\n              \"      <td>-0.455503</td>\\n\",\n              \"      <td>1.631031</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <td>-0.323250</td>\\n\",\n              \"      <td>0.807996</td>\\n\",\n              \"      <td>0.387009</td>\\n\",\n              \"      <td>0.391866</td>\\n\",\n              \"      <td>0.059279</td>\\n\",\n              \"      <td>-0.911020</td>\\n\",\n              \"      <td>-0.712572</td>\\n\",\n              \"      <td>-0.355619</td>\\n\",\n              \"      <td>0.513344</td>\\n\",\n              \"      <td>1.131328</td>\\n\",\n              \"      <td>0.164242</td>\\n\",\n              \"      <td>-0.431585</td>\\n\",\n              \"      <td>0.981779</td>\\n\",\n              \"      <td>-0.382720</td>\\n\",\n              \"      <td>1.228837</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <td>-0.497215</td>\\n\",\n              \"      <td>0.946547</td>\\n\",\n              \"      <td>0.381737</td>\\n\",\n              \"      <td>0.588996</td>\\n\",\n              \"      <td>-0.123029</td>\\n\",\n              \"      <td>-0.604750</td>\\n\",\n              \"      <td>-0.472004</td>\\n\",\n              \"      <td>-0.014517</td>\\n\",\n              \"      <td>0.493909</td>\\n\",\n              \"      <td>0.639742</td>\\n\",\n              \"      <td>0.004018</td>\\n\",\n              \"      <td>-0.108050</td>\\n\",\n              \"      <td>0.898489</td>\\n\",\n              \"      <td>-0.554202</td>\\n\",\n              \"      <td>1.574298</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <td>-0.631920</td>\\n\",\n              \"      <td>-0.159586</td>\\n\",\n              \"      <td>0.422561</td>\\n\",\n              \"      <td>-0.758301</td>\\n\",\n              \"      <td>-0.140733</td>\\n\",\n              \"      <td>0.286956</td>\\n\",\n              \"      <td>-0.247963</td>\\n\",\n              \"      <td>-0.187684</td>\\n\",\n              \"      <td>0.390543</td>\\n\",\n              \"      <td>0.290638</td>\\n\",\n              \"      <td>0.500850</td>\\n\",\n              \"      <td>0.830710</td>\\n\",\n              \"      <td>0.013555</td>\\n\",\n              \"      <td>0.353955</td>\\n\",\n              \"      <td>0.172023</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <td>-0.576832</td>\\n\",\n              \"      <td>-0.458122</td>\\n\",\n              \"      <td>1.026463</td>\\n\",\n              \"      <td>-1.154116</td>\\n\",\n              \"      <td>-0.650626</td>\\n\",\n              \"      <td>-0.082031</td>\\n\",\n              \"      <td>-0.189536</td>\\n\",\n              \"      <td>0.369872</td>\\n\",\n              \"      <td>0.995566</td>\\n\",\n              \"      <td>0.419234</td>\\n\",\n              \"      <td>0.693259</td>\\n\",\n              \"      <td>0.424213</td>\\n\",\n              \"      <td>-0.044790</td>\\n\",\n              \"      <td>0.079687</td>\\n\",\n              \"      <td>0.145574</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <td>-0.877566</td>\\n\",\n              \"      <td>-0.482393</td>\\n\",\n              \"      <td>0.929203</td>\\n\",\n              \"      <td>-1.328698</td>\\n\",\n              \"      <td>-0.354967</td>\\n\",\n              \"      <td>-0.043935</td>\\n\",\n              \"      <td>-0.003959</td>\\n\",\n              \"      <td>0.160286</td>\\n\",\n              \"      <td>1.060482</td>\\n\",\n              \"      <td>-0.005815</td>\\n\",\n              \"      <td>0.600583</td>\\n\",\n              \"      <td>0.441404</td>\\n\",\n              \"      <td>0.137963</td>\\n\",\n              \"      <td>-0.205029</td>\\n\",\n              \"      <td>0.152584</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <td>-0.976038</td>\\n\",\n              \"      <td>-0.463793</td>\\n\",\n              \"      <td>0.790353</td>\\n\",\n              \"      <td>-0.859319</td>\\n\",\n              \"      <td>-0.761272</td>\\n\",\n              \"      <td>-0.040525</td>\\n\",\n              \"      <td>-0.344847</td>\\n\",\n              \"      <td>0.335068</td>\\n\",\n              \"      <td>1.191478</td>\\n\",\n              \"      <td>0.181390</td>\\n\",\n              \"      <td>0.441230</td>\\n\",\n              \"      <td>0.578118</td>\\n\",\n              \"      <td>-0.040014</td>\\n\",\n              \"      <td>-0.233115</td>\\n\",\n              \"      <td>0.004666</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <td>-0.840217</td>\\n\",\n              \"      <td>-0.629078</td>\\n\",\n              \"      <td>1.017721</td>\\n\",\n              \"      <td>-1.310373</td>\\n\",\n              \"      <td>-0.434270</td>\\n\",\n              \"      <td>-0.297177</td>\\n\",\n              \"      <td>-0.330215</td>\\n\",\n              \"      <td>0.229346</td>\\n\",\n              \"      <td>0.703244</td>\\n\",\n              \"      <td>0.318045</td>\\n\",\n              \"      <td>0.607417</td>\\n\",\n              \"      <td>0.403582</td>\\n\",\n              \"      <td>-0.140879</td>\\n\",\n              \"      <td>-0.105237</td>\\n\",\n              \"      <td>0.229215</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <td>-0.341378</td>\\n\",\n              \"      <td>0.670975</td>\\n\",\n              \"      <td>0.437849</td>\\n\",\n              \"      <td>0.494568</td>\\n\",\n              \"      <td>-0.176995</td>\\n\",\n              \"      <td>-0.914049</td>\\n\",\n              \"      <td>-0.521373</td>\\n\",\n              \"      <td>-0.026236</td>\\n\",\n              \"      <td>0.475310</td>\\n\",\n              \"      <td>0.806331</td>\\n\",\n              \"      <td>-0.020645</td>\\n\",\n              \"      <td>-0.340928</td>\\n\",\n              \"      <td>0.754797</td>\\n\",\n              \"      <td>-0.486747</td>\\n\",\n              \"      <td>1.407213</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <td>-0.893495</td>\\n\",\n              \"      <td>-0.469336</td>\\n\",\n              \"      <td>1.210493</td>\\n\",\n              \"      <td>-1.258101</td>\\n\",\n              \"      <td>-0.816817</td>\\n\",\n              \"      <td>-0.789102</td>\\n\",\n              \"      <td>-0.231874</td>\\n\",\n              \"      <td>0.428963</td>\\n\",\n              \"      <td>1.099132</td>\\n\",\n              \"      <td>0.218836</td>\\n\",\n              \"      <td>0.067266</td>\\n\",\n              \"      <td>0.314867</td>\\n\",\n              \"      <td>0.015383</td>\\n\",\n              \"      <td>-0.180145</td>\\n\",\n              \"      <td>0.182565</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <td>-0.772558</td>\\n\",\n              \"      <td>-0.558312</td>\\n\",\n              \"      <td>1.258790</td>\\n\",\n              \"      <td>-0.937237</td>\\n\",\n              \"      <td>-0.905406</td>\\n\",\n              \"      <td>-0.658782</td>\\n\",\n              \"      <td>-0.175029</td>\\n\",\n              \"      <td>0.624610</td>\\n\",\n              \"      <td>1.118971</td>\\n\",\n              \"      <td>0.501862</td>\\n\",\n              \"      <td>0.534945</td>\\n\",\n              \"      <td>0.137323</td>\\n\",\n              \"      <td>-0.297624</td>\\n\",\n              \"      <td>-0.415096</td>\\n\",\n              \"      <td>0.298166</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <td>-0.753567</td>\\n\",\n              \"      <td>-0.569372</td>\\n\",\n              \"      <td>1.248701</td>\\n\",\n              \"      <td>-1.184956</td>\\n\",\n              \"      <td>-0.870067</td>\\n\",\n              \"      <td>-0.782575</td>\\n\",\n              \"      <td>-0.137969</td>\\n\",\n              \"      <td>0.573266</td>\\n\",\n              \"      <td>1.246748</td>\\n\",\n              \"      <td>0.434166</td>\\n\",\n              \"      <td>0.161741</td>\\n\",\n              \"      <td>0.153767</td>\\n\",\n              \"      <td>-0.128329</td>\\n\",\n              \"      <td>-0.177872</td>\\n\",\n              \"      <td>0.331763</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <td>-0.924956</td>\\n\",\n              \"      <td>-0.503358</td>\\n\",\n              \"      <td>1.221505</td>\\n\",\n              \"      <td>-1.280991</td>\\n\",\n              \"      <td>-0.901741</td>\\n\",\n              \"      <td>-0.725451</td>\\n\",\n              \"      <td>-0.042456</td>\\n\",\n              \"      <td>0.466820</td>\\n\",\n              \"      <td>1.198279</td>\\n\",\n              \"      <td>0.321750</td>\\n\",\n              \"      <td>0.184301</td>\\n\",\n              \"      <td>0.354623</td>\\n\",\n              \"      <td>-0.019580</td>\\n\",\n              \"      <td>-0.172424</td>\\n\",\n              \"      <td>0.229652</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <td>-0.496436</td>\\n\",\n              \"      <td>-0.483039</td>\\n\",\n              \"      <td>0.496584</td>\\n\",\n              \"      <td>-1.251115</td>\\n\",\n              \"      <td>-0.488516</td>\\n\",\n              \"      <td>-0.087176</td>\\n\",\n              \"      <td>-0.477904</td>\\n\",\n              \"      <td>0.081075</td>\\n\",\n              \"      <td>0.932781</td>\\n\",\n              \"      <td>-0.092416</td>\\n\",\n              \"      <td>0.358710</td>\\n\",\n              \"      <td>0.611974</td>\\n\",\n              \"      <td>0.158456</td>\\n\",\n              \"      <td>0.380635</td>\\n\",\n              \"      <td>0.238793</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>today</th>\\n\",\n              \"      <td>-0.682214</td>\\n\",\n              \"      <td>0.454401</td>\\n\",\n              \"      <td>0.012207</td>\\n\",\n              \"      <td>-0.301444</td>\\n\",\n              \"      <td>-0.004128</td>\\n\",\n              \"      <td>0.539051</td>\\n\",\n              \"      <td>-0.560557</td>\\n\",\n              \"      <td>-0.669468</td>\\n\",\n              \"      <td>0.236689</td>\\n\",\n              \"      <td>0.297953</td>\\n\",\n              \"      <td>0.785535</td>\\n\",\n              \"      <td>1.206358</td>\\n\",\n              \"      <td>0.864446</td>\\n\",\n              \"      <td>0.635667</td>\\n\",\n              \"      <td>0.865603</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                 0         1         2   ...        12        13        14\\n\",\n              \"sky       -0.818569  0.399088  0.025276  ...  1.146570  0.620345  1.000821\\n\",\n              \"blue      -0.347705  0.484645 -0.123974  ...  0.772077  0.308862  0.901417\\n\",\n              \"beautiful -0.631715  0.489223 -0.039816  ...  1.131276  0.647305  0.927159\\n\",\n              \"quick     -0.377969  0.875323  0.505043  ...  0.876488 -0.264486  1.617072\\n\",\n              \"brown     -0.426562  0.552525  0.424001  ...  0.981535 -0.455129  1.527002\\n\",\n              \"fox       -0.544743  0.937319  0.375954  ...  0.739188 -0.455503  1.631031\\n\",\n              \"lazy      -0.323250  0.807996  0.387009  ...  0.981779 -0.382720  1.228837\\n\",\n              \"dog       -0.497215  0.946547  0.381737  ...  0.898489 -0.554202  1.574298\\n\",\n              \"love      -0.631920 -0.159586  0.422561  ...  0.013555  0.353955  0.172023\\n\",\n              \"sausages  -0.576832 -0.458122  1.026463  ... -0.044790  0.079687  0.145574\\n\",\n              \"ham       -0.877566 -0.482393  0.929203  ...  0.137963 -0.205029  0.152584\\n\",\n              \"bacon     -0.976038 -0.463793  0.790353  ... -0.040014 -0.233115  0.004666\\n\",\n              \"eggs      -0.840217 -0.629078  1.017721  ... -0.140879 -0.105237  0.229215\\n\",\n              \"jumps     -0.341378  0.670975  0.437849  ...  0.754797 -0.486747  1.407213\\n\",\n              \"kings     -0.893495 -0.469336  1.210493  ...  0.015383 -0.180145  0.182565\\n\",\n              \"breakfast -0.772558 -0.558312  1.258790  ... -0.297624 -0.415096  0.298166\\n\",\n              \"toast     -0.753567 -0.569372  1.248701  ... -0.128329 -0.177872  0.331763\\n\",\n              \"beans     -0.924956 -0.503358  1.221505  ... -0.019580 -0.172424  0.229652\\n\",\n              \"green     -0.496436 -0.483039  0.496584  ...  0.158456  0.380635  0.238793\\n\",\n              \"today     -0.682214  0.454401  0.012207  ...  0.864446  0.635667  0.865603\\n\",\n              \"\\n\",\n              \"[20 rows x 15 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 6\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"gTCiDguVRiqu\"\n      },\n      \"source\": [\n        \"### Looking at term semantic similarity\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"S63FJhi2Riqv\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 689\n        },\n        \"outputId\": \"ca368c74-ffbc-4b7a-9d48-25c2b3aa9358\"\n      },\n      \"source\": [\n        \"import numpy as np\\n\",\n        \"from sklearn.metrics.pairwise import cosine_similarity\\n\",\n        \"\\n\",\n        \"similarity_matrix = cosine_similarity(vec_df.values)\\n\",\n        \"similarity_df = pd.DataFrame(similarity_matrix, index=words, columns=words)\\n\",\n        \"similarity_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <th>today</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.916322</td>\\n\",\n              \"      <td>0.978884</td>\\n\",\n              \"      <td>0.431173</td>\\n\",\n              \"      <td>0.405290</td>\\n\",\n              \"      <td>0.432529</td>\\n\",\n              \"      <td>0.406296</td>\\n\",\n              \"      <td>0.419792</td>\\n\",\n              \"      <td>0.723005</td>\\n\",\n              \"      <td>0.348153</td>\\n\",\n              \"      <td>0.375051</td>\\n\",\n              \"      <td>0.323178</td>\\n\",\n              \"      <td>0.333458</td>\\n\",\n              \"      <td>0.307980</td>\\n\",\n              \"      <td>0.151495</td>\\n\",\n              \"      <td>0.101826</td>\\n\",\n              \"      <td>0.105531</td>\\n\",\n              \"      <td>0.163778</td>\\n\",\n              \"      <td>0.473998</td>\\n\",\n              \"      <td>0.980911</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <td>0.916322</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.912599</td>\\n\",\n              \"      <td>0.624923</td>\\n\",\n              \"      <td>0.593610</td>\\n\",\n              \"      <td>0.637191</td>\\n\",\n              \"      <td>0.604366</td>\\n\",\n              \"      <td>0.624508</td>\\n\",\n              \"      <td>0.529950</td>\\n\",\n              \"      <td>0.203664</td>\\n\",\n              \"      <td>0.220718</td>\\n\",\n              \"      <td>0.215074</td>\\n\",\n              \"      <td>0.185698</td>\\n\",\n              \"      <td>0.529882</td>\\n\",\n              \"      <td>0.091409</td>\\n\",\n              \"      <td>0.044772</td>\\n\",\n              \"      <td>0.052484</td>\\n\",\n              \"      <td>0.091067</td>\\n\",\n              \"      <td>0.362248</td>\\n\",\n              \"      <td>0.929598</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <td>0.978884</td>\\n\",\n              \"      <td>0.912599</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.415492</td>\\n\",\n              \"      <td>0.364876</td>\\n\",\n              \"      <td>0.410171</td>\\n\",\n              \"      <td>0.361448</td>\\n\",\n              \"      <td>0.408251</td>\\n\",\n              \"      <td>0.726956</td>\\n\",\n              \"      <td>0.365698</td>\\n\",\n              \"      <td>0.398261</td>\\n\",\n              \"      <td>0.350296</td>\\n\",\n              \"      <td>0.334364</td>\\n\",\n              \"      <td>0.285894</td>\\n\",\n              \"      <td>0.197300</td>\\n\",\n              \"      <td>0.112035</td>\\n\",\n              \"      <td>0.140627</td>\\n\",\n              \"      <td>0.206921</td>\\n\",\n              \"      <td>0.533898</td>\\n\",\n              \"      <td>0.981693</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <td>0.431173</td>\\n\",\n              \"      <td>0.624923</td>\\n\",\n              \"      <td>0.415492</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.974776</td>\\n\",\n              \"      <td>0.986562</td>\\n\",\n              \"      <td>0.948987</td>\\n\",\n              \"      <td>0.985003</td>\\n\",\n              \"      <td>0.078848</td>\\n\",\n              \"      <td>0.147220</td>\\n\",\n              \"      <td>0.095342</td>\\n\",\n              \"      <td>0.139736</td>\\n\",\n              \"      <td>0.140857</td>\\n\",\n              \"      <td>0.980632</td>\\n\",\n              \"      <td>0.238964</td>\\n\",\n              \"      <td>0.268426</td>\\n\",\n              \"      <td>0.265857</td>\\n\",\n              \"      <td>0.229278</td>\\n\",\n              \"      <td>0.076854</td>\\n\",\n              \"      <td>0.411802</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <td>0.405290</td>\\n\",\n              \"      <td>0.593610</td>\\n\",\n              \"      <td>0.364876</td>\\n\",\n              \"      <td>0.974776</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.966186</td>\\n\",\n              \"      <td>0.966826</td>\\n\",\n              \"      <td>0.964126</td>\\n\",\n              \"      <td>0.059448</td>\\n\",\n              \"      <td>0.150536</td>\\n\",\n              \"      <td>0.103589</td>\\n\",\n              \"      <td>0.145033</td>\\n\",\n              \"      <td>0.156364</td>\\n\",\n              \"      <td>0.983229</td>\\n\",\n              \"      <td>0.239937</td>\\n\",\n              \"      <td>0.290021</td>\\n\",\n              \"      <td>0.274447</td>\\n\",\n              \"      <td>0.236794</td>\\n\",\n              \"      <td>0.050416</td>\\n\",\n              \"      <td>0.374005</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <td>0.432529</td>\\n\",\n              \"      <td>0.637191</td>\\n\",\n              \"      <td>0.410171</td>\\n\",\n              \"      <td>0.986562</td>\\n\",\n              \"      <td>0.966186</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.940885</td>\\n\",\n              \"      <td>0.988680</td>\\n\",\n              \"      <td>0.086827</td>\\n\",\n              \"      <td>0.125054</td>\\n\",\n              \"      <td>0.094065</td>\\n\",\n              \"      <td>0.146798</td>\\n\",\n              \"      <td>0.134135</td>\\n\",\n              \"      <td>0.973922</td>\\n\",\n              \"      <td>0.219031</td>\\n\",\n              \"      <td>0.260623</td>\\n\",\n              \"      <td>0.242012</td>\\n\",\n              \"      <td>0.211370</td>\\n\",\n              \"      <td>0.051543</td>\\n\",\n              \"      <td>0.421023</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <td>0.406296</td>\\n\",\n              \"      <td>0.604366</td>\\n\",\n              \"      <td>0.361448</td>\\n\",\n              \"      <td>0.948987</td>\\n\",\n              \"      <td>0.966826</td>\\n\",\n              \"      <td>0.940885</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.931963</td>\\n\",\n              \"      <td>0.059554</td>\\n\",\n              \"      <td>0.134683</td>\\n\",\n              \"      <td>0.088038</td>\\n\",\n              \"      <td>0.118733</td>\\n\",\n              \"      <td>0.141515</td>\\n\",\n              \"      <td>0.965676</td>\\n\",\n              \"      <td>0.224570</td>\\n\",\n              \"      <td>0.251142</td>\\n\",\n              \"      <td>0.249651</td>\\n\",\n              \"      <td>0.210059</td>\\n\",\n              \"      <td>0.055752</td>\\n\",\n              \"      <td>0.368139</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <td>0.419792</td>\\n\",\n              \"      <td>0.624508</td>\\n\",\n              \"      <td>0.408251</td>\\n\",\n              \"      <td>0.985003</td>\\n\",\n              \"      <td>0.964126</td>\\n\",\n              \"      <td>0.988680</td>\\n\",\n              \"      <td>0.931963</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.052253</td>\\n\",\n              \"      <td>0.108274</td>\\n\",\n              \"      <td>0.095622</td>\\n\",\n              \"      <td>0.145849</td>\\n\",\n              \"      <td>0.104835</td>\\n\",\n              \"      <td>0.972904</td>\\n\",\n              \"      <td>0.215023</td>\\n\",\n              \"      <td>0.242703</td>\\n\",\n              \"      <td>0.233813</td>\\n\",\n              \"      <td>0.207681</td>\\n\",\n              \"      <td>0.041935</td>\\n\",\n              \"      <td>0.404676</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <td>0.723005</td>\\n\",\n              \"      <td>0.529950</td>\\n\",\n              \"      <td>0.726956</td>\\n\",\n              \"      <td>0.078848</td>\\n\",\n              \"      <td>0.059448</td>\\n\",\n              \"      <td>0.086827</td>\\n\",\n              \"      <td>0.059554</td>\\n\",\n              \"      <td>0.052253</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.799470</td>\\n\",\n              \"      <td>0.792994</td>\\n\",\n              \"      <td>0.767679</td>\\n\",\n              \"      <td>0.796566</td>\\n\",\n              \"      <td>0.005466</td>\\n\",\n              \"      <td>0.625080</td>\\n\",\n              \"      <td>0.576993</td>\\n\",\n              \"      <td>0.582872</td>\\n\",\n              \"      <td>0.644243</td>\\n\",\n              \"      <td>0.841480</td>\\n\",\n              \"      <td>0.741229</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <td>0.348153</td>\\n\",\n              \"      <td>0.203664</td>\\n\",\n              \"      <td>0.365698</td>\\n\",\n              \"      <td>0.147220</td>\\n\",\n              \"      <td>0.150536</td>\\n\",\n              \"      <td>0.125054</td>\\n\",\n              \"      <td>0.134683</td>\\n\",\n              \"      <td>0.108274</td>\\n\",\n              \"      <td>0.799470</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.944656</td>\\n\",\n              \"      <td>0.940454</td>\\n\",\n              \"      <td>0.962446</td>\\n\",\n              \"      <td>0.147289</td>\\n\",\n              \"      <td>0.910787</td>\\n\",\n              \"      <td>0.924428</td>\\n\",\n              \"      <td>0.919423</td>\\n\",\n              \"      <td>0.930842</td>\\n\",\n              \"      <td>0.897956</td>\\n\",\n              \"      <td>0.339160</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <td>0.375051</td>\\n\",\n              \"      <td>0.220718</td>\\n\",\n              \"      <td>0.398261</td>\\n\",\n              \"      <td>0.095342</td>\\n\",\n              \"      <td>0.103589</td>\\n\",\n              \"      <td>0.094065</td>\\n\",\n              \"      <td>0.088038</td>\\n\",\n              \"      <td>0.095622</td>\\n\",\n              \"      <td>0.792994</td>\\n\",\n              \"      <td>0.944656</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.934962</td>\\n\",\n              \"      <td>0.951132</td>\\n\",\n              \"      <td>0.101450</td>\\n\",\n              \"      <td>0.899074</td>\\n\",\n              \"      <td>0.864812</td>\\n\",\n              \"      <td>0.875990</td>\\n\",\n              \"      <td>0.912917</td>\\n\",\n              \"      <td>0.900396</td>\\n\",\n              \"      <td>0.355246</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <td>0.323178</td>\\n\",\n              \"      <td>0.215074</td>\\n\",\n              \"      <td>0.350296</td>\\n\",\n              \"      <td>0.139736</td>\\n\",\n              \"      <td>0.145033</td>\\n\",\n              \"      <td>0.146798</td>\\n\",\n              \"      <td>0.118733</td>\\n\",\n              \"      <td>0.145849</td>\\n\",\n              \"      <td>0.767679</td>\\n\",\n              \"      <td>0.940454</td>\\n\",\n              \"      <td>0.934962</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.919470</td>\\n\",\n              \"      <td>0.156260</td>\\n\",\n              \"      <td>0.912529</td>\\n\",\n              \"      <td>0.907225</td>\\n\",\n              \"      <td>0.897633</td>\\n\",\n              \"      <td>0.924267</td>\\n\",\n              \"      <td>0.876585</td>\\n\",\n              \"      <td>0.331912</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <td>0.333458</td>\\n\",\n              \"      <td>0.185698</td>\\n\",\n              \"      <td>0.334364</td>\\n\",\n              \"      <td>0.140857</td>\\n\",\n              \"      <td>0.156364</td>\\n\",\n              \"      <td>0.134135</td>\\n\",\n              \"      <td>0.141515</td>\\n\",\n              \"      <td>0.104835</td>\\n\",\n              \"      <td>0.796566</td>\\n\",\n              \"      <td>0.962446</td>\\n\",\n              \"      <td>0.951132</td>\\n\",\n              \"      <td>0.919470</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.155002</td>\\n\",\n              \"      <td>0.926607</td>\\n\",\n              \"      <td>0.917920</td>\\n\",\n              \"      <td>0.915359</td>\\n\",\n              \"      <td>0.931424</td>\\n\",\n              \"      <td>0.888642</td>\\n\",\n              \"      <td>0.315476</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <td>0.307980</td>\\n\",\n              \"      <td>0.529882</td>\\n\",\n              \"      <td>0.285894</td>\\n\",\n              \"      <td>0.980632</td>\\n\",\n              \"      <td>0.983229</td>\\n\",\n              \"      <td>0.973922</td>\\n\",\n              \"      <td>0.965676</td>\\n\",\n              \"      <td>0.972904</td>\\n\",\n              \"      <td>0.005466</td>\\n\",\n              \"      <td>0.147289</td>\\n\",\n              \"      <td>0.101450</td>\\n\",\n              \"      <td>0.156260</td>\\n\",\n              \"      <td>0.155002</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.282232</td>\\n\",\n              \"      <td>0.319914</td>\\n\",\n              \"      <td>0.315454</td>\\n\",\n              \"      <td>0.269876</td>\\n\",\n              \"      <td>0.055042</td>\\n\",\n              \"      <td>0.286493</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <td>0.151495</td>\\n\",\n              \"      <td>0.091409</td>\\n\",\n              \"      <td>0.197300</td>\\n\",\n              \"      <td>0.238964</td>\\n\",\n              \"      <td>0.239937</td>\\n\",\n              \"      <td>0.219031</td>\\n\",\n              \"      <td>0.224570</td>\\n\",\n              \"      <td>0.215023</td>\\n\",\n              \"      <td>0.625080</td>\\n\",\n              \"      <td>0.910787</td>\\n\",\n              \"      <td>0.899074</td>\\n\",\n              \"      <td>0.912529</td>\\n\",\n              \"      <td>0.926607</td>\\n\",\n              \"      <td>0.282232</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.951472</td>\\n\",\n              \"      <td>0.985816</td>\\n\",\n              \"      <td>0.994538</td>\\n\",\n              \"      <td>0.839887</td>\\n\",\n              \"      <td>0.158965</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <td>0.101826</td>\\n\",\n              \"      <td>0.044772</td>\\n\",\n              \"      <td>0.112035</td>\\n\",\n              \"      <td>0.268426</td>\\n\",\n              \"      <td>0.290021</td>\\n\",\n              \"      <td>0.260623</td>\\n\",\n              \"      <td>0.251142</td>\\n\",\n              \"      <td>0.242703</td>\\n\",\n              \"      <td>0.576993</td>\\n\",\n              \"      <td>0.924428</td>\\n\",\n              \"      <td>0.864812</td>\\n\",\n              \"      <td>0.907225</td>\\n\",\n              \"      <td>0.917920</td>\\n\",\n              \"      <td>0.319914</td>\\n\",\n              \"      <td>0.951472</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.977887</td>\\n\",\n              \"      <td>0.963628</td>\\n\",\n              \"      <td>0.751828</td>\\n\",\n              \"      <td>0.097428</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <td>0.105531</td>\\n\",\n              \"      <td>0.052484</td>\\n\",\n              \"      <td>0.140627</td>\\n\",\n              \"      <td>0.265857</td>\\n\",\n              \"      <td>0.274447</td>\\n\",\n              \"      <td>0.242012</td>\\n\",\n              \"      <td>0.249651</td>\\n\",\n              \"      <td>0.233813</td>\\n\",\n              \"      <td>0.582872</td>\\n\",\n              \"      <td>0.919423</td>\\n\",\n              \"      <td>0.875990</td>\\n\",\n              \"      <td>0.897633</td>\\n\",\n              \"      <td>0.915359</td>\\n\",\n              \"      <td>0.315454</td>\\n\",\n              \"      <td>0.985816</td>\\n\",\n              \"      <td>0.977887</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.990308</td>\\n\",\n              \"      <td>0.805278</td>\\n\",\n              \"      <td>0.105260</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <td>0.163778</td>\\n\",\n              \"      <td>0.091067</td>\\n\",\n              \"      <td>0.206921</td>\\n\",\n              \"      <td>0.229278</td>\\n\",\n              \"      <td>0.236794</td>\\n\",\n              \"      <td>0.211370</td>\\n\",\n              \"      <td>0.210059</td>\\n\",\n              \"      <td>0.207681</td>\\n\",\n              \"      <td>0.644243</td>\\n\",\n              \"      <td>0.930842</td>\\n\",\n              \"      <td>0.912917</td>\\n\",\n              \"      <td>0.924267</td>\\n\",\n              \"      <td>0.931424</td>\\n\",\n              \"      <td>0.269876</td>\\n\",\n              \"      <td>0.994538</td>\\n\",\n              \"      <td>0.963628</td>\\n\",\n              \"      <td>0.990308</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.838045</td>\\n\",\n              \"      <td>0.171681</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <td>0.473998</td>\\n\",\n              \"      <td>0.362248</td>\\n\",\n              \"      <td>0.533898</td>\\n\",\n              \"      <td>0.076854</td>\\n\",\n              \"      <td>0.050416</td>\\n\",\n              \"      <td>0.051543</td>\\n\",\n              \"      <td>0.055752</td>\\n\",\n              \"      <td>0.041935</td>\\n\",\n              \"      <td>0.841480</td>\\n\",\n              \"      <td>0.897956</td>\\n\",\n              \"      <td>0.900396</td>\\n\",\n              \"      <td>0.876585</td>\\n\",\n              \"      <td>0.888642</td>\\n\",\n              \"      <td>0.055042</td>\\n\",\n              \"      <td>0.839887</td>\\n\",\n              \"      <td>0.751828</td>\\n\",\n              \"      <td>0.805278</td>\\n\",\n              \"      <td>0.838045</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.484399</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>today</th>\\n\",\n              \"      <td>0.980911</td>\\n\",\n              \"      <td>0.929598</td>\\n\",\n              \"      <td>0.981693</td>\\n\",\n              \"      <td>0.411802</td>\\n\",\n              \"      <td>0.374005</td>\\n\",\n              \"      <td>0.421023</td>\\n\",\n              \"      <td>0.368139</td>\\n\",\n              \"      <td>0.404676</td>\\n\",\n              \"      <td>0.741229</td>\\n\",\n              \"      <td>0.339160</td>\\n\",\n              \"      <td>0.355246</td>\\n\",\n              \"      <td>0.331912</td>\\n\",\n              \"      <td>0.315476</td>\\n\",\n              \"      <td>0.286493</td>\\n\",\n              \"      <td>0.158965</td>\\n\",\n              \"      <td>0.097428</td>\\n\",\n              \"      <td>0.105260</td>\\n\",\n              \"      <td>0.171681</td>\\n\",\n              \"      <td>0.484399</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                sky      blue  beautiful  ...     beans     green     today\\n\",\n              \"sky        1.000000  0.916322   0.978884  ...  0.163778  0.473998  0.980911\\n\",\n              \"blue       0.916322  1.000000   0.912599  ...  0.091067  0.362248  0.929598\\n\",\n              \"beautiful  0.978884  0.912599   1.000000  ...  0.206921  0.533898  0.981693\\n\",\n              \"quick      0.431173  0.624923   0.415492  ...  0.229278  0.076854  0.411802\\n\",\n              \"brown      0.405290  0.593610   0.364876  ...  0.236794  0.050416  0.374005\\n\",\n              \"fox        0.432529  0.637191   0.410171  ...  0.211370  0.051543  0.421023\\n\",\n              \"lazy       0.406296  0.604366   0.361448  ...  0.210059  0.055752  0.368139\\n\",\n              \"dog        0.419792  0.624508   0.408251  ...  0.207681  0.041935  0.404676\\n\",\n              \"love       0.723005  0.529950   0.726956  ...  0.644243  0.841480  0.741229\\n\",\n              \"sausages   0.348153  0.203664   0.365698  ...  0.930842  0.897956  0.339160\\n\",\n              \"ham        0.375051  0.220718   0.398261  ...  0.912917  0.900396  0.355246\\n\",\n              \"bacon      0.323178  0.215074   0.350296  ...  0.924267  0.876585  0.331912\\n\",\n              \"eggs       0.333458  0.185698   0.334364  ...  0.931424  0.888642  0.315476\\n\",\n              \"jumps      0.307980  0.529882   0.285894  ...  0.269876  0.055042  0.286493\\n\",\n              \"kings      0.151495  0.091409   0.197300  ...  0.994538  0.839887  0.158965\\n\",\n              \"breakfast  0.101826  0.044772   0.112035  ...  0.963628  0.751828  0.097428\\n\",\n              \"toast      0.105531  0.052484   0.140627  ...  0.990308  0.805278  0.105260\\n\",\n              \"beans      0.163778  0.091067   0.206921  ...  1.000000  0.838045  0.171681\\n\",\n              \"green      0.473998  0.362248   0.533898  ...  0.838045  1.000000  0.484399\\n\",\n              \"today      0.980911  0.929598   0.981693  ...  0.171681  0.484399  1.000000\\n\",\n              \"\\n\",\n              \"[20 rows x 20 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 7\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ngIHnn__Riqx\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 374\n        },\n        \"outputId\": \"d05dd28c-5955-4313-ce19-029b87b8dfba\"\n      },\n      \"source\": [\n        \"feature_names = np.array(words)\\n\",\n        \"similarity_df.apply(lambda row: feature_names[np.argsort(-row.values)[1:4]], \\n\",\n        \"                    axis=1)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"sky           [today, beautiful, blue]\\n\",\n              \"blue           [today, sky, beautiful]\\n\",\n              \"beautiful           [today, sky, blue]\\n\",\n              \"quick                [fox, dog, jumps]\\n\",\n              \"brown             [jumps, quick, lazy]\\n\",\n              \"fox                [dog, quick, jumps]\\n\",\n              \"lazy             [brown, jumps, quick]\\n\",\n              \"dog                [fox, quick, jumps]\\n\",\n              \"love           [green, sausages, eggs]\\n\",\n              \"sausages            [eggs, ham, bacon]\\n\",\n              \"ham            [eggs, sausages, bacon]\\n\",\n              \"bacon           [sausages, ham, beans]\\n\",\n              \"eggs            [sausages, ham, beans]\\n\",\n              \"jumps              [brown, quick, fox]\\n\",\n              \"kings        [beans, toast, breakfast]\\n\",\n              \"breakfast        [toast, beans, kings]\\n\",\n              \"toast        [beans, kings, breakfast]\\n\",\n              \"beans        [kings, toast, breakfast]\\n\",\n              \"green            [ham, sausages, eggs]\\n\",\n              \"today           [beautiful, sky, blue]\\n\",\n              \"dtype: object\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 8\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"rTUAkYxQRiqz\"\n      },\n      \"source\": [\n        \"# The GloVe Model\\n\",\n        \"\\n\",\n        \"The GloVe model stands for Global Vectors which is an unsupervised learning model which can be used to obtain dense word vectors similar to Word2Vec. However the technique is different and training is performed on an aggregated global word-word co-occurrence matrix, giving us a vector space with meaningful sub-structures. This method was invented in Stanford by Pennington et al. and I recommend you to read the original paper on GloVe, _[‘GloVe: Global Vectors for Word Representation’ by Pennington et al.](https://nlp.stanford.edu/pubs/glove.pdf)_ which is an excellent read to get some perspective on how this model works.\\n\",\n        \"\\n\",\n        \"The basic methodology of the GloVe model is to first create a huge word-context co-occurence matrix consisting of (word, context) pairs such that each element in this matrix represents how often a word occurs with the context (which can be a sequence of words). The idea then is to apply matrix factorization to approximate this matrix as depicted in the following figure.\\n\",\n        \"\\n\",\n        \"![](https://github.com/dipanjanS/nlp_workshop_odsc19/blob/master/Module04%20-%20Text%20Representation/glove_arch.png?raw=1)\\n\",\n        \"\\n\",\n        \"Considering the __Word-Context (WC)__ matrix, __Word-Feature (WF)__ matrix and __Feature-Context (FC)__ matrix, we try to factorize __WC = WF x FC__\\n\",\n        \"\\n\",\n        \"Such that we we aim to reconstruct __WC__ from __WF__ and __FC__ by multiplying them. For this, we typically initialize __WF__ and __FC__ with some random weights and attempt to multiply them to get __WC'__ (an approximation of __WC__) and measure how close it is to __WC__. We do this multiple times using Stochastic Gradient Descent (SGD) to minimize the error. Finally, the __Word-Feature matrix (WF)__ gives us the word embeddings for each word where __F__ can be preset to a specific number of dimensions\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"_UFyeFqfRiq0\"\n      },\n      \"source\": [\n        \"# Robust Glove Model with SpaCy\\n\",\n        \"\\n\",\n        \"Let’s try and leverage GloVe based embeddings for our document clustering task. The very popular spacy framework comes with capabilities to leverage GloVe embeddings based on different language models. You can also get pre-trained word vectors and load them up as needed using gensim or spacy.\\n\",\n        \"\\n\",\n        \"If you have spacy installed, we will be using the __[`en_vectors_web_lg`](https://spacy.io/models/en#en_vectors_web_lg)__ model which consists of 300-dimensional word vectors trained on [Common Crawl](http://commoncrawl.org) with GloVe.\\n\",\n        \"\\n\",\n        \"__Install Instructions:__\\n\",\n        \"\\n\",\n        \"```\\n\",\n        \"# Use the following command to install spaCy\\n\",\n        \"> pip install -U spacy\\n\",\n        \"OR\\n\",\n        \"> conda install -c conda-forge spacy\\n\",\n        \"\\n\",\n        \"C:\\\\WINDOWS\\\\system32>python -m spacy download en_vectors_web_lg\\n\",\n        \"Collecting en_vectors_web_lg==2.0.0 from https://github.com/explosion/spacy-models/releases/download/en_vectors_web_lg-2.0.0/en_vectors_web_lg-2.0.0.tar.gz#egg=en_vectors_web_lg==2.0.0\\n\",\n        \"  Downloading https://github.com/explosion/spacy-models/releases/download/en_vectors_web_lg-2.0.0/en_vectors_web_lg-2.0.0.tar.gz (661.8MB)\\n\",\n        \"    100% |████████████████████████████████| 661.8MB 392kB/s\\n\",\n        \"Installing collected packages: en-vectors-web-lg\\n\",\n        \"  Running setup.py install for en-vectors-web-lg ... done\\n\",\n        \"Successfully installed en-vectors-web-lg-2.0.0\\n\",\n        \"You are using pip version 10.0.1, however version 18.0 is available.\\n\",\n        \"You should consider upgrading via the 'python -m pip install --upgrade pip' command.\\n\",\n        \"\\n\",\n        \"    Linking successful\\n\",\n        \"    C:\\\\Anaconda3\\\\lib\\\\site-packages\\\\en_vectors_web_lg -->\\n\",\n        \"    C:\\\\Anaconda3\\\\lib\\\\site-packages\\\\spacy\\\\data\\\\en_vectors_web_lg\\n\",\n        \"\\n\",\n        \"    You can now load the model via spacy.load('en_vectors_web_lg')\\n\",\n        \"```\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"geEhPWzgTA7K\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 156\n        },\n        \"outputId\": \"925b33eb-8de8-417f-d596-da42af328273\"\n      },\n      \"source\": [\n        \"!python -m spacy download en\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Requirement already satisfied: en_core_web_sm==2.1.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz#egg=en_core_web_sm==2.1.0 in /usr/local/lib/python3.6/dist-packages (2.1.0)\\n\",\n            \"\\u001b[38;5;2m✔ Download and installation successful\\u001b[0m\\n\",\n            \"You can now load the model via spacy.load('en_core_web_sm')\\n\",\n            \"\\u001b[38;5;2m✔ Linking successful\\u001b[0m\\n\",\n            \"/usr/local/lib/python3.6/dist-packages/en_core_web_sm -->\\n\",\n            \"/usr/local/lib/python3.6/dist-packages/spacy/data/en\\n\",\n            \"You can now load the model via spacy.load('en')\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"sz4gggzKTkYx\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 88\n        },\n        \"outputId\": \"1b8aa213-261e-46d5-96a6-3ab1d2ac32d2\"\n      },\n      \"source\": [\n        \"!python -m spacy download en_vectors_web_lg\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Requirement already satisfied: en_vectors_web_lg==2.1.0 from https://github.com/explosion/spacy-models/releases/download/en_vectors_web_lg-2.1.0/en_vectors_web_lg-2.1.0.tar.gz#egg=en_vectors_web_lg==2.1.0 in /usr/local/lib/python3.6/dist-packages (2.1.0)\\n\",\n            \"\\u001b[38;5;2m✔ Download and installation successful\\u001b[0m\\n\",\n            \"You can now load the model via spacy.load('en_vectors_web_lg')\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"xCfnNf5fRiq0\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"32218af6-78f9-42f1-fcb4-d46673e47c1d\"\n      },\n      \"source\": [\n        \"import spacy\\n\",\n        \"\\n\",\n        \"nlp = spacy.load('en_vectors_web_lg')\\n\",\n        \"total_vectors = len(nlp.vocab.vectors)\\n\",\n        \"\\n\",\n        \"print('Total word vectors:', total_vectors)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Total word vectors: 1070971\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"5Gf4dcBuRiq2\"\n      },\n      \"source\": [\n        \"This validates that everything is working and in order. Let’s get the GloVe embeddings for each of our words now in our toy corpus.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"sd68_DV0Riq3\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 718\n        },\n        \"outputId\": \"0beef2e4-3e0e-4290-deee-4163bb2681bc\"\n      },\n      \"source\": [\n        \"unique_words = list(set([word for sublist in tokenized_corpus for word in sublist]))\\n\",\n        \"\\n\",\n        \"word_glove_vectors = np.array([nlp(word).vector for word in unique_words])\\n\",\n        \"vec_df = pd.DataFrame(word_glove_vectors, index=unique_words)\\n\",\n        \"vec_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <th>8</th>\\n\",\n              \"      <th>9</th>\\n\",\n              \"      <th>10</th>\\n\",\n              \"      <th>11</th>\\n\",\n              \"      <th>12</th>\\n\",\n              \"      <th>13</th>\\n\",\n              \"      <th>14</th>\\n\",\n              \"      <th>15</th>\\n\",\n              \"      <th>16</th>\\n\",\n              \"      <th>17</th>\\n\",\n              \"      <th>18</th>\\n\",\n              \"      <th>19</th>\\n\",\n              \"      <th>20</th>\\n\",\n              \"      <th>21</th>\\n\",\n              \"      <th>22</th>\\n\",\n              \"      <th>23</th>\\n\",\n              \"      <th>24</th>\\n\",\n              \"      <th>25</th>\\n\",\n              \"      <th>26</th>\\n\",\n              \"      <th>27</th>\\n\",\n              \"      <th>28</th>\\n\",\n              \"      <th>29</th>\\n\",\n              \"      <th>30</th>\\n\",\n              \"      <th>31</th>\\n\",\n              \"      <th>32</th>\\n\",\n              \"      <th>33</th>\\n\",\n              \"      <th>34</th>\\n\",\n              \"      <th>35</th>\\n\",\n              \"      <th>36</th>\\n\",\n              \"      <th>37</th>\\n\",\n              \"      <th>38</th>\\n\",\n              \"      <th>39</th>\\n\",\n              \"      <th>...</th>\\n\",\n              \"      <th>260</th>\\n\",\n              \"      <th>261</th>\\n\",\n              \"      <th>262</th>\\n\",\n              \"      <th>263</th>\\n\",\n              \"      <th>264</th>\\n\",\n              \"      <th>265</th>\\n\",\n              \"      <th>266</th>\\n\",\n              \"      <th>267</th>\\n\",\n              \"      <th>268</th>\\n\",\n              \"      <th>269</th>\\n\",\n              \"      <th>270</th>\\n\",\n              \"      <th>271</th>\\n\",\n              \"      <th>272</th>\\n\",\n              \"      <th>273</th>\\n\",\n              \"      <th>274</th>\\n\",\n              \"      <th>275</th>\\n\",\n              \"      <th>276</th>\\n\",\n              \"      <th>277</th>\\n\",\n              \"      <th>278</th>\\n\",\n              \"      <th>279</th>\\n\",\n              \"      <th>280</th>\\n\",\n              \"      <th>281</th>\\n\",\n              \"      <th>282</th>\\n\",\n              \"      <th>283</th>\\n\",\n              \"      <th>284</th>\\n\",\n              \"      <th>285</th>\\n\",\n              \"      <th>286</th>\\n\",\n              \"      <th>287</th>\\n\",\n              \"      <th>288</th>\\n\",\n              \"      <th>289</th>\\n\",\n              \"      <th>290</th>\\n\",\n              \"      <th>291</th>\\n\",\n              \"      <th>292</th>\\n\",\n              \"      <th>293</th>\\n\",\n              \"      <th>294</th>\\n\",\n              \"      <th>295</th>\\n\",\n              \"      <th>296</th>\\n\",\n              \"      <th>297</th>\\n\",\n              \"      <th>298</th>\\n\",\n              \"      <th>299</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <td>-0.174290</td>\\n\",\n              \"      <td>-0.064869</td>\\n\",\n              \"      <td>-0.046976</td>\\n\",\n              \"      <td>0.287420</td>\\n\",\n              \"      <td>-0.128150</td>\\n\",\n              \"      <td>0.647630</td>\\n\",\n              \"      <td>0.056315</td>\\n\",\n              \"      <td>-0.240440</td>\\n\",\n              \"      <td>-0.025094</td>\\n\",\n              \"      <td>0.502220</td>\\n\",\n              \"      <td>0.029936</td>\\n\",\n              \"      <td>0.871290</td>\\n\",\n              \"      <td>-0.270070</td>\\n\",\n              \"      <td>-0.854380</td>\\n\",\n              \"      <td>0.241580</td>\\n\",\n              \"      <td>-0.278750</td>\\n\",\n              \"      <td>0.479100</td>\\n\",\n              \"      <td>0.132680</td>\\n\",\n              \"      <td>0.284740</td>\\n\",\n              \"      <td>0.323430</td>\\n\",\n              \"      <td>-0.171420</td>\\n\",\n              \"      <td>0.324220</td>\\n\",\n              \"      <td>0.137840</td>\\n\",\n              \"      <td>-0.357310</td>\\n\",\n              \"      <td>0.288720</td>\\n\",\n              \"      <td>-0.357420</td>\\n\",\n              \"      <td>-0.602930</td>\\n\",\n              \"      <td>-0.186040</td>\\n\",\n              \"      <td>-0.271860</td>\\n\",\n              \"      <td>-0.829750</td>\\n\",\n              \"      <td>0.270550</td>\\n\",\n              \"      <td>0.225760</td>\\n\",\n              \"      <td>0.352370</td>\\n\",\n              \"      <td>-0.196700</td>\\n\",\n              \"      <td>1.051100</td>\\n\",\n              \"      <td>0.210840</td>\\n\",\n              \"      <td>0.115040</td>\\n\",\n              \"      <td>0.283120</td>\\n\",\n              \"      <td>0.700670</td>\\n\",\n              \"      <td>1.452400</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.145720</td>\\n\",\n              \"      <td>-0.327310</td>\\n\",\n              \"      <td>-0.594870</td>\\n\",\n              \"      <td>0.679110</td>\\n\",\n              \"      <td>0.213380</td>\\n\",\n              \"      <td>1.053200</td>\\n\",\n              \"      <td>-0.032428</td>\\n\",\n              \"      <td>0.105010</td>\\n\",\n              \"      <td>-0.622310</td>\\n\",\n              \"      <td>-0.151530</td>\\n\",\n              \"      <td>0.418720</td>\\n\",\n              \"      <td>-0.380260</td>\\n\",\n              \"      <td>0.401980</td>\\n\",\n              \"      <td>-0.007394</td>\\n\",\n              \"      <td>-0.399710</td>\\n\",\n              \"      <td>0.896790</td>\\n\",\n              \"      <td>-0.081613</td>\\n\",\n              \"      <td>-0.019213</td>\\n\",\n              \"      <td>0.360840</td>\\n\",\n              \"      <td>0.013679</td>\\n\",\n              \"      <td>0.437120</td>\\n\",\n              \"      <td>-0.148730</td>\\n\",\n              \"      <td>-0.078819</td>\\n\",\n              \"      <td>-0.435240</td>\\n\",\n              \"      <td>0.249950</td>\\n\",\n              \"      <td>0.663400</td>\\n\",\n              \"      <td>0.297820</td>\\n\",\n              \"      <td>-0.332740</td>\\n\",\n              \"      <td>-0.254690</td>\\n\",\n              \"      <td>-0.018595</td>\\n\",\n              \"      <td>0.302240</td>\\n\",\n              \"      <td>0.195470</td>\\n\",\n              \"      <td>-0.653980</td>\\n\",\n              \"      <td>-0.291150</td>\\n\",\n              \"      <td>-0.684290</td>\\n\",\n              \"      <td>-0.266370</td>\\n\",\n              \"      <td>0.304310</td>\\n\",\n              \"      <td>-0.806830</td>\\n\",\n              \"      <td>0.619540</td>\\n\",\n              \"      <td>0.201200</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <td>-0.353320</td>\\n\",\n              \"      <td>-0.299710</td>\\n\",\n              \"      <td>-0.176230</td>\\n\",\n              \"      <td>-0.321940</td>\\n\",\n              \"      <td>-0.385640</td>\\n\",\n              \"      <td>0.586110</td>\\n\",\n              \"      <td>0.411160</td>\\n\",\n              \"      <td>-0.418680</td>\\n\",\n              \"      <td>0.073093</td>\\n\",\n              \"      <td>1.486500</td>\\n\",\n              \"      <td>0.178510</td>\\n\",\n              \"      <td>-0.364790</td>\\n\",\n              \"      <td>-0.318890</td>\\n\",\n              \"      <td>-0.186660</td>\\n\",\n              \"      <td>-0.176970</td>\\n\",\n              \"      <td>-0.185470</td>\\n\",\n              \"      <td>-0.287790</td>\\n\",\n              \"      <td>0.579630</td>\\n\",\n              \"      <td>0.413430</td>\\n\",\n              \"      <td>-0.142170</td>\\n\",\n              \"      <td>-0.122250</td>\\n\",\n              \"      <td>0.093341</td>\\n\",\n              \"      <td>-0.117550</td>\\n\",\n              \"      <td>-0.436210</td>\\n\",\n              \"      <td>0.416610</td>\\n\",\n              \"      <td>-0.172810</td>\\n\",\n              \"      <td>0.080734</td>\\n\",\n              \"      <td>-0.534250</td>\\n\",\n              \"      <td>0.790970</td>\\n\",\n              \"      <td>-0.175410</td>\\n\",\n              \"      <td>-0.503800</td>\\n\",\n              \"      <td>0.092905</td>\\n\",\n              \"      <td>0.000162</td>\\n\",\n              \"      <td>-0.636440</td>\\n\",\n              \"      <td>0.064689</td>\\n\",\n              \"      <td>0.262830</td>\\n\",\n              \"      <td>0.266300</td>\\n\",\n              \"      <td>0.183250</td>\\n\",\n              \"      <td>-0.397460</td>\\n\",\n              \"      <td>0.109490</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.185390</td>\\n\",\n              \"      <td>0.121400</td>\\n\",\n              \"      <td>-0.077576</td>\\n\",\n              \"      <td>-0.188900</td>\\n\",\n              \"      <td>0.394630</td>\\n\",\n              \"      <td>-0.383130</td>\\n\",\n              \"      <td>-0.288160</td>\\n\",\n              \"      <td>-0.359380</td>\\n\",\n              \"      <td>0.642020</td>\\n\",\n              \"      <td>0.084683</td>\\n\",\n              \"      <td>-0.288520</td>\\n\",\n              \"      <td>-0.443680</td>\\n\",\n              \"      <td>-0.141780</td>\\n\",\n              \"      <td>-0.207710</td>\\n\",\n              \"      <td>0.006349</td>\\n\",\n              \"      <td>-0.368950</td>\\n\",\n              \"      <td>-0.082058</td>\\n\",\n              \"      <td>-0.195290</td>\\n\",\n              \"      <td>-0.067179</td>\\n\",\n              \"      <td>0.001303</td>\\n\",\n              \"      <td>0.468360</td>\\n\",\n              \"      <td>-0.175710</td>\\n\",\n              \"      <td>0.198760</td>\\n\",\n              \"      <td>0.467780</td>\\n\",\n              \"      <td>0.593930</td>\\n\",\n              \"      <td>-0.335560</td>\\n\",\n              \"      <td>-0.072169</td>\\n\",\n              \"      <td>-0.369840</td>\\n\",\n              \"      <td>0.114630</td>\\n\",\n              \"      <td>0.430670</td>\\n\",\n              \"      <td>0.402310</td>\\n\",\n              \"      <td>-0.038554</td>\\n\",\n              \"      <td>-0.288670</td>\\n\",\n              \"      <td>-0.244130</td>\\n\",\n              \"      <td>0.460990</td>\\n\",\n              \"      <td>0.514170</td>\\n\",\n              \"      <td>0.136260</td>\\n\",\n              \"      <td>0.344190</td>\\n\",\n              \"      <td>-0.845300</td>\\n\",\n              \"      <td>-0.077383</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <td>0.171200</td>\\n\",\n              \"      <td>0.534390</td>\\n\",\n              \"      <td>-0.348540</td>\\n\",\n              \"      <td>-0.097234</td>\\n\",\n              \"      <td>0.101800</td>\\n\",\n              \"      <td>-0.170860</td>\\n\",\n              \"      <td>0.295650</td>\\n\",\n              \"      <td>-0.041816</td>\\n\",\n              \"      <td>-0.516550</td>\\n\",\n              \"      <td>2.117200</td>\\n\",\n              \"      <td>0.179450</td>\\n\",\n              \"      <td>0.264130</td>\\n\",\n              \"      <td>-0.231180</td>\\n\",\n              \"      <td>-0.328040</td>\\n\",\n              \"      <td>-0.219140</td>\\n\",\n              \"      <td>-0.043589</td>\\n\",\n              \"      <td>-0.492380</td>\\n\",\n              \"      <td>1.642500</td>\\n\",\n              \"      <td>0.243910</td>\\n\",\n              \"      <td>-0.196320</td>\\n\",\n              \"      <td>-0.257400</td>\\n\",\n              \"      <td>0.071950</td>\\n\",\n              \"      <td>-0.027151</td>\\n\",\n              \"      <td>-0.065426</td>\\n\",\n              \"      <td>-0.224650</td>\\n\",\n              \"      <td>0.159030</td>\\n\",\n              \"      <td>0.545230</td>\\n\",\n              \"      <td>-0.178430</td>\\n\",\n              \"      <td>-0.233200</td>\\n\",\n              \"      <td>0.475470</td>\\n\",\n              \"      <td>-0.073868</td>\\n\",\n              \"      <td>0.261460</td>\\n\",\n              \"      <td>-0.195230</td>\\n\",\n              \"      <td>-0.084660</td>\\n\",\n              \"      <td>0.128970</td>\\n\",\n              \"      <td>-0.460530</td>\\n\",\n              \"      <td>0.164740</td>\\n\",\n              \"      <td>-0.450340</td>\\n\",\n              \"      <td>-0.340450</td>\\n\",\n              \"      <td>-0.214240</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.527940</td>\\n\",\n              \"      <td>0.122210</td>\\n\",\n              \"      <td>0.367880</td>\\n\",\n              \"      <td>0.142500</td>\\n\",\n              \"      <td>0.039286</td>\\n\",\n              \"      <td>-0.418430</td>\\n\",\n              \"      <td>0.020668</td>\\n\",\n              \"      <td>-0.153280</td>\\n\",\n              \"      <td>-0.852450</td>\\n\",\n              \"      <td>0.400710</td>\\n\",\n              \"      <td>-1.663700</td>\\n\",\n              \"      <td>-0.472610</td>\\n\",\n              \"      <td>-0.488350</td>\\n\",\n              \"      <td>-0.506310</td>\\n\",\n              \"      <td>-0.205750</td>\\n\",\n              \"      <td>0.100800</td>\\n\",\n              \"      <td>0.075323</td>\\n\",\n              \"      <td>-0.022721</td>\\n\",\n              \"      <td>0.207690</td>\\n\",\n              \"      <td>-0.112650</td>\\n\",\n              \"      <td>0.589970</td>\\n\",\n              \"      <td>-0.206480</td>\\n\",\n              \"      <td>-0.314750</td>\\n\",\n              \"      <td>-0.220790</td>\\n\",\n              \"      <td>-0.126200</td>\\n\",\n              \"      <td>-0.028778</td>\\n\",\n              \"      <td>-0.176830</td>\\n\",\n              \"      <td>0.180990</td>\\n\",\n              \"      <td>0.232540</td>\\n\",\n              \"      <td>-0.199140</td>\\n\",\n              \"      <td>-0.285540</td>\\n\",\n              \"      <td>0.104670</td>\\n\",\n              \"      <td>0.126310</td>\\n\",\n              \"      <td>0.120040</td>\\n\",\n              \"      <td>0.254380</td>\\n\",\n              \"      <td>0.247400</td>\\n\",\n              \"      <td>0.207670</td>\\n\",\n              \"      <td>0.172580</td>\\n\",\n              \"      <td>0.063875</td>\\n\",\n              \"      <td>0.350990</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <td>0.129450</td>\\n\",\n              \"      <td>0.036518</td>\\n\",\n              \"      <td>0.032298</td>\\n\",\n              \"      <td>-0.060034</td>\\n\",\n              \"      <td>0.399840</td>\\n\",\n              \"      <td>-0.103020</td>\\n\",\n              \"      <td>-0.507880</td>\\n\",\n              \"      <td>0.076630</td>\\n\",\n              \"      <td>-0.422920</td>\\n\",\n              \"      <td>0.815730</td>\\n\",\n              \"      <td>-0.182540</td>\\n\",\n              \"      <td>-0.072278</td>\\n\",\n              \"      <td>-0.358110</td>\\n\",\n              \"      <td>-0.428660</td>\\n\",\n              \"      <td>0.108800</td>\\n\",\n              \"      <td>0.151030</td>\\n\",\n              \"      <td>0.240360</td>\\n\",\n              \"      <td>2.115100</td>\\n\",\n              \"      <td>-0.116390</td>\\n\",\n              \"      <td>-1.058300</td>\\n\",\n              \"      <td>-0.053679</td>\\n\",\n              \"      <td>-0.340660</td>\\n\",\n              \"      <td>-0.387930</td>\\n\",\n              \"      <td>0.220610</td>\\n\",\n              \"      <td>-0.345300</td>\\n\",\n              \"      <td>-0.294830</td>\\n\",\n              \"      <td>-0.377170</td>\\n\",\n              \"      <td>0.040785</td>\\n\",\n              \"      <td>0.155960</td>\\n\",\n              \"      <td>0.378200</td>\\n\",\n              \"      <td>-0.230140</td>\\n\",\n              \"      <td>0.106140</td>\\n\",\n              \"      <td>-0.083818</td>\\n\",\n              \"      <td>-0.121110</td>\\n\",\n              \"      <td>-0.498090</td>\\n\",\n              \"      <td>-0.311230</td>\\n\",\n              \"      <td>0.168420</td>\\n\",\n              \"      <td>0.005281</td>\\n\",\n              \"      <td>-0.281660</td>\\n\",\n              \"      <td>-0.335470</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.158920</td>\\n\",\n              \"      <td>0.486020</td>\\n\",\n              \"      <td>-0.087139</td>\\n\",\n              \"      <td>0.601080</td>\\n\",\n              \"      <td>-0.000770</td>\\n\",\n              \"      <td>-0.082692</td>\\n\",\n              \"      <td>-0.120790</td>\\n\",\n              \"      <td>0.113970</td>\\n\",\n              \"      <td>-0.492130</td>\\n\",\n              \"      <td>-0.134840</td>\\n\",\n              \"      <td>-0.493600</td>\\n\",\n              \"      <td>0.351470</td>\\n\",\n              \"      <td>-0.019813</td>\\n\",\n              \"      <td>-0.075597</td>\\n\",\n              \"      <td>0.369570</td>\\n\",\n              \"      <td>-0.309500</td>\\n\",\n              \"      <td>-0.218600</td>\\n\",\n              \"      <td>0.335340</td>\\n\",\n              \"      <td>0.106540</td>\\n\",\n              \"      <td>-0.123870</td>\\n\",\n              \"      <td>-0.140150</td>\\n\",\n              \"      <td>-0.312630</td>\\n\",\n              \"      <td>-0.524710</td>\\n\",\n              \"      <td>-0.285340</td>\\n\",\n              \"      <td>-0.277620</td>\\n\",\n              \"      <td>0.080487</td>\\n\",\n              \"      <td>0.060031</td>\\n\",\n              \"      <td>0.539010</td>\\n\",\n              \"      <td>0.554740</td>\\n\",\n              \"      <td>-0.147810</td>\\n\",\n              \"      <td>-0.501280</td>\\n\",\n              \"      <td>0.169010</td>\\n\",\n              \"      <td>0.548250</td>\\n\",\n              \"      <td>-0.319380</td>\\n\",\n              \"      <td>-0.072887</td>\\n\",\n              \"      <td>0.382950</td>\\n\",\n              \"      <td>0.237410</td>\\n\",\n              \"      <td>0.052289</td>\\n\",\n              \"      <td>0.182060</td>\\n\",\n              \"      <td>0.412640</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <td>-0.348680</td>\\n\",\n              \"      <td>-0.077720</td>\\n\",\n              \"      <td>0.177750</td>\\n\",\n              \"      <td>-0.094953</td>\\n\",\n              \"      <td>-0.452890</td>\\n\",\n              \"      <td>0.237790</td>\\n\",\n              \"      <td>0.209440</td>\\n\",\n              \"      <td>0.037886</td>\\n\",\n              \"      <td>0.035064</td>\\n\",\n              \"      <td>0.899010</td>\\n\",\n              \"      <td>-0.517950</td>\\n\",\n              \"      <td>-0.547580</td>\\n\",\n              \"      <td>-0.673110</td>\\n\",\n              \"      <td>-0.131650</td>\\n\",\n              \"      <td>-0.585420</td>\\n\",\n              \"      <td>0.312030</td>\\n\",\n              \"      <td>-0.094121</td>\\n\",\n              \"      <td>0.140050</td>\\n\",\n              \"      <td>0.028915</td>\\n\",\n              \"      <td>-0.242290</td>\\n\",\n              \"      <td>-0.091525</td>\\n\",\n              \"      <td>0.133210</td>\\n\",\n              \"      <td>0.114760</td>\\n\",\n              \"      <td>-0.545550</td>\\n\",\n              \"      <td>-0.046149</td>\\n\",\n              \"      <td>-0.022279</td>\\n\",\n              \"      <td>-0.994870</td>\\n\",\n              \"      <td>0.240050</td>\\n\",\n              \"      <td>-0.113700</td>\\n\",\n              \"      <td>-0.117760</td>\\n\",\n              \"      <td>-0.478400</td>\\n\",\n              \"      <td>0.278980</td>\\n\",\n              \"      <td>0.659960</td>\\n\",\n              \"      <td>-0.082358</td>\\n\",\n              \"      <td>0.075643</td>\\n\",\n              \"      <td>-0.308380</td>\\n\",\n              \"      <td>0.134520</td>\\n\",\n              \"      <td>-0.122870</td>\\n\",\n              \"      <td>-0.243410</td>\\n\",\n              \"      <td>-0.010298</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.520700</td>\\n\",\n              \"      <td>0.152850</td>\\n\",\n              \"      <td>0.196420</td>\\n\",\n              \"      <td>-0.176430</td>\\n\",\n              \"      <td>0.433690</td>\\n\",\n              \"      <td>-0.492050</td>\\n\",\n              \"      <td>0.044667</td>\\n\",\n              \"      <td>0.195000</td>\\n\",\n              \"      <td>-0.431390</td>\\n\",\n              \"      <td>0.167560</td>\\n\",\n              \"      <td>-0.896450</td>\\n\",\n              \"      <td>0.551010</td>\\n\",\n              \"      <td>0.004203</td>\\n\",\n              \"      <td>0.328360</td>\\n\",\n              \"      <td>0.343580</td>\\n\",\n              \"      <td>0.185590</td>\\n\",\n              \"      <td>-0.146440</td>\\n\",\n              \"      <td>0.156990</td>\\n\",\n              \"      <td>-0.507790</td>\\n\",\n              \"      <td>0.071018</td>\\n\",\n              \"      <td>0.156870</td>\\n\",\n              \"      <td>0.230150</td>\\n\",\n              \"      <td>0.087828</td>\\n\",\n              \"      <td>0.270050</td>\\n\",\n              \"      <td>0.266410</td>\\n\",\n              \"      <td>0.291140</td>\\n\",\n              \"      <td>-0.132860</td>\\n\",\n              \"      <td>-0.254160</td>\\n\",\n              \"      <td>-0.095441</td>\\n\",\n              \"      <td>-0.174040</td>\\n\",\n              \"      <td>-0.283050</td>\\n\",\n              \"      <td>0.270240</td>\\n\",\n              \"      <td>-0.654800</td>\\n\",\n              \"      <td>0.105300</td>\\n\",\n              \"      <td>-0.068738</td>\\n\",\n              \"      <td>-0.534750</td>\\n\",\n              \"      <td>0.061783</td>\\n\",\n              \"      <td>0.123610</td>\\n\",\n              \"      <td>-0.553700</td>\\n\",\n              \"      <td>-0.544790</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <td>-0.334840</td>\\n\",\n              \"      <td>0.215990</td>\\n\",\n              \"      <td>-0.350440</td>\\n\",\n              \"      <td>-0.260020</td>\\n\",\n              \"      <td>0.411070</td>\\n\",\n              \"      <td>0.154010</td>\\n\",\n              \"      <td>-0.386110</td>\\n\",\n              \"      <td>0.206380</td>\\n\",\n              \"      <td>0.386700</td>\\n\",\n              \"      <td>1.460500</td>\\n\",\n              \"      <td>0.355940</td>\\n\",\n              \"      <td>-0.057770</td>\\n\",\n              \"      <td>-0.310030</td>\\n\",\n              \"      <td>0.533790</td>\\n\",\n              \"      <td>-0.016381</td>\\n\",\n              \"      <td>0.366800</td>\\n\",\n              \"      <td>0.360580</td>\\n\",\n              \"      <td>0.362340</td>\\n\",\n              \"      <td>-0.101930</td>\\n\",\n              \"      <td>-0.365060</td>\\n\",\n              \"      <td>-0.546650</td>\\n\",\n              \"      <td>0.563370</td>\\n\",\n              \"      <td>0.229860</td>\\n\",\n              \"      <td>-0.757940</td>\\n\",\n              \"      <td>0.320240</td>\\n\",\n              \"      <td>0.132530</td>\\n\",\n              \"      <td>0.343050</td>\\n\",\n              \"      <td>-0.240840</td>\\n\",\n              \"      <td>0.044138</td>\\n\",\n              \"      <td>-0.535110</td>\\n\",\n              \"      <td>-0.257930</td>\\n\",\n              \"      <td>0.346190</td>\\n\",\n              \"      <td>-0.071962</td>\\n\",\n              \"      <td>-0.213440</td>\\n\",\n              \"      <td>0.332550</td>\\n\",\n              \"      <td>-0.404350</td>\\n\",\n              \"      <td>0.107330</td>\\n\",\n              \"      <td>-0.027624</td>\\n\",\n              \"      <td>0.289630</td>\\n\",\n              \"      <td>-0.225150</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.134910</td>\\n\",\n              \"      <td>0.343390</td>\\n\",\n              \"      <td>0.048773</td>\\n\",\n              \"      <td>-0.517680</td>\\n\",\n              \"      <td>0.212040</td>\\n\",\n              \"      <td>0.051897</td>\\n\",\n              \"      <td>0.142010</td>\\n\",\n              \"      <td>0.225710</td>\\n\",\n              \"      <td>0.352020</td>\\n\",\n              \"      <td>0.398190</td>\\n\",\n              \"      <td>-0.202120</td>\\n\",\n              \"      <td>-0.097922</td>\\n\",\n              \"      <td>-0.024712</td>\\n\",\n              \"      <td>-0.100950</td>\\n\",\n              \"      <td>0.000120</td>\\n\",\n              \"      <td>-0.443560</td>\\n\",\n              \"      <td>0.097503</td>\\n\",\n              \"      <td>-0.128980</td>\\n\",\n              \"      <td>0.123670</td>\\n\",\n              \"      <td>-0.291170</td>\\n\",\n              \"      <td>-0.302130</td>\\n\",\n              \"      <td>-0.337530</td>\\n\",\n              \"      <td>-0.372290</td>\\n\",\n              \"      <td>0.201640</td>\\n\",\n              \"      <td>0.419570</td>\\n\",\n              \"      <td>0.020038</td>\\n\",\n              \"      <td>-0.171160</td>\\n\",\n              \"      <td>0.433560</td>\\n\",\n              \"      <td>0.179710</td>\\n\",\n              \"      <td>0.089282</td>\\n\",\n              \"      <td>-0.107030</td>\\n\",\n              \"      <td>-0.279480</td>\\n\",\n              \"      <td>-0.186200</td>\\n\",\n              \"      <td>-0.543140</td>\\n\",\n              \"      <td>-0.479980</td>\\n\",\n              \"      <td>-0.284680</td>\\n\",\n              \"      <td>0.036022</td>\\n\",\n              \"      <td>0.190290</td>\\n\",\n              \"      <td>0.692290</td>\\n\",\n              \"      <td>-0.071501</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <td>-0.057120</td>\\n\",\n              \"      <td>0.052685</td>\\n\",\n              \"      <td>0.003026</td>\\n\",\n              \"      <td>-0.048517</td>\\n\",\n              \"      <td>0.007043</td>\\n\",\n              \"      <td>0.041856</td>\\n\",\n              \"      <td>-0.024704</td>\\n\",\n              \"      <td>-0.039783</td>\\n\",\n              \"      <td>0.009614</td>\\n\",\n              \"      <td>0.308416</td>\\n\",\n              \"      <td>-0.089130</td>\\n\",\n              \"      <td>0.041381</td>\\n\",\n              \"      <td>-0.095640</td>\\n\",\n              \"      <td>0.033153</td>\\n\",\n              \"      <td>-0.048714</td>\\n\",\n              \"      <td>0.026033</td>\\n\",\n              \"      <td>0.071408</td>\\n\",\n              \"      <td>0.151969</td>\\n\",\n              \"      <td>0.020897</td>\\n\",\n              \"      <td>-0.064305</td>\\n\",\n              \"      <td>-0.059467</td>\\n\",\n              \"      <td>-0.022701</td>\\n\",\n              \"      <td>0.038028</td>\\n\",\n              \"      <td>-0.069476</td>\\n\",\n              \"      <td>0.051839</td>\\n\",\n              \"      <td>-0.006171</td>\\n\",\n              \"      <td>-0.034795</td>\\n\",\n              \"      <td>-0.059360</td>\\n\",\n              \"      <td>0.012666</td>\\n\",\n              \"      <td>-0.036328</td>\\n\",\n              \"      <td>-0.079183</td>\\n\",\n              \"      <td>0.017406</td>\\n\",\n              \"      <td>-0.011875</td>\\n\",\n              \"      <td>0.078330</td>\\n\",\n              \"      <td>0.051765</td>\\n\",\n              \"      <td>0.021839</td>\\n\",\n              \"      <td>0.079245</td>\\n\",\n              \"      <td>-0.128954</td>\\n\",\n              \"      <td>-0.006980</td>\\n\",\n              \"      <td>0.054850</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.005369</td>\\n\",\n              \"      <td>-0.053469</td>\\n\",\n              \"      <td>-0.016607</td>\\n\",\n              \"      <td>-0.095284</td>\\n\",\n              \"      <td>-0.006578</td>\\n\",\n              \"      <td>0.055140</td>\\n\",\n              \"      <td>-0.004591</td>\\n\",\n              \"      <td>-0.007719</td>\\n\",\n              \"      <td>-0.064524</td>\\n\",\n              \"      <td>0.027798</td>\\n\",\n              \"      <td>-0.041898</td>\\n\",\n              \"      <td>0.120860</td>\\n\",\n              \"      <td>0.014708</td>\\n\",\n              \"      <td>0.013792</td>\\n\",\n              \"      <td>0.016121</td>\\n\",\n              \"      <td>0.056161</td>\\n\",\n              \"      <td>0.008394</td>\\n\",\n              \"      <td>0.031247</td>\\n\",\n              \"      <td>0.026793</td>\\n\",\n              \"      <td>-0.022593</td>\\n\",\n              \"      <td>-0.014645</td>\\n\",\n              \"      <td>0.047150</td>\\n\",\n              \"      <td>0.008740</td>\\n\",\n              \"      <td>-0.042436</td>\\n\",\n              \"      <td>0.063281</td>\\n\",\n              \"      <td>0.067289</td>\\n\",\n              \"      <td>0.037409</td>\\n\",\n              \"      <td>-0.026295</td>\\n\",\n              \"      <td>0.020831</td>\\n\",\n              \"      <td>-0.004480</td>\\n\",\n              \"      <td>0.003257</td>\\n\",\n              \"      <td>-0.036864</td>\\n\",\n              \"      <td>-0.043878</td>\\n\",\n              \"      <td>0.000249</td>\\n\",\n              \"      <td>-0.026959</td>\\n\",\n              \"      <td>0.077895</td>\\n\",\n              \"      <td>0.044350</td>\\n\",\n              \"      <td>0.035107</td>\\n\",\n              \"      <td>0.042551</td>\\n\",\n              \"      <td>-0.010643</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <td>0.073378</td>\\n\",\n              \"      <td>0.227670</td>\\n\",\n              \"      <td>0.208420</td>\\n\",\n              \"      <td>-0.456790</td>\\n\",\n              \"      <td>-0.078219</td>\\n\",\n              \"      <td>0.601960</td>\\n\",\n              \"      <td>-0.024494</td>\\n\",\n              \"      <td>-0.467980</td>\\n\",\n              \"      <td>0.054627</td>\\n\",\n              \"      <td>2.283700</td>\\n\",\n              \"      <td>-0.681900</td>\\n\",\n              \"      <td>-0.037457</td>\\n\",\n              \"      <td>-0.324390</td>\\n\",\n              \"      <td>0.442410</td>\\n\",\n              \"      <td>0.197600</td>\\n\",\n              \"      <td>-0.508460</td>\\n\",\n              \"      <td>-0.196110</td>\\n\",\n              \"      <td>1.313400</td>\\n\",\n              \"      <td>0.190610</td>\\n\",\n              \"      <td>-0.050723</td>\\n\",\n              \"      <td>-0.458790</td>\\n\",\n              \"      <td>0.169650</td>\\n\",\n              \"      <td>-0.265080</td>\\n\",\n              \"      <td>-0.439940</td>\\n\",\n              \"      <td>0.294480</td>\\n\",\n              \"      <td>-0.395270</td>\\n\",\n              \"      <td>-0.476240</td>\\n\",\n              \"      <td>-0.436840</td>\\n\",\n              \"      <td>-0.561440</td>\\n\",\n              \"      <td>-0.191850</td>\\n\",\n              \"      <td>0.183180</td>\\n\",\n              \"      <td>0.157190</td>\\n\",\n              \"      <td>0.281240</td>\\n\",\n              \"      <td>0.033112</td>\\n\",\n              \"      <td>0.064599</td>\\n\",\n              \"      <td>0.271460</td>\\n\",\n              \"      <td>-0.337520</td>\\n\",\n              \"      <td>-0.229610</td>\\n\",\n              \"      <td>-0.539340</td>\\n\",\n              \"      <td>0.577800</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.199320</td>\\n\",\n              \"      <td>-0.344430</td>\\n\",\n              \"      <td>0.108090</td>\\n\",\n              \"      <td>-0.078482</td>\\n\",\n              \"      <td>-0.140850</td>\\n\",\n              \"      <td>0.065754</td>\\n\",\n              \"      <td>-0.335080</td>\\n\",\n              \"      <td>0.058111</td>\\n\",\n              \"      <td>-1.530400</td>\\n\",\n              \"      <td>0.123050</td>\\n\",\n              \"      <td>-0.637070</td>\\n\",\n              \"      <td>-0.152480</td>\\n\",\n              \"      <td>0.308960</td>\\n\",\n              \"      <td>-0.317620</td>\\n\",\n              \"      <td>-0.101160</td>\\n\",\n              \"      <td>0.791200</td>\\n\",\n              \"      <td>0.111700</td>\\n\",\n              \"      <td>-0.449060</td>\\n\",\n              \"      <td>0.336830</td>\\n\",\n              \"      <td>0.906860</td>\\n\",\n              \"      <td>0.409920</td>\\n\",\n              \"      <td>-0.610050</td>\\n\",\n              \"      <td>-0.246430</td>\\n\",\n              \"      <td>0.067408</td>\\n\",\n              \"      <td>0.344840</td>\\n\",\n              \"      <td>0.285870</td>\\n\",\n              \"      <td>0.543030</td>\\n\",\n              \"      <td>0.127340</td>\\n\",\n              \"      <td>-0.486970</td>\\n\",\n              \"      <td>0.968110</td>\\n\",\n              \"      <td>0.647710</td>\\n\",\n              \"      <td>0.373820</td>\\n\",\n              \"      <td>0.019931</td>\\n\",\n              \"      <td>-0.033672</td>\\n\",\n              \"      <td>-0.073184</td>\\n\",\n              \"      <td>0.296830</td>\\n\",\n              \"      <td>0.340420</td>\\n\",\n              \"      <td>-0.599390</td>\\n\",\n              \"      <td>-0.061114</td>\\n\",\n              \"      <td>0.232200</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>today</th>\\n\",\n              \"      <td>-0.156570</td>\\n\",\n              \"      <td>0.594890</td>\\n\",\n              \"      <td>-0.031445</td>\\n\",\n              \"      <td>-0.077586</td>\\n\",\n              \"      <td>0.278630</td>\\n\",\n              \"      <td>-0.509210</td>\\n\",\n              \"      <td>-0.066350</td>\\n\",\n              \"      <td>-0.081890</td>\\n\",\n              \"      <td>-0.047986</td>\\n\",\n              \"      <td>2.803600</td>\\n\",\n              \"      <td>-0.131820</td>\\n\",\n              \"      <td>-0.627100</td>\\n\",\n              \"      <td>0.253880</td>\\n\",\n              \"      <td>-0.472910</td>\\n\",\n              \"      <td>-0.428750</td>\\n\",\n              \"      <td>0.143520</td>\\n\",\n              \"      <td>-0.118180</td>\\n\",\n              \"      <td>0.679740</td>\\n\",\n              \"      <td>-0.006229</td>\\n\",\n              \"      <td>-0.001527</td>\\n\",\n              \"      <td>-0.163790</td>\\n\",\n              \"      <td>-0.034067</td>\\n\",\n              \"      <td>0.271020</td>\\n\",\n              \"      <td>0.054245</td>\\n\",\n              \"      <td>-0.011752</td>\\n\",\n              \"      <td>0.324470</td>\\n\",\n              \"      <td>-0.321400</td>\\n\",\n              \"      <td>-0.003704</td>\\n\",\n              \"      <td>-0.205390</td>\\n\",\n              \"      <td>0.057008</td>\\n\",\n              \"      <td>0.177460</td>\\n\",\n              \"      <td>-0.166030</td>\\n\",\n              \"      <td>0.505320</td>\\n\",\n              \"      <td>-0.215200</td>\\n\",\n              \"      <td>0.010503</td>\\n\",\n              \"      <td>0.598390</td>\\n\",\n              \"      <td>0.021347</td>\\n\",\n              \"      <td>0.103650</td>\\n\",\n              \"      <td>0.023387</td>\\n\",\n              \"      <td>0.097183</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.553160</td>\\n\",\n              \"      <td>0.100970</td>\\n\",\n              \"      <td>-0.386630</td>\\n\",\n              \"      <td>0.012178</td>\\n\",\n              \"      <td>-0.181380</td>\\n\",\n              \"      <td>-0.381290</td>\\n\",\n              \"      <td>-0.200480</td>\\n\",\n              \"      <td>-0.347470</td>\\n\",\n              \"      <td>0.702780</td>\\n\",\n              \"      <td>0.299910</td>\\n\",\n              \"      <td>-0.198150</td>\\n\",\n              \"      <td>0.041330</td>\\n\",\n              \"      <td>-0.169990</td>\\n\",\n              \"      <td>0.346500</td>\\n\",\n              \"      <td>-0.135520</td>\\n\",\n              \"      <td>0.162350</td>\\n\",\n              \"      <td>-0.145150</td>\\n\",\n              \"      <td>0.289770</td>\\n\",\n              \"      <td>0.095377</td>\\n\",\n              \"      <td>-0.113840</td>\\n\",\n              \"      <td>0.372630</td>\\n\",\n              \"      <td>-0.116170</td>\\n\",\n              \"      <td>0.091593</td>\\n\",\n              \"      <td>0.126660</td>\\n\",\n              \"      <td>-0.035243</td>\\n\",\n              \"      <td>0.261140</td>\\n\",\n              \"      <td>0.235310</td>\\n\",\n              \"      <td>-0.323920</td>\\n\",\n              \"      <td>-0.338050</td>\\n\",\n              \"      <td>0.134510</td>\\n\",\n              \"      <td>-0.326580</td>\\n\",\n              \"      <td>-0.413380</td>\\n\",\n              \"      <td>0.367910</td>\\n\",\n              \"      <td>-0.262630</td>\\n\",\n              \"      <td>-0.203690</td>\\n\",\n              \"      <td>-0.296560</td>\\n\",\n              \"      <td>-0.014873</td>\\n\",\n              \"      <td>-0.250060</td>\\n\",\n              \"      <td>-0.115940</td>\\n\",\n              \"      <td>0.083741</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <td>-0.072368</td>\\n\",\n              \"      <td>0.233200</td>\\n\",\n              \"      <td>0.137260</td>\\n\",\n              \"      <td>-0.156630</td>\\n\",\n              \"      <td>0.248440</td>\\n\",\n              \"      <td>0.349870</td>\\n\",\n              \"      <td>-0.241700</td>\\n\",\n              \"      <td>-0.091426</td>\\n\",\n              \"      <td>-0.530150</td>\\n\",\n              \"      <td>1.341300</td>\\n\",\n              \"      <td>-0.867850</td>\\n\",\n              \"      <td>-0.131830</td>\\n\",\n              \"      <td>-0.596790</td>\\n\",\n              \"      <td>-0.344150</td>\\n\",\n              \"      <td>-0.161210</td>\\n\",\n              \"      <td>-0.000925</td>\\n\",\n              \"      <td>0.532670</td>\\n\",\n              \"      <td>2.132900</td>\\n\",\n              \"      <td>0.021933</td>\\n\",\n              \"      <td>-0.519330</td>\\n\",\n              \"      <td>0.365570</td>\\n\",\n              \"      <td>-0.012978</td>\\n\",\n              \"      <td>-0.271540</td>\\n\",\n              \"      <td>0.004896</td>\\n\",\n              \"      <td>-0.118490</td>\\n\",\n              \"      <td>-0.383380</td>\\n\",\n              \"      <td>-0.489440</td>\\n\",\n              \"      <td>0.491470</td>\\n\",\n              \"      <td>0.136640</td>\\n\",\n              \"      <td>-0.096163</td>\\n\",\n              \"      <td>-0.028429</td>\\n\",\n              \"      <td>0.003963</td>\\n\",\n              \"      <td>0.155420</td>\\n\",\n              \"      <td>-0.296800</td>\\n\",\n              \"      <td>-0.148950</td>\\n\",\n              \"      <td>-0.055311</td>\\n\",\n              \"      <td>0.300030</td>\\n\",\n              \"      <td>0.163760</td>\\n\",\n              \"      <td>-0.169410</td>\\n\",\n              \"      <td>-0.101660</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.063701</td>\\n\",\n              \"      <td>0.268550</td>\\n\",\n              \"      <td>0.125370</td>\\n\",\n              \"      <td>0.603330</td>\\n\",\n              \"      <td>0.340680</td>\\n\",\n              \"      <td>-0.364250</td>\\n\",\n              \"      <td>-0.353150</td>\\n\",\n              \"      <td>-0.432980</td>\\n\",\n              \"      <td>-0.420860</td>\\n\",\n              \"      <td>0.157040</td>\\n\",\n              \"      <td>-0.255520</td>\\n\",\n              \"      <td>0.168950</td>\\n\",\n              \"      <td>0.079552</td>\\n\",\n              \"      <td>-0.315130</td>\\n\",\n              \"      <td>0.085769</td>\\n\",\n              \"      <td>-0.079049</td>\\n\",\n              \"      <td>0.000499</td>\\n\",\n              \"      <td>0.415510</td>\\n\",\n              \"      <td>0.130620</td>\\n\",\n              \"      <td>0.218690</td>\\n\",\n              \"      <td>0.170560</td>\\n\",\n              \"      <td>-0.236900</td>\\n\",\n              \"      <td>-0.390740</td>\\n\",\n              \"      <td>0.059123</td>\\n\",\n              \"      <td>-0.080229</td>\\n\",\n              \"      <td>0.119570</td>\\n\",\n              \"      <td>0.372940</td>\\n\",\n              \"      <td>0.389800</td>\\n\",\n              \"      <td>0.427670</td>\\n\",\n              \"      <td>-0.112340</td>\\n\",\n              \"      <td>-0.405170</td>\\n\",\n              \"      <td>0.243570</td>\\n\",\n              \"      <td>0.437300</td>\\n\",\n              \"      <td>-0.461520</td>\\n\",\n              \"      <td>-0.352710</td>\\n\",\n              \"      <td>0.336250</td>\\n\",\n              \"      <td>0.069899</td>\\n\",\n              \"      <td>-0.111550</td>\\n\",\n              \"      <td>0.532930</td>\\n\",\n              \"      <td>0.712680</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <td>0.259230</td>\\n\",\n              \"      <td>-0.854690</td>\\n\",\n              \"      <td>0.360010</td>\\n\",\n              \"      <td>-0.642000</td>\\n\",\n              \"      <td>0.568530</td>\\n\",\n              \"      <td>-0.321420</td>\\n\",\n              \"      <td>0.173250</td>\\n\",\n              \"      <td>0.133030</td>\\n\",\n              \"      <td>-0.089720</td>\\n\",\n              \"      <td>1.528600</td>\\n\",\n              \"      <td>-0.289030</td>\\n\",\n              \"      <td>-0.658740</td>\\n\",\n              \"      <td>0.179310</td>\\n\",\n              \"      <td>-0.077445</td>\\n\",\n              \"      <td>0.086629</td>\\n\",\n              \"      <td>-0.132770</td>\\n\",\n              \"      <td>0.189590</td>\\n\",\n              \"      <td>0.243270</td>\\n\",\n              \"      <td>0.194470</td>\\n\",\n              \"      <td>0.256190</td>\\n\",\n              \"      <td>0.115750</td>\\n\",\n              \"      <td>0.441050</td>\\n\",\n              \"      <td>-0.328350</td>\\n\",\n              \"      <td>0.151940</td>\\n\",\n              \"      <td>-0.868790</td>\\n\",\n              \"      <td>0.175560</td>\\n\",\n              \"      <td>-0.190540</td>\\n\",\n              \"      <td>0.382940</td>\\n\",\n              \"      <td>-0.124040</td>\\n\",\n              \"      <td>0.784500</td>\\n\",\n              \"      <td>0.111830</td>\\n\",\n              \"      <td>0.642220</td>\\n\",\n              \"      <td>-0.268260</td>\\n\",\n              \"      <td>0.053329</td>\\n\",\n              \"      <td>-0.055495</td>\\n\",\n              \"      <td>0.750070</td>\\n\",\n              \"      <td>-0.644130</td>\\n\",\n              \"      <td>-0.276970</td>\\n\",\n              \"      <td>-0.108700</td>\\n\",\n              \"      <td>0.445280</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.756250</td>\\n\",\n              \"      <td>0.262880</td>\\n\",\n              \"      <td>-0.039965</td>\\n\",\n              \"      <td>0.037196</td>\\n\",\n              \"      <td>-0.183640</td>\\n\",\n              \"      <td>-0.360540</td>\\n\",\n              \"      <td>0.515670</td>\\n\",\n              \"      <td>0.445350</td>\\n\",\n              \"      <td>-0.235570</td>\\n\",\n              \"      <td>0.452830</td>\\n\",\n              \"      <td>-0.297770</td>\\n\",\n              \"      <td>0.626260</td>\\n\",\n              \"      <td>-0.544090</td>\\n\",\n              \"      <td>-0.003886</td>\\n\",\n              \"      <td>-0.076988</td>\\n\",\n              \"      <td>-0.623640</td>\\n\",\n              \"      <td>0.102650</td>\\n\",\n              \"      <td>0.178460</td>\\n\",\n              \"      <td>-0.097651</td>\\n\",\n              \"      <td>-0.290180</td>\\n\",\n              \"      <td>0.530120</td>\\n\",\n              \"      <td>0.071785</td>\\n\",\n              \"      <td>-0.056542</td>\\n\",\n              \"      <td>-0.011450</td>\\n\",\n              \"      <td>0.053002</td>\\n\",\n              \"      <td>0.323720</td>\\n\",\n              \"      <td>0.379260</td>\\n\",\n              \"      <td>-0.312000</td>\\n\",\n              \"      <td>0.007405</td>\\n\",\n              \"      <td>-0.572380</td>\\n\",\n              \"      <td>-0.470090</td>\\n\",\n              \"      <td>0.063743</td>\\n\",\n              \"      <td>-0.545210</td>\\n\",\n              \"      <td>-0.192310</td>\\n\",\n              \"      <td>-0.301020</td>\\n\",\n              \"      <td>1.068500</td>\\n\",\n              \"      <td>0.231160</td>\\n\",\n              \"      <td>-0.147330</td>\\n\",\n              \"      <td>0.662490</td>\\n\",\n              \"      <td>-0.577420</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <td>0.312550</td>\\n\",\n              \"      <td>-0.303080</td>\\n\",\n              \"      <td>0.019587</td>\\n\",\n              \"      <td>-0.354940</td>\\n\",\n              \"      <td>0.100180</td>\\n\",\n              \"      <td>-0.141530</td>\\n\",\n              \"      <td>-0.514270</td>\\n\",\n              \"      <td>0.886110</td>\\n\",\n              \"      <td>-0.530540</td>\\n\",\n              \"      <td>1.556600</td>\\n\",\n              \"      <td>-0.001385</td>\\n\",\n              \"      <td>-0.214260</td>\\n\",\n              \"      <td>-0.524280</td>\\n\",\n              \"      <td>0.104250</td>\\n\",\n              \"      <td>-0.339810</td>\\n\",\n              \"      <td>0.186400</td>\\n\",\n              \"      <td>0.022981</td>\\n\",\n              \"      <td>1.186600</td>\\n\",\n              \"      <td>-0.180270</td>\\n\",\n              \"      <td>-0.891930</td>\\n\",\n              \"      <td>0.084658</td>\\n\",\n              \"      <td>0.173110</td>\\n\",\n              \"      <td>-0.380410</td>\\n\",\n              \"      <td>0.311870</td>\\n\",\n              \"      <td>-0.259610</td>\\n\",\n              \"      <td>-0.097019</td>\\n\",\n              \"      <td>-0.014994</td>\\n\",\n              \"      <td>0.051264</td>\\n\",\n              \"      <td>0.068153</td>\\n\",\n              \"      <td>0.035770</td>\\n\",\n              \"      <td>-0.123790</td>\\n\",\n              \"      <td>0.201050</td>\\n\",\n              \"      <td>-0.246020</td>\\n\",\n              \"      <td>-0.070083</td>\\n\",\n              \"      <td>-0.265050</td>\\n\",\n              \"      <td>-0.012957</td>\\n\",\n              \"      <td>-0.184630</td>\\n\",\n              \"      <td>-0.129890</td>\\n\",\n              \"      <td>0.084696</td>\\n\",\n              \"      <td>-0.021024</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.263900</td>\\n\",\n              \"      <td>0.108530</td>\\n\",\n              \"      <td>0.030066</td>\\n\",\n              \"      <td>-0.175170</td>\\n\",\n              \"      <td>0.155300</td>\\n\",\n              \"      <td>-0.880140</td>\\n\",\n              \"      <td>-0.195720</td>\\n\",\n              \"      <td>0.157680</td>\\n\",\n              \"      <td>-0.557130</td>\\n\",\n              \"      <td>0.342250</td>\\n\",\n              \"      <td>-0.722380</td>\\n\",\n              \"      <td>0.326730</td>\\n\",\n              \"      <td>-0.051512</td>\\n\",\n              \"      <td>0.090080</td>\\n\",\n              \"      <td>0.378730</td>\\n\",\n              \"      <td>0.013059</td>\\n\",\n              \"      <td>-0.239590</td>\\n\",\n              \"      <td>-0.368900</td>\\n\",\n              \"      <td>0.010188</td>\\n\",\n              \"      <td>-0.158160</td>\\n\",\n              \"      <td>0.291280</td>\\n\",\n              \"      <td>-0.962140</td>\\n\",\n              \"      <td>-0.925610</td>\\n\",\n              \"      <td>-0.122720</td>\\n\",\n              \"      <td>-0.022322</td>\\n\",\n              \"      <td>-0.152050</td>\\n\",\n              \"      <td>0.595670</td>\\n\",\n              \"      <td>0.397470</td>\\n\",\n              \"      <td>0.487380</td>\\n\",\n              \"      <td>-0.147080</td>\\n\",\n              \"      <td>-0.667050</td>\\n\",\n              \"      <td>0.279110</td>\\n\",\n              \"      <td>0.500970</td>\\n\",\n              \"      <td>-0.277580</td>\\n\",\n              \"      <td>-0.143720</td>\\n\",\n              \"      <td>0.342710</td>\\n\",\n              \"      <td>0.287580</td>\\n\",\n              \"      <td>0.537740</td>\\n\",\n              \"      <td>0.363490</td>\\n\",\n              \"      <td>0.496920</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <td>-0.374120</td>\\n\",\n              \"      <td>-0.076264</td>\\n\",\n              \"      <td>0.109260</td>\\n\",\n              \"      <td>0.186620</td>\\n\",\n              \"      <td>0.029943</td>\\n\",\n              \"      <td>0.182700</td>\\n\",\n              \"      <td>-0.631980</td>\\n\",\n              \"      <td>0.133060</td>\\n\",\n              \"      <td>-0.128980</td>\\n\",\n              \"      <td>0.603430</td>\\n\",\n              \"      <td>-0.680410</td>\\n\",\n              \"      <td>-0.142220</td>\\n\",\n              \"      <td>-0.133570</td>\\n\",\n              \"      <td>-0.659430</td>\\n\",\n              \"      <td>0.052402</td>\\n\",\n              \"      <td>0.167450</td>\\n\",\n              \"      <td>0.639230</td>\\n\",\n              \"      <td>1.768000</td>\\n\",\n              \"      <td>0.346190</td>\\n\",\n              \"      <td>-0.624800</td>\\n\",\n              \"      <td>-0.128670</td>\\n\",\n              \"      <td>-0.197030</td>\\n\",\n              \"      <td>-0.374500</td>\\n\",\n              \"      <td>0.330640</td>\\n\",\n              \"      <td>0.046832</td>\\n\",\n              \"      <td>-0.653510</td>\\n\",\n              \"      <td>-0.561360</td>\\n\",\n              \"      <td>0.227370</td>\\n\",\n              \"      <td>0.229230</td>\\n\",\n              \"      <td>-0.415810</td>\\n\",\n              \"      <td>-0.167670</td>\\n\",\n              \"      <td>0.335430</td>\\n\",\n              \"      <td>0.097227</td>\\n\",\n              \"      <td>-0.467030</td>\\n\",\n              \"      <td>-0.026857</td>\\n\",\n              \"      <td>-0.067665</td>\\n\",\n              \"      <td>-0.192110</td>\\n\",\n              \"      <td>-0.133740</td>\\n\",\n              \"      <td>0.016268</td>\\n\",\n              \"      <td>-0.208270</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.117450</td>\\n\",\n              \"      <td>0.055016</td>\\n\",\n              \"      <td>0.236820</td>\\n\",\n              \"      <td>0.898190</td>\\n\",\n              \"      <td>-0.409690</td>\\n\",\n              \"      <td>0.075218</td>\\n\",\n              \"      <td>-0.110300</td>\\n\",\n              \"      <td>-0.409910</td>\\n\",\n              \"      <td>-0.957180</td>\\n\",\n              \"      <td>0.527490</td>\\n\",\n              \"      <td>-0.042655</td>\\n\",\n              \"      <td>0.266180</td>\\n\",\n              \"      <td>0.305260</td>\\n\",\n              \"      <td>-0.519010</td>\\n\",\n              \"      <td>-0.460440</td>\\n\",\n              \"      <td>-0.093834</td>\\n\",\n              \"      <td>0.130060</td>\\n\",\n              \"      <td>0.019268</td>\\n\",\n              \"      <td>0.010198</td>\\n\",\n              \"      <td>0.007583</td>\\n\",\n              \"      <td>0.295510</td>\\n\",\n              \"      <td>0.231560</td>\\n\",\n              \"      <td>-0.034880</td>\\n\",\n              \"      <td>-0.116940</td>\\n\",\n              \"      <td>-0.327330</td>\\n\",\n              \"      <td>0.204910</td>\\n\",\n              \"      <td>0.475000</td>\\n\",\n              \"      <td>0.513100</td>\\n\",\n              \"      <td>-0.145760</td>\\n\",\n              \"      <td>-0.185080</td>\\n\",\n              \"      <td>-0.015404</td>\\n\",\n              \"      <td>0.392890</td>\\n\",\n              \"      <td>-0.034826</td>\\n\",\n              \"      <td>-0.720300</td>\\n\",\n              \"      <td>-0.365320</td>\\n\",\n              \"      <td>0.740510</td>\\n\",\n              \"      <td>0.108390</td>\\n\",\n              \"      <td>-0.365760</td>\\n\",\n              \"      <td>-0.288190</td>\\n\",\n              \"      <td>0.114630</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <td>-0.430730</td>\\n\",\n              \"      <td>-0.016025</td>\\n\",\n              \"      <td>0.484620</td>\\n\",\n              \"      <td>0.101390</td>\\n\",\n              \"      <td>-0.299200</td>\\n\",\n              \"      <td>0.761820</td>\\n\",\n              \"      <td>-0.353130</td>\\n\",\n              \"      <td>-0.325290</td>\\n\",\n              \"      <td>0.156730</td>\\n\",\n              \"      <td>0.873210</td>\\n\",\n              \"      <td>-0.078280</td>\\n\",\n              \"      <td>0.277670</td>\\n\",\n              \"      <td>-0.524210</td>\\n\",\n              \"      <td>0.103800</td>\\n\",\n              \"      <td>-0.018345</td>\\n\",\n              \"      <td>-0.397500</td>\\n\",\n              \"      <td>0.230810</td>\\n\",\n              \"      <td>0.940140</td>\\n\",\n              \"      <td>0.275650</td>\\n\",\n              \"      <td>0.314490</td>\\n\",\n              \"      <td>0.157910</td>\\n\",\n              \"      <td>0.219310</td>\\n\",\n              \"      <td>-0.328710</td>\\n\",\n              \"      <td>-0.187760</td>\\n\",\n              \"      <td>-0.209180</td>\\n\",\n              \"      <td>-0.528110</td>\\n\",\n              \"      <td>-0.425460</td>\\n\",\n              \"      <td>0.020278</td>\\n\",\n              \"      <td>0.124110</td>\\n\",\n              \"      <td>-0.553420</td>\\n\",\n              \"      <td>-0.566570</td>\\n\",\n              \"      <td>0.768710</td>\\n\",\n              \"      <td>0.329540</td>\\n\",\n              \"      <td>-0.153310</td>\\n\",\n              \"      <td>0.631360</td>\\n\",\n              \"      <td>0.108580</td>\\n\",\n              \"      <td>-0.126160</td>\\n\",\n              \"      <td>0.102500</td>\\n\",\n              \"      <td>0.291810</td>\\n\",\n              \"      <td>1.129400</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.011195</td>\\n\",\n              \"      <td>-0.129620</td>\\n\",\n              \"      <td>-0.518830</td>\\n\",\n              \"      <td>0.015317</td>\\n\",\n              \"      <td>0.249340</td>\\n\",\n              \"      <td>0.594640</td>\\n\",\n              \"      <td>-0.209520</td>\\n\",\n              \"      <td>-0.364450</td>\\n\",\n              \"      <td>-0.853380</td>\\n\",\n              \"      <td>-0.196230</td>\\n\",\n              \"      <td>0.425870</td>\\n\",\n              \"      <td>-0.343410</td>\\n\",\n              \"      <td>0.622890</td>\\n\",\n              \"      <td>0.374680</td>\\n\",\n              \"      <td>-0.768440</td>\\n\",\n              \"      <td>0.632930</td>\\n\",\n              \"      <td>0.026989</td>\\n\",\n              \"      <td>-0.281060</td>\\n\",\n              \"      <td>-0.010866</td>\\n\",\n              \"      <td>0.182310</td>\\n\",\n              \"      <td>0.437670</td>\\n\",\n              \"      <td>-0.278490</td>\\n\",\n              \"      <td>0.109020</td>\\n\",\n              \"      <td>-0.177370</td>\\n\",\n              \"      <td>0.025408</td>\\n\",\n              \"      <td>0.480750</td>\\n\",\n              \"      <td>0.586230</td>\\n\",\n              \"      <td>0.424540</td>\\n\",\n              \"      <td>-0.247770</td>\\n\",\n              \"      <td>0.165690</td>\\n\",\n              \"      <td>0.304240</td>\\n\",\n              \"      <td>0.413440</td>\\n\",\n              \"      <td>-0.540730</td>\\n\",\n              \"      <td>-0.035930</td>\\n\",\n              \"      <td>-0.429450</td>\\n\",\n              \"      <td>-0.246590</td>\\n\",\n              \"      <td>0.161490</td>\\n\",\n              \"      <td>-1.065400</td>\\n\",\n              \"      <td>-0.244940</td>\\n\",\n              \"      <td>0.269540</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <td>-0.417810</td>\\n\",\n              \"      <td>-0.035192</td>\\n\",\n              \"      <td>-0.126150</td>\\n\",\n              \"      <td>-0.215930</td>\\n\",\n              \"      <td>-0.669740</td>\\n\",\n              \"      <td>0.513250</td>\\n\",\n              \"      <td>-0.797090</td>\\n\",\n              \"      <td>-0.068611</td>\\n\",\n              \"      <td>0.634660</td>\\n\",\n              \"      <td>1.256300</td>\\n\",\n              \"      <td>-0.809100</td>\\n\",\n              \"      <td>0.012227</td>\\n\",\n              \"      <td>-0.261690</td>\\n\",\n              \"      <td>0.260560</td>\\n\",\n              \"      <td>0.260520</td>\\n\",\n              \"      <td>-0.185840</td>\\n\",\n              \"      <td>-0.285730</td>\\n\",\n              \"      <td>1.359900</td>\\n\",\n              \"      <td>-0.115380</td>\\n\",\n              \"      <td>-0.019430</td>\\n\",\n              \"      <td>-0.033052</td>\\n\",\n              \"      <td>0.386340</td>\\n\",\n              \"      <td>-0.520640</td>\\n\",\n              \"      <td>-0.325880</td>\\n\",\n              \"      <td>-0.255210</td>\\n\",\n              \"      <td>-0.614430</td>\\n\",\n              \"      <td>-0.366000</td>\\n\",\n              \"      <td>0.133900</td>\\n\",\n              \"      <td>0.049880</td>\\n\",\n              \"      <td>-1.093600</td>\\n\",\n              \"      <td>-0.436250</td>\\n\",\n              \"      <td>-0.279800</td>\\n\",\n              \"      <td>0.525020</td>\\n\",\n              \"      <td>-0.450040</td>\\n\",\n              \"      <td>0.196330</td>\\n\",\n              \"      <td>0.611860</td>\\n\",\n              \"      <td>0.004073</td>\\n\",\n              \"      <td>-0.381950</td>\\n\",\n              \"      <td>0.357830</td>\\n\",\n              \"      <td>0.753130</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.016694</td>\\n\",\n              \"      <td>0.168550</td>\\n\",\n              \"      <td>-0.135030</td>\\n\",\n              \"      <td>0.072960</td>\\n\",\n              \"      <td>-0.065344</td>\\n\",\n              \"      <td>0.768680</td>\\n\",\n              \"      <td>-0.194850</td>\\n\",\n              \"      <td>-0.313310</td>\\n\",\n              \"      <td>-0.552650</td>\\n\",\n              \"      <td>-0.488490</td>\\n\",\n              \"      <td>0.470120</td>\\n\",\n              \"      <td>-0.396550</td>\\n\",\n              \"      <td>0.688490</td>\\n\",\n              \"      <td>-0.017080</td>\\n\",\n              \"      <td>-1.037700</td>\\n\",\n              \"      <td>0.081078</td>\\n\",\n              \"      <td>-0.414330</td>\\n\",\n              \"      <td>0.188600</td>\\n\",\n              \"      <td>0.216510</td>\\n\",\n              \"      <td>0.603600</td>\\n\",\n              \"      <td>0.943960</td>\\n\",\n              \"      <td>-0.288970</td>\\n\",\n              \"      <td>-0.023022</td>\\n\",\n              \"      <td>-0.616510</td>\\n\",\n              \"      <td>-0.180130</td>\\n\",\n              \"      <td>0.405020</td>\\n\",\n              \"      <td>0.043301</td>\\n\",\n              \"      <td>-0.438280</td>\\n\",\n              \"      <td>-0.684250</td>\\n\",\n              \"      <td>0.209900</td>\\n\",\n              \"      <td>-0.232860</td>\\n\",\n              \"      <td>-0.139740</td>\\n\",\n              \"      <td>-0.681080</td>\\n\",\n              \"      <td>-0.370920</td>\\n\",\n              \"      <td>-0.545510</td>\\n\",\n              \"      <td>0.073728</td>\\n\",\n              \"      <td>0.111620</td>\\n\",\n              \"      <td>-0.324700</td>\\n\",\n              \"      <td>0.059721</td>\\n\",\n              \"      <td>0.159160</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <td>-0.423290</td>\\n\",\n              \"      <td>-0.264500</td>\\n\",\n              \"      <td>0.200870</td>\\n\",\n              \"      <td>0.082187</td>\\n\",\n              \"      <td>0.066944</td>\\n\",\n              \"      <td>1.027600</td>\\n\",\n              \"      <td>-0.989140</td>\\n\",\n              \"      <td>-0.259950</td>\\n\",\n              \"      <td>0.145960</td>\\n\",\n              \"      <td>0.766450</td>\\n\",\n              \"      <td>-0.581010</td>\\n\",\n              \"      <td>0.317560</td>\\n\",\n              \"      <td>-0.043719</td>\\n\",\n              \"      <td>-0.847330</td>\\n\",\n              \"      <td>0.188070</td>\\n\",\n              \"      <td>-0.716880</td>\\n\",\n              \"      <td>0.009522</td>\\n\",\n              \"      <td>1.124100</td>\\n\",\n              \"      <td>0.437220</td>\\n\",\n              \"      <td>0.371400</td>\\n\",\n              \"      <td>-0.208100</td>\\n\",\n              \"      <td>-0.380830</td>\\n\",\n              \"      <td>-0.282530</td>\\n\",\n              \"      <td>0.159310</td>\\n\",\n              \"      <td>-0.096079</td>\\n\",\n              \"      <td>-0.959680</td>\\n\",\n              \"      <td>-0.222080</td>\\n\",\n              \"      <td>0.299910</td>\\n\",\n              \"      <td>0.163690</td>\\n\",\n              \"      <td>-0.710410</td>\\n\",\n              \"      <td>0.242250</td>\\n\",\n              \"      <td>-0.072045</td>\\n\",\n              \"      <td>0.802380</td>\\n\",\n              \"      <td>-0.477040</td>\\n\",\n              \"      <td>-0.313830</td>\\n\",\n              \"      <td>0.332220</td>\\n\",\n              \"      <td>0.277570</td>\\n\",\n              \"      <td>0.260040</td>\\n\",\n              \"      <td>0.278750</td>\\n\",\n              \"      <td>0.600180</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.157950</td>\\n\",\n              \"      <td>-0.233430</td>\\n\",\n              \"      <td>0.009833</td>\\n\",\n              \"      <td>0.106710</td>\\n\",\n              \"      <td>-0.324040</td>\\n\",\n              \"      <td>0.290390</td>\\n\",\n              \"      <td>-0.099283</td>\\n\",\n              \"      <td>-0.294040</td>\\n\",\n              \"      <td>-0.564550</td>\\n\",\n              \"      <td>0.230860</td>\\n\",\n              \"      <td>0.647260</td>\\n\",\n              \"      <td>-0.244820</td>\\n\",\n              \"      <td>0.223060</td>\\n\",\n              \"      <td>-0.353680</td>\\n\",\n              \"      <td>-0.633440</td>\\n\",\n              \"      <td>0.286330</td>\\n\",\n              \"      <td>-0.448500</td>\\n\",\n              \"      <td>0.002610</td>\\n\",\n              \"      <td>0.687900</td>\\n\",\n              \"      <td>0.707310</td>\\n\",\n              \"      <td>0.353040</td>\\n\",\n              \"      <td>-0.451420</td>\\n\",\n              \"      <td>0.177150</td>\\n\",\n              \"      <td>-0.599130</td>\\n\",\n              \"      <td>0.276450</td>\\n\",\n              \"      <td>0.776900</td>\\n\",\n              \"      <td>0.776190</td>\\n\",\n              \"      <td>0.449290</td>\\n\",\n              \"      <td>0.172610</td>\\n\",\n              \"      <td>-0.184870</td>\\n\",\n              \"      <td>0.048760</td>\\n\",\n              \"      <td>0.351680</td>\\n\",\n              \"      <td>-0.786260</td>\\n\",\n              \"      <td>-0.368790</td>\\n\",\n              \"      <td>-0.528640</td>\\n\",\n              \"      <td>0.287650</td>\\n\",\n              \"      <td>-0.273120</td>\\n\",\n              \"      <td>-1.114000</td>\\n\",\n              \"      <td>0.064322</td>\\n\",\n              \"      <td>0.223620</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <td>0.130740</td>\\n\",\n              \"      <td>-0.193730</td>\\n\",\n              \"      <td>0.253270</td>\\n\",\n              \"      <td>0.090102</td>\\n\",\n              \"      <td>-0.272580</td>\\n\",\n              \"      <td>-0.030571</td>\\n\",\n              \"      <td>0.096945</td>\\n\",\n              \"      <td>-0.115060</td>\\n\",\n              \"      <td>0.484000</td>\\n\",\n              \"      <td>0.848380</td>\\n\",\n              \"      <td>-0.076659</td>\\n\",\n              \"      <td>0.018191</td>\\n\",\n              \"      <td>-0.241220</td>\\n\",\n              \"      <td>0.283660</td>\\n\",\n              \"      <td>-0.104840</td>\\n\",\n              \"      <td>0.246110</td>\\n\",\n              \"      <td>-0.143910</td>\\n\",\n              \"      <td>0.665090</td>\\n\",\n              \"      <td>-0.140930</td>\\n\",\n              \"      <td>-0.278840</td>\\n\",\n              \"      <td>-0.205080</td>\\n\",\n              \"      <td>-0.419600</td>\\n\",\n              \"      <td>-0.690090</td>\\n\",\n              \"      <td>-0.053260</td>\\n\",\n              \"      <td>-0.144340</td>\\n\",\n              \"      <td>-0.039000</td>\\n\",\n              \"      <td>0.298490</td>\\n\",\n              \"      <td>-0.279020</td>\\n\",\n              \"      <td>-0.355020</td>\\n\",\n              \"      <td>-0.702110</td>\\n\",\n              \"      <td>-0.238980</td>\\n\",\n              \"      <td>0.428790</td>\\n\",\n              \"      <td>0.333940</td>\\n\",\n              \"      <td>0.089014</td>\\n\",\n              \"      <td>0.005472</td>\\n\",\n              \"      <td>0.178270</td>\\n\",\n              \"      <td>0.014409</td>\\n\",\n              \"      <td>-0.317270</td>\\n\",\n              \"      <td>0.134030</td>\\n\",\n              \"      <td>0.863840</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.284800</td>\\n\",\n              \"      <td>0.227920</td>\\n\",\n              \"      <td>0.139690</td>\\n\",\n              \"      <td>0.382060</td>\\n\",\n              \"      <td>-0.355480</td>\\n\",\n              \"      <td>0.238640</td>\\n\",\n              \"      <td>-0.201450</td>\\n\",\n              \"      <td>0.166890</td>\\n\",\n              \"      <td>-0.696860</td>\\n\",\n              \"      <td>0.601810</td>\\n\",\n              \"      <td>0.053797</td>\\n\",\n              \"      <td>-0.024351</td>\\n\",\n              \"      <td>0.917220</td>\\n\",\n              \"      <td>0.472390</td>\\n\",\n              \"      <td>-0.595590</td>\\n\",\n              \"      <td>0.690710</td>\\n\",\n              \"      <td>-0.247270</td>\\n\",\n              \"      <td>0.163100</td>\\n\",\n              \"      <td>0.335320</td>\\n\",\n              \"      <td>0.524700</td>\\n\",\n              \"      <td>0.196020</td>\\n\",\n              \"      <td>-0.398660</td>\\n\",\n              \"      <td>0.400470</td>\\n\",\n              \"      <td>0.066376</td>\\n\",\n              \"      <td>-0.183670</td>\\n\",\n              \"      <td>0.483620</td>\\n\",\n              \"      <td>0.701590</td>\\n\",\n              \"      <td>0.019826</td>\\n\",\n              \"      <td>-0.162880</td>\\n\",\n              \"      <td>0.915870</td>\\n\",\n              \"      <td>0.142080</td>\\n\",\n              \"      <td>0.481910</td>\\n\",\n              \"      <td>0.045167</td>\\n\",\n              \"      <td>0.057151</td>\\n\",\n              \"      <td>-0.149520</td>\\n\",\n              \"      <td>-0.495130</td>\\n\",\n              \"      <td>-0.086677</td>\\n\",\n              \"      <td>-0.569040</td>\\n\",\n              \"      <td>-0.359290</td>\\n\",\n              \"      <td>0.097443</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <td>0.139490</td>\\n\",\n              \"      <td>0.534530</td>\\n\",\n              \"      <td>-0.252470</td>\\n\",\n              \"      <td>-0.125650</td>\\n\",\n              \"      <td>0.048748</td>\\n\",\n              \"      <td>0.152440</td>\\n\",\n              \"      <td>0.199060</td>\\n\",\n              \"      <td>-0.065970</td>\\n\",\n              \"      <td>0.128830</td>\\n\",\n              \"      <td>2.055900</td>\\n\",\n              \"      <td>-0.443390</td>\\n\",\n              \"      <td>-0.101740</td>\\n\",\n              \"      <td>0.271180</td>\\n\",\n              \"      <td>-0.124290</td>\\n\",\n              \"      <td>-0.457530</td>\\n\",\n              \"      <td>0.055878</td>\\n\",\n              \"      <td>-0.303950</td>\\n\",\n              \"      <td>0.795430</td>\\n\",\n              \"      <td>-0.290600</td>\\n\",\n              \"      <td>0.519080</td>\\n\",\n              \"      <td>0.169090</td>\\n\",\n              \"      <td>-0.327430</td>\\n\",\n              \"      <td>0.206060</td>\\n\",\n              \"      <td>-0.083885</td>\\n\",\n              \"      <td>0.196960</td>\\n\",\n              \"      <td>0.328470</td>\\n\",\n              \"      <td>0.087838</td>\\n\",\n              \"      <td>-0.127840</td>\\n\",\n              \"      <td>0.309790</td>\\n\",\n              \"      <td>0.206920</td>\\n\",\n              \"      <td>-0.085855</td>\\n\",\n              \"      <td>0.547900</td>\\n\",\n              \"      <td>-0.423440</td>\\n\",\n              \"      <td>0.345730</td>\\n\",\n              \"      <td>0.229210</td>\\n\",\n              \"      <td>-0.215380</td>\\n\",\n              \"      <td>0.091481</td>\\n\",\n              \"      <td>-0.278010</td>\\n\",\n              \"      <td>-0.341830</td>\\n\",\n              \"      <td>-0.130670</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.055732</td>\\n\",\n              \"      <td>0.319250</td>\\n\",\n              \"      <td>-0.262930</td>\\n\",\n              \"      <td>0.306830</td>\\n\",\n              \"      <td>0.094407</td>\\n\",\n              \"      <td>0.344400</td>\\n\",\n              \"      <td>0.303240</td>\\n\",\n              \"      <td>0.417650</td>\\n\",\n              \"      <td>-0.104270</td>\\n\",\n              \"      <td>0.418500</td>\\n\",\n              \"      <td>-0.678930</td>\\n\",\n              \"      <td>-0.160720</td>\\n\",\n              \"      <td>-0.820230</td>\\n\",\n              \"      <td>-0.014762</td>\\n\",\n              \"      <td>-0.091018</td>\\n\",\n              \"      <td>-0.008955</td>\\n\",\n              \"      <td>-0.026122</td>\\n\",\n              \"      <td>-0.134550</td>\\n\",\n              \"      <td>0.192630</td>\\n\",\n              \"      <td>0.331130</td>\\n\",\n              \"      <td>-0.152970</td>\\n\",\n              \"      <td>-0.368220</td>\\n\",\n              \"      <td>-0.146490</td>\\n\",\n              \"      <td>-0.315470</td>\\n\",\n              \"      <td>0.139630</td>\\n\",\n              \"      <td>0.298850</td>\\n\",\n              \"      <td>0.671980</td>\\n\",\n              \"      <td>0.220490</td>\\n\",\n              \"      <td>-0.182790</td>\\n\",\n              \"      <td>-0.248110</td>\\n\",\n              \"      <td>-0.124380</td>\\n\",\n              \"      <td>0.178440</td>\\n\",\n              \"      <td>-0.099469</td>\\n\",\n              \"      <td>0.008682</td>\\n\",\n              \"      <td>0.089213</td>\\n\",\n              \"      <td>-0.075513</td>\\n\",\n              \"      <td>-0.049069</td>\\n\",\n              \"      <td>-0.015228</td>\\n\",\n              \"      <td>0.088408</td>\\n\",\n              \"      <td>0.302170</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <td>-0.773320</td>\\n\",\n              \"      <td>-0.282540</td>\\n\",\n              \"      <td>0.580760</td>\\n\",\n              \"      <td>0.841480</td>\\n\",\n              \"      <td>0.258540</td>\\n\",\n              \"      <td>0.585210</td>\\n\",\n              \"      <td>-0.021890</td>\\n\",\n              \"      <td>-0.463680</td>\\n\",\n              \"      <td>0.139070</td>\\n\",\n              \"      <td>0.658720</td>\\n\",\n              \"      <td>-0.168670</td>\\n\",\n              \"      <td>0.192260</td>\\n\",\n              \"      <td>-0.398010</td>\\n\",\n              \"      <td>-0.600910</td>\\n\",\n              \"      <td>-0.241560</td>\\n\",\n              \"      <td>-0.088710</td>\\n\",\n              \"      <td>0.099011</td>\\n\",\n              \"      <td>0.838680</td>\\n\",\n              \"      <td>0.397170</td>\\n\",\n              \"      <td>0.288050</td>\\n\",\n              \"      <td>0.477210</td>\\n\",\n              \"      <td>-0.160270</td>\\n\",\n              \"      <td>-0.011555</td>\\n\",\n              \"      <td>0.400100</td>\\n\",\n              \"      <td>-0.178950</td>\\n\",\n              \"      <td>-0.941120</td>\\n\",\n              \"      <td>-0.538650</td>\\n\",\n              \"      <td>0.284690</td>\\n\",\n              \"      <td>0.204900</td>\\n\",\n              \"      <td>-0.603190</td>\\n\",\n              \"      <td>-0.767880</td>\\n\",\n              \"      <td>0.331020</td>\\n\",\n              \"      <td>0.508820</td>\\n\",\n              \"      <td>-0.166050</td>\\n\",\n              \"      <td>0.729980</td>\\n\",\n              \"      <td>0.247200</td>\\n\",\n              \"      <td>-0.409570</td>\\n\",\n              \"      <td>-0.030922</td>\\n\",\n              \"      <td>-0.147350</td>\\n\",\n              \"      <td>1.449700</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.083141</td>\\n\",\n              \"      <td>-0.412700</td>\\n\",\n              \"      <td>0.057152</td>\\n\",\n              \"      <td>0.079565</td>\\n\",\n              \"      <td>-0.370370</td>\\n\",\n              \"      <td>0.430860</td>\\n\",\n              \"      <td>-0.237530</td>\\n\",\n              \"      <td>-0.541830</td>\\n\",\n              \"      <td>-0.926910</td>\\n\",\n              \"      <td>0.089818</td>\\n\",\n              \"      <td>0.516110</td>\\n\",\n              \"      <td>-0.174690</td>\\n\",\n              \"      <td>0.482730</td>\\n\",\n              \"      <td>0.580170</td>\\n\",\n              \"      <td>-0.693060</td>\\n\",\n              \"      <td>0.632340</td>\\n\",\n              \"      <td>-0.079333</td>\\n\",\n              \"      <td>-0.008798</td>\\n\",\n              \"      <td>0.058371</td>\\n\",\n              \"      <td>0.006332</td>\\n\",\n              \"      <td>-0.053509</td>\\n\",\n              \"      <td>-0.074803</td>\\n\",\n              \"      <td>0.139680</td>\\n\",\n              \"      <td>0.391960</td>\\n\",\n              \"      <td>0.584610</td>\\n\",\n              \"      <td>0.275520</td>\\n\",\n              \"      <td>0.755370</td>\\n\",\n              \"      <td>0.418950</td>\\n\",\n              \"      <td>-0.183280</td>\\n\",\n              \"      <td>0.452320</td>\\n\",\n              \"      <td>0.464470</td>\\n\",\n              \"      <td>0.481400</td>\\n\",\n              \"      <td>-0.829200</td>\\n\",\n              \"      <td>0.354910</td>\\n\",\n              \"      <td>0.224530</td>\\n\",\n              \"      <td>-0.493920</td>\\n\",\n              \"      <td>0.456930</td>\\n\",\n              \"      <td>-0.649100</td>\\n\",\n              \"      <td>-0.131930</td>\\n\",\n              \"      <td>0.372040</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <td>-0.445630</td>\\n\",\n              \"      <td>0.191510</td>\\n\",\n              \"      <td>-0.249210</td>\\n\",\n              \"      <td>0.465900</td>\\n\",\n              \"      <td>0.161950</td>\\n\",\n              \"      <td>0.212780</td>\\n\",\n              \"      <td>-0.046480</td>\\n\",\n              \"      <td>0.021170</td>\\n\",\n              \"      <td>0.417660</td>\\n\",\n              \"      <td>1.686900</td>\\n\",\n              \"      <td>-0.451860</td>\\n\",\n              \"      <td>-0.011807</td>\\n\",\n              \"      <td>0.072409</td>\\n\",\n              \"      <td>-0.114820</td>\\n\",\n              \"      <td>-0.534210</td>\\n\",\n              \"      <td>-0.150700</td>\\n\",\n              \"      <td>-0.352960</td>\\n\",\n              \"      <td>1.711500</td>\\n\",\n              \"      <td>-0.211920</td>\\n\",\n              \"      <td>-0.400470</td>\\n\",\n              \"      <td>-0.420410</td>\\n\",\n              \"      <td>0.076042</td>\\n\",\n              \"      <td>0.023444</td>\\n\",\n              \"      <td>-0.744810</td>\\n\",\n              \"      <td>0.006499</td>\\n\",\n              \"      <td>0.443510</td>\\n\",\n              \"      <td>0.484180</td>\\n\",\n              \"      <td>-0.541020</td>\\n\",\n              \"      <td>0.375070</td>\\n\",\n              \"      <td>-0.595550</td>\\n\",\n              \"      <td>0.097029</td>\\n\",\n              \"      <td>0.119870</td>\\n\",\n              \"      <td>-0.079122</td>\\n\",\n              \"      <td>-0.053397</td>\\n\",\n              \"      <td>-0.028888</td>\\n\",\n              \"      <td>0.157510</td>\\n\",\n              \"      <td>0.164100</td>\\n\",\n              \"      <td>0.288250</td>\\n\",\n              \"      <td>-0.065758</td>\\n\",\n              \"      <td>-0.240000</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>-0.185420</td>\\n\",\n              \"      <td>-0.064913</td>\\n\",\n              \"      <td>0.242120</td>\\n\",\n              \"      <td>-0.674920</td>\\n\",\n              \"      <td>0.394260</td>\\n\",\n              \"      <td>-0.304280</td>\\n\",\n              \"      <td>0.103000</td>\\n\",\n              \"      <td>0.336920</td>\\n\",\n              \"      <td>0.300430</td>\\n\",\n              \"      <td>0.349690</td>\\n\",\n              \"      <td>0.353660</td>\\n\",\n              \"      <td>0.017008</td>\\n\",\n              \"      <td>-0.170840</td>\\n\",\n              \"      <td>-0.286230</td>\\n\",\n              \"      <td>-0.106920</td>\\n\",\n              \"      <td>0.313400</td>\\n\",\n              \"      <td>0.307010</td>\\n\",\n              \"      <td>-0.103920</td>\\n\",\n              \"      <td>0.231590</td>\\n\",\n              \"      <td>0.027126</td>\\n\",\n              \"      <td>0.169710</td>\\n\",\n              \"      <td>0.010259</td>\\n\",\n              \"      <td>-0.171380</td>\\n\",\n              \"      <td>0.448950</td>\\n\",\n              \"      <td>-0.293820</td>\\n\",\n              \"      <td>-0.312280</td>\\n\",\n              \"      <td>-0.054189</td>\\n\",\n              \"      <td>0.069783</td>\\n\",\n              \"      <td>-0.104720</td>\\n\",\n              \"      <td>-0.124150</td>\\n\",\n              \"      <td>-0.329460</td>\\n\",\n              \"      <td>0.421860</td>\\n\",\n              \"      <td>-0.039543</td>\\n\",\n              \"      <td>0.150180</td>\\n\",\n              \"      <td>0.338220</td>\\n\",\n              \"      <td>0.049554</td>\\n\",\n              \"      <td>0.149420</td>\\n\",\n              \"      <td>-0.038789</td>\\n\",\n              \"      <td>-0.019069</td>\\n\",\n              \"      <td>0.348650</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"<p>20 rows × 300 columns</p>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                0         1         2    ...       297       298       299\\n\",\n              \"sausages  -0.174290 -0.064869 -0.046976  ... -0.806830  0.619540  0.201200\\n\",\n              \"lazy      -0.353320 -0.299710 -0.176230  ...  0.344190 -0.845300 -0.077383\\n\",\n              \"beautiful  0.171200  0.534390 -0.348540  ...  0.172580  0.063875  0.350990\\n\",\n              \"blue       0.129450  0.036518  0.032298  ...  0.052289  0.182060  0.412640\\n\",\n              \"fox       -0.348680 -0.077720  0.177750  ...  0.123610 -0.553700 -0.544790\\n\",\n              \"jumps     -0.334840  0.215990 -0.350440  ...  0.190290  0.692290 -0.071501\\n\",\n              \"dog       -0.057120  0.052685  0.003026  ...  0.035107  0.042551 -0.010643\\n\",\n              \"breakfast  0.073378  0.227670  0.208420  ... -0.599390 -0.061114  0.232200\\n\",\n              \"today     -0.156570  0.594890 -0.031445  ... -0.250060 -0.115940  0.083741\\n\",\n              \"green     -0.072368  0.233200  0.137260  ... -0.111550  0.532930  0.712680\\n\",\n              \"kings      0.259230 -0.854690  0.360010  ... -0.147330  0.662490 -0.577420\\n\",\n              \"sky        0.312550 -0.303080  0.019587  ...  0.537740  0.363490  0.496920\\n\",\n              \"brown     -0.374120 -0.076264  0.109260  ... -0.365760 -0.288190  0.114630\\n\",\n              \"bacon     -0.430730 -0.016025  0.484620  ... -1.065400 -0.244940  0.269540\\n\",\n              \"eggs      -0.417810 -0.035192 -0.126150  ... -0.324700  0.059721  0.159160\\n\",\n              \"beans     -0.423290 -0.264500  0.200870  ... -1.114000  0.064322  0.223620\\n\",\n              \"toast      0.130740 -0.193730  0.253270  ... -0.569040 -0.359290  0.097443\\n\",\n              \"love       0.139490  0.534530 -0.252470  ... -0.015228  0.088408  0.302170\\n\",\n              \"ham       -0.773320 -0.282540  0.580760  ... -0.649100 -0.131930  0.372040\\n\",\n              \"quick     -0.445630  0.191510 -0.249210  ... -0.038789 -0.019069  0.348650\\n\",\n              \"\\n\",\n              \"[20 rows x 300 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 12\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"fSKGVbkeRiq5\"\n      },\n      \"source\": [\n        \"We can now use t-SNE to visualize these embeddings similar to what we did using our Word2Vec embeddings.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"j6aSesHGRiq5\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 378\n        },\n        \"outputId\": \"50fb644e-cbd4-4937-ac07-25b83d2f331c\"\n      },\n      \"source\": [\n        \"tsne = TSNE(n_components=2, random_state=42, n_iter=5000, perplexity=3)\\n\",\n        \"np.set_printoptions(suppress=True)\\n\",\n        \"T = tsne.fit_transform(word_glove_vectors)\\n\",\n        \"labels = unique_words\\n\",\n        \"\\n\",\n        \"plt.figure(figsize=(12, 6))\\n\",\n        \"plt.scatter(T[:, 0], T[:, 1], c='red', edgecolors='r')\\n\",\n        \"for label, x, y in zip(labels, T[:, 0], T[:, 1]):\\n\",\n        \"    plt.annotate(label, xy=(x+1, y+1), xytext=(0, 0), textcoords='offset points')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"display_data\",\n          \"data\": {\n            \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAtEAAAFpCAYAAABauHSCAAAABHNC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ngB2NB+YfYmuQN4jO6W8vVV9W+AJB+la7gmgO1VtXc4U9fL8CPgKrqH0J4D\\nPghQVQeSfJruzR3gU1V1YDhT1AxfBU4HdrU7C7ur6iNV5TE5oqrqkBmNnEuA9wGPJvl1q90E3Eq3\\n7HEj8ATwnrbvqOdazVmfBHYk+QzwEN1/mGh/fifJNHCArvEeGL+xUJIkSeqTyzkkSZKkPtlES5Ik\\nSX2yiZYkSZL6ZBMtSZIk9ckmWpIkSeqTTbQkSZLUJ5toSZIkqU820ZIkSVKf/gPaPplGScU8bAAA\\nAABJRU5ErkJggg==\\n\",\n            \"text/plain\": [\n              \"<Figure size 864x432 with 1 Axes>\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          }\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"Ce6BV5bFRiq7\"\n      },\n      \"source\": [\n        \"### Looking at term semantic similarity\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"fyO3JzS2Riq8\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 689\n        },\n        \"outputId\": \"9b88675d-eb0f-4693-b318-a43bddcaeaf2\"\n      },\n      \"source\": [\n        \"import numpy as np\\n\",\n        \"from sklearn.metrics.pairwise import cosine_similarity\\n\",\n        \"\\n\",\n        \"similarity_matrix = cosine_similarity(vec_df.values)\\n\",\n        \"similarity_df = pd.DataFrame(similarity_matrix, index=unique_words, columns=unique_words)\\n\",\n        \"similarity_df\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <th>today</th>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sausages</th>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.168205</td>\\n\",\n              \"      <td>0.114540</td>\\n\",\n              \"      <td>0.097443</td>\\n\",\n              \"      <td>0.133348</td>\\n\",\n              \"      <td>0.083306</td>\\n\",\n              \"      <td>0.247529</td>\\n\",\n              \"      <td>0.415231</td>\\n\",\n              \"      <td>0.094879</td>\\n\",\n              \"      <td>0.233169</td>\\n\",\n              \"      <td>0.070071</td>\\n\",\n              \"      <td>0.061753</td>\\n\",\n              \"      <td>0.289625</td>\\n\",\n              \"      <td>0.729162</td>\\n\",\n              \"      <td>0.548310</td>\\n\",\n              \"      <td>0.546647</td>\\n\",\n              \"      <td>0.498062</td>\\n\",\n              \"      <td>0.146917</td>\\n\",\n              \"      <td>0.622770</td>\\n\",\n              \"      <td>0.162966</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>lazy</th>\\n\",\n              \"      <td>0.168205</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.294308</td>\\n\",\n              \"      <td>0.230513</td>\\n\",\n              \"      <td>0.267240</td>\\n\",\n              \"      <td>0.222112</td>\\n\",\n              \"      <td>0.301678</td>\\n\",\n              \"      <td>0.319941</td>\\n\",\n              \"      <td>0.286802</td>\\n\",\n              \"      <td>0.230945</td>\\n\",\n              \"      <td>0.190515</td>\\n\",\n              \"      <td>0.259361</td>\\n\",\n              \"      <td>0.256875</td>\\n\",\n              \"      <td>0.264376</td>\\n\",\n              \"      <td>0.236769</td>\\n\",\n              \"      <td>0.245672</td>\\n\",\n              \"      <td>0.231329</td>\\n\",\n              \"      <td>0.339280</td>\\n\",\n              \"      <td>0.222571</td>\\n\",\n              \"      <td>0.400060</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beautiful</th>\\n\",\n              \"      <td>0.114540</td>\\n\",\n              \"      <td>0.294308</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.461366</td>\\n\",\n              \"      <td>0.210050</td>\\n\",\n              \"      <td>0.142554</td>\\n\",\n              \"      <td>0.280658</td>\\n\",\n              \"      <td>0.314472</td>\\n\",\n              \"      <td>0.314184</td>\\n\",\n              \"      <td>0.392392</td>\\n\",\n              \"      <td>0.158615</td>\\n\",\n              \"      <td>0.428081</td>\\n\",\n              \"      <td>0.355700</td>\\n\",\n              \"      <td>0.151157</td>\\n\",\n              \"      <td>0.214437</td>\\n\",\n              \"      <td>0.165268</td>\\n\",\n              \"      <td>0.189482</td>\\n\",\n              \"      <td>0.594738</td>\\n\",\n              \"      <td>0.110936</td>\\n\",\n              \"      <td>0.289178</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>blue</th>\\n\",\n              \"      <td>0.097443</td>\\n\",\n              \"      <td>0.230513</td>\\n\",\n              \"      <td>0.461366</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.371178</td>\\n\",\n              \"      <td>0.187263</td>\\n\",\n              \"      <td>0.314065</td>\\n\",\n              \"      <td>0.197103</td>\\n\",\n              \"      <td>0.180088</td>\\n\",\n              \"      <td>0.764083</td>\\n\",\n              \"      <td>0.207656</td>\\n\",\n              \"      <td>0.627800</td>\\n\",\n              \"      <td>0.683011</td>\\n\",\n              \"      <td>0.242987</td>\\n\",\n              \"      <td>0.297546</td>\\n\",\n              \"      <td>0.261304</td>\\n\",\n              \"      <td>0.232264</td>\\n\",\n              \"      <td>0.364961</td>\\n\",\n              \"      <td>0.185452</td>\\n\",\n              \"      <td>0.220331</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>fox</th>\\n\",\n              \"      <td>0.133348</td>\\n\",\n              \"      <td>0.267240</td>\\n\",\n              \"      <td>0.210050</td>\\n\",\n              \"      <td>0.371178</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.250834</td>\\n\",\n              \"      <td>0.485855</td>\\n\",\n              \"      <td>0.165064</td>\\n\",\n              \"      <td>0.150072</td>\\n\",\n              \"      <td>0.323800</td>\\n\",\n              \"      <td>0.226735</td>\\n\",\n              \"      <td>0.303459</td>\\n\",\n              \"      <td>0.406912</td>\\n\",\n              \"      <td>0.210082</td>\\n\",\n              \"      <td>0.247314</td>\\n\",\n              \"      <td>0.118537</td>\\n\",\n              \"      <td>0.163371</td>\\n\",\n              \"      <td>0.255050</td>\\n\",\n              \"      <td>0.209454</td>\\n\",\n              \"      <td>0.192686</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>jumps</th>\\n\",\n              \"      <td>0.083306</td>\\n\",\n              \"      <td>0.222112</td>\\n\",\n              \"      <td>0.142554</td>\\n\",\n              \"      <td>0.187263</td>\\n\",\n              \"      <td>0.250834</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.307961</td>\\n\",\n              \"      <td>0.103865</td>\\n\",\n              \"      <td>0.142099</td>\\n\",\n              \"      <td>0.150752</td>\\n\",\n              \"      <td>0.086659</td>\\n\",\n              \"      <td>0.278595</td>\\n\",\n              \"      <td>0.110400</td>\\n\",\n              \"      <td>0.091021</td>\\n\",\n              \"      <td>0.150622</td>\\n\",\n              \"      <td>0.095544</td>\\n\",\n              \"      <td>0.119099</td>\\n\",\n              \"      <td>0.185114</td>\\n\",\n              \"      <td>0.046432</td>\\n\",\n              \"      <td>0.301096</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>dog</th>\\n\",\n              \"      <td>0.247529</td>\\n\",\n              \"      <td>0.301678</td>\\n\",\n              \"      <td>0.280658</td>\\n\",\n              \"      <td>0.314065</td>\\n\",\n              \"      <td>0.485855</td>\\n\",\n              \"      <td>0.307961</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.295957</td>\\n\",\n              \"      <td>0.223730</td>\\n\",\n              \"      <td>0.272693</td>\\n\",\n              \"      <td>0.156674</td>\\n\",\n              \"      <td>0.219087</td>\\n\",\n              \"      <td>0.341204</td>\\n\",\n              \"      <td>0.295123</td>\\n\",\n              \"      <td>0.291202</td>\\n\",\n              \"      <td>0.230778</td>\\n\",\n              \"      <td>0.182994</td>\\n\",\n              \"      <td>0.358715</td>\\n\",\n              \"      <td>0.262579</td>\\n\",\n              \"      <td>0.299892</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>breakfast</th>\\n\",\n              \"      <td>0.415231</td>\\n\",\n              \"      <td>0.319941</td>\\n\",\n              \"      <td>0.314472</td>\\n\",\n              \"      <td>0.197103</td>\\n\",\n              \"      <td>0.165064</td>\\n\",\n              \"      <td>0.103865</td>\\n\",\n              \"      <td>0.295957</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.288788</td>\\n\",\n              \"      <td>0.288437</td>\\n\",\n              \"      <td>0.161841</td>\\n\",\n              \"      <td>0.205429</td>\\n\",\n              \"      <td>0.277158</td>\\n\",\n              \"      <td>0.487737</td>\\n\",\n              \"      <td>0.431108</td>\\n\",\n              \"      <td>0.378215</td>\\n\",\n              \"      <td>0.513436</td>\\n\",\n              \"      <td>0.245735</td>\\n\",\n              \"      <td>0.371688</td>\\n\",\n              \"      <td>0.358221</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>today</th>\\n\",\n              \"      <td>0.094879</td>\\n\",\n              \"      <td>0.286802</td>\\n\",\n              \"      <td>0.314184</td>\\n\",\n              \"      <td>0.180088</td>\\n\",\n              \"      <td>0.150072</td>\\n\",\n              \"      <td>0.142099</td>\\n\",\n              \"      <td>0.223730</td>\\n\",\n              \"      <td>0.288788</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.246754</td>\\n\",\n              \"      <td>0.204743</td>\\n\",\n              \"      <td>0.256770</td>\\n\",\n              \"      <td>0.147418</td>\\n\",\n              \"      <td>0.158949</td>\\n\",\n              \"      <td>0.183048</td>\\n\",\n              \"      <td>0.147652</td>\\n\",\n              \"      <td>0.174257</td>\\n\",\n              \"      <td>0.371650</td>\\n\",\n              \"      <td>0.104115</td>\\n\",\n              \"      <td>0.370023</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>green</th>\\n\",\n              \"      <td>0.233169</td>\\n\",\n              \"      <td>0.230945</td>\\n\",\n              \"      <td>0.392392</td>\\n\",\n              \"      <td>0.764083</td>\\n\",\n              \"      <td>0.323800</td>\\n\",\n              \"      <td>0.150752</td>\\n\",\n              \"      <td>0.272693</td>\\n\",\n              \"      <td>0.288437</td>\\n\",\n              \"      <td>0.246754</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.151519</td>\\n\",\n              \"      <td>0.488385</td>\\n\",\n              \"      <td>0.646850</td>\\n\",\n              \"      <td>0.386664</td>\\n\",\n              \"      <td>0.392072</td>\\n\",\n              \"      <td>0.462498</td>\\n\",\n              \"      <td>0.287608</td>\\n\",\n              \"      <td>0.327302</td>\\n\",\n              \"      <td>0.290761</td>\\n\",\n              \"      <td>0.287504</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>kings</th>\\n\",\n              \"      <td>0.070071</td>\\n\",\n              \"      <td>0.190515</td>\\n\",\n              \"      <td>0.158615</td>\\n\",\n              \"      <td>0.207656</td>\\n\",\n              \"      <td>0.226735</td>\\n\",\n              \"      <td>0.086659</td>\\n\",\n              \"      <td>0.156674</td>\\n\",\n              \"      <td>0.161841</td>\\n\",\n              \"      <td>0.204743</td>\\n\",\n              \"      <td>0.151519</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.263785</td>\\n\",\n              \"      <td>0.193487</td>\\n\",\n              \"      <td>0.146716</td>\\n\",\n              \"      <td>0.118818</td>\\n\",\n              \"      <td>0.092759</td>\\n\",\n              \"      <td>0.125741</td>\\n\",\n              \"      <td>0.263805</td>\\n\",\n              \"      <td>0.127651</td>\\n\",\n              \"      <td>0.127679</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>sky</th>\\n\",\n              \"      <td>0.061753</td>\\n\",\n              \"      <td>0.259361</td>\\n\",\n              \"      <td>0.428081</td>\\n\",\n              \"      <td>0.627800</td>\\n\",\n              \"      <td>0.303459</td>\\n\",\n              \"      <td>0.278595</td>\\n\",\n              \"      <td>0.219087</td>\\n\",\n              \"      <td>0.205429</td>\\n\",\n              \"      <td>0.256770</td>\\n\",\n              \"      <td>0.488385</td>\\n\",\n              \"      <td>0.263785</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.408844</td>\\n\",\n              \"      <td>0.172964</td>\\n\",\n              \"      <td>0.223585</td>\\n\",\n              \"      <td>0.160064</td>\\n\",\n              \"      <td>0.216372</td>\\n\",\n              \"      <td>0.351084</td>\\n\",\n              \"      <td>0.174496</td>\\n\",\n              \"      <td>0.192515</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>brown</th>\\n\",\n              \"      <td>0.289625</td>\\n\",\n              \"      <td>0.256875</td>\\n\",\n              \"      <td>0.355700</td>\\n\",\n              \"      <td>0.683011</td>\\n\",\n              \"      <td>0.406912</td>\\n\",\n              \"      <td>0.110400</td>\\n\",\n              \"      <td>0.341204</td>\\n\",\n              \"      <td>0.277158</td>\\n\",\n              \"      <td>0.147418</td>\\n\",\n              \"      <td>0.646850</td>\\n\",\n              \"      <td>0.193487</td>\\n\",\n              \"      <td>0.408844</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.432891</td>\\n\",\n              \"      <td>0.466903</td>\\n\",\n              \"      <td>0.453427</td>\\n\",\n              \"      <td>0.347578</td>\\n\",\n              \"      <td>0.331943</td>\\n\",\n              \"      <td>0.335111</td>\\n\",\n              \"      <td>0.217009</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>bacon</th>\\n\",\n              \"      <td>0.729162</td>\\n\",\n              \"      <td>0.264376</td>\\n\",\n              \"      <td>0.151157</td>\\n\",\n              \"      <td>0.242987</td>\\n\",\n              \"      <td>0.210082</td>\\n\",\n              \"      <td>0.091021</td>\\n\",\n              \"      <td>0.295123</td>\\n\",\n              \"      <td>0.487737</td>\\n\",\n              \"      <td>0.158949</td>\\n\",\n              \"      <td>0.386664</td>\\n\",\n              \"      <td>0.146716</td>\\n\",\n              \"      <td>0.172964</td>\\n\",\n              \"      <td>0.432891</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.620539</td>\\n\",\n              \"      <td>0.617909</td>\\n\",\n              \"      <td>0.622701</td>\\n\",\n              \"      <td>0.292268</td>\\n\",\n              \"      <td>0.738816</td>\\n\",\n              \"      <td>0.265370</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>eggs</th>\\n\",\n              \"      <td>0.548310</td>\\n\",\n              \"      <td>0.236769</td>\\n\",\n              \"      <td>0.214437</td>\\n\",\n              \"      <td>0.297546</td>\\n\",\n              \"      <td>0.247314</td>\\n\",\n              \"      <td>0.150622</td>\\n\",\n              \"      <td>0.291202</td>\\n\",\n              \"      <td>0.431108</td>\\n\",\n              \"      <td>0.183048</td>\\n\",\n              \"      <td>0.392072</td>\\n\",\n              \"      <td>0.118818</td>\\n\",\n              \"      <td>0.223585</td>\\n\",\n              \"      <td>0.466903</td>\\n\",\n              \"      <td>0.620539</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.585053</td>\\n\",\n              \"      <td>0.495935</td>\\n\",\n              \"      <td>0.254177</td>\\n\",\n              \"      <td>0.489116</td>\\n\",\n              \"      <td>0.245487</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>beans</th>\\n\",\n              \"      <td>0.546647</td>\\n\",\n              \"      <td>0.245672</td>\\n\",\n              \"      <td>0.165268</td>\\n\",\n              \"      <td>0.261304</td>\\n\",\n              \"      <td>0.118537</td>\\n\",\n              \"      <td>0.095544</td>\\n\",\n              \"      <td>0.230778</td>\\n\",\n              \"      <td>0.378215</td>\\n\",\n              \"      <td>0.147652</td>\\n\",\n              \"      <td>0.462498</td>\\n\",\n              \"      <td>0.092759</td>\\n\",\n              \"      <td>0.160064</td>\\n\",\n              \"      <td>0.453427</td>\\n\",\n              \"      <td>0.617909</td>\\n\",\n              \"      <td>0.585053</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.449284</td>\\n\",\n              \"      <td>0.249891</td>\\n\",\n              \"      <td>0.495773</td>\\n\",\n              \"      <td>0.251534</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>toast</th>\\n\",\n              \"      <td>0.498062</td>\\n\",\n              \"      <td>0.231329</td>\\n\",\n              \"      <td>0.189482</td>\\n\",\n              \"      <td>0.232264</td>\\n\",\n              \"      <td>0.163371</td>\\n\",\n              \"      <td>0.119099</td>\\n\",\n              \"      <td>0.182994</td>\\n\",\n              \"      <td>0.513436</td>\\n\",\n              \"      <td>0.174257</td>\\n\",\n              \"      <td>0.287608</td>\\n\",\n              \"      <td>0.125741</td>\\n\",\n              \"      <td>0.216372</td>\\n\",\n              \"      <td>0.347578</td>\\n\",\n              \"      <td>0.622701</td>\\n\",\n              \"      <td>0.495935</td>\\n\",\n              \"      <td>0.449284</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.274246</td>\\n\",\n              \"      <td>0.500586</td>\\n\",\n              \"      <td>0.292624</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>love</th>\\n\",\n              \"      <td>0.146917</td>\\n\",\n              \"      <td>0.339280</td>\\n\",\n              \"      <td>0.594738</td>\\n\",\n              \"      <td>0.364961</td>\\n\",\n              \"      <td>0.255050</td>\\n\",\n              \"      <td>0.185114</td>\\n\",\n              \"      <td>0.358715</td>\\n\",\n              \"      <td>0.245735</td>\\n\",\n              \"      <td>0.371650</td>\\n\",\n              \"      <td>0.327302</td>\\n\",\n              \"      <td>0.263805</td>\\n\",\n              \"      <td>0.351084</td>\\n\",\n              \"      <td>0.331943</td>\\n\",\n              \"      <td>0.292268</td>\\n\",\n              \"      <td>0.254177</td>\\n\",\n              \"      <td>0.249891</td>\\n\",\n              \"      <td>0.274246</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.218128</td>\\n\",\n              \"      <td>0.292446</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>ham</th>\\n\",\n              \"      <td>0.622770</td>\\n\",\n              \"      <td>0.222571</td>\\n\",\n              \"      <td>0.110936</td>\\n\",\n              \"      <td>0.185452</td>\\n\",\n              \"      <td>0.209454</td>\\n\",\n              \"      <td>0.046432</td>\\n\",\n              \"      <td>0.262579</td>\\n\",\n              \"      <td>0.371688</td>\\n\",\n              \"      <td>0.104115</td>\\n\",\n              \"      <td>0.290761</td>\\n\",\n              \"      <td>0.127651</td>\\n\",\n              \"      <td>0.174496</td>\\n\",\n              \"      <td>0.335111</td>\\n\",\n              \"      <td>0.738816</td>\\n\",\n              \"      <td>0.489116</td>\\n\",\n              \"      <td>0.495773</td>\\n\",\n              \"      <td>0.500586</td>\\n\",\n              \"      <td>0.218128</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.191665</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>quick</th>\\n\",\n              \"      <td>0.162966</td>\\n\",\n              \"      <td>0.400060</td>\\n\",\n              \"      <td>0.289178</td>\\n\",\n              \"      <td>0.220331</td>\\n\",\n              \"      <td>0.192686</td>\\n\",\n              \"      <td>0.301096</td>\\n\",\n              \"      <td>0.299892</td>\\n\",\n              \"      <td>0.358221</td>\\n\",\n              \"      <td>0.370023</td>\\n\",\n              \"      <td>0.287504</td>\\n\",\n              \"      <td>0.127679</td>\\n\",\n              \"      <td>0.192515</td>\\n\",\n              \"      <td>0.217009</td>\\n\",\n              \"      <td>0.265370</td>\\n\",\n              \"      <td>0.245487</td>\\n\",\n              \"      <td>0.251534</td>\\n\",\n              \"      <td>0.292624</td>\\n\",\n              \"      <td>0.292446</td>\\n\",\n              \"      <td>0.191665</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"           sausages      lazy  beautiful  ...      love       ham     quick\\n\",\n              \"sausages   1.000000  0.168205   0.114540  ...  0.146917  0.622770  0.162966\\n\",\n              \"lazy       0.168205  1.000000   0.294308  ...  0.339280  0.222571  0.400060\\n\",\n              \"beautiful  0.114540  0.294308   1.000000  ...  0.594738  0.110936  0.289178\\n\",\n              \"blue       0.097443  0.230513   0.461366  ...  0.364961  0.185452  0.220331\\n\",\n              \"fox        0.133348  0.267240   0.210050  ...  0.255050  0.209454  0.192686\\n\",\n              \"jumps      0.083306  0.222112   0.142554  ...  0.185114  0.046432  0.301096\\n\",\n              \"dog        0.247529  0.301678   0.280658  ...  0.358715  0.262579  0.299892\\n\",\n              \"breakfast  0.415231  0.319941   0.314472  ...  0.245735  0.371688  0.358221\\n\",\n              \"today      0.094879  0.286802   0.314184  ...  0.371650  0.104115  0.370023\\n\",\n              \"green      0.233169  0.230945   0.392392  ...  0.327302  0.290761  0.287504\\n\",\n              \"kings      0.070071  0.190515   0.158615  ...  0.263805  0.127651  0.127679\\n\",\n              \"sky        0.061753  0.259361   0.428081  ...  0.351084  0.174496  0.192515\\n\",\n              \"brown      0.289625  0.256875   0.355700  ...  0.331943  0.335111  0.217009\\n\",\n              \"bacon      0.729162  0.264376   0.151157  ...  0.292268  0.738816  0.265370\\n\",\n              \"eggs       0.548310  0.236769   0.214437  ...  0.254177  0.489116  0.245487\\n\",\n              \"beans      0.546647  0.245672   0.165268  ...  0.249891  0.495773  0.251534\\n\",\n              \"toast      0.498062  0.231329   0.189482  ...  0.274246  0.500586  0.292624\\n\",\n              \"love       0.146917  0.339280   0.594738  ...  1.000000  0.218128  0.292446\\n\",\n              \"ham        0.622770  0.222571   0.110936  ...  0.218128  1.000000  0.191665\\n\",\n              \"quick      0.162966  0.400060   0.289178  ...  0.292446  0.191665  1.000000\\n\",\n              \"\\n\",\n              \"[20 rows x 20 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 14\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"JC-aQ1IERiq9\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 374\n        },\n        \"outputId\": \"caead4fe-3923-423f-9b0f-fbe71bcc6097\"\n      },\n      \"source\": [\n        \"feature_names = np.array(unique_words)\\n\",\n        \"similarity_df.apply(lambda row: feature_names[np.argsort(-row.values)[1:4]], \\n\",\n        \"                    axis=1)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"sausages           [bacon, ham, eggs]\\n\",\n              \"lazy         [quick, love, breakfast]\\n\",\n              \"beautiful           [love, blue, sky]\\n\",\n              \"blue              [green, brown, sky]\\n\",\n              \"fox                [dog, brown, blue]\\n\",\n              \"jumps               [dog, quick, sky]\\n\",\n              \"dog                [fox, love, brown]\\n\",\n              \"breakfast        [toast, bacon, eggs]\\n\",\n              \"today        [love, quick, beautiful]\\n\",\n              \"green              [blue, brown, sky]\\n\",\n              \"kings                [love, sky, fox]\\n\",\n              \"sky          [blue, green, beautiful]\\n\",\n              \"brown             [blue, green, eggs]\\n\",\n              \"bacon          [ham, sausages, toast]\\n\",\n              \"eggs         [bacon, beans, sausages]\\n\",\n              \"beans         [bacon, eggs, sausages]\\n\",\n              \"toast         [bacon, breakfast, ham]\\n\",\n              \"love         [beautiful, today, blue]\\n\",\n              \"ham          [bacon, sausages, toast]\\n\",\n              \"quick        [lazy, today, breakfast]\\n\",\n              \"dtype: object\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 15\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"pU1BAEUWRiq_\"\n      },\n      \"source\": [\n        \"# The FastText Model\\n\",\n        \"\\n\",\n        \"The FastText model was first introduced by Facebook in 2016 as an extension and supposedly improvement of the vanilla Word2Vec model. Based on the original paper titled _[‘Enriching Word Vectors with Subword Information’](https://arxiv.org/pdf/1607.04606.pdf)_ by Mikolov et al. which is an excellent read to gain an in-depth understanding of how this model works. Overall, FastText is a framework for learning word representations and also performing robust, fast and accurate text classification. The framework is open-sourced by Facebook on [GitHub](https://github.com/facebookresearch/fastText) and claims to have the following.\\n\",\n        \"\\n\",\n        \"- Recent state-of-the-art English word vectors.\\n\",\n        \"- Word vectors for 157 languages trained on Wikipedia and Crawl.\\n\",\n        \"- Models for language identification and various supervised tasks.\\n\",\n        \"\\n\",\n        \"Though I haven't implemented this model from scratch, based on the research paper, following is what I learnt about how the model works. In general, predictive models like the Word2Vec model typically considers each word as a distinct entity (e.g. where) and generates a dense embedding for the word. However this poses to be a serious limitation with languages having massive vocabularies and many rare words which may not occur a lot in different corpora. \\n\",\n        \"\\n\",\n        \"The Word2Vec model typically ignores the morphological structure of each word and considers a word as a single entity. The FastText model ___considers each word as a Bag of Character n-grams___. This is also called as a ___subword model___ in the paper.\\n\",\n        \"\\n\",\n        \"We add special boundary symbols __<__ and __>__ at the beginning and end of words. This enables us to distinguish prefixes and suffixes from other character sequences. We also include the word __w__ itself in the set of its n-grams, to learn a representation for each word (in addition to its character n-grams). \\n\",\n        \"\\n\",\n        \"Taking the word where and __n=3 (tri-grams)__ as an example, it will be represented by the __character n-grams__: __<wh, whe, her, ere, re>__ and the special sequence __< where >__ representing the whole word. Note that the sequence , corresponding to the word __< her >__ is different from the tri-gram __her__ from the word __where__.\\n\",\n        \"\\n\",\n        \"In practice, the paper recommends in extracting all the n-grams for __n ≥ 3__ and __n ≤ 6__. This is a very simple approach, and different sets of n-grams could be considered, for example taking all prefixes and suffixes. We typically associate a vector representation (embedding) to each n-gram for a word. \\n\",\n        \"\\n\",\n        \"Thus, we can represent a word by the sum of the vector representations of its n-grams or the average of the embedding of these n-grams. Thus, due to this effect of leveraging n-grams from individual words based on their characters, there is a higher chance for rare words to get a good representation since their character based n-grams should occur across other words of the corpus.\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"ZTpq6CyxRiq_\"\n      },\n      \"source\": [\n        \"# Robust FastText Model with Gensim\\n\",\n        \"\\n\",\n        \"The __`gensim`__ package has nice wrappers providing us interfaces to leverage the FastText model available under the `gensim.models.fasttext` module. Let’s apply this once again on our toy corpus.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"qzrr2AiJRirA\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"953c4f62-98e4-42fc-f68d-dda2bc6c5989\"\n      },\n      \"source\": [\n        \"from gensim.models.fasttext import FastText\\n\",\n        \"\\n\",\n        \"# Set values for various parameters\\n\",\n        \"feature_size = 15    # Word vector dimensionality  \\n\",\n        \"window_context = 20  # Context window size                                                                                    \\n\",\n        \"min_word_count = 1   # Minimum word count                        \\n\",\n        \"sample = 1e-3        # Downsample setting for frequent words\\n\",\n        \"sg = 1               # skip-gram model\\n\",\n        \"\\n\",\n        \"ft_model = FastText(tokenized_corpus, size=feature_size, \\n\",\n        \"                     window=window_context, min_count = min_word_count,\\n\",\n        \"                     sg=sg, sample=sample, iter=5000)\\n\",\n        \"ft_model\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"<gensim.models.fasttext.FastText at 0x7fa2752d01d0>\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 16\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"iR6sYaASRirB\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 378\n        },\n        \"outputId\": \"233613d4-3851-4b02-dc33-1ff52f081948\"\n      },\n      \"source\": [\n        \"# visualize embeddings\\n\",\n        \"from sklearn.manifold import TSNE\\n\",\n        \"\\n\",\n        \"words = ft_model.wv.index2word\\n\",\n        \"wvs = ft_model.wv[words]\\n\",\n        \"\\n\",\n        \"tsne = TSNE(n_components=2, random_state=42, n_iter=5000, perplexity=5)\\n\",\n        \"np.set_printoptions(suppress=True)\\n\",\n        \"T = tsne.fit_transform(wvs)\\n\",\n        \"labels = words\\n\",\n        \"\\n\",\n        \"plt.figure(figsize=(12, 6))\\n\",\n        \"plt.scatter(T[:, 0], T[:, 1], c='green', edgecolors='k')\\n\",\n        \"for label, x, y in zip(labels, T[:, 0], T[:, 1]):\\n\",\n        \"    plt.annotate(label, xy=(x+1, y+1), xytext=(0, 0), textcoords='offset points')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"display_data\",\n          \"data\": {\n            \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAuAAAAFpCAYAAADdiZ2EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3XlclWX+//H3BZaGe7lkKRw0N+QA\\nIqi5oaaZk4pLi4rj9lMnzdFxyq8WzkQWrc7YWJpLjU6FX/2mZWVlM06SaFaAHfcsF6DMKS1MCTWB\\n6/cHeEZNywXuw/J6Ph48POc697nvz33P6cybm2sx1loBAAAAcIafrwsAAAAAKhICOAAAAOAgAjgA\\nAADgIAI4AAAA4CACOAAAAOAgAjgAAADgIAI4AAAA4CACOAAAAOAgAjgAAADgIAI4AAAA4KBKvi7g\\nYtWpU8e6XC5flwEAAIByLD09/bC1tm5JHqPMBHCXy6W0tDRflwEAAIByzBiTWdLHoAsKAAAA4CAC\\nOAAAAOAgAjgAAADgIAI4AAAolTIyMhQaGurrMoBiRwAHAAAAHEQABwAApVZ+fr7Gjh2rVq1a6dZb\\nb9Xx48e1aNEiRUdHKzw8XIMGDVJubq4kaeTIkRo/frzat2+vxo0bKzk5WaNHj1bLli01cuRI354I\\ncAYCOABUUCX95/2MjAwtXbrU+zwtLU2TJk2SJJ08eV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37pXb7da0adMUHR192QG8\\nrHwPnW9hIJfLpWnTpikyMlKvvvqq9u7dq9tuu01t2rRR586dvdfkrbfeUrt27dS6dWv16NHDOx3i\\nmRYtWqTevXufHtxcX9J4Y8w6STLGrDLGpBtjdhhjxhW1+Rtjlhhjthtjthljphhj7pAUJSnJGOMx\\nxlxzwRMq6T4uxfVDH3AA5dErSa/YoKZB1vgZG9Q0qMQGYF6poKAg+o+XgNLY//ZCg4MHDBxgmzZt\\najt16mQHDhxoFy5ceFb/Z2sL+0Dfdddd1u1225YtW9rf/e531trC/s7jxo2zoaGhNiQkxN5+++3W\\n2sJBmKf7Oltr7e23327XrVvn83P9n2n/Y91utw0PD7dRUVE2NTXVxsfH28aNG9sOHTrYkSNH2oce\\neshaa+2uXbus2+22ERERNj4+3tsH/PHHH7chISE2PDzc9urVy3733Xf2xIkT9rbbbrMtWrSwsbGx\\nNiYmxnu+CxYssDfddJNt27atHT58uH3wwQettRe+phMnTrStWrWybrfbDh482J44ceKKrkNp/h7a\\nv3+/leTt8z5q1Cj79NNP26CgIPvkk096t+vevbt3sOtHH31ku3XrZq219vvvv/cOml20aJH94x//\\naK219qGHHrJPP/20ffbZZ22/fv2811DS15Lut6cHTErXFv17jaTtkq6T1EbSv87YplbRv8mSouyv\\n5FpTtHGpFxUVZdPS0nxdBgCUez/++KPuuusuffXVV8rPz9ef/vQnTZs2TWlpaapataoGDhyogQMH\\n6ssvv9S1116rP/zhD5Kk+Ph41atXT5MnT/bxGZQdfv5+svFW8j+jMV8yiUYF+QU+qcnVzKXMDplS\\n8BmN+6VGGxopa0+WcnNz1aVLFy1cuFCRkZE+qbG4XOhcgz4MUsbnGY7WkpOTo2rVqikvL08DBgzQ\\n6NGjNWDAAEdrKK0yMjLUpUsX77iB999/X3PmzJHH49EHH3ygoKAg5eTkqG7dumrevLn3fSdPntSu\\nXbu0bds23XfffTp48KB++uknBQcHa82aNUpISNBrr72mRo0aadWqVbrqqqskScaYg5L+aq2dVfQ8\\nQdLp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G5xkqyC9QxucZPg2k55t+bubMmYqOjlZoaKjGjRvn/avMnj171KNHD4WHhysy\\nMlJ79+6VtVZTp05VaGio3G63li9fLklKTk5W165d9fprr6uKXxUNGTxE+3fvJ3z7WGnql1+SuAMO\\nABXYld5tKigo8M7Be3qlP6C4ZGRkKDg4WBs2bFDHjh01evRohYSEaPTo0d5VI3/729/qrrvuUt++\\nfdWuXTtNnz5dAwYM0IkTJ1RQUKB3331X8+fP15o1a3T48GFFR0fr448/1u7duxUbG6sdO3bohhtu\\nUMeOHfX000//rG8xnMUdcABAuXcld5t27typm266SbfccgvhGyWmUaNG6tixoyRp2LBh2rBhg9at\\nW6d27drJ7Xbr/fff144dO3Ts2DEdOHDAO3VflSpVFBAQoA0bNmjIkCHy9/dX/fr1FRMTo9TUVElS\\n27Zt1bBhQ/n5+SkiIkIZGRm+Ok0UqSj98iv5ugAAgO8ENglUZtY5d5suchaIkJAQ7du3r+SKA3T+\\n6ecmTJigtLQ0NWrUSAkJCb+6nPuFVK5c2fvY39//slYNRfE63QUoPiFeWS8X9cufXf765XMHHAAq\\nsIpytwllw6VMP3fusvDVq1dXw4YNtWrVKkmFi7Dk5uaqc+fOWr58ufLz83Xo0CGtX79ebdu29c0J\\n4qKUpjEIJYU74ABQgVWUu00o/U4PCM7tnSsNljKzzp5+7nT/7/Hjxys7O1uhoaG6/vrrFR0d7d3H\\nyy+/rN/97nf685//rKuuukqvvvqqBgwYoE2bNik8PFzGGD311FO6/vrr9dlnn/nwbFHRMQgTAEqx\\nC03D1rVrV82aNUtRUSU6TghwTGkYfFccXnnlFc2ZM0c//fST2rVrp3nz5mnJkiV68sknVatWLYWH\\nh6ty5cp67rnntHfvXsXFxenHH39UbGysnnnmGeXk5OjgwYO6++67dfToUeXl5en5559X586dfX1q\\nFQaDMAEAQIVQHqaf27Vrl5YvX66NGzfK4/HI399fSUlJeuSRR/TRRx9p48aNZ915nzx5siZPnqxt\\n27apYcOG3valS5eqV69e8ng82rJliyIiInxxOmc536JIaWlpmjRpko8qKtsI4ABQyp1vHuQzVatW\\nzft4xYoVGjlypCTp0KFDGjRokKKjoxUdHa2NGzc6WTZwSUrTsvCX69///rfS09MVHR2tiIgI/fvf\\n/9Zf//pXxcTE6Nprr9VVV12lO++807v9pk2bvM+HDh3qbY+OjtbixYuVkJCgbdu2qXr1X13Z3Cei\\noqI0Z84cX5dRJhHAAaCU2717tyZMmKBdu3apRo0a3lUof83kyZM1ZcoUpaamauXKlRozZkwJVwpc\\nvvIwINhaqxEjRsjj8cjj8Wj37t1KSEi45P106dJF69ev14033qiRI0fqpZdeKv5ir8C+ffvUunVr\\nPf300+rTp4+kwuXeR48era5du6px48ZnBfNHHnlEzZs3V6dOnTRkyBDNmjVLkjRnzhyFhIQoLCxM\\ngwcP9sm5+AqDMAGglDt3HuSLveO0du1a7dy50/v86NGjysnJOeuOOVBalIcBwbfccotiY2M1ZcoU\\n1atXT99//71at26tP/zhD8rOzlb16tW1cuVKud1uSVL79u21cuVK3X333Vq2bJl3P5mZmWrYsKHG\\njh2rkydPavPmzRo+fLivTussu3fv1uDBg7VkyRJlZ2frgw8+8L722Wefad26dTp27JiaN2+u8ePH\\ny+PxaOXKldqyZYtOnTqlyMhItWnTRpL0xBNPaP/+/apcubKOHDniq1PyCe6AA0Apd755kC/0/Mz5\\nkAsKCvTRRx9578YdOHCA8I1SrSxNP3fulIlJS5MUEhKiRx99VLfeeqvCwsLUs2dPHTx4UA8++KDa\\ntm2rjh07yuVyqWbNmpKkZ555Rn/9618VFhamPXv2eNuTk5MVHh6u1q1ba/ny5Zo8ebIvT9Xr0KFD\\nio2NVVJSksLDw3/2+u23367KlSurTp06qlevnr755htt3LhRsbGxqlKliqpXr66+fft6tw8LC1Nc\\nXJxeeeUVVapUse4JE8ABoJS70DzIp9WvX1+7du1SQUGBXn/9dW/7rbfeqmeffdb73OPxOFMwUM6d\\nnjIxs0OmbLxVZodMjZsyTklLk3T33XfL4/Fo69atSk9PV/v27TV06FB98cUX2rhxo77//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3jwGlSq2OxKKeQWm1N0ipJ54EF4BvgCnDd9u3apJm3v3Nar98AHuo24pWVAfgyJH0r6ccl\\nXi9Spu22UKZS5oH3ew024t+2236CMt18QNIzzYsujz/KI5BGkByOTfrSMZC0FvgCeNP2H81rqdV2\\nlshpanUEtu/Y3gZsoswQbO05pF5N9R3Avcz28/+lnaQPgRP141Xg0cblTfVc3F1yNya2r9b3BUnH\\nKJ3dNUkbbM/XKeeFXoOcTMNymNptyfa1wXH60nYkraYMFD+xfbSeTq2OYKmcplbHw/Z1SaeApyhL\\noKbqXe5m3gY5nZM0BawHfu8l4BWSO+AtLVoz9xIw2NU/C+ypO3g3Uza6fN91fBPqDPBY3RV9P2VT\\ny2zPMU0cSWskrRscA7so9TkL7KvN9gHH+4lwog3L4Szwan3CxJPAjcb0fywjfelo6rrYj4DLtj9o\\nXEqttjQsp6nV9iQ9IunBevwAsJOytv4UsLs2W1yng/rdDXzn/9kf1+QOeHvvSdpGmdb7GXgDwPZF\\nSTPAJcpO6gO27/QW5QSxfVvSQeArYBVwyPbFnsOaRNPAsbpfZQr41PaXks4AM5JeA34BXu4xxnue\\npM+AHcDDkuaAt4F3WTqHJ4EXKJuv/gT2dx7wBBiS0x3pS0fyNLAXuFDX1wK8RWp1FMNy+kpqtbUN\\nwOH6dJj7gBnbJyRdAj6X9A5wjvLDh/r+saSfKBu39/QR9ErKP2FGRERERHQoS1AiIiIiIjqUAXhE\\nRERERIcyAI+IiIiI6FAG4BERERERHcoAPCIiIiKiQxmAR0RERER0KAPwiIiIiIgOZQAeEREREdGh\\nvwBoT//nYxH0QgAAAABJRU5ErkJggg==\\n\",\n            \"text/plain\": [\n              \"<Figure size 864x432 with 1 Axes>\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          }\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"tzqhdlSpbY8s\"\n      },\n      \"source\": [\n        \"## Embedding Operations\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"_LplYuHBRirE\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 85\n        },\n        \"outputId\": \"00a2d159-159b-4e65-c398-464ffdd3f53c\"\n      },\n      \"source\": [\n        \"ft_model.wv['sky'], ft_model.wv['sky'].shape\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"(array([-1.1745292 ,  1.3008002 , -0.62582475,  0.14681922, -0.46031192,\\n\",\n              \"        -0.65553826, -0.1245426 , -0.09819014, -0.34571466,  0.23251319,\\n\",\n              \"         0.03760778,  0.8506686 , -0.5574059 ,  0.03467001, -0.45169955],\\n\",\n              \"       dtype=float32), (15,))\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 18\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"40z0JRH5RirG\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 105\n        },\n        \"outputId\": \"4a3f3b54-7f35-41c5-f7b2-5738421a029b\"\n      },\n      \"source\": [\n        \"print(ft_model.wv.similarity(w1='ham', w2='sky'))\\n\",\n        \"print(ft_model.wv.similarity(w1='ham', w2='sausages'))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"0.38875625\\n\",\n            \"0.96545506\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"/usr/local/lib/python3.6/dist-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`.\\n\",\n            \"  if np.issubdtype(vec.dtype, np.int):\\n\"\n          ],\n          \"name\": \"stderr\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"7iwDNr-lRirI\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 139\n        },\n        \"outputId\": \"c8988302-e591-4264-d174-5086d703b0ac\"\n      },\n      \"source\": [\n        \"st1 = \\\"dog fox ham\\\"\\n\",\n        \"print('Odd one out for [',st1, ']:',  \\n\",\n        \"      ft_model.wv.doesnt_match(st1.split()))\\n\",\n        \"\\n\",\n        \"st2 = \\\"bacon ham sky sausages\\\"\\n\",\n        \"print('Odd one out for [',st2, ']:', \\n\",\n        \"      ft_model.wv.doesnt_match(st2.split()))\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Odd one out for [ dog fox ham ]: ham\\n\",\n            \"Odd one out for [ bacon ham sky sausages ]: sky\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"/usr/local/lib/python3.6/dist-packages/gensim/models/keyedvectors.py:895: FutureWarning: arrays to stack must be passed as a \\\"sequence\\\" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.\\n\",\n            \"  vectors = vstack(self.word_vec(word, use_norm=True) for word in used_words).astype(REAL)\\n\",\n            \"/usr/local/lib/python3.6/dist-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`.\\n\",\n            \"  if np.issubdtype(vec.dtype, np.int):\\n\"\n          ],\n          \"name\": \"stderr\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"QxZeE7w8RirK\"\n      },\n      \"source\": [\n        \"### Getting document level embeddings\\n\",\n        \"\\n\",\n        \"Now suppose we wanted to cluster the eight documents from our toy corpus, we would need to get the document level embeddings from each of the words present in each document. One strategy would be to average out the word embeddings for each word in a document. This is an extremely useful strategy and you can adopt the same for your own problems. Let’s apply this now on our corpus to get features for each document.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"q8ETS-PxRirK\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"def average_word_vectors(words, model, vocabulary, num_features):\\n\",\n        \"    \\n\",\n        \"    feature_vector = np.zeros((num_features,),dtype=\\\"float64\\\")\\n\",\n        \"    nwords = 0.\\n\",\n        \"    \\n\",\n        \"    for word in words:\\n\",\n        \"        if word in vocabulary: \\n\",\n        \"            nwords = nwords + 1.\\n\",\n        \"            feature_vector = np.add(feature_vector, model.wv[word])\\n\",\n        \"    \\n\",\n        \"    if nwords:\\n\",\n        \"        feature_vector = np.divide(feature_vector, nwords)\\n\",\n        \"        \\n\",\n        \"    return feature_vector\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def averaged_word_vectorizer(corpus, model, num_features):\\n\",\n        \"    vocabulary = set(model.wv.index2word)\\n\",\n        \"    features = [average_word_vectors(tokenized_sentence, model, vocabulary, num_features)\\n\",\n        \"                    for tokenized_sentence in corpus]\\n\",\n        \"    return np.array(features)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"MPFoB8y5RirM\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 297\n        },\n        \"outputId\": \"c6073b7d-b71e-4496-e325-805d3ccacad4\"\n      },\n      \"source\": [\n        \"# get document level embeddings\\n\",\n        \"ft_doc_features = averaged_word_vectorizer(corpus=tokenized_corpus, model=ft_model,\\n\",\n        \"                                             num_features=feature_size)\\n\",\n        \"pd.DataFrame(ft_doc_features)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <th>8</th>\\n\",\n              \"      <th>9</th>\\n\",\n              \"      <th>10</th>\\n\",\n              \"      <th>11</th>\\n\",\n              \"      <th>12</th>\\n\",\n              \"      <th>13</th>\\n\",\n              \"      <th>14</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>-1.017834</td>\\n\",\n              \"      <td>1.219471</td>\\n\",\n              \"      <td>-0.471404</td>\\n\",\n              \"      <td>0.100632</td>\\n\",\n              \"      <td>-0.485411</td>\\n\",\n              \"      <td>-0.580870</td>\\n\",\n              \"      <td>-0.183611</td>\\n\",\n              \"      <td>-0.032766</td>\\n\",\n              \"      <td>-0.266565</td>\\n\",\n              \"      <td>0.289460</td>\\n\",\n              \"      <td>0.074620</td>\\n\",\n              \"      <td>0.748789</td>\\n\",\n              \"      <td>-0.517958</td>\\n\",\n              \"      <td>0.038283</td>\\n\",\n              \"      <td>-0.297274</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>-1.051389</td>\\n\",\n              \"      <td>0.996752</td>\\n\",\n              \"      <td>-0.461333</td>\\n\",\n              \"      <td>0.187398</td>\\n\",\n              \"      <td>-0.399002</td>\\n\",\n              \"      <td>-0.535357</td>\\n\",\n              \"      <td>-0.133190</td>\\n\",\n              \"      <td>-0.102741</td>\\n\",\n              \"      <td>-0.235152</td>\\n\",\n              \"      <td>0.255751</td>\\n\",\n              \"      <td>0.070397</td>\\n\",\n              \"      <td>0.575714</td>\\n\",\n              \"      <td>-0.376731</td>\\n\",\n              \"      <td>0.007694</td>\\n\",\n              \"      <td>-0.241070</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>-0.080685</td>\\n\",\n              \"      <td>1.394714</td>\\n\",\n              \"      <td>1.015425</td>\\n\",\n              \"      <td>0.091486</td>\\n\",\n              \"      <td>-1.111383</td>\\n\",\n              \"      <td>-0.360878</td>\\n\",\n              \"      <td>-0.166006</td>\\n\",\n              \"      <td>0.346778</td>\\n\",\n              \"      <td>-0.375867</td>\\n\",\n              \"      <td>0.003422</td>\\n\",\n              \"      <td>0.676978</td>\\n\",\n              \"      <td>-0.001734</td>\\n\",\n              \"      <td>-0.380349</td>\\n\",\n              \"      <td>0.563245</td>\\n\",\n              \"      <td>0.395930</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>-1.443467</td>\\n\",\n              \"      <td>0.329564</td>\\n\",\n              \"      <td>-0.008377</td>\\n\",\n              \"      <td>1.037905</td>\\n\",\n              \"      <td>-0.312026</td>\\n\",\n              \"      <td>-0.233052</td>\\n\",\n              \"      <td>0.184552</td>\\n\",\n              \"      <td>-0.440906</td>\\n\",\n              \"      <td>-0.320137</td>\\n\",\n              \"      <td>-0.371566</td>\\n\",\n              \"      <td>0.666171</td>\\n\",\n              \"      <td>-0.895322</td>\\n\",\n              \"      <td>0.647324</td>\\n\",\n              \"      <td>-0.199162</td>\\n\",\n              \"      <td>-0.239623</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>-1.307474</td>\\n\",\n              \"      <td>0.324607</td>\\n\",\n              \"      <td>-0.140498</td>\\n\",\n              \"      <td>0.826300</td>\\n\",\n              \"      <td>-0.173477</td>\\n\",\n              \"      <td>-0.265190</td>\\n\",\n              \"      <td>0.072099</td>\\n\",\n              \"      <td>-0.486643</td>\\n\",\n              \"      <td>-0.283610</td>\\n\",\n              \"      <td>-0.157870</td>\\n\",\n              \"      <td>0.412292</td>\\n\",\n              \"      <td>-0.508161</td>\\n\",\n              \"      <td>0.427139</td>\\n\",\n              \"      <td>-0.166446</td>\\n\",\n              \"      <td>-0.225815</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>-0.189542</td>\\n\",\n              \"      <td>1.352578</td>\\n\",\n              \"      <td>0.803024</td>\\n\",\n              \"      <td>0.068530</td>\\n\",\n              \"      <td>-1.020865</td>\\n\",\n              \"      <td>-0.378753</td>\\n\",\n              \"      <td>-0.193295</td>\\n\",\n              \"      <td>0.301214</td>\\n\",\n              \"      <td>-0.350197</td>\\n\",\n              \"      <td>0.057726</td>\\n\",\n              \"      <td>0.584805</td>\\n\",\n              \"      <td>0.126631</td>\\n\",\n              \"      <td>-0.409361</td>\\n\",\n              \"      <td>0.484519</td>\\n\",\n              \"      <td>0.307555</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>-1.085396</td>\\n\",\n              \"      <td>1.229123</td>\\n\",\n              \"      <td>-0.536072</td>\\n\",\n              \"      <td>0.100034</td>\\n\",\n              \"      <td>-0.476581</td>\\n\",\n              \"      <td>-0.611018</td>\\n\",\n              \"      <td>-0.181043</td>\\n\",\n              \"      <td>-0.026112</td>\\n\",\n              \"      <td>-0.259882</td>\\n\",\n              \"      <td>0.283033</td>\\n\",\n              \"      <td>0.046487</td>\\n\",\n              \"      <td>0.772775</td>\\n\",\n              \"      <td>-0.532793</td>\\n\",\n              \"      <td>0.030967</td>\\n\",\n              \"      <td>-0.318839</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>-0.088025</td>\\n\",\n              \"      <td>1.415853</td>\\n\",\n              \"      <td>1.003639</td>\\n\",\n              \"      <td>0.080209</td>\\n\",\n              \"      <td>-1.119665</td>\\n\",\n              \"      <td>-0.375660</td>\\n\",\n              \"      <td>-0.176112</td>\\n\",\n              \"      <td>0.350506</td>\\n\",\n              \"      <td>-0.377900</td>\\n\",\n              \"      <td>0.002104</td>\\n\",\n              \"      <td>0.662523</td>\\n\",\n              \"      <td>0.023472</td>\\n\",\n              \"      <td>-0.398187</td>\\n\",\n              \"      <td>0.561428</td>\\n\",\n              \"      <td>0.385074</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"         0         1         2   ...        12        13        14\\n\",\n              \"0 -1.017834  1.219471 -0.471404  ... -0.517958  0.038283 -0.297274\\n\",\n              \"1 -1.051389  0.996752 -0.461333  ... -0.376731  0.007694 -0.241070\\n\",\n              \"2 -0.080685  1.394714  1.015425  ... -0.380349  0.563245  0.395930\\n\",\n              \"3 -1.443467  0.329564 -0.008377  ...  0.647324 -0.199162 -0.239623\\n\",\n              \"4 -1.307474  0.324607 -0.140498  ...  0.427139 -0.166446 -0.225815\\n\",\n              \"5 -0.189542  1.352578  0.803024  ... -0.409361  0.484519  0.307555\\n\",\n              \"6 -1.085396  1.229123 -0.536072  ... -0.532793  0.030967 -0.318839\\n\",\n              \"7 -0.088025  1.415853  1.003639  ... -0.398187  0.561428  0.385074\\n\",\n              \"\\n\",\n              \"[8 rows x 15 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 22\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"mgrKl_vqRirN\"\n      },\n      \"source\": [\n        \"### Trying out document clustering\\n\",\n        \"\\n\",\n        \"Now that we have our features for each document, let’s cluster these documents using the Affinity Propagation algorithm, which is a clustering algorithm based on the concept of “message passing” between data points and does not need the number of clusters as an explicit input which is often required by partition-based clustering algorithms.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"n9C0aRLwRirO\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 297\n        },\n        \"outputId\": \"cfe31134-897f-4f74-cae9-1f9529c09786\"\n      },\n      \"source\": [\n        \"from sklearn.cluster import AffinityPropagation\\n\",\n        \"\\n\",\n        \"ap = AffinityPropagation()\\n\",\n        \"ap.fit(ft_doc_features)\\n\",\n        \"\\n\",\n        \"cluster_labels = ap.labels_\\n\",\n        \"cluster_labels = pd.DataFrame(cluster_labels, \\n\",\n        \"                              columns=['ClusterLabel'])\\n\",\n        \"\\n\",\n        \"pd.concat([corpus_df, cluster_labels], axis=1)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Document</th>\\n\",\n              \"      <th>Category</th>\\n\",\n              \"      <th>ClusterLabel</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>The sky is blue and beautiful.</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>Love this blue and beautiful sky!</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>The quick brown fox jumps over the lazy dog.</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>A king's breakfast has sausages, ham, bacon, eggs, toast and beans</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>I love green eggs, ham, sausages and bacon!</td>\\n\",\n              \"      <td>food</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <td>The brown fox is quick and the blue dog is lazy!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <td>The sky is very blue and the sky is very beautiful today</td>\\n\",\n              \"      <td>weather</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <td>The dog is lazy but the brown fox is quick!</td>\\n\",\n              \"      <td>animals</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                             Document  ... ClusterLabel\\n\",\n              \"0                                      The sky is blue and beautiful.  ...            0\\n\",\n              \"1                                   Love this blue and beautiful sky!  ...            0\\n\",\n              \"2                        The quick brown fox jumps over the lazy dog.  ...            2\\n\",\n              \"3  A king's breakfast has sausages, ham, bacon, eggs, toast and beans  ...            1\\n\",\n              \"4                         I love green eggs, ham, sausages and bacon!  ...            1\\n\",\n              \"5                    The brown fox is quick and the blue dog is lazy!  ...            2\\n\",\n              \"6            The sky is very blue and the sky is very beautiful today  ...            0\\n\",\n              \"7                         The dog is lazy but the brown fox is quick!  ...            2\\n\",\n              \"\\n\",\n              \"[8 rows x 3 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 23\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"bB6pQQTPRirQ\"\n      },\n      \"source\": [\n        \"We can see that our algorithm has clustered each document into the right group based on our Word2Vec features. Pretty neat! We can also visualize how each document in positioned in each cluster by using [_Principal Component Analysis (PCA)_](https://en.wikipedia.org/wiki/Principal_component_analysis) to reduce the feature dimensions to 2-D and then visualizing the same (by color coding each cluster).\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"3VA6oJnIRirR\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 378\n        },\n        \"outputId\": \"05242d98-b335-44c6-f234-d3c067a16bfa\"\n      },\n      \"source\": [\n        \"from sklearn.decomposition import PCA\\n\",\n        \"\\n\",\n        \"pca = PCA(n_components=2, random_state=42)\\n\",\n        \"pcs = pca.fit_transform(ft_doc_features)\\n\",\n        \"labels = ap.labels_\\n\",\n        \"categories = list(corpus_df['Category'])\\n\",\n        \"plt.figure(figsize=(8, 6))\\n\",\n        \"\\n\",\n        \"for i in range(len(labels)):\\n\",\n        \"    label = labels[i]\\n\",\n        \"    color = 'orange' if label == 0 else 'blue' if label == 1 else 'green'\\n\",\n        \"    annotation_label = categories[i]\\n\",\n        \"    x, y = pcs[i]\\n\",\n        \"    plt.scatter(x, y, c=color, edgecolors='k')\\n\",\n        \"    plt.annotate(annotation_label, xy=(x+1e-2, y+1e-2), xytext=(0, 0), \\n\",\n        \"                 textcoords='offset points')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"display_data\",\n          \"data\": {\n            \"image/png\": \"iVBORw0KGgoAAAANSUhEUgAAAe8AAAFpCAYAAAC1YKAIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBo\\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3X9w1NX97/HXmwiRWCrwDV8L1bDY\\nL2iaHyaw0gQJQ0NRqA4g6lRMx1qxadqrt2WmTp0JKDDG+v2WtnfCqBm0NvhtoNwb7JV6oQIlKFh/\\nsEkBwy9BmgTBWggKEogl9dw/soRIEwhks5uTPB8zGfZz9rPnvPdkySufz579xJxzAgAA/ugT6wIA\\nAMDFIbwBAPAM4Q0AgGcIbwAAPEN4AwDgGcIbAADPEN4AAHiG8AYAwDOENwAAniG8AQDwzGWxLqA9\\niYmJLhAIxLoMAACiprKy8ohzbsiF9uu24R0IBBQKhWJdBgAAUWNmtR3Zj9PmAAB4hvAGAMAzhDcA\\nAJ4hvAEA8AzhDQCAZwhvAAA8Q3gD8F5paakOHTrUsh0IBHTky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yNPmAAD0ZIQ3AACeIbwBAPAM4Q0A\\ngGcIbwAAPEN4AwDgGcIbAADPEN4AAHjm/wPdx/JV3GcdSgAAAABJRU5ErkJggg==\\n\",\n            \"text/plain\": [\n              \"<Figure size 576x432 with 1 Axes>\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          }\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"PvFiGdkMRirS\"\n      },\n      \"source\": [\n        \"Everything looks to be in order as documents in each cluster are closer to each other and far apart from other clusters.\"\n      ]\n    }\n  ]\n}"
  },
  {
    "path": "notebooks/04_NLP_Applications_Text_Similarity_Content_Recommenders.ipynb",
    "content": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"accelerator\": \"GPU\",\n    \"colab\": {\n      \"name\": \"04-NLP Applications - Text Similarity Content Recommenders.ipynb\",\n      \"provenance\": [],\n      \"collapsed_sections\": []\n    },\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.7.6\"\n    }\n  },\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"wGdpBKaHXuoc\"\n      },\n      \"source\": [\n        \"# Movie Recommendations with Document Similarity\\n\",\n        \"\\n\",\n        \"Recommender systems are one of the popular and most adopted applications of machine learning. They are typically used to recommend entities to users and these entites can be anything like products, movies, services and so on. \\n\",\n        \"\\n\",\n        \"Popular examples of recommendations include,\\n\",\n        \"- Amazon suggesting products on its website\\n\",\n        \"- Amazon Prime, Netflix, Hotstar recommending movies\\\\shows\\n\",\n        \"- YouTube recommending videos to watch\\n\",\n        \"\\n\",\n        \"Typically recommender systems can be implemented in three ways:\\n\",\n        \"\\n\",\n        \"- Simple Rule-based Recommenders: Typically based on specific global metrics and thresholds like movie popularity, global ratings etc.\\n\",\n        \"- Content-based Recommenders: This is based on providing similar entities based on a specific entity of interest. Content metadata can be used here like movie descriptions, genre, cast, director and so on\\n\",\n        \"- Collaborative filtering Recommenders: Here we don't need metadata but we try to predict recommendations and ratings based on past ratings of different users and specific items.\\n\",\n        \"\\n\",\n        \"We will be building a movie recommendation system here where based on data\\\\metadata pertaining to different movies, we try and recommend similar movies of interest!\\n\",\n        \"\\n\",\n        \"![](https://i.imgur.com/c7Go7d3.png)\\n\",\n        \"\\n\",\n        \"Since our focus in not really recommendation engines but NLP, we will be leveraging the text-based metadata for each movie to try and recommend similar movies based on specific movies of interest. This falls under content-based recommenders. \"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"S2lYDs1RjvRn\"\n      },\n      \"source\": [\n        \"# Install Dependencies\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"-U-mW8t5YDFH\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 470\n        },\n        \"outputId\": \"bf0849c5-079d-44cf-a71a-de310210787a\"\n      },\n      \"source\": [\n        \"!pip install textsearch\\n\",\n        \"!pip install contractions\\n\",\n        \"import nltk\\n\",\n        \"nltk.download('punkt')\\n\",\n        \"nltk.download('stopwords')\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Collecting textsearch\\n\",\n            \"  Downloading https://files.pythonhosted.org/packages/42/a8/03407021f9555043de5492a2bd7a35c56cc03c2510092b5ec018cae1bbf1/textsearch-0.0.17-py2.py3-none-any.whl\\n\",\n            \"Collecting Unidecode\\n\",\n            \"\\u001b[?25l  Downloading https://files.pythonhosted.org/packages/d0/42/d9edfed04228bacea2d824904cae367ee9efd05e6cce7ceaaedd0b0ad964/Unidecode-1.1.1-py2.py3-none-any.whl (238kB)\\n\",\n            \"\\u001b[K     |████████████████████████████████| 245kB 7.9MB/s \\n\",\n            \"\\u001b[?25hCollecting pyahocorasick\\n\",\n            \"\\u001b[?25l  Downloading https://files.pythonhosted.org/packages/f4/9f/f0d8e8850e12829eea2e778f1c90e3c53a9a799b7f412082a5d21cd19ae1/pyahocorasick-1.4.0.tar.gz (312kB)\\n\",\n            \"\\u001b[K     |████████████████████████████████| 317kB 14.2MB/s \\n\",\n            \"\\u001b[?25hBuilding wheels for collected packages: pyahocorasick\\n\",\n            \"  Building wheel for pyahocorasick (setup.py) ... \\u001b[?25l\\u001b[?25hdone\\n\",\n            \"  Created wheel for pyahocorasick: filename=pyahocorasick-1.4.0-cp36-cp36m-linux_x86_64.whl size=81702 sha256=806fc3ab02550f97e873a75ee295eb4acc7e8b73d1ad761dcd80d0de3dd91064\\n\",\n            \"  Stored in directory: /root/.cache/pip/wheels/0a/90/61/87a55f5b459792fbb2b7ba6b31721b06ff5cf6bde541b40994\\n\",\n            \"Successfully built pyahocorasick\\n\",\n            \"Installing collected packages: Unidecode, pyahocorasick, textsearch\\n\",\n            \"Successfully installed Unidecode-1.1.1 pyahocorasick-1.4.0 textsearch-0.0.17\\n\",\n            \"Collecting contractions\\n\",\n            \"  Downloading https://files.pythonhosted.org/packages/85/41/c3dfd5feb91a8d587ed1a59f553f07c05f95ad4e5d00ab78702fbf8fe48a/contractions-0.0.24-py2.py3-none-any.whl\\n\",\n            \"Requirement already satisfied: textsearch in /usr/local/lib/python3.6/dist-packages (from contractions) (0.0.17)\\n\",\n            \"Requirement already satisfied: pyahocorasick in /usr/local/lib/python3.6/dist-packages (from textsearch->contractions) (1.4.0)\\n\",\n            \"Requirement already satisfied: Unidecode in /usr/local/lib/python3.6/dist-packages (from textsearch->contractions) (1.1.1)\\n\",\n            \"Installing collected packages: contractions\\n\",\n            \"Successfully installed contractions-0.0.24\\n\",\n            \"[nltk_data] Downloading package punkt to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping tokenizers/punkt.zip.\\n\",\n            \"[nltk_data] Downloading package stopwords to /root/nltk_data...\\n\",\n            \"[nltk_data]   Unzipping corpora/stopwords.zip.\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"True\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 1\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"7_de4c8pjvRr\"\n      },\n      \"source\": [\n        \"# Load and View Data\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"ctP-qx30YUyC\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 470\n        },\n        \"outputId\": \"ba2083d4-0322-43bc-b7bb-ee8ee28c7575\"\n      },\n      \"source\": [\n        \"import pandas as pd\\n\",\n        \"\\n\",\n        \"df = pd.read_csv('https://github.com/dipanjanS/nlp_workshop_dhs18/raw/master/Unit%2010%20-%20Project%208%20-%20Movie%20Recommendations%20with%20Document%20Similarity/tmdb_5000_movies.csv.gz', compression='gzip')\\n\",\n        \"df.info()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"<class 'pandas.core.frame.DataFrame'>\\n\",\n            \"RangeIndex: 4803 entries, 0 to 4802\\n\",\n            \"Data columns (total 20 columns):\\n\",\n            \" #   Column                Non-Null Count  Dtype  \\n\",\n            \"---  ------                --------------  -----  \\n\",\n            \" 0   budget                4803 non-null   int64  \\n\",\n            \" 1   genres                4803 non-null   object \\n\",\n            \" 2   homepage              1712 non-null   object \\n\",\n            \" 3   id                    4803 non-null   int64  \\n\",\n            \" 4   keywords              4803 non-null   object \\n\",\n            \" 5   original_language     4803 non-null   object \\n\",\n            \" 6   original_title        4803 non-null   object \\n\",\n            \" 7   overview              4800 non-null   object \\n\",\n            \" 8   popularity            4803 non-null   float64\\n\",\n            \" 9   production_companies  4803 non-null   object \\n\",\n            \" 10  production_countries  4803 non-null   object \\n\",\n            \" 11  release_date          4802 non-null   object \\n\",\n            \" 12  revenue               4803 non-null   int64  \\n\",\n            \" 13  runtime               4801 non-null   float64\\n\",\n            \" 14  spoken_languages      4803 non-null   object \\n\",\n            \" 15  status                4803 non-null   object \\n\",\n            \" 16  tagline               3959 non-null   object \\n\",\n            \" 17  title                 4803 non-null   object \\n\",\n            \" 18  vote_average          4803 non-null   float64\\n\",\n            \" 19  vote_count            4803 non-null   int64  \\n\",\n            \"dtypes: float64(3), int64(4), object(13)\\n\",\n            \"memory usage: 750.6+ KB\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"frQbM_zrZC2D\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 702\n        },\n        \"outputId\": \"8b46b999-021c-4374-e4e8-255c6a1d73c1\"\n      },\n      \"source\": [\n        \"df.head()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>budget</th>\\n\",\n              \"      <th>genres</th>\\n\",\n              \"      <th>homepage</th>\\n\",\n              \"      <th>id</th>\\n\",\n              \"      <th>keywords</th>\\n\",\n              \"      <th>original_language</th>\\n\",\n              \"      <th>original_title</th>\\n\",\n              \"      <th>overview</th>\\n\",\n              \"      <th>popularity</th>\\n\",\n              \"      <th>production_companies</th>\\n\",\n              \"      <th>production_countries</th>\\n\",\n              \"      <th>release_date</th>\\n\",\n              \"      <th>revenue</th>\\n\",\n              \"      <th>runtime</th>\\n\",\n              \"      <th>spoken_languages</th>\\n\",\n              \"      <th>status</th>\\n\",\n              \"      <th>tagline</th>\\n\",\n              \"      <th>title</th>\\n\",\n              \"      <th>vote_average</th>\\n\",\n              \"      <th>vote_count</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>237000000</td>\\n\",\n              \"      <td>[{\\\"id\\\": 28, \\\"name\\\": \\\"Action\\\"}, {\\\"id\\\": 12, \\\"nam...</td>\\n\",\n              \"      <td>http://www.avatarmovie.com/</td>\\n\",\n              \"      <td>19995</td>\\n\",\n              \"      <td>[{\\\"id\\\": 1463, \\\"name\\\": \\\"culture clash\\\"}, {\\\"id\\\":...</td>\\n\",\n              \"      <td>en</td>\\n\",\n              \"      <td>Avatar</td>\\n\",\n              \"      <td>In the 22nd century, a paraplegic Marine is di...</td>\\n\",\n              \"      <td>150.437577</td>\\n\",\n              \"      <td>[{\\\"name\\\": \\\"Ingenious Film Partners\\\", \\\"id\\\": 289...</td>\\n\",\n              \"      <td>[{\\\"iso_3166_1\\\": \\\"US\\\", \\\"name\\\": \\\"United States o...</td>\\n\",\n              \"      <td>2009-12-10</td>\\n\",\n              \"      <td>2787965087</td>\\n\",\n              \"      <td>162.0</td>\\n\",\n              \"      <td>[{\\\"iso_639_1\\\": \\\"en\\\", \\\"name\\\": \\\"English\\\"}, {\\\"iso...</td>\\n\",\n              \"      <td>Released</td>\\n\",\n              \"      <td>Enter the World of Pandora.</td>\\n\",\n              \"      <td>Avatar</td>\\n\",\n              \"      <td>7.2</td>\\n\",\n              \"      <td>11800</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>300000000</td>\\n\",\n              \"      <td>[{\\\"id\\\": 12, \\\"name\\\": \\\"Adventure\\\"}, {\\\"id\\\": 14, \\\"...</td>\\n\",\n              \"      <td>http://disney.go.com/disneypictures/pirates/</td>\\n\",\n              \"      <td>285</td>\\n\",\n              \"      <td>[{\\\"id\\\": 270, \\\"name\\\": \\\"ocean\\\"}, {\\\"id\\\": 726, \\\"na...</td>\\n\",\n              \"      <td>en</td>\\n\",\n              \"      <td>Pirates of the Caribbean: At World's End</td>\\n\",\n              \"      <td>Captain Barbossa, long believed to be dead, ha...</td>\\n\",\n              \"      <td>139.082615</td>\\n\",\n              \"      <td>[{\\\"name\\\": \\\"Walt Disney Pictures\\\", \\\"id\\\": 2}, {\\\"...</td>\\n\",\n              \"      <td>[{\\\"iso_3166_1\\\": \\\"US\\\", \\\"name\\\": \\\"United States o...</td>\\n\",\n              \"      <td>2007-05-19</td>\\n\",\n              \"      <td>961000000</td>\\n\",\n              \"      <td>169.0</td>\\n\",\n              \"      <td>[{\\\"iso_639_1\\\": \\\"en\\\", \\\"name\\\": \\\"English\\\"}]</td>\\n\",\n              \"      <td>Released</td>\\n\",\n              \"      <td>At the end of the world, the adventure begins.</td>\\n\",\n              \"      <td>Pirates of the Caribbean: At World's End</td>\\n\",\n              \"      <td>6.9</td>\\n\",\n              \"      <td>4500</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>245000000</td>\\n\",\n              \"      <td>[{\\\"id\\\": 28, \\\"name\\\": \\\"Action\\\"}, {\\\"id\\\": 12, \\\"nam...</td>\\n\",\n              \"      <td>http://www.sonypictures.com/movies/spectre/</td>\\n\",\n              \"      <td>206647</td>\\n\",\n              \"      <td>[{\\\"id\\\": 470, \\\"name\\\": \\\"spy\\\"}, {\\\"id\\\": 818, \\\"name...</td>\\n\",\n              \"      <td>en</td>\\n\",\n              \"      <td>Spectre</td>\\n\",\n              \"      <td>A cryptic message from Bond’s past sends him o...</td>\\n\",\n              \"      <td>107.376788</td>\\n\",\n              \"      <td>[{\\\"name\\\": \\\"Columbia Pictures\\\", \\\"id\\\": 5}, {\\\"nam...</td>\\n\",\n              \"      <td>[{\\\"iso_3166_1\\\": \\\"GB\\\", \\\"name\\\": \\\"United Kingdom\\\"...</td>\\n\",\n              \"      <td>2015-10-26</td>\\n\",\n              \"      <td>880674609</td>\\n\",\n              \"      <td>148.0</td>\\n\",\n              \"      <td>[{\\\"iso_639_1\\\": \\\"fr\\\", \\\"name\\\": \\\"Fran\\\\u00e7ais\\\"},...</td>\\n\",\n              \"      <td>Released</td>\\n\",\n              \"      <td>A Plan No One Escapes</td>\\n\",\n              \"      <td>Spectre</td>\\n\",\n              \"      <td>6.3</td>\\n\",\n              \"      <td>4466</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>250000000</td>\\n\",\n              \"      <td>[{\\\"id\\\": 28, \\\"name\\\": \\\"Action\\\"}, {\\\"id\\\": 80, \\\"nam...</td>\\n\",\n              \"      <td>http://www.thedarkknightrises.com/</td>\\n\",\n              \"      <td>49026</td>\\n\",\n              \"      <td>[{\\\"id\\\": 849, \\\"name\\\": \\\"dc comics\\\"}, {\\\"id\\\": 853,...</td>\\n\",\n              \"      <td>en</td>\\n\",\n              \"      <td>The Dark Knight Rises</td>\\n\",\n              \"      <td>Following the death of District Attorney Harve...</td>\\n\",\n              \"      <td>112.312950</td>\\n\",\n              \"      <td>[{\\\"name\\\": \\\"Legendary Pictures\\\", \\\"id\\\": 923}, {\\\"...</td>\\n\",\n              \"      <td>[{\\\"iso_3166_1\\\": \\\"US\\\", \\\"name\\\": \\\"United States o...</td>\\n\",\n              \"      <td>2012-07-16</td>\\n\",\n              \"      <td>1084939099</td>\\n\",\n              \"      <td>165.0</td>\\n\",\n              \"      <td>[{\\\"iso_639_1\\\": \\\"en\\\", \\\"name\\\": \\\"English\\\"}]</td>\\n\",\n              \"      <td>Released</td>\\n\",\n              \"      <td>The Legend Ends</td>\\n\",\n              \"      <td>The Dark Knight Rises</td>\\n\",\n              \"      <td>7.6</td>\\n\",\n              \"      <td>9106</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>260000000</td>\\n\",\n              \"      <td>[{\\\"id\\\": 28, \\\"name\\\": \\\"Action\\\"}, {\\\"id\\\": 12, \\\"nam...</td>\\n\",\n              \"      <td>http://movies.disney.com/john-carter</td>\\n\",\n              \"      <td>49529</td>\\n\",\n              \"      <td>[{\\\"id\\\": 818, \\\"name\\\": \\\"based on novel\\\"}, {\\\"id\\\":...</td>\\n\",\n              \"      <td>en</td>\\n\",\n              \"      <td>John Carter</td>\\n\",\n              \"      <td>John Carter is a war-weary, former military ca...</td>\\n\",\n              \"      <td>43.926995</td>\\n\",\n              \"      <td>[{\\\"name\\\": \\\"Walt Disney Pictures\\\", \\\"id\\\": 2}]</td>\\n\",\n              \"      <td>[{\\\"iso_3166_1\\\": \\\"US\\\", \\\"name\\\": \\\"United States o...</td>\\n\",\n              \"      <td>2012-03-07</td>\\n\",\n              \"      <td>284139100</td>\\n\",\n              \"      <td>132.0</td>\\n\",\n              \"      <td>[{\\\"iso_639_1\\\": \\\"en\\\", \\\"name\\\": \\\"English\\\"}]</td>\\n\",\n              \"      <td>Released</td>\\n\",\n              \"      <td>Lost in our world, found in another.</td>\\n\",\n              \"      <td>John Carter</td>\\n\",\n              \"      <td>6.1</td>\\n\",\n              \"      <td>2124</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"      budget  ... vote_count\\n\",\n              \"0  237000000  ...      11800\\n\",\n              \"1  300000000  ...       4500\\n\",\n              \"2  245000000  ...       4466\\n\",\n              \"3  250000000  ...       9106\\n\",\n              \"4  260000000  ...       2124\\n\",\n              \"\\n\",\n              \"[5 rows x 20 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 3\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"2lURVWdjZGHL\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 218\n        },\n        \"outputId\": \"341937af-3a75-4fc9-b8f5-051bd5d48115\"\n      },\n      \"source\": [\n        \"df = df[['title', 'tagline', 'overview', 'popularity']]\\n\",\n        \"df.tagline.fillna('', inplace=True)\\n\",\n        \"df['description'] = df['tagline'].map(str) + ' ' + df['overview']\\n\",\n        \"df.dropna(inplace=True)\\n\",\n        \"df = df.sort_values(by=['popularity'], ascending=False)\\n\",\n        \"df.info()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"<class 'pandas.core.frame.DataFrame'>\\n\",\n            \"Int64Index: 4800 entries, 546 to 4553\\n\",\n            \"Data columns (total 5 columns):\\n\",\n            \" #   Column       Non-Null Count  Dtype  \\n\",\n            \"---  ------       --------------  -----  \\n\",\n            \" 0   title        4800 non-null   object \\n\",\n            \" 1   tagline      4800 non-null   object \\n\",\n            \" 2   overview     4800 non-null   object \\n\",\n            \" 3   popularity   4800 non-null   float64\\n\",\n            \" 4   description  4800 non-null   object \\n\",\n            \"dtypes: float64(1), object(4)\\n\",\n            \"memory usage: 225.0+ KB\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"hfwvf3UgZJK6\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 195\n        },\n        \"outputId\": \"224b2622-664a-4ca2-8bea-2d017d990b74\"\n      },\n      \"source\": [\n        \"df.head()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>title</th>\\n\",\n              \"      <th>tagline</th>\\n\",\n              \"      <th>overview</th>\\n\",\n              \"      <th>popularity</th>\\n\",\n              \"      <th>description</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>546</th>\\n\",\n              \"      <td>Minions</td>\\n\",\n              \"      <td>Before Gru, they had a history of bad bosses</td>\\n\",\n              \"      <td>Minions Stuart, Kevin and Bob are recruited by...</td>\\n\",\n              \"      <td>875.581305</td>\\n\",\n              \"      <td>Before Gru, they had a history of bad bosses M...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>95</th>\\n\",\n              \"      <td>Interstellar</td>\\n\",\n              \"      <td>Mankind was born on Earth. It was never meant ...</td>\\n\",\n              \"      <td>Interstellar chronicles the adventures of a gr...</td>\\n\",\n              \"      <td>724.247784</td>\\n\",\n              \"      <td>Mankind was born on Earth. It was never meant ...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>788</th>\\n\",\n              \"      <td>Deadpool</td>\\n\",\n              \"      <td>Witness the beginning of a happy ending</td>\\n\",\n              \"      <td>Deadpool tells the origin story of former Spec...</td>\\n\",\n              \"      <td>514.569956</td>\\n\",\n              \"      <td>Witness the beginning of a happy ending Deadpo...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>94</th>\\n\",\n              \"      <td>Guardians of the Galaxy</td>\\n\",\n              \"      <td>All heroes start somewhere.</td>\\n\",\n              \"      <td>Light years from Earth, 26 years after being a...</td>\\n\",\n              \"      <td>481.098624</td>\\n\",\n              \"      <td>All heroes start somewhere. Light years from E...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>127</th>\\n\",\n              \"      <td>Mad Max: Fury Road</td>\\n\",\n              \"      <td>What a Lovely Day.</td>\\n\",\n              \"      <td>An apocalyptic story set in the furthest reach...</td>\\n\",\n              \"      <td>434.278564</td>\\n\",\n              \"      <td>What a Lovely Day. An apocalyptic story set in...</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                       title  ...                                        description\\n\",\n              \"546                  Minions  ...  Before Gru, they had a history of bad bosses M...\\n\",\n              \"95              Interstellar  ...  Mankind was born on Earth. It was never meant ...\\n\",\n              \"788                 Deadpool  ...  Witness the beginning of a happy ending Deadpo...\\n\",\n              \"94   Guardians of the Galaxy  ...  All heroes start somewhere. Light years from E...\\n\",\n              \"127       Mad Max: Fury Road  ...  What a Lovely Day. An apocalyptic story set in...\\n\",\n              \"\\n\",\n              \"[5 rows x 5 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 5\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"3wDHsF6qZWNv\"\n      },\n      \"source\": [\n        \"# Build a Movie Recommender System\\n\",\n        \"\\n\",\n        \"Here you will build your own movie recommender system. We will use the following pipeline:\\n\",\n        \"- Text pre-processing\\n\",\n        \"- Feature Engineering\\n\",\n        \"- Document Similarity Computation\\n\",\n        \"- Find top similar movies\\n\",\n        \"- Build a movie recommendation function\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"## Document Similarity\\n\",\n        \"\\n\",\n        \"Recommendations are about understanding the underlying features which make us favour one choice over the other. Similarity between items(in this case movies) is one way to understanding why we choose one movie over another. There are different ways to calculate similarity between two items. One of the most widely used measures is __cosine similarity__ which we have already used in the previous unit.\\n\",\n        \"\\n\",\n        \"### Cosine Similarity\\n\",\n        \"\\n\",\n        \"Cosine Similarity is used to calculate a numeric score to denote the similarity between two text documents. Mathematically, it is defined as follows:\\n\",\n        \"\\n\",\n        \"$$ cosine(x,y) = \\\\frac{x. y^\\\\intercal}{||x||.||y||} $$\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"BjLTJDE9ZXSj\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"2643ed1b-92c6-466e-b9ae-81eeba4be39e\"\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"import re\\n\",\n        \"import numpy as np\\n\",\n        \"import contractions\\n\",\n        \"\\n\",\n        \"stop_words = nltk.corpus.stopwords.words('english')\\n\",\n        \"\\n\",\n        \"def normalize_document(doc):\\n\",\n        \"    # lower case and remove special characters\\\\whitespaces\\n\",\n        \"    doc = re.sub(r'[^a-zA-Z0-9\\\\s]', '', doc, re.I|re.A)\\n\",\n        \"    doc = doc.lower()\\n\",\n        \"    doc = doc.strip()\\n\",\n        \"    doc = contractions.fix(doc)\\n\",\n        \"    # tokenize document\\n\",\n        \"    tokens = nltk.word_tokenize(doc)\\n\",\n        \"    #filter stopwords out of document\\n\",\n        \"    filtered_tokens = [token for token in tokens if token not in stop_words]\\n\",\n        \"    # re-create document from filtered tokens\\n\",\n        \"    doc = ' '.join(filtered_tokens)\\n\",\n        \"    return doc\\n\",\n        \"\\n\",\n        \"normalize_corpus = np.vectorize(normalize_document)\\n\",\n        \"\\n\",\n        \"norm_corpus = normalize_corpus(list(df['description']))\\n\",\n        \"len(norm_corpus)\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"4800\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 6\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"uNiwar7saOuj\"\n      },\n      \"source\": [\n        \"## Extract TF-IDF Features\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"NZkWolSnaRkd\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"c26d1f42-92c3-408e-ec49-b1096d2f505c\"\n      },\n      \"source\": [\n        \"from sklearn.feature_extraction.text import TfidfVectorizer\\n\",\n        \"\\n\",\n        \"tf = TfidfVectorizer(ngram_range=(1, 2), min_df=2)\\n\",\n        \"tfidf_matrix = tf.fit_transform(norm_corpus)\\n\",\n        \"tfidf_matrix.shape\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"(4800, 20468)\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 7\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"PIyXn448aXnt\"\n      },\n      \"source\": [\n        \"## Compute Pairwise Document Similarity\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"dKYgrUc4aUHm\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 244\n        },\n        \"outputId\": \"4efb9bc1-135e-4824-e7db-073251006c46\"\n      },\n      \"source\": [\n        \"from sklearn.metrics.pairwise import cosine_similarity\\n\",\n        \"\\n\",\n        \"doc_sim = cosine_similarity(tfidf_matrix)\\n\",\n        \"doc_sim_df = pd.DataFrame(doc_sim)\\n\",\n        \"doc_sim_df.head()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <th>5</th>\\n\",\n              \"      <th>6</th>\\n\",\n              \"      <th>7</th>\\n\",\n              \"      <th>8</th>\\n\",\n              \"      <th>9</th>\\n\",\n              \"      <th>10</th>\\n\",\n              \"      <th>11</th>\\n\",\n              \"      <th>12</th>\\n\",\n              \"      <th>13</th>\\n\",\n              \"      <th>14</th>\\n\",\n              \"      <th>15</th>\\n\",\n              \"      <th>16</th>\\n\",\n              \"      <th>17</th>\\n\",\n              \"      <th>18</th>\\n\",\n              \"      <th>19</th>\\n\",\n              \"      <th>20</th>\\n\",\n              \"      <th>21</th>\\n\",\n              \"      <th>22</th>\\n\",\n              \"      <th>23</th>\\n\",\n              \"      <th>24</th>\\n\",\n              \"      <th>25</th>\\n\",\n              \"      <th>26</th>\\n\",\n              \"      <th>27</th>\\n\",\n              \"      <th>28</th>\\n\",\n              \"      <th>29</th>\\n\",\n              \"      <th>30</th>\\n\",\n              \"      <th>31</th>\\n\",\n              \"      <th>32</th>\\n\",\n              \"      <th>33</th>\\n\",\n              \"      <th>34</th>\\n\",\n              \"      <th>35</th>\\n\",\n              \"      <th>36</th>\\n\",\n              \"      <th>37</th>\\n\",\n              \"      <th>38</th>\\n\",\n              \"      <th>39</th>\\n\",\n              \"      <th>...</th>\\n\",\n              \"      <th>4760</th>\\n\",\n              \"      <th>4761</th>\\n\",\n              \"      <th>4762</th>\\n\",\n              \"      <th>4763</th>\\n\",\n              \"      <th>4764</th>\\n\",\n              \"      <th>4765</th>\\n\",\n              \"      <th>4766</th>\\n\",\n              \"      <th>4767</th>\\n\",\n              \"      <th>4768</th>\\n\",\n              \"      <th>4769</th>\\n\",\n              \"      <th>4770</th>\\n\",\n              \"      <th>4771</th>\\n\",\n              \"      <th>4772</th>\\n\",\n              \"      <th>4773</th>\\n\",\n              \"      <th>4774</th>\\n\",\n              \"      <th>4775</th>\\n\",\n              \"      <th>4776</th>\\n\",\n              \"      <th>4777</th>\\n\",\n              \"      <th>4778</th>\\n\",\n              \"      <th>4779</th>\\n\",\n              \"      <th>4780</th>\\n\",\n              \"      <th>4781</th>\\n\",\n              \"      <th>4782</th>\\n\",\n              \"      <th>4783</th>\\n\",\n              \"      <th>4784</th>\\n\",\n              \"      <th>4785</th>\\n\",\n              \"      <th>4786</th>\\n\",\n              \"      <th>4787</th>\\n\",\n              \"      <th>4788</th>\\n\",\n              \"      <th>4789</th>\\n\",\n              \"      <th>4790</th>\\n\",\n              \"      <th>4791</th>\\n\",\n              \"      <th>4792</th>\\n\",\n              \"      <th>4793</th>\\n\",\n              \"      <th>4794</th>\\n\",\n              \"      <th>4795</th>\\n\",\n              \"      <th>4796</th>\\n\",\n              \"      <th>4797</th>\\n\",\n              \"      <th>4798</th>\\n\",\n              \"      <th>4799</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>1.00000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.006070</td>\\n\",\n              \"      <td>0.008067</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.025531</td>\\n\",\n              \"      <td>0.008554</td>\\n\",\n              \"      <td>0.018111</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.007439</td>\\n\",\n              \"      <td>0.010454</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.008190</td>\\n\",\n              \"      <td>0.008365</td>\\n\",\n              \"      <td>0.010035</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.050976</td>\\n\",\n              \"      <td>0.006502</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.010728</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.006908</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.167573</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.009191</td>\\n\",\n              \"      <td>0.053475</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.009711</td>\\n\",\n              \"      <td>0.006508</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.028409</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.008870</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.033246</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.034092</td>\\n\",\n              \"      <td>0.018754</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.037924</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.009646</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0.00000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.017839</td>\\n\",\n              \"      <td>0.007967</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.012501</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.014840</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.012814</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.024144</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.008101</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.016898</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.017789</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.008885</td>\\n\",\n              \"      <td>0.009432</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.014947</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.022738</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.019783</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.011407</td>\\n\",\n              \"      <td>0.011409</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.011632</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.015329</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.008367</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.021596</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.017561</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.019152</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.007963</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>0.00000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.017176</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.024326</td>\\n\",\n              \"      <td>0.005471</td>\\n\",\n              \"      <td>0.018038</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.005099</td>\\n\",\n              \"      <td>0.004985</td>\\n\",\n              \"      <td>0.004705</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.004843</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.017026</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.003672</td>\\n\",\n              \"      <td>0.003984</td>\\n\",\n              \"      <td>0.030998</td>\\n\",\n              \"      <td>0.006959</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.006117</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.019548</td>\\n\",\n              \"      <td>0.020365</td>\\n\",\n              \"      <td>0.009213</td>\\n\",\n              \"      <td>0.028467</td>\\n\",\n              \"      <td>0.010515</td>\\n\",\n              \"      <td>0.004198</td>\\n\",\n              \"      <td>0.006311</td>\\n\",\n              \"      <td>0.015154</td>\\n\",\n              \"      <td>0.012698</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.020597</td>\\n\",\n              \"      <td>0.004723</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.016673</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.006625</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.006972</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.010574</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.008222</td>\\n\",\n              \"      <td>0.008604</td>\\n\",\n              \"      <td>0.012782</td>\\n\",\n              \"      <td>0.015353</td>\\n\",\n              \"      <td>0.006259</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.010555</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.006903</td>\\n\",\n              \"      <td>0.005023</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.012893</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.025975</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.027126</td>\\n\",\n              \"      <td>0.009340</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>0.00000</td>\\n\",\n              \"      <td>0.017839</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.022414</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.037207</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.027958</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.012232</td>\\n\",\n              \"      <td>0.017893</td>\\n\",\n              \"      <td>0.043639</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.023127</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.009324</td>\\n\",\n              \"      <td>0.022995</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.044476</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.014029</td>\\n\",\n              \"      <td>0.030561</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.056761</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.018486</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.060846</td>\\n\",\n              \"      <td>0.025035</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.036237</td>\\n\",\n              \"      <td>0.030516</td>\\n\",\n              \"      <td>0.022605</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>0.00607</td>\\n\",\n              \"      <td>0.007967</td>\\n\",\n              \"      <td>0.017176</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>1.000000</td>\\n\",\n              \"      <td>0.004672</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.064572</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.036611</td>\\n\",\n              \"      <td>0.023879</td>\\n\",\n              \"      <td>0.014421</td>\\n\",\n              \"      <td>0.012316</td>\\n\",\n              \"      <td>0.019834</td>\\n\",\n              \"      <td>0.008170</td>\\n\",\n              \"      <td>0.004308</td>\\n\",\n              \"      <td>0.025459</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.008907</td>\\n\",\n              \"      <td>0.023736</td>\\n\",\n              \"      <td>0.011341</td>\\n\",\n              \"      <td>0.003009</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.026928</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.010026</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.019557</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.028521</td>\\n\",\n              \"      <td>0.016018</td>\\n\",\n              \"      <td>0.011311</td>\\n\",\n              \"      <td>0.016912</td>\\n\",\n              \"      <td>0.022974</td>\\n\",\n              \"      <td>0.054142</td>\\n\",\n              \"      <td>0.013767</td>\\n\",\n              \"      <td>0.027397</td>\\n\",\n              \"      <td>0.005416</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0.005088</td>\\n\",\n              \"      <td>0.015097</td>\\n\",\n              \"      <td>0.030759</td>\\n\",\n              \"      <td>0.013663</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.012624</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.027018</td>\\n\",\n              \"      <td>0.012025</td>\\n\",\n              \"      <td>0.005714</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.017230</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.022327</td>\\n\",\n              \"      <td>0.007051</td>\\n\",\n              \"      <td>0.038014</td>\\n\",\n              \"      <td>0.011783</td>\\n\",\n              \"      <td>0.018612</td>\\n\",\n              \"      <td>0.021468</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.003767</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.008650</td>\\n\",\n              \"      <td>0.009499</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.012749</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.022056</td>\\n\",\n              \"      <td>0.019659</td>\\n\",\n              \"      <td>0.036850</td>\\n\",\n              \"      <td>0.0</td>\\n\",\n              \"      <td>0.015824</td>\\n\",\n              \"      <td>0.000000</td>\\n\",\n              \"      <td>0.076022</td>\\n\",\n              \"      <td>0.004515</td>\\n\",\n              \"      <td>0.043469</td>\\n\",\n              \"      <td>0.011464</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"<p>5 rows × 4800 columns</p>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"      0         1         2     ...      4797      4798      4799\\n\",\n              \"0  1.00000  0.000000  0.000000  ...  0.000000  0.000000  0.009646\\n\",\n              \"1  0.00000  1.000000  0.000000  ...  0.000000  0.000000  0.007963\\n\",\n              \"2  0.00000  0.000000  1.000000  ...  0.000000  0.027126  0.009340\\n\",\n              \"3  0.00000  0.017839  0.000000  ...  0.000000  0.000000  0.000000\\n\",\n              \"4  0.00607  0.007967  0.017176  ...  0.004515  0.043469  0.011464\\n\",\n              \"\\n\",\n              \"[5 rows x 4800 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 8\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"h08MqvY9adgt\"\n      },\n      \"source\": [\n        \"## Get List of Movie Titles\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"rWr6lgqTaZsJ\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 50\n        },\n        \"outputId\": \"e71ed347-2667-431b-bd3c-9c343b704da5\"\n      },\n      \"source\": [\n        \"movies_list = df['title'].values\\n\",\n        \"movies_list, movies_list.shape\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"(array(['Minions', 'Interstellar', 'Deadpool', ..., 'Penitentiary',\\n\",\n              \"        'Alien Zone', 'America Is Still the Place'], dtype=object), (4800,))\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 9\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"69SKx3ZTaftu\"\n      },\n      \"source\": [\n        \"## Find Top Similar Movies for a Sample Movie\\n\",\n        \"\\n\",\n        \"Let's take __Minions__ the most popular movie the the dataframe above and try and find the most similar movies which can be recommended\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"JT3tw7Wka6B0\"\n      },\n      \"source\": [\n        \"#### Find movie ID\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"MmAUpmxWa-Kv\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"ebfad8e3-77f1-4004-ca8c-ce1be801cb69\"\n      },\n      \"source\": [\n        \"movie_idx = np.where(movies_list == 'Minions')[0][0]\\n\",\n        \"movie_idx\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"0\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 10\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"2IO3VhLka_vi\"\n      },\n      \"source\": [\n        \"#### Get movie similarities\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"Shbop-mDbDSS\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 50\n        },\n        \"outputId\": \"7bc72ee0-3cd6-4595-8b4c-2e4232e1ee6e\"\n      },\n      \"source\": [\n        \"movie_similarities = doc_sim_df.iloc[movie_idx].values\\n\",\n        \"movie_similarities\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"array([1.        , 0.        , 0.        , ..., 0.        , 0.        ,\\n\",\n              \"       0.00964634])\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 11\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"cjMx8FqtbE4O\"\n      },\n      \"source\": [\n        \"#### Get top 5 similar movie IDs\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"AgmQgy8QbHDF\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"c00ee209-a607-4e0b-9348-30bb77681bd3\"\n      },\n      \"source\": [\n        \"similar_movie_idxs = np.argsort(-movie_similarities)[1:6]\\n\",\n        \"similar_movie_idxs\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"array([ 33,  60, 737, 490, 298])\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 12\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"n7Fzp3qcbJv3\"\n      },\n      \"source\": [\n        \"#### Get top 5 similar movies\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"h4o7WpNlbNlT\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 67\n        },\n        \"outputId\": \"8ca9f814-165d-4fb9-ff72-31fcc096cc56\"\n      },\n      \"source\": [\n        \"similar_movies = movies_list[similar_movie_idxs]\\n\",\n        \"similar_movies\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"array(['Despicable Me 2', 'Despicable Me',\\n\",\n              \"       'Teenage Mutant Ninja Turtles: Out of the Shadows', 'Superman',\\n\",\n              \"       'Rise of the Guardians'], dtype=object)\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 13\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"f5lpIbnMcnOx\"\n      },\n      \"source\": [\n        \"### Build a movie recommender function to recommend top 5 similar movies for any movie \\n\",\n        \"\\n\",\n        \"The movie title, movie title list and document similarity matrix dataframe will be given as inputs to the function\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"OOL8nLbacpXq\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"def movie_recommender(movie_title, movies=movies_list, doc_sims=doc_sim_df):\\n\",\n        \"    # find movie id\\n\",\n        \"    movie_idx = np.where(movies == movie_title)[0][0]\\n\",\n        \"    # get movie similarities\\n\",\n        \"    movie_similarities = doc_sims.iloc[movie_idx].values\\n\",\n        \"    # get top 5 similar movie IDs\\n\",\n        \"    similar_movie_idxs = np.argsort(-movie_similarities)[1:6]\\n\",\n        \"    # get top 5 movies\\n\",\n        \"    similar_movies = movies[similar_movie_idxs]\\n\",\n        \"    # return the top 5 movies\\n\",\n        \"    return similar_movies\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"colab_type\": \"text\",\n        \"id\": \"U4t4wBWwceFA\"\n      },\n      \"source\": [\n        \"# Get popular Movie Recommendations\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"5V4EpMgAbPYY\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"popular_movies = ['Minions', 'Interstellar', 'Deadpool', 'Jurassic World', 'Pirates of the Caribbean: The Curse of the Black Pearl',\\n\",\n        \"              'Dawn of the Planet of the Apes', 'The Hunger Games: Mockingjay - Part 1', 'Terminator Genisys', \\n\",\n        \"              'Captain America: Civil War', 'The Dark Knight', 'The Martian', 'Batman v Superman: Dawn of Justice', \\n\",\n        \"              'Pulp Fiction', 'The Godfather', 'The Shawshank Redemption', 'The Lord of the Rings: The Fellowship of the Ring',  \\n\",\n        \"              'Harry Potter and the Chamber of Secrets', 'Star Wars', 'The Hobbit: The Battle of the Five Armies',\\n\",\n        \"              'Iron Man']\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"colab_type\": \"code\",\n        \"id\": \"N1ky8g-Ichp6\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 1000\n        },\n        \"outputId\": \"17575641-1b5f-4ae8-800a-5b65be5808e9\"\n      },\n      \"source\": [\n        \"for movie in popular_movies:\\n\",\n        \"    print('Movie:', movie)\\n\",\n        \"    print('Top 5 recommended Movies:', movie_recommender(movie_title=movie, movies=movies_list, doc_sims=doc_sim_df))\\n\",\n        \"    print()\"\n      ],\n      \"execution_count\": null,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Movie: Minions\\n\",\n            \"Top 5 recommended Movies: ['Despicable Me 2' 'Despicable Me'\\n\",\n            \" 'Teenage Mutant Ninja Turtles: Out of the Shadows' 'Superman'\\n\",\n            \" 'Rise of the Guardians']\\n\",\n            \"\\n\",\n            \"Movie: Interstellar\\n\",\n            \"Top 5 recommended Movies: ['Gattaca' 'Space Pirate Captain Harlock' 'Space Cowboys'\\n\",\n            \" 'Starship Troopers' 'Final Destination 2']\\n\",\n            \"\\n\",\n            \"Movie: Deadpool\\n\",\n            \"Top 5 recommended Movies: ['Silent Trigger' 'Underworld: Evolution' 'Bronson' 'Shaft' 'Don Jon']\\n\",\n            \"\\n\",\n            \"Movie: Jurassic World\\n\",\n            \"Top 5 recommended Movies: ['Jurassic Park' 'The Lost World: Jurassic Park'\\n\",\n            \" \\\"National Lampoon's Vacation\\\" 'The Nut Job' 'Vacation']\\n\",\n            \"\\n\",\n            \"Movie: Pirates of the Caribbean: The Curse of the Black Pearl\\n\",\n            \"Top 5 recommended Movies: [\\\"Pirates of the Caribbean: Dead Man's Chest\\\"\\n\",\n            \" 'Pirates of the Caribbean: On Stranger Tides' 'The Pirate'\\n\",\n            \" 'The Pirates! In an Adventure with Scientists!' 'Joyful Noise']\\n\",\n            \"\\n\",\n            \"Movie: Dawn of the Planet of the Apes\\n\",\n            \"Top 5 recommended Movies: ['Battle for the Planet of the Apes' 'Groove' 'The Other End of the Line'\\n\",\n            \" 'Chicago Overcoat' 'Definitely, Maybe']\\n\",\n            \"\\n\",\n            \"Movie: The Hunger Games: Mockingjay - Part 1\\n\",\n            \"Top 5 recommended Movies: ['The Hunger Games: Catching Fire' 'The Hunger Games: Mockingjay - Part 2'\\n\",\n            \" 'John Carter' 'For Greater Glory - The True Story of Cristiada'\\n\",\n            \" 'The Proposition']\\n\",\n            \"\\n\",\n            \"Movie: Terminator Genisys\\n\",\n            \"Top 5 recommended Movies: ['Terminator 2: Judgment Day' 'Terminator Salvation'\\n\",\n            \" 'Terminator 3: Rise of the Machines' 'Mad Max'\\n\",\n            \" 'X-Men: Days of Future Past']\\n\",\n            \"\\n\",\n            \"Movie: Captain America: Civil War\\n\",\n            \"Top 5 recommended Movies: ['Captain America: The Winter Soldier' 'This Means War'\\n\",\n            \" 'Avengers: Age of Ultron' 'Iron Man 2' 'Escape from Tomorrow']\\n\",\n            \"\\n\",\n            \"Movie: The Dark Knight\\n\",\n            \"Top 5 recommended Movies: ['The Dark Knight Rises' 'Batman Forever' 'Batman Returns'\\n\",\n            \" 'Batman: The Dark Knight Returns, Part 2' 'JFK']\\n\",\n            \"\\n\",\n            \"Movie: The Martian\\n\",\n            \"Top 5 recommended Movies: ['The Last Days on Mars' 'Swept Away' 'Alive' 'All Is Lost' 'Red Planet']\\n\",\n            \"\\n\",\n            \"Movie: Batman v Superman: Dawn of Justice\\n\",\n            \"Top 5 recommended Movies: ['Batman Returns' 'The Punisher' 'Defendor'\\n\",\n            \" 'Batman: The Dark Knight Returns, Part 2' 'Nowhere to Run']\\n\",\n            \"\\n\",\n            \"Movie: Pulp Fiction\\n\",\n            \"Top 5 recommended Movies: ['Sliding Doors' 'You Kill Me' 'New York Stories' 'Timecrimes'\\n\",\n            \" 'All or Nothing']\\n\",\n            \"\\n\",\n            \"Movie: The Godfather\\n\",\n            \"Top 5 recommended Movies: ['The Godfather: Part II' 'Blood Ties' 'Made' 'Lords of London'\\n\",\n            \" 'Easy Money']\\n\",\n            \"\\n\",\n            \"Movie: The Shawshank Redemption\\n\",\n            \"Top 5 recommended Movies: ['Civil Brand' 'Les Misérables' 'The Chorus' 'Prison' 'Fortress']\\n\",\n            \"\\n\",\n            \"Movie: The Lord of the Rings: The Fellowship of the Ring\\n\",\n            \"Top 5 recommended Movies: ['The Lord of the Rings: The Two Towers'\\n\",\n            \" 'The Hobbit: The Desolation of Smaug'\\n\",\n            \" 'The Lord of the Rings: The Return of the King'\\n\",\n            \" \\\"What's the Worst That Could Happen?\\\" 'The Hobbit: An Unexpected Journey']\\n\",\n            \"\\n\",\n            \"Movie: Harry Potter and the Chamber of Secrets\\n\",\n            \"Top 5 recommended Movies: ['Harry Potter and the Prisoner of Azkaban'\\n\",\n            \" 'Harry Potter and the Goblet of Fire'\\n\",\n            \" 'Harry Potter and the Order of the Phoenix'\\n\",\n            \" 'Harry Potter and the Half-Blood Prince'\\n\",\n            \" \\\"Harry Potter and the Philosopher's Stone\\\"]\\n\",\n            \"\\n\",\n            \"Movie: Star Wars\\n\",\n            \"Top 5 recommended Movies: ['The Empire Strikes Back' 'Return of the Jedi' 'Shrek the Third'\\n\",\n            \" 'The Ice Pirates' 'The Tale of Despereaux']\\n\",\n            \"\\n\",\n            \"Movie: The Hobbit: The Battle of the Five Armies\\n\",\n            \"Top 5 recommended Movies: ['The Hobbit: The Desolation of Smaug' 'The Hobbit: An Unexpected Journey'\\n\",\n            \" \\\"Dragon Nest: Warriors' Dawn\\\"\\n\",\n            \" 'A Funny Thing Happened on the Way to the Forum' 'X-Men: Apocalypse']\\n\",\n            \"\\n\",\n            \"Movie: Iron Man\\n\",\n            \"Top 5 recommended Movies: ['Iron Man 2' 'Avengers: Age of Ultron' 'Hostage' 'Iron Man 3'\\n\",\n            \" 'Baahubali: The Beginning']\\n\",\n            \"\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    }\n  ]\n}"
  },
  {
    "path": "notebooks/05_NLP_Applications_Predicting_E_Commerce_Product_Recommendation_Ratings_from_Reviews_.ipynb",
    "content": "{\n  \"nbformat\": 4,\n  \"nbformat_minor\": 0,\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.6.5\"\n    },\n    \"colab\": {\n      \"name\": \"05 - NLP Applications - Predicting E-Commerce Product Recommendation Ratings from Reviews .ipynb\",\n      \"provenance\": [],\n      \"collapsed_sections\": []\n    }\n  },\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"8wgGEuy-9G1x\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Predicting E-Commerce Product Recommendation Ratings from Reviews \\n\",\n        \"\\n\",\n        \"\\n\",\n        \"![](https://github.com/dipanjanS/feature_engineering_session_dhs18/blob/master/ecommerce_product_ratings_prediction/clothing_banner.jpg?raw=1)\\n\",\n        \"\\n\",\n        \"This is a classic NLP problem dealing with data from an e-commerce store focusing on women's clothing. Each record in the dataset is a customer review which consists of the review title, text description and a rating (ranging from 1 - 5) for a product amongst other features\\n\",\n        \"\\n\",\n        \"We convert this into a binary classification problem such that a customer recommends a product (label 1) is the rating is > 3 else they do not recommend the product (label 0)\\n\",\n        \"\\n\",\n        \"__Main Objective:__ Leverage the review text attributes to predict the recommendation rating (classification)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"_Author: Dipanjan (DJ) Sarkar_\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"NdpvzY1D9G1y\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Load up basic dependencies\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"VXs4584w9G1y\",\n        \"colab_type\": \"code\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import numpy as np\\n\",\n        \"import pandas as pd\\n\",\n        \"\\n\",\n        \"from sklearn.metrics import confusion_matrix, classification_report\"\n      ],\n      \"execution_count\": 25,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"PxMJ0XnP9G11\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Load and View the Dataset\\n\",\n        \"\\n\",\n        \"The data is available at https://www.kaggle.com/nicapotato/womens-ecommerce-clothing-reviews from where you can download it.\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"We recommend using the kaggle API and the following command via CLI to get it.\\n\",\n        \"\\n\",\n        \"__`kaggle datasets download -d nicapotato/womens-ecommerce-clothing-reviews`__\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"scrolled\": true,\n        \"id\": \"xmq8n6Sa9G12\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 246\n        },\n        \"outputId\": \"77cb6a72-43ae-4df4-81bb-d26822e8c2f4\"\n      },\n      \"source\": [\n        \"df = pd.read_csv('https://raw.githubusercontent.com/dipanjanS/feature_engineering_session_dhs18/master/ecommerce_product_ratings_prediction/Womens%20Clothing%20E-Commerce%20Reviews.csv', keep_default_na=False)\\n\",\n        \"df.head()\"\n      ],\n      \"execution_count\": 26,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Unnamed: 0</th>\\n\",\n              \"      <th>Clothing ID</th>\\n\",\n              \"      <th>Age</th>\\n\",\n              \"      <th>Title</th>\\n\",\n              \"      <th>Review Text</th>\\n\",\n              \"      <th>Rating</th>\\n\",\n              \"      <th>Recommended IND</th>\\n\",\n              \"      <th>Positive Feedback Count</th>\\n\",\n              \"      <th>Division Name</th>\\n\",\n              \"      <th>Department Name</th>\\n\",\n              \"      <th>Class Name</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>767</td>\\n\",\n              \"      <td>33</td>\\n\",\n              \"      <td></td>\\n\",\n              \"      <td>Absolutely wonderful - silky and sexy and comf...</td>\\n\",\n              \"      <td>4</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>Initmates</td>\\n\",\n              \"      <td>Intimate</td>\\n\",\n              \"      <td>Intimates</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>1080</td>\\n\",\n              \"      <td>34</td>\\n\",\n              \"      <td></td>\\n\",\n              \"      <td>Love this dress!  it's sooo pretty.  i happene...</td>\\n\",\n              \"      <td>5</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>4</td>\\n\",\n              \"      <td>General</td>\\n\",\n              \"      <td>Dresses</td>\\n\",\n              \"      <td>Dresses</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>1077</td>\\n\",\n              \"      <td>60</td>\\n\",\n              \"      <td>Some major design flaws</td>\\n\",\n              \"      <td>I had such high hopes for this dress and reall...</td>\\n\",\n              \"      <td>3</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>General</td>\\n\",\n              \"      <td>Dresses</td>\\n\",\n              \"      <td>Dresses</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>3</td>\\n\",\n              \"      <td>1049</td>\\n\",\n              \"      <td>50</td>\\n\",\n              \"      <td>My favorite buy!</td>\\n\",\n              \"      <td>I love, love, love this jumpsuit. it's fun, fl...</td>\\n\",\n              \"      <td>5</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>General Petite</td>\\n\",\n              \"      <td>Bottoms</td>\\n\",\n              \"      <td>Pants</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>4</td>\\n\",\n              \"      <td>847</td>\\n\",\n              \"      <td>47</td>\\n\",\n              \"      <td>Flattering shirt</td>\\n\",\n              \"      <td>This shirt is very flattering to all due to th...</td>\\n\",\n              \"      <td>5</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>6</td>\\n\",\n              \"      <td>General</td>\\n\",\n              \"      <td>Tops</td>\\n\",\n              \"      <td>Blouses</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   Unnamed: 0  Clothing ID  Age  ...   Division Name Department Name  Class Name\\n\",\n              \"0           0          767   33  ...       Initmates        Intimate   Intimates\\n\",\n              \"1           1         1080   34  ...         General         Dresses     Dresses\\n\",\n              \"2           2         1077   60  ...         General         Dresses     Dresses\\n\",\n              \"3           3         1049   50  ...  General Petite         Bottoms       Pants\\n\",\n              \"4           4          847   47  ...         General            Tops     Blouses\\n\",\n              \"\\n\",\n              \"[5 rows x 11 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 26\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"HSWdX9p49G15\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Basic Data Processing\\n\",\n        \"\\n\",\n        \"- Merge all review text attributes (title, text description) into one attribute\\n\",\n        \"- Convert the 5-star rating system into a binary recommendation rating of 1 or 0\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"wD3desQl9G16\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 195\n        },\n        \"outputId\": \"5788af75-820a-4c13-b580-1ba106f5d172\"\n      },\n      \"source\": [\n        \"df['Review'] = (df['Title'].map(str) +' '+ df['Review Text']).apply(lambda row: row.strip())\\n\",\n        \"df['Rating'] = [1 if rating > 3 else 0 for rating in df['Rating']]\\n\",\n        \"df = df[['Review', 'Rating']]\\n\",\n        \"df.head()\"\n      ],\n      \"execution_count\": 27,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Review</th>\\n\",\n              \"      <th>Rating</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>Absolutely wonderful - silky and sexy and comf...</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>Love this dress!  it's sooo pretty.  i happene...</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>Some major design flaws I had such high hopes ...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>My favorite buy! I love, love, love this jumps...</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>Flattering shirt This shirt is very flattering...</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                              Review  Rating\\n\",\n              \"0  Absolutely wonderful - silky and sexy and comf...       1\\n\",\n              \"1  Love this dress!  it's sooo pretty.  i happene...       1\\n\",\n              \"2  Some major design flaws I had such high hopes ...       0\\n\",\n              \"3  My favorite buy! I love, love, love this jumps...       1\\n\",\n              \"4  Flattering shirt This shirt is very flattering...       1\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 27\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"hWM1huGb9G19\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Remove all records with no review text\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"VB2DhPLH9G19\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 168\n        },\n        \"outputId\": \"0c8fcc37-0998-435e-a912-f6f60f9c30de\"\n      },\n      \"source\": [\n        \"df = df[df['Review'] != '']\\n\",\n        \"df.info()\"\n      ],\n      \"execution_count\": 28,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"<class 'pandas.core.frame.DataFrame'>\\n\",\n            \"Int64Index: 22642 entries, 0 to 23485\\n\",\n            \"Data columns (total 2 columns):\\n\",\n            \" #   Column  Non-Null Count  Dtype \\n\",\n            \"---  ------  --------------  ----- \\n\",\n            \" 0   Review  22642 non-null  object\\n\",\n            \" 1   Rating  22642 non-null  int64 \\n\",\n            \"dtypes: int64(1), object(1)\\n\",\n            \"memory usage: 530.7+ KB\\n\"\n          ],\n          \"name\": \"stdout\"\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"Sa8SCfu59G1_\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## There is some imbalance in the data based on product ratings\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"LHRcOkxZ9G2A\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 67\n        },\n        \"outputId\": \"fdeea29a-c6ab-4634-848d-83cd9a4df54e\"\n      },\n      \"source\": [\n        \"df['Rating'].value_counts()\"\n      ],\n      \"execution_count\": 29,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"1    17449\\n\",\n              \"0     5193\\n\",\n              \"Name: Rating, dtype: int64\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 29\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"j9HZhCnN9G2C\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Build train and test datasets\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"jBsPt1rC9G2C\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"047e7192-a598-47c1-d0e2-25a38fd8ba14\"\n      },\n      \"source\": [\n        \"from sklearn.model_selection import train_test_split\\n\",\n        \"\\n\",\n        \"X_train, X_test, y_train, y_test = train_test_split(df[['Review']], df['Rating'], random_state=42)\\n\",\n        \"X_train.shape, X_test.shape\"\n      ],\n      \"execution_count\": 30,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"((16981, 1), (5661, 1))\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 30\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"_m6_wP6X9G2F\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"b703f0af-1d6c-4200-b494-e37be4a59411\"\n      },\n      \"source\": [\n        \"from collections import Counter\\n\",\n        \"Counter(y_train), Counter(y_test)\"\n      ],\n      \"execution_count\": 31,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"(Counter({0: 3922, 1: 13059}), Counter({0: 1271, 1: 4390}))\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 31\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"ZiKBkmzA9G2H\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Experiment 1: Basic NLP Count based Features\\n\",\n        \"\\n\",\n        \"A number of basic text based features can also be created which sometimes are helpful for improving text classification models. \\n\",\n        \"Some examples are:\\n\",\n        \"\\n\",\n        \"- __Word Count:__ total number of words in the documents\\n\",\n        \"- __Character Count:__ total number of characters in the documents\\n\",\n        \"- __Average Word Density:__ average length of the words used in the documents\\n\",\n        \"- __Puncutation Count:__ total number of punctuation marks in the documents\\n\",\n        \"- __Upper Case Count:__ total number of upper count words in the documents\\n\",\n        \"- __Title Word Count:__ total number of proper case (title) words in the documents\\n\",\n        \"\\n\",\n        \"Source: https://www.analyticsvidhya.com/blog/2018/04/a-comprehensive-guide-to-understand-and-implement-text-classification-in-python/\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"Rk6Kc62u9G2H\",\n        \"colab_type\": \"code\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import string\\n\",\n        \"\\n\",\n        \"X_train['char_count'] = X_train['Review'].apply(len)\\n\",\n        \"X_train['word_count'] = X_train['Review'].apply(lambda x: len(x.split()))\\n\",\n        \"X_train['word_density'] = X_train['char_count'] / (X_train['word_count']+1)\\n\",\n        \"X_train['punctuation_count'] = X_train['Review'].apply(lambda x: len(\\\"\\\".join(_ for _ in x if _ in string.punctuation))) \\n\",\n        \"X_train['title_word_count'] = X_train['Review'].apply(lambda x: len([wrd for wrd in x.split() if wrd.istitle()]))\\n\",\n        \"X_train['upper_case_word_count'] = X_train['Review'].apply(lambda x: len([wrd for wrd in x.split() if wrd.isupper()]))\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"X_test['char_count'] = X_test['Review'].apply(len)\\n\",\n        \"X_test['word_count'] = X_test['Review'].apply(lambda x: len(x.split()))\\n\",\n        \"X_test['word_density'] = X_test['char_count'] / (X_test['word_count']+1)\\n\",\n        \"X_test['punctuation_count'] = X_test['Review'].apply(lambda x: len(\\\"\\\".join(_ for _ in x if _ in string.punctuation))) \\n\",\n        \"X_test['title_word_count'] = X_test['Review'].apply(lambda x: len([wrd for wrd in x.split() if wrd.istitle()]))\\n\",\n        \"X_test['upper_case_word_count'] = X_test['Review'].apply(lambda x: len([wrd for wrd in x.split() if wrd.isupper()]))\"\n      ],\n      \"execution_count\": 32,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"iyJ87jSe9G2J\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 195\n        },\n        \"outputId\": \"47cce8ab-5da8-49f3-929e-01d225864d79\"\n      },\n      \"source\": [\n        \"X_train.head()\"\n      ],\n      \"execution_count\": 33,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Review</th>\\n\",\n              \"      <th>char_count</th>\\n\",\n              \"      <th>word_count</th>\\n\",\n              \"      <th>word_density</th>\\n\",\n              \"      <th>punctuation_count</th>\\n\",\n              \"      <th>title_word_count</th>\\n\",\n              \"      <th>upper_case_word_count</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>12896</th>\\n\",\n              \"      <td>Soooo soft! This is a delightfully soft and fl...</td>\\n\",\n              \"      <td>268</td>\\n\",\n              \"      <td>52</td>\\n\",\n              \"      <td>5.056604</td>\\n\",\n              \"      <td>8</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>13183</th>\\n\",\n              \"      <td>Had my eye on this, but dind't get I finally v...</td>\\n\",\n              \"      <td>399</td>\\n\",\n              \"      <td>84</td>\\n\",\n              \"      <td>4.694118</td>\\n\",\n              \"      <td>20</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1496</th>\\n\",\n              \"      <td>I wanted to like this... I wanted to like this...</td>\\n\",\n              \"      <td>525</td>\\n\",\n              \"      <td>104</td>\\n\",\n              \"      <td>5.000000</td>\\n\",\n              \"      <td>19</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5205</th>\\n\",\n              \"      <td>Beautiful blouse Bought this for my daughter i...</td>\\n\",\n              \"      <td>203</td>\\n\",\n              \"      <td>35</td>\\n\",\n              \"      <td>5.638889</td>\\n\",\n              \"      <td>10</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>13366</th>\\n\",\n              \"      <td>Boxy. large. Boxy, unflattering, and large.\\\\n\\\\...</td>\\n\",\n              \"      <td>295</td>\\n\",\n              \"      <td>51</td>\\n\",\n              \"      <td>5.673077</td>\\n\",\n              \"      <td>22</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                  Review  ...  upper_case_word_count\\n\",\n              \"12896  Soooo soft! This is a delightfully soft and fl...  ...                      0\\n\",\n              \"13183  Had my eye on this, but dind't get I finally v...  ...                      1\\n\",\n              \"1496   I wanted to like this... I wanted to like this...  ...                      2\\n\",\n              \"5205   Beautiful blouse Bought this for my daughter i...  ...                      0\\n\",\n              \"13366  Boxy. large. Boxy, unflattering, and large.\\\\n\\\\...  ...                      0\\n\",\n              \"\\n\",\n              \"[5 rows x 7 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 33\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"1mHfxYqj9G2L\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Training a Logistic Regression Model \\n\",\n        \"\\n\",\n        \"A logistic regression model is easy to train, interpret and works well on a wide variety of NLP problems\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"4xlxi2zO9G2L\",\n        \"colab_type\": \"code\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"from sklearn.linear_model import LogisticRegression\\n\",\n        \"\\n\",\n        \"lr = LogisticRegression(C=1, random_state=42, solver='liblinear')\"\n      ],\n      \"execution_count\": 34,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"yLi8rI2d9G2N\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Model Evaluation Metrics - Quick Refresher\\n\",\n        \"\\n\",\n        \"Just accuracy is never enough in datasets with a rare class problem.\\n\",\n        \"\\n\",\n        \"- __Precision:__ The positive predictive power of a model. Out of all the predictions made by a model for a class, how many are actually correct\\n\",\n        \"- __Recall:__ The coverage or hit-rate of a model. Out of all the test data samples belonging to a class, how many was the model able to predict (hit or cover) correctly.\\n\",\n        \"- __F1-score:__ The harmonic mean of the precision and recall\\n\",\n        \"\\n\",\n        \"Do check out ROC Curve, AUC Score and PR Curve also\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"v7uniDrC9G2O\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 311\n        },\n        \"outputId\": \"549e2638-58b9-4360-fe88-9f8e2b1a0904\"\n      },\n      \"source\": [\n        \"lr.fit(X_train.drop(['Review'], axis=1), y_train)\\n\",\n        \"predictions = lr.predict(X_test.drop(['Review'], axis=1))\\n\",\n        \"\\n\",\n        \"print(classification_report(y_test, predictions))\\n\",\n        \"pd.DataFrame(confusion_matrix(y_test, predictions))\"\n      ],\n      \"execution_count\": 35,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"              precision    recall  f1-score   support\\n\",\n            \"\\n\",\n            \"           0       0.00      0.00      0.00      1271\\n\",\n            \"           1       0.78      1.00      0.87      4390\\n\",\n            \"\\n\",\n            \"    accuracy                           0.78      5661\\n\",\n            \"   macro avg       0.39      0.50      0.44      5661\\n\",\n            \"weighted avg       0.60      0.78      0.68      5661\\n\",\n            \"\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"/usr/local/lib/python3.6/dist-packages/sklearn/metrics/_classification.py:1272: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\\n\",\n            \"  _warn_prf(average, modifier, msg_start, len(result))\\n\"\n          ],\n          \"name\": \"stderr\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>1271</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>4390</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   0     1\\n\",\n              \"0  0  1271\\n\",\n              \"1  0  4390\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 35\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"WB1WXnmS9G2Q\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"Looks like our model was not able to predict a single product having a bad (no recommendation) rating, i.e. __Class 0__. \\n\",\n        \"\\n\",\n        \"This is as good as someone predicting a __1__ or __good__ for every product review. \\n\",\n        \"\\n\",\n        \"Can we do better?\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"Njk5U6ld9G2a\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Leveraging Text Sentiment\\n\",\n        \"\\n\",\n        \"Reviews are pretty subjective, opinionated and people often express stong emotions, feelings. \\n\",\n        \"This makes it a classic case where the text documents here are a good candidate for extracting sentiment as a feature.\\n\",\n        \"\\n\",\n        \"The general expectation is that highly rated and recommended products (__label 1__) should have a __positive__ sentiment and products which are not recommended (__label 0__) should have a __negative__ sentiment.\\n\",\n        \"\\n\",\n        \"TextBlob is an excellent open-source library for performing NLP tasks with ease, including sentiment analysis. It also an a sentiment lexicon (in the form of an XML file) which it leverages to give both polarity and subjectivity scores. \\n\",\n        \"\\n\",\n        \"- The polarity score is a float within the range [-1.0, 1.0]. \\n\",\n        \"- The subjectivity is a float within the range [0.0, 1.0] where 0.0 is very objective and 1.0 is very subjective. \\n\",\n        \"\\n\",\n        \"Perhaps this could be used for getting some new features? Let's look at some basic examples.\\n\",\n        \"\\n\",\n        \"Source: https://towardsdatascience.com/a-practitioners-guide-to-natural-language-processing-part-i-processing-understanding-text-9f4abfd13e72\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"oG7_MSsR9G2a\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"20f440ec-31e1-4d41-e276-2824b4348725\"\n      },\n      \"source\": [\n        \"import textblob\\n\",\n        \"\\n\",\n        \"textblob.TextBlob('This is an AMAZING pair of Jeans!').sentiment\"\n      ],\n      \"execution_count\": 36,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"Sentiment(polarity=0.7500000000000001, subjectivity=0.9)\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 36\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"71olVhAp9G2d\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"64b444d4-5e38-4474-fb4f-64826107da49\"\n      },\n      \"source\": [\n        \"textblob.TextBlob('I really hated this UGLY T-shirt!!').sentiment\"\n      ],\n      \"execution_count\": 37,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"Sentiment(polarity=-0.95, subjectivity=0.85)\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 37\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"G9vlglD09G2f\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"Looks like this should help us get features which can distinguish between good and bad products. Let's try it out on our dataset!\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"k1D5kDCM9G2f\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Experiment 2: Features from Sentiment Analysis \\n\",\n        \"\\n\",\n        \"Remember this is unsupervised, lexicon-based sentiment analysis where we don't have any pre-labeled data saying which review migth have a positive or negative sentiment. We use the lexicon to determine this.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"nkYd9_8A9G2f\",\n        \"colab_type\": \"code\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"x_train_snt_obj = X_train['Review'].apply(lambda row: textblob.TextBlob(row).sentiment)\\n\",\n        \"X_train['Polarity'] = [obj.polarity for obj in x_train_snt_obj.values]\\n\",\n        \"X_train['Subjectivity'] = [obj.subjectivity for obj in x_train_snt_obj.values]\\n\",\n        \"\\n\",\n        \"x_test_snt_obj = X_test['Review'].apply(lambda row: textblob.TextBlob(row).sentiment)\\n\",\n        \"X_test['Polarity'] = [obj.polarity for obj in x_test_snt_obj.values]\\n\",\n        \"X_test['Subjectivity'] = [obj.subjectivity for obj in x_test_snt_obj.values]\"\n      ],\n      \"execution_count\": 38,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"5so7o_W89G2h\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 195\n        },\n        \"outputId\": \"57bb8e33-8416-4d78-8b3c-734aaf106dae\"\n      },\n      \"source\": [\n        \"X_train.head()\"\n      ],\n      \"execution_count\": 39,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Review</th>\\n\",\n              \"      <th>char_count</th>\\n\",\n              \"      <th>word_count</th>\\n\",\n              \"      <th>word_density</th>\\n\",\n              \"      <th>punctuation_count</th>\\n\",\n              \"      <th>title_word_count</th>\\n\",\n              \"      <th>upper_case_word_count</th>\\n\",\n              \"      <th>Polarity</th>\\n\",\n              \"      <th>Subjectivity</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>12896</th>\\n\",\n              \"      <td>Soooo soft! This is a delightfully soft and fl...</td>\\n\",\n              \"      <td>268</td>\\n\",\n              \"      <td>52</td>\\n\",\n              \"      <td>5.056604</td>\\n\",\n              \"      <td>8</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.170455</td>\\n\",\n              \"      <td>0.490909</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>13183</th>\\n\",\n              \"      <td>Had my eye on this, but dind't get I finally v...</td>\\n\",\n              \"      <td>399</td>\\n\",\n              \"      <td>84</td>\\n\",\n              \"      <td>4.694118</td>\\n\",\n              \"      <td>20</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0.101944</td>\\n\",\n              \"      <td>0.719537</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1496</th>\\n\",\n              \"      <td>I wanted to like this... I wanted to like this...</td>\\n\",\n              \"      <td>525</td>\\n\",\n              \"      <td>104</td>\\n\",\n              \"      <td>5.000000</td>\\n\",\n              \"      <td>19</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0.186538</td>\\n\",\n              \"      <td>0.458761</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5205</th>\\n\",\n              \"      <td>Beautiful blouse Bought this for my daughter i...</td>\\n\",\n              \"      <td>203</td>\\n\",\n              \"      <td>35</td>\\n\",\n              \"      <td>5.638889</td>\\n\",\n              \"      <td>10</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.625000</td>\\n\",\n              \"      <td>0.825000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>13366</th>\\n\",\n              \"      <td>Boxy. large. Boxy, unflattering, and large.\\\\n\\\\...</td>\\n\",\n              \"      <td>295</td>\\n\",\n              \"      <td>51</td>\\n\",\n              \"      <td>5.673077</td>\\n\",\n              \"      <td>22</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.329613</td>\\n\",\n              \"      <td>0.510268</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                  Review  ...  Subjectivity\\n\",\n              \"12896  Soooo soft! This is a delightfully soft and fl...  ...      0.490909\\n\",\n              \"13183  Had my eye on this, but dind't get I finally v...  ...      0.719537\\n\",\n              \"1496   I wanted to like this... I wanted to like this...  ...      0.458761\\n\",\n              \"5205   Beautiful blouse Bought this for my daughter i...  ...      0.825000\\n\",\n              \"13366  Boxy. large. Boxy, unflattering, and large.\\\\n\\\\...  ...      0.510268\\n\",\n              \"\\n\",\n              \"[5 rows x 9 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 39\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"G7xf9V_59G2j\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Model Training and Evaluation\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"_fiZszFw9G2j\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 258\n        },\n        \"outputId\": \"7ddabd2f-c990-46a9-a332-6dca46f3e917\"\n      },\n      \"source\": [\n        \"lr.fit(X_train.drop(['Review'], axis=1), y_train, )\\n\",\n        \"predictions = lr.predict(X_test.drop(['Review'], axis=1))\\n\",\n        \"\\n\",\n        \"print(classification_report(y_test, predictions))\\n\",\n        \"pd.DataFrame(confusion_matrix(y_test, predictions))\"\n      ],\n      \"execution_count\": 40,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"              precision    recall  f1-score   support\\n\",\n            \"\\n\",\n            \"           0       0.69      0.27      0.38      1271\\n\",\n            \"           1       0.82      0.97      0.89      4390\\n\",\n            \"\\n\",\n            \"    accuracy                           0.81      5661\\n\",\n            \"   macro avg       0.75      0.62      0.64      5661\\n\",\n            \"weighted avg       0.79      0.81      0.77      5661\\n\",\n            \"\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>339</td>\\n\",\n              \"      <td>932</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>153</td>\\n\",\n              \"      <td>4237</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"     0     1\\n\",\n              \"0  339   932\\n\",\n              \"1  153  4237\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 40\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"0mx9hX449G2l\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"Interesting! Looks like we are now able to predict __27%__ of the total number of bad or negative rated products now! \\n\",\n        \"Precision is quite good at __69%__\\n\",\n        \"\\n\",\n        \"__F1-Score__ for bad reviews is now __40%__ and good reviews is __89%__\\n\",\n        \"\\n\",\n        \"This brings our overall __F1-Score__ to __77%__ which is quite good.\\n\",\n        \"\\n\",\n        \"Can we still improve on our model since the recall of bad reviews is still pretty low?\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"U09f6e829G2l\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Text Pre-processing and Wrangling\\n\",\n        \"\\n\",\n        \"We want to extract some specific features based on standard NLP feature engineering models like the classic Bag of Words model.\\n\",\n        \"For this we need to clean and pre-process our text data. We will build a simple text pre-processor here since the main intent is to look at feature engineering strategies.\\n\",\n        \"\\n\",\n        \"We will focus on:\\n\",\n        \"- Text Lowercasing\\n\",\n        \"- Removal of contractions\\n\",\n        \"- Removing unnecessary characters, numbers and symbols\\n\",\n        \"- Stemming\\n\",\n        \"- Stopword removal\\n\",\n        \"\\n\",\n        \"Source: https://towardsdatascience.com/a-practitioners-guide-to-natural-language-processing-part-i-processing-understanding-text-9f4abfd13e72\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"RNNjrbiRAXpA\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 235\n        },\n        \"outputId\": \"a1a4b6dd-5381-4023-e7f4-19352e329ddb\"\n      },\n      \"source\": [\n        \"!pip install contractions\\n\",\n        \"!pip install textsearch\\n\",\n        \"!pip install tqdm\\n\",\n        \"import nltk\\n\",\n        \"nltk.download('punkt')\\n\",\n        \"nltk.download('stopwords')\"\n      ],\n      \"execution_count\": 41,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"Requirement already satisfied: contractions in /usr/local/lib/python3.6/dist-packages (0.0.25)\\n\",\n            \"Requirement already satisfied: textsearch in /usr/local/lib/python3.6/dist-packages (from contractions) (0.0.17)\\n\",\n            \"Requirement already satisfied: pyahocorasick in /usr/local/lib/python3.6/dist-packages (from textsearch->contractions) (1.4.0)\\n\",\n            \"Requirement already satisfied: Unidecode in /usr/local/lib/python3.6/dist-packages (from textsearch->contractions) (1.1.1)\\n\",\n            \"Requirement already satisfied: textsearch in /usr/local/lib/python3.6/dist-packages (0.0.17)\\n\",\n            \"Requirement already satisfied: pyahocorasick in /usr/local/lib/python3.6/dist-packages (from textsearch) (1.4.0)\\n\",\n            \"Requirement already satisfied: Unidecode in /usr/local/lib/python3.6/dist-packages (from textsearch) (1.1.1)\\n\",\n            \"Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (4.41.1)\\n\",\n            \"[nltk_data] Downloading package punkt to /root/nltk_data...\\n\",\n            \"[nltk_data]   Package punkt is already up-to-date!\\n\",\n            \"[nltk_data] Downloading package stopwords to /root/nltk_data...\\n\",\n            \"[nltk_data]   Package stopwords is already up-to-date!\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"True\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 41\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"s8PQYYWm9G2n\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 34\n        },\n        \"outputId\": \"32ae4c28-d3c2-414f-9ffb-2bc21ec0d2b6\"\n      },\n      \"source\": [\n        \"import contractions\\n\",\n        \"\\n\",\n        \"contractions.fix('I didn\\\\'t like this t-shirt')\"\n      ],\n      \"execution_count\": 42,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/plain\": [\n              \"'I did not like this t-shirt'\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 42\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"ZSkz7gQY9G2t\",\n        \"colab_type\": \"code\",\n        \"colab\": {}\n      },\n      \"source\": [\n        \"import nltk\\n\",\n        \"import contractions\\n\",\n        \"import re\\n\",\n        \"\\n\",\n        \"# remove some stopwords to capture negation in n-grams if possible\\n\",\n        \"stop_words = nltk.corpus.stopwords.words('english')\\n\",\n        \"stop_words.remove('no')\\n\",\n        \"stop_words.remove('not')\\n\",\n        \"stop_words.remove('but')\\n\",\n        \"\\n\",\n        \"# load up a simple porter stemmer - nothing fancy\\n\",\n        \"ps = nltk.porter.PorterStemmer()\\n\",\n        \"\\n\",\n        \"def simple_text_preprocessor(document): \\n\",\n        \"    # lower case\\n\",\n        \"    document = str(document).lower()\\n\",\n        \"    \\n\",\n        \"    # expand contractions\\n\",\n        \"    document = contractions.fix(document)\\n\",\n        \"    \\n\",\n        \"    # remove unnecessary characters\\n\",\n        \"    document = re.sub(r'[^a-zA-Z]',r' ', document)\\n\",\n        \"    document = re.sub(r'nbsp', r'', document)\\n\",\n        \"    document = re.sub(' +', ' ', document)\\n\",\n        \"    \\n\",\n        \"    # simple porter stemming\\n\",\n        \"    document = ' '.join([ps.stem(word) for word in document.split()])\\n\",\n        \"    \\n\",\n        \"    # stopwords removal\\n\",\n        \"    document = ' '.join([word for word in document.split() if word not in stop_words])\\n\",\n        \"    \\n\",\n        \"    return document\\n\",\n        \"\\n\",\n        \"stp = np.vectorize(simple_text_preprocessor)\"\n      ],\n      \"execution_count\": 43,\n      \"outputs\": []\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"u3bHOnew9G2v\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 296\n        },\n        \"outputId\": \"2d374c5c-dc4b-4d61-ec31-1fd3bf24fb97\"\n      },\n      \"source\": [\n        \"X_train['Clean Review'] = stp(X_train['Review'].values)\\n\",\n        \"X_test['Clean Review'] = stp(X_test['Review'].values)\\n\",\n        \"\\n\",\n        \"X_train.head()\"\n      ],\n      \"execution_count\": 44,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>Review</th>\\n\",\n              \"      <th>char_count</th>\\n\",\n              \"      <th>word_count</th>\\n\",\n              \"      <th>word_density</th>\\n\",\n              \"      <th>punctuation_count</th>\\n\",\n              \"      <th>title_word_count</th>\\n\",\n              \"      <th>upper_case_word_count</th>\\n\",\n              \"      <th>Polarity</th>\\n\",\n              \"      <th>Subjectivity</th>\\n\",\n              \"      <th>Clean Review</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>12896</th>\\n\",\n              \"      <td>Soooo soft! This is a delightfully soft and fl...</td>\\n\",\n              \"      <td>268</td>\\n\",\n              \"      <td>52</td>\\n\",\n              \"      <td>5.056604</td>\\n\",\n              \"      <td>8</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.170455</td>\\n\",\n              \"      <td>0.490909</td>\\n\",\n              \"      <td>soooo soft thi delight soft fluffi sweater mig...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>13183</th>\\n\",\n              \"      <td>Had my eye on this, but dind't get I finally v...</td>\\n\",\n              \"      <td>399</td>\\n\",\n              \"      <td>84</td>\\n\",\n              \"      <td>4.694118</td>\\n\",\n              \"      <td>20</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0.101944</td>\\n\",\n              \"      <td>0.719537</td>\\n\",\n              \"      <td>eye thi but dind get final visit store petit t...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1496</th>\\n\",\n              \"      <td>I wanted to like this... I wanted to like this...</td>\\n\",\n              \"      <td>525</td>\\n\",\n              \"      <td>104</td>\\n\",\n              \"      <td>5.000000</td>\\n\",\n              \"      <td>19</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0.186538</td>\\n\",\n              \"      <td>0.458761</td>\\n\",\n              \"      <td>want like thi want like thi top badli badli fa...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>5205</th>\\n\",\n              \"      <td>Beautiful blouse Bought this for my daughter i...</td>\\n\",\n              \"      <td>203</td>\\n\",\n              \"      <td>35</td>\\n\",\n              \"      <td>5.638889</td>\\n\",\n              \"      <td>10</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.625000</td>\\n\",\n              \"      <td>0.825000</td>\\n\",\n              \"      <td>beauti blous bought thi daughter law birthday ...</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>13366</th>\\n\",\n              \"      <td>Boxy. large. Boxy, unflattering, and large.\\\\n\\\\...</td>\\n\",\n              \"      <td>295</td>\\n\",\n              \"      <td>51</td>\\n\",\n              \"      <td>5.673077</td>\\n\",\n              \"      <td>22</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.329613</td>\\n\",\n              \"      <td>0.510268</td>\\n\",\n              \"      <td>boxi larg boxi unflatt larg I curvi pound thi ...</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"                                                  Review  ...                                       Clean Review\\n\",\n              \"12896  Soooo soft! This is a delightfully soft and fl...  ...  soooo soft thi delight soft fluffi sweater mig...\\n\",\n              \"13183  Had my eye on this, but dind't get I finally v...  ...  eye thi but dind get final visit store petit t...\\n\",\n              \"1496   I wanted to like this... I wanted to like this...  ...  want like thi want like thi top badli badli fa...\\n\",\n              \"5205   Beautiful blouse Bought this for my daughter i...  ...  beauti blous bought thi daughter law birthday ...\\n\",\n              \"13366  Boxy. large. Boxy, unflattering, and large.\\\\n\\\\...  ...  boxi larg boxi unflatt larg I curvi pound thi ...\\n\",\n              \"\\n\",\n              \"[5 rows x 10 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 44\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"-wYVCWIQ9G2y\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Extracting out the structured features from previous experiments\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"C7jXiEiG9G2y\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 195\n        },\n        \"outputId\": \"36aeccd5-106c-4fbe-c75c-82d24d57fec9\"\n      },\n      \"source\": [\n        \"X_train_metadata = X_train.drop(['Review', 'Clean Review'], axis=1).reset_index(drop=True)\\n\",\n        \"X_test_metadata = X_test.drop(['Review', 'Clean Review'], axis=1).reset_index(drop=True)\\n\",\n        \"\\n\",\n        \"X_train_metadata.head()\"\n      ],\n      \"execution_count\": 45,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>char_count</th>\\n\",\n              \"      <th>word_count</th>\\n\",\n              \"      <th>word_density</th>\\n\",\n              \"      <th>punctuation_count</th>\\n\",\n              \"      <th>title_word_count</th>\\n\",\n              \"      <th>upper_case_word_count</th>\\n\",\n              \"      <th>Polarity</th>\\n\",\n              \"      <th>Subjectivity</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>268</td>\\n\",\n              \"      <td>52</td>\\n\",\n              \"      <td>5.056604</td>\\n\",\n              \"      <td>8</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.170455</td>\\n\",\n              \"      <td>0.490909</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>399</td>\\n\",\n              \"      <td>84</td>\\n\",\n              \"      <td>4.694118</td>\\n\",\n              \"      <td>20</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0.101944</td>\\n\",\n              \"      <td>0.719537</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>525</td>\\n\",\n              \"      <td>104</td>\\n\",\n              \"      <td>5.000000</td>\\n\",\n              \"      <td>19</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0.186538</td>\\n\",\n              \"      <td>0.458761</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>203</td>\\n\",\n              \"      <td>35</td>\\n\",\n              \"      <td>5.638889</td>\\n\",\n              \"      <td>10</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.625000</td>\\n\",\n              \"      <td>0.825000</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>295</td>\\n\",\n              \"      <td>51</td>\\n\",\n              \"      <td>5.673077</td>\\n\",\n              \"      <td>22</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.329613</td>\\n\",\n              \"      <td>0.510268</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   char_count  word_count  ...  Polarity  Subjectivity\\n\",\n              \"0         268          52  ...  0.170455      0.490909\\n\",\n              \"1         399          84  ...  0.101944      0.719537\\n\",\n              \"2         525         104  ...  0.186538      0.458761\\n\",\n              \"3         203          35  ...  0.625000      0.825000\\n\",\n              \"4         295          51  ...  0.329613      0.510268\\n\",\n              \"\\n\",\n              \"[5 rows x 8 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 45\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"r7777OYn9G21\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"# Experiment 3: Adding Bag of Words based Features - 1-grams\\n\",\n        \"\\n\",\n        \"This is perhaps the most simple vector space representational model for unstructured text. A vector space model is simply a mathematical model to represent unstructured text (or any other data) as numeric vectors, such that each dimension of the vector is a specific feature\\\\attribute. \\n\",\n        \"\\n\",\n        \"The bag of words model represents each text document as a numeric vector where each dimension is a specific word from the corpus and the value could be its frequency in the document, occurrence (denoted by 1 or 0) or even weighted values. \\n\",\n        \"\\n\",\n        \"The model’s name is such because each document is represented literally as a ‘bag’ of its own words, disregarding word orders, sequences and grammar.\\n\",\n        \"\\n\",\n        \"Source: https://towardsdatascience.com/understanding-feature-engineering-part-3-traditional-methods-for-text-data-f6f7d70acd41\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"SaX1fDmT9G23\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 244\n        },\n        \"outputId\": \"49a8d0d7-fdf0-4391-c636-015281834d30\"\n      },\n      \"source\": [\n        \"from sklearn.feature_extraction.text import CountVectorizer\\n\",\n        \"\\n\",\n        \"cv = CountVectorizer(min_df=0.0, max_df=1.0, ngram_range=(1, 1))\\n\",\n        \"X_traincv = cv.fit_transform(X_train['Clean Review']).toarray()\\n\",\n        \"X_traincv = pd.DataFrame(X_traincv, columns=cv.get_feature_names())\\n\",\n        \"\\n\",\n        \"X_testcv = cv.transform(X_test['Clean Review']).toarray()\\n\",\n        \"X_testcv = pd.DataFrame(X_testcv, columns=cv.get_feature_names())\\n\",\n        \"X_traincv.head()\"\n      ],\n      \"execution_count\": 46,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>aa</th>\\n\",\n              \"      <th>aaaaandidon</th>\\n\",\n              \"      <th>aaaaannnnnnd</th>\\n\",\n              \"      <th>aaaah</th>\\n\",\n              \"      <th>aaaahmaz</th>\\n\",\n              \"      <th>aaah</th>\\n\",\n              \"      <th>ab</th>\\n\",\n              \"      <th>abbey</th>\\n\",\n              \"      <th>abbi</th>\\n\",\n              \"      <th>abck</th>\\n\",\n              \"      <th>abdomen</th>\\n\",\n              \"      <th>abdomin</th>\\n\",\n              \"      <th>abercrombi</th>\\n\",\n              \"      <th>abil</th>\\n\",\n              \"      <th>abject</th>\\n\",\n              \"      <th>abl</th>\\n\",\n              \"      <th>abnorm</th>\\n\",\n              \"      <th>abo</th>\\n\",\n              \"      <th>abolut</th>\\n\",\n              \"      <th>abou</th>\\n\",\n              \"      <th>abov</th>\\n\",\n              \"      <th>abroad</th>\\n\",\n              \"      <th>abruptli</th>\\n\",\n              \"      <th>abso</th>\\n\",\n              \"      <th>absolut</th>\\n\",\n              \"      <th>absolutley</th>\\n\",\n              \"      <th>absolutli</th>\\n\",\n              \"      <th>absorb</th>\\n\",\n              \"      <th>abstract</th>\\n\",\n              \"      <th>absurd</th>\\n\",\n              \"      <th>abt</th>\\n\",\n              \"      <th>abund</th>\\n\",\n              \"      <th>abus</th>\\n\",\n              \"      <th>ac</th>\\n\",\n              \"      <th>acacia</th>\\n\",\n              \"      <th>accent</th>\\n\",\n              \"      <th>accentu</th>\\n\",\n              \"      <th>accentuatea</th>\\n\",\n              \"      <th>accept</th>\\n\",\n              \"      <th>acceptabl</th>\\n\",\n              \"      <th>...</th>\\n\",\n              \"      <th>yoga</th>\\n\",\n              \"      <th>yogi</th>\\n\",\n              \"      <th>yogini</th>\\n\",\n              \"      <th>yoke</th>\\n\",\n              \"      <th>yolk</th>\\n\",\n              \"      <th>yoo</th>\\n\",\n              \"      <th>yore</th>\\n\",\n              \"      <th>york</th>\\n\",\n              \"      <th>yoself</th>\\n\",\n              \"      <th>young</th>\\n\",\n              \"      <th>younger</th>\\n\",\n              \"      <th>youth</th>\\n\",\n              \"      <th>youthful</th>\\n\",\n              \"      <th>yr</th>\\n\",\n              \"      <th>yuck</th>\\n\",\n              \"      <th>yucki</th>\\n\",\n              \"      <th>yuk</th>\\n\",\n              \"      <th>yum</th>\\n\",\n              \"      <th>yumi</th>\\n\",\n              \"      <th>yummi</th>\\n\",\n              \"      <th>yummiest</th>\\n\",\n              \"      <th>yummysweat</th>\\n\",\n              \"      <th>yup</th>\\n\",\n              \"      <th>zag</th>\\n\",\n              \"      <th>zara</th>\\n\",\n              \"      <th>zermatt</th>\\n\",\n              \"      <th>zero</th>\\n\",\n              \"      <th>zig</th>\\n\",\n              \"      <th>zigzag</th>\\n\",\n              \"      <th>zillion</th>\\n\",\n              \"      <th>zing</th>\\n\",\n              \"      <th>zip</th>\\n\",\n              \"      <th>zipper</th>\\n\",\n              \"      <th>zipperi</th>\\n\",\n              \"      <th>zippi</th>\\n\",\n              \"      <th>zone</th>\\n\",\n              \"      <th>zooland</th>\\n\",\n              \"      <th>zoom</th>\\n\",\n              \"      <th>zowi</th>\\n\",\n              \"      <th>zuma</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"<p>5 rows × 8559 columns</p>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   aa  aaaaandidon  aaaaannnnnnd  aaaah  ...  zooland  zoom  zowi  zuma\\n\",\n              \"0   0            0             0      0  ...        0     0     0     0\\n\",\n              \"1   0            0             0      0  ...        0     0     0     0\\n\",\n              \"2   0            0             0      0  ...        0     0     0     0\\n\",\n              \"3   0            0             0      0  ...        0     0     0     0\\n\",\n              \"4   0            0             0      0  ...        0     0     0     0\\n\",\n              \"\\n\",\n              \"[5 rows x 8559 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 46\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"AMNdg_cg9G27\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 244\n        },\n        \"outputId\": \"dcfd5c6a-1293-4e42-fdc8-af4bcb9a7ebb\"\n      },\n      \"source\": [\n        \"X_train_comb = pd.concat([X_train_metadata, X_traincv], axis=1)\\n\",\n        \"X_test_comb = pd.concat([X_test_metadata, X_testcv], axis=1)\\n\",\n        \"\\n\",\n        \"X_train_comb.head()\"\n      ],\n      \"execution_count\": 47,\n      \"outputs\": [\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>char_count</th>\\n\",\n              \"      <th>word_count</th>\\n\",\n              \"      <th>word_density</th>\\n\",\n              \"      <th>punctuation_count</th>\\n\",\n              \"      <th>title_word_count</th>\\n\",\n              \"      <th>upper_case_word_count</th>\\n\",\n              \"      <th>Polarity</th>\\n\",\n              \"      <th>Subjectivity</th>\\n\",\n              \"      <th>aa</th>\\n\",\n              \"      <th>aaaaandidon</th>\\n\",\n              \"      <th>aaaaannnnnnd</th>\\n\",\n              \"      <th>aaaah</th>\\n\",\n              \"      <th>aaaahmaz</th>\\n\",\n              \"      <th>aaah</th>\\n\",\n              \"      <th>ab</th>\\n\",\n              \"      <th>abbey</th>\\n\",\n              \"      <th>abbi</th>\\n\",\n              \"      <th>abck</th>\\n\",\n              \"      <th>abdomen</th>\\n\",\n              \"      <th>abdomin</th>\\n\",\n              \"      <th>abercrombi</th>\\n\",\n              \"      <th>abil</th>\\n\",\n              \"      <th>abject</th>\\n\",\n              \"      <th>abl</th>\\n\",\n              \"      <th>abnorm</th>\\n\",\n              \"      <th>abo</th>\\n\",\n              \"      <th>abolut</th>\\n\",\n              \"      <th>abou</th>\\n\",\n              \"      <th>abov</th>\\n\",\n              \"      <th>abroad</th>\\n\",\n              \"      <th>abruptli</th>\\n\",\n              \"      <th>abso</th>\\n\",\n              \"      <th>absolut</th>\\n\",\n              \"      <th>absolutley</th>\\n\",\n              \"      <th>absolutli</th>\\n\",\n              \"      <th>absorb</th>\\n\",\n              \"      <th>abstract</th>\\n\",\n              \"      <th>absurd</th>\\n\",\n              \"      <th>abt</th>\\n\",\n              \"      <th>abund</th>\\n\",\n              \"      <th>...</th>\\n\",\n              \"      <th>yoga</th>\\n\",\n              \"      <th>yogi</th>\\n\",\n              \"      <th>yogini</th>\\n\",\n              \"      <th>yoke</th>\\n\",\n              \"      <th>yolk</th>\\n\",\n              \"      <th>yoo</th>\\n\",\n              \"      <th>yore</th>\\n\",\n              \"      <th>york</th>\\n\",\n              \"      <th>yoself</th>\\n\",\n              \"      <th>young</th>\\n\",\n              \"      <th>younger</th>\\n\",\n              \"      <th>youth</th>\\n\",\n              \"      <th>youthful</th>\\n\",\n              \"      <th>yr</th>\\n\",\n              \"      <th>yuck</th>\\n\",\n              \"      <th>yucki</th>\\n\",\n              \"      <th>yuk</th>\\n\",\n              \"      <th>yum</th>\\n\",\n              \"      <th>yumi</th>\\n\",\n              \"      <th>yummi</th>\\n\",\n              \"      <th>yummiest</th>\\n\",\n              \"      <th>yummysweat</th>\\n\",\n              \"      <th>yup</th>\\n\",\n              \"      <th>zag</th>\\n\",\n              \"      <th>zara</th>\\n\",\n              \"      <th>zermatt</th>\\n\",\n              \"      <th>zero</th>\\n\",\n              \"      <th>zig</th>\\n\",\n              \"      <th>zigzag</th>\\n\",\n              \"      <th>zillion</th>\\n\",\n              \"      <th>zing</th>\\n\",\n              \"      <th>zip</th>\\n\",\n              \"      <th>zipper</th>\\n\",\n              \"      <th>zipperi</th>\\n\",\n              \"      <th>zippi</th>\\n\",\n              \"      <th>zone</th>\\n\",\n              \"      <th>zooland</th>\\n\",\n              \"      <th>zoom</th>\\n\",\n              \"      <th>zowi</th>\\n\",\n              \"      <th>zuma</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>268</td>\\n\",\n              \"      <td>52</td>\\n\",\n              \"      <td>5.056604</td>\\n\",\n              \"      <td>8</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.170455</td>\\n\",\n              \"      <td>0.490909</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>399</td>\\n\",\n              \"      <td>84</td>\\n\",\n              \"      <td>4.694118</td>\\n\",\n              \"      <td>20</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0.101944</td>\\n\",\n              \"      <td>0.719537</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>1</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>2</th>\\n\",\n              \"      <td>525</td>\\n\",\n              \"      <td>104</td>\\n\",\n              \"      <td>5.000000</td>\\n\",\n              \"      <td>19</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0.186538</td>\\n\",\n              \"      <td>0.458761</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>3</th>\\n\",\n              \"      <td>203</td>\\n\",\n              \"      <td>35</td>\\n\",\n              \"      <td>5.638889</td>\\n\",\n              \"      <td>10</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.625000</td>\\n\",\n              \"      <td>0.825000</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>4</th>\\n\",\n              \"      <td>295</td>\\n\",\n              \"      <td>51</td>\\n\",\n              \"      <td>5.673077</td>\\n\",\n              \"      <td>22</td>\\n\",\n              \"      <td>2</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0.329613</td>\\n\",\n              \"      <td>0.510268</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>...</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"      <td>0</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"<p>5 rows × 8567 columns</p>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"   char_count  word_count  word_density  ...  zoom  zowi  zuma\\n\",\n              \"0         268          52      5.056604  ...     0     0     0\\n\",\n              \"1         399          84      4.694118  ...     0     0     0\\n\",\n              \"2         525         104      5.000000  ...     0     0     0\\n\",\n              \"3         203          35      5.638889  ...     0     0     0\\n\",\n              \"4         295          51      5.673077  ...     0     0     0\\n\",\n              \"\\n\",\n              \"[5 rows x 8567 columns]\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 47\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"OE5qPGfz9G3A\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"## Model Training and Evaluation\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"metadata\": {\n        \"id\": \"fWaTndc-9G3A\",\n        \"colab_type\": \"code\",\n        \"colab\": {\n          \"base_uri\": \"https://localhost:8080/\",\n          \"height\": 258\n        },\n        \"outputId\": \"2e50b231-5f42-4713-cbba-601dfd7eccb0\"\n      },\n      \"source\": [\n        \"lr.fit(X_train_comb, y_train)\\n\",\n        \"predictions = lr.predict(X_test_comb)\\n\",\n        \"\\n\",\n        \"print(classification_report(y_test, predictions))\\n\",\n        \"pd.DataFrame(confusion_matrix(y_test, predictions))\"\n      ],\n      \"execution_count\": 48,\n      \"outputs\": [\n        {\n          \"output_type\": \"stream\",\n          \"text\": [\n            \"              precision    recall  f1-score   support\\n\",\n            \"\\n\",\n            \"           0       0.76      0.70      0.73      1271\\n\",\n            \"           1       0.92      0.93      0.92      4390\\n\",\n            \"\\n\",\n            \"    accuracy                           0.88      5661\\n\",\n            \"   macro avg       0.84      0.82      0.83      5661\\n\",\n            \"weighted avg       0.88      0.88      0.88      5661\\n\",\n            \"\\n\"\n          ],\n          \"name\": \"stdout\"\n        },\n        {\n          \"output_type\": \"execute_result\",\n          \"data\": {\n            \"text/html\": [\n              \"<div>\\n\",\n              \"<style scoped>\\n\",\n              \"    .dataframe tbody tr th:only-of-type {\\n\",\n              \"        vertical-align: middle;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe tbody tr th {\\n\",\n              \"        vertical-align: top;\\n\",\n              \"    }\\n\",\n              \"\\n\",\n              \"    .dataframe thead th {\\n\",\n              \"        text-align: right;\\n\",\n              \"    }\\n\",\n              \"</style>\\n\",\n              \"<table border=\\\"1\\\" class=\\\"dataframe\\\">\\n\",\n              \"  <thead>\\n\",\n              \"    <tr style=\\\"text-align: right;\\\">\\n\",\n              \"      <th></th>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <th>1</th>\\n\",\n              \"    </tr>\\n\",\n              \"  </thead>\\n\",\n              \"  <tbody>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>0</th>\\n\",\n              \"      <td>890</td>\\n\",\n              \"      <td>381</td>\\n\",\n              \"    </tr>\\n\",\n              \"    <tr>\\n\",\n              \"      <th>1</th>\\n\",\n              \"      <td>286</td>\\n\",\n              \"      <td>4104</td>\\n\",\n              \"    </tr>\\n\",\n              \"  </tbody>\\n\",\n              \"</table>\\n\",\n              \"</div>\"\n            ],\n            \"text/plain\": [\n              \"     0     1\\n\",\n              \"0  890   381\\n\",\n              \"1  286  4104\"\n            ]\n          },\n          \"metadata\": {\n            \"tags\": []\n          },\n          \"execution_count\": 48\n        }\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {\n        \"id\": \"1ePwRpYI9G3E\",\n        \"colab_type\": \"text\"\n      },\n      \"source\": [\n        \"Wow! This looks promising.\\n\",\n        \"\\n\",\n        \"We are now able to predict __70%__ of the total number of bad or negative rated products now! \\n\",\n        \"Precision is quite good at __76%__\\n\",\n        \"\\n\",\n        \"__F1-Score__ for bad reviews is now __73%__ and good reviews is __92%__\\n\",\n        \"\\n\",\n        \"This brings our overall __F1-Score__ to __88%__ which is quite good.\"\n      ]\n    }\n  ]\n}"
  }
]