├── plotlines ├── images │ ├── kv-sm.jpg │ ├── animated.gif │ ├── dtw-md.png │ ├── overlay-LK.gif │ └── vonnegut-overlay.png └── README_plotlines.md ├── summarization ├── articles.csv ├── README.md └── summarization.py ├── custom_sentiment ├── header.jpg └── README.md ├── interior_design ├── images │ ├── industrial1.jpg │ ├── industrial2.png │ ├── industrial3.jpg │ ├── industrial4.jpg │ ├── industrial5.jpg │ ├── industrial6.jpg │ ├── industrial7.jpg │ ├── minimalism1.jpg │ ├── minimalism2.jpg │ ├── minimalism3.jpg │ ├── minimalism4.png │ ├── minimalism5.jpg │ ├── minimalism6.jpg │ ├── minimalism7.jpg │ ├── contemporary1.jpg │ ├── contemporary2.jpg │ ├── contemporary3.jpg │ ├── contemporary4.jpg │ ├── contemporary5.jpg │ ├── contemporary6.jpg │ └── contemporary7.jpg ├── test_images │ ├── contemporary-test.jpg │ ├── industrial-test.jpg │ ├── industrial-test2.jpg │ ├── industrial-test3.jpg │ ├── minimalism-test.jpg │ ├── minimalism-test2.jpg │ ├── minimalism-test3.jpg │ ├── contemporary-test2.JPG │ └── contemporary-test3.jpg ├── README.md └── main.py ├── matching_clothes ├── test_shirts │ ├── 12770.jpg │ ├── 13668.jpg │ ├── 14195.jpg │ ├── 9915.jpg │ ├── 9969.jpg │ └── 11896765.jpg ├── training_pants │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ └── 5.jpg ├── white_shirts │ ├── 31199.jpg │ ├── 4711.jpg │ ├── 606.jpg │ ├── 7971.jpg │ ├── 99995.jpg │ ├── 99996.jpg │ ├── 99997.jpg │ ├── 99998.jpg │ ├── 99999.jpg │ └── 993282.jpg ├── training_shirts │ ├── 1050.jpg │ ├── 1349.jpg │ ├── 4160.jpg │ ├── 101528.jpg │ ├── 101845.jpg │ ├── 102004.jpg │ ├── 104414.jpg │ ├── 104775.jpg │ ├── 116996.jpg │ ├── 117339.jpg │ ├── 12180.jpg │ ├── 12234.jpg │ ├── 138964.jpg │ ├── 140240.jpg │ ├── 146469.jpg │ ├── 148051.jpg │ ├── 148756.jpg │ ├── 14937.jpg │ ├── 153460.jpg │ ├── 155181.jpg │ ├── 166481.jpg │ ├── 166695.jpg │ ├── 168346.jpg │ ├── 170881.jpg │ ├── 177582.jpg │ ├── 187343.jpg │ ├── 188047.jpg │ ├── 188107.jpg │ ├── 19870.jpg │ ├── 200235.jpg │ ├── 200684.jpg │ ├── 20988.jpg │ ├── 212190.jpg │ ├── 212737.jpg │ ├── 213095.jpg │ ├── 213322.jpg │ ├── 215011.jpg │ ├── 215422.jpg │ ├── 217931.jpg │ ├── 218935.jpg │ ├── 221454.jpg │ ├── 222927.jpg │ ├── 224483.jpg │ ├── 224554.jpg │ ├── 235080.jpg │ ├── 235255.jpg │ ├── 235647.jpg │ ├── 236198.jpg │ ├── 240253.jpg │ ├── 240342.jpg │ ├── 24968.jpg │ ├── 261084.jpg │ ├── 261738.jpg │ ├── 261938.jpg │ ├── 265350.jpg │ ├── 268546.jpg │ ├── 273025.jpg │ ├── 273114.jpg │ ├── 277435.jpg │ ├── 29835.jpg │ ├── 32552.jpg │ ├── 34037.jpg │ ├── 35084.jpg │ ├── 36152.jpg │ ├── 36219.jpg │ ├── 38506.jpg │ ├── 38556.jpg │ ├── 38920.jpg │ ├── 40649.jpg │ ├── 41177.jpg │ ├── 42436.jpg │ ├── 42959.jpg │ ├── 46151.jpg │ ├── 46646.jpg │ ├── 46756.jpg │ ├── 47808.jpg │ ├── 47902.jpg │ ├── 51368.jpg │ ├── 52007.jpg │ ├── 52706.jpg │ ├── 53644.jpg │ ├── 54017.jpg │ ├── 55360.jpg │ ├── 65811.jpg │ ├── 67989.jpg │ ├── 68289.jpg │ ├── 68482.jpg │ ├── 69438.jpg │ ├── 70697.jpg │ ├── 72737.jpg │ ├── 73993.jpg │ ├── 74155.jpg │ ├── 75033.jpg │ ├── 77414.jpg │ ├── 91390.jpg │ ├── 93594.jpg │ ├── 95829.jpg │ ├── 97460.jpg │ ├── 98225.jpg │ └── 98781.jpg ├── README.md ├── main.py ├── clothes_match_labeled_data_1.txt └── clothes_match_labeled_data_2.txt ├── personalized_content_filter ├── test_articles.csv └── main.py ├── read_from_xlsx ├── README.md └── read_from_xlsx.py ├── faqs_bot ├── README.md └── faqs_bot.py ├── Fortnite_PUBG ├── README.md ├── tweet_keywords_analysis.py └── tweet_emotion_analysis.py ├── LICENSE └── README.md /plotlines/images/kv-sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/plotlines/images/kv-sm.jpg -------------------------------------------------------------------------------- /summarization/articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/summarization/articles.csv -------------------------------------------------------------------------------- /custom_sentiment/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/custom_sentiment/header.jpg -------------------------------------------------------------------------------- /plotlines/images/animated.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/plotlines/images/animated.gif -------------------------------------------------------------------------------- /plotlines/images/dtw-md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/plotlines/images/dtw-md.png -------------------------------------------------------------------------------- /plotlines/images/overlay-LK.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/plotlines/images/overlay-LK.gif -------------------------------------------------------------------------------- /interior_design/images/industrial1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial1.jpg -------------------------------------------------------------------------------- /interior_design/images/industrial2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial2.png -------------------------------------------------------------------------------- /interior_design/images/industrial3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial3.jpg -------------------------------------------------------------------------------- /interior_design/images/industrial4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial4.jpg -------------------------------------------------------------------------------- /interior_design/images/industrial5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial5.jpg -------------------------------------------------------------------------------- /interior_design/images/industrial6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial6.jpg -------------------------------------------------------------------------------- /interior_design/images/industrial7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/industrial7.jpg -------------------------------------------------------------------------------- /interior_design/images/minimalism1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism1.jpg -------------------------------------------------------------------------------- /interior_design/images/minimalism2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism2.jpg -------------------------------------------------------------------------------- /interior_design/images/minimalism3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism3.jpg -------------------------------------------------------------------------------- /interior_design/images/minimalism4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism4.png -------------------------------------------------------------------------------- /interior_design/images/minimalism5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism5.jpg -------------------------------------------------------------------------------- /interior_design/images/minimalism6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism6.jpg -------------------------------------------------------------------------------- /interior_design/images/minimalism7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/minimalism7.jpg -------------------------------------------------------------------------------- /matching_clothes/test_shirts/12770.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/test_shirts/12770.jpg -------------------------------------------------------------------------------- /matching_clothes/test_shirts/13668.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/test_shirts/13668.jpg -------------------------------------------------------------------------------- /matching_clothes/test_shirts/14195.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/test_shirts/14195.jpg -------------------------------------------------------------------------------- /matching_clothes/test_shirts/9915.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/test_shirts/9915.jpg -------------------------------------------------------------------------------- /matching_clothes/test_shirts/9969.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/test_shirts/9969.jpg -------------------------------------------------------------------------------- /matching_clothes/training_pants/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_pants/1.jpg -------------------------------------------------------------------------------- /matching_clothes/training_pants/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_pants/2.jpg -------------------------------------------------------------------------------- /matching_clothes/training_pants/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_pants/3.jpg -------------------------------------------------------------------------------- /matching_clothes/training_pants/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_pants/4.jpg -------------------------------------------------------------------------------- /matching_clothes/training_pants/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_pants/5.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/31199.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/31199.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/4711.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/4711.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/606.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/606.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/7971.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/7971.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/99995.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/99995.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/99996.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/99996.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/99997.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/99997.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/99998.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/99998.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/99999.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/99999.jpg -------------------------------------------------------------------------------- /plotlines/images/vonnegut-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/plotlines/images/vonnegut-overlay.png -------------------------------------------------------------------------------- /interior_design/images/contemporary1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary1.jpg -------------------------------------------------------------------------------- /interior_design/images/contemporary2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary2.jpg -------------------------------------------------------------------------------- /interior_design/images/contemporary3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary3.jpg -------------------------------------------------------------------------------- /interior_design/images/contemporary4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary4.jpg -------------------------------------------------------------------------------- /interior_design/images/contemporary5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary5.jpg -------------------------------------------------------------------------------- /interior_design/images/contemporary6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary6.jpg -------------------------------------------------------------------------------- /interior_design/images/contemporary7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/images/contemporary7.jpg -------------------------------------------------------------------------------- /matching_clothes/test_shirts/11896765.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/test_shirts/11896765.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/1050.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/1050.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/1349.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/1349.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/4160.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/4160.jpg -------------------------------------------------------------------------------- /matching_clothes/white_shirts/993282.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/white_shirts/993282.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/101528.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/101528.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/101845.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/101845.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/102004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/102004.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/104414.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/104414.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/104775.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/104775.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/116996.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/116996.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/117339.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/117339.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/12180.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/12180.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/12234.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/12234.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/138964.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/138964.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/140240.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/140240.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/146469.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/146469.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/148051.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/148051.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/148756.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/148756.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/14937.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/14937.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/153460.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/153460.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/155181.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/155181.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/166481.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/166481.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/166695.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/166695.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/168346.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/168346.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/170881.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/170881.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/177582.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/177582.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/187343.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/187343.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/188047.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/188047.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/188107.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/188107.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/19870.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/19870.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/200235.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/200235.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/200684.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/200684.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/20988.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/20988.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/212190.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/212190.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/212737.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/212737.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/213095.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/213095.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/213322.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/213322.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/215011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/215011.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/215422.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/215422.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/217931.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/217931.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/218935.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/218935.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/221454.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/221454.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/222927.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/222927.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/224483.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/224483.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/224554.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/224554.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/235080.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/235080.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/235255.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/235255.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/235647.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/235647.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/236198.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/236198.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/240253.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/240253.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/240342.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/240342.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/24968.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/24968.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/261084.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/261084.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/261738.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/261738.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/261938.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/261938.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/265350.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/265350.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/268546.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/268546.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/273025.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/273025.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/273114.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/273114.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/277435.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/277435.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/29835.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/29835.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/32552.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/32552.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/34037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/34037.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/35084.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/35084.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/36152.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/36152.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/36219.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/36219.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/38506.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/38506.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/38556.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/38556.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/38920.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/38920.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/40649.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/40649.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/41177.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/41177.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/42436.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/42436.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/42959.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/42959.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/46151.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/46151.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/46646.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/46646.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/46756.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/46756.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/47808.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/47808.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/47902.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/47902.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/51368.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/51368.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/52007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/52007.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/52706.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/52706.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/53644.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/53644.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/54017.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/54017.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/55360.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/55360.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/65811.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/65811.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/67989.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/67989.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/68289.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/68289.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/68482.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/68482.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/69438.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/69438.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/70697.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/70697.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/72737.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/72737.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/73993.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/73993.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/74155.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/74155.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/75033.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/75033.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/77414.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/77414.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/91390.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/91390.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/93594.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/93594.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/95829.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/95829.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/97460.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/97460.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/98225.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/98225.jpg -------------------------------------------------------------------------------- /matching_clothes/training_shirts/98781.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/matching_clothes/training_shirts/98781.jpg -------------------------------------------------------------------------------- /personalized_content_filter/test_articles.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/personalized_content_filter/test_articles.csv -------------------------------------------------------------------------------- /interior_design/test_images/contemporary-test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/contemporary-test.jpg -------------------------------------------------------------------------------- /interior_design/test_images/industrial-test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/industrial-test.jpg -------------------------------------------------------------------------------- /interior_design/test_images/industrial-test2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/industrial-test2.jpg -------------------------------------------------------------------------------- /interior_design/test_images/industrial-test3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/industrial-test3.jpg -------------------------------------------------------------------------------- /interior_design/test_images/minimalism-test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/minimalism-test.jpg -------------------------------------------------------------------------------- /interior_design/test_images/minimalism-test2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/minimalism-test2.jpg -------------------------------------------------------------------------------- /interior_design/test_images/minimalism-test3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/minimalism-test3.jpg -------------------------------------------------------------------------------- /interior_design/test_images/contemporary-test2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/contemporary-test2.JPG -------------------------------------------------------------------------------- /interior_design/test_images/contemporary-test3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IndicoDataSolutions/SuperCell/HEAD/interior_design/test_images/contemporary-test3.jpg -------------------------------------------------------------------------------- /summarization/README.md: -------------------------------------------------------------------------------- 1 | # Summarization 2 | This script uses the indico Summarization API to create summaries for a batch of articles stored in a CSV file.
3 | Check out the tutorial for more information. 4 | 5 | Receive 10k Free API calls per month to continue experimenting with indico. Sign up here.
6 | -------------------------------------------------------------------------------- /read_from_xlsx/README.md: -------------------------------------------------------------------------------- 1 |

**Read from .xlsx (Excel files)**


2 | This small program will help you easily analyze your own Excel data using indico’s machine learning text APIs.
3 | [Check out the tutorial](https://indico.io/blog/tutorial-analyze-excel-files-indicoapis/) for more information.
4 | 5 | Receive 10k Free API calls per month to continue experimenting with indico. [Sign up here](https://indico.io/plans).
6 | Get started with our APIs on [our docs](https://indico.io/docs)! 7 | -------------------------------------------------------------------------------- /faqs_bot/README.md: -------------------------------------------------------------------------------- 1 | # FAQs Bot 2 | This demo uses indico's Text Features API to find text similarity to create a customer support bot that automatically responds to FAQs from users.
3 | Check out the tutorial for more information. 4 | 5 | Receive 10k Free API calls per month to continue experimenting with indico. Sign up here.
6 | Get started with Text Features on our docs! 7 | -------------------------------------------------------------------------------- /matching_clothes/README.md: -------------------------------------------------------------------------------- 1 | # Matching Clothes 2 | This demo uses the indico Custom Collections API to train a clothing matching model.
3 | Check out the tutorial for more information. 4 | 5 | Receive 10k Free API calls per month to continue experimenting with indico. Sign up here.
6 | Get started with Custom Collections on our docs! 7 | -------------------------------------------------------------------------------- /Fortnite_PUBG/README.md: -------------------------------------------------------------------------------- 1 | # Fortnite vs. PUBG on Twitter 2 | This demo uses indico's Sentiment Analysis, Emotions, and Keywords API to analyze tweets from gamers discussing Fortnite and PUBG on Twitter.
3 | Check out the tutorial for more information. 4 | 5 | Receive 10k Free API calls per month to continue experimenting with indico. Sign up here.
6 | Get started with Custom Collection on our docs! 7 | -------------------------------------------------------------------------------- /interior_design/README.md: -------------------------------------------------------------------------------- 1 | # Interior Design Style Classifier 2 | This demo uses indico's Custom Collection API to train an image classifier to categorize images based on interior design style.
3 | Check out the tutorial for more information. 4 | 5 | Receive 10k Free API calls per month to continue experimenting with indico. Sign up here.
6 | Get started with Custom Collection on our docs! 7 | -------------------------------------------------------------------------------- /custom_sentiment/README.md: -------------------------------------------------------------------------------- 1 | ## Notebook and code to accompany the KDnuggets article: "Semi-supervised feature transfer: the big practical benefit of deep learning today?" 2 | 3 | ## Four different machine learning strategies are compared: 4 | 5 | A. Custom scikit-learn model using n-grams, TFIDF features and logistic regression.
6 | B. Pre-trained sentiment API.
7 | C. Custom-trained API using general text features.
8 | D. Custom-trained API using pre-trained sentiment features. 9 | 10 | ####Receive 10k Free API calls per month to continue experimenting with indico. Sign up here. 11 | 12 | ####Get started with Custom Collections here on our docs! 13 | -------------------------------------------------------------------------------- /personalized_content_filter/main.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import indicoio 3 | from indicoio.custom import Collection 4 | 5 | # insert your API key 6 | indicoio.config.api_key = "YOUR_API_KEY" 7 | 8 | def clean_article(article): 9 | return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace') 10 | 11 | def test_model(test_list): 12 | cleaned_test = [clean_article(text) for row in test_list for text in row] 13 | print "Articles cleaned and ready for analysis!" 14 | for data in cleaned_test: 15 | print collection.predict(data) 16 | 17 | if __name__ == "__main__": 18 | # Replace "YOUR_COLLECTION_NAME" with the name you gave your dataset in CrowdLabel 19 | collection = Collection("YOUR_COLLECTION_NAME") 20 | 21 | with open('test_articles.csv', 'rU') as f: 22 | test_list = csv.reader(f) 23 | test_model(test_list) 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 indico 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /plotlines/README_plotlines.md: -------------------------------------------------------------------------------- 1 | # plotlines 2 | Exploring the shapes of stories using indico sentiment analysis APIs. Implements a couple hacks to enable sentiment models to work reasonably well across long context windows 3 | Sentiment analysis is difficult to implement on long stories. This repo implements a couple hacks, to demonstrate how the indico sentiment API can be used to pick up long-range emotional landscape across long stories and movie scripts. We think Kurt Vonnegut would be impressed! 4 | 5 | ### To install: 6 | Navigate to a good place on your filesystem, then: 7 | `git clone https://github.com/IndicoDataSolutions/plotlines` 8 | 9 | If you don't have ipython/Jupyter installed yet, then install it: 10 | `pip install -U ipython` 11 | 12 | Launch the notebook server. It will bring up a browser window. 13 | `ipython notebook` 14 | 15 | Click on `plotlines.ipynb` and walk through the code. Either use the menu `Cell > Run all` to run everything at once, or use `Shift + Enter` to execute one cell at a time. 16 | 17 | Follow the links in the notebook to get an indico API key, install any necessary modules, and find input data (e.g., movie scripts). 18 | 19 | 20 | -------------------------------------------------------------------------------- /summarization/summarization.py: -------------------------------------------------------------------------------- 1 | import indicoio 2 | import csv 3 | 4 | indicoio.config.api_key = 'YOUR_API_KEY' 5 | 6 | def clean_article(article): 7 | return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace') 8 | 9 | def clean_articles(article_list): 10 | # data processing: clean up new lines and convert strings into utf-8 so the indico API can read the data 11 | # put all articles into a list for easy batch processing 12 | cleaned_articles = [clean_article(text) for row in article_list for text in row] 13 | print "Articles cleaned and ready for batch processing!" 14 | return cleaned_articles 15 | 16 | def get_summary(cleaned_articles): 17 | # get article summaries 18 | summary = [indicoio.summarization(item) for item in cleaned_articles] 19 | # clean up result for easy readability 20 | print "Here are the summaries for all %d articles:" % (len(summary)) 21 | for line in summary: 22 | print "\n" + " ".join(line) 23 | 24 | if __name__ == "__main__": 25 | with open('articles.csv', 'rU') as f: 26 | article_list = csv.reader(f) 27 | cleaned_articles = clean_articles(article_list) 28 | get_summary(cleaned_articles) 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SuperCell 2 | Hello, and welcome to indico's repo for public tutorials and the code that accompanies technical articles. 3 | 4 | #### First get an indico API key 5 | Many of these tutorials use indico API's, so you'll need to get a (free) API key. Go to [indico.io](https://indico.io) to register (or to generate a new key if you've already registered and forgotten our old key). 6 | 7 | ## Plotlines 8 | An exploration of the "shapes of stories" using sentiment analysis API and a few hacks. Presented as an experiment using a jupyter/ipython notebook. 9 | 10 | 11 | ## Semi-supervised transfer learning with custom models 12 | Comparison of four different machine learning strategies: 13 | 1. Build a model from scratch using scikit-learn. 14 | 2. Integrate a pre-built API. 15 | 3. Build a custom model on top of word-level features. 16 | 4. Transfer features from a pre-built model into a custom classifier. 17 | 18 | Accompanies this [article on KD Nuggets](http://www.kdnuggets.com/2016/07/semi-supervised-feature-transfer-deep-learning.html) 19 | 20 | ## Visualizing with t-SNE 21 | [Link to blog post at indico.io](https://indico.io/blog/visualizing-with-t-sne/) 22 | 23 | ## Image Features Classifier 24 | Currently available in a separate repo: [link](https://github.com/IndicoDataSolutions/ImageFeaturesClassifier) 25 | 26 | ## Image Similarity 27 | Currently available in a separate repo: [link](https://github.com/IndicoDataSolutions/ImageSimilarity) 28 | -------------------------------------------------------------------------------- /interior_design/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | from tqdm import tqdm 3 | import base64 4 | 5 | def generate_training_data(): 6 | d = [] 7 | labels = [] 8 | 9 | for root, dirs, files in os.walk("images"): 10 | for image in files: 11 | if image.endswith(".jpg") or image.endswith(".png"): 12 | 13 | # get file paths 14 | d.append(os.path.join(root, image)) 15 | 16 | # turn filenames into labels for the images 17 | label = os.path.splitext(image)[0] # remove path elements from label 18 | l = ''.join([c for c in label if not c.isdigit()]) # remove numbers from label 19 | labels.append(l) 20 | 21 | # put images and labels into a single list to pass into the Custom Collections API 22 | all_data = [list(x) for x in zip(d, labels)] 23 | return all_data 24 | 25 | def test_model(): 26 | print "Test results for CONTEMPORARY category:" 27 | print collection.predict("test_images/contemporary-test.jpg") 28 | print collection.predict("test_images/contemporary-test2.jpg") 29 | print collection.predict("test_images/contemporary-test3.jpg") 30 | print "******" 31 | print "Test results for INDUSTRIAL category:" 32 | print collection.predict("test_images/industrial-test.jpg") 33 | print collection.predict("test_images/industrial-test2.jpg") 34 | print collection.predict("test_images/industrial-test3.jpg") 35 | print "******" 36 | print "Test results for MINIMALISM category:" 37 | print collection.predict("test_images/minimalism-test.jpg") 38 | print collection.predict("test_images/minimalism-test2.jpg") 39 | print collection.predict("test_images/minimalism-test3.jpg") 40 | 41 | if __name__ == "__main__": 42 | # TODO 43 | -------------------------------------------------------------------------------- /matching_clothes/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | from operator import itemgetter 3 | 4 | from indicoio.custom import Collection 5 | 6 | def generate_training_data(fname): 7 | """ 8 | Read in text file and generate training data. 9 | Each line looks like the following: 10 | 11 | 1050: [1, 2, 3, 4, 5] 12 | 1349: [1, 2, 3, 4, 5] 13 | 4160: [1, 2, 3] 14 | ... 15 | 16 | First we split on the colon of each row, where the first 17 | half is the image filename and the second half is its 18 | associated labels. 19 | """ 20 | with open(fname, "rb") as f: 21 | for line in f: 22 | shirt, targets = line.split(":") 23 | shirt_path = "training_shirts/{image}.jpg".format( 24 | image=shirt.strip() 25 | ) 26 | shirt_path = os.path.abspath(shirt_path) 27 | 28 | # parse out the list of targets 29 | target_list = targets.strip()[1:-1].split(",") 30 | labels = map(lambda target: "label" + target.strip(), target_list) 31 | yield [ (shirt_path, label) for label in labels] 32 | raise StopIteration 33 | 34 | 35 | if __name__ == "__main__": 36 | collection = Collection("clothes_collection_1") 37 | 38 | # Clear any previous changes 39 | try: 40 | collection.clear() 41 | except: 42 | pass 43 | 44 | train = generate_training_data("clothes_match_labeled_data_1.txt") 45 | 46 | total = 0 47 | for samples in train: 48 | print "Adding {num} samples to collection".format(num=len(samples)) 49 | collection.add_data(samples) 50 | total += len(samples) 51 | print "Added {total} samples to collection thus far".format(total=total) 52 | 53 | collection.train() 54 | collection.wait() 55 | 56 | sort_key = itemgetter(1) 57 | print sorted(collection.predict("test_shirts/9915.jpg").items(), key=sort_key) 58 | print sorted(collection.predict("test_shirts/12770.jpg").items(), key=sort_key) 59 | print sorted(collection.predict("test_shirts/13668.jpg").items(), key=sort_key) 60 | print sorted(collection.predict("test_shirts/14195.jpg").items(), key=sort_key) 61 | print sorted(collection.predict("test_shirts/11896765.jpg").items(), key=sort_key) 62 | -------------------------------------------------------------------------------- /matching_clothes/clothes_match_labeled_data_1.txt: -------------------------------------------------------------------------------- 1 | 1050: [1, 2, 3, 4, 5] 2 | 1349: [1, 2, 3, 4, 5] 3 | 4160: [1, 2, 3] 4 | 12180: [1, 2, 3, 4] 5 | 12234: [2, 3, 4] 6 | 14937: [2, 4] 7 | 19870: [1, 2, 3, 4] 8 | 20988: [1, 2, 3, 4] 9 | 24968: [2, 3] 10 | 29835: [1, 2, 3] 11 | 32552: [2, 4, 5] 12 | 34037: [2, 3] 13 | 35084: [2, 3, 4] 14 | 36152: [1, 2, 4] 15 | 36219: [2, 4] 16 | 38506: [3] 17 | 38556: [1, 3, 4] 18 | 38920: [1, 2, 3, 4, 5] 19 | 40649: [2, 3] 20 | 41177: [1, 3, 4] 21 | 42436: [1, 3, 4] 22 | 42959: [2, 4, 5] 23 | 46151: [1, 3, 4] 24 | 46646: [2, 3, 4] 25 | 46756: [1, 3, 4] 26 | 47808: [2, 3, 4] 27 | 47902: [2, 3, 4] 28 | 51368: [1, 3] 29 | 52007: [2, 4, 5] 30 | 52706: [2, 3, 4] 31 | 53644: [2, 3, 4] 32 | 54017: [2, 3, 4] 33 | 55360: [2, 3] 34 | 65811: [2, 3, 4] 35 | 67989: [1, 2, 3, 4] 36 | 68289: [1, 2, 3, 4] 37 | 68482: [1, 3, 4] 38 | 69438: [1, 3, 4] 39 | 70697: [2, 4] 40 | 72737: [2, 3] 41 | 73993: [3] 42 | 74155: [2, 4] 43 | 75033: [2, 3, 4] 44 | 77414: [3, 4] 45 | 91390: [1, 2, 3, 4] 46 | 93594: [2, 4] 47 | 95829: [1, 3, 4] 48 | 97460: [1, 2, 4] 49 | 98225: [1, 3, 4, 5] 50 | 98781: [2, 3, 4] 51 | 101528: [2, 4] 52 | 101845: [2, 3, 4] 53 | 102004: [1, 3, 4] 54 | 104414: [3, 4] 55 | 104775: [2, 3, 4] 56 | 116996: [2, 4] 57 | 117339: [2, 3, 4] 58 | 138964: [2, 4, 5] 59 | 140240: [2, 4] 60 | 146469: [1, 3, 4] 61 | 148051: [2, 3, 4] 62 | 148756: [2, 3, 4] 63 | 153460: [1, 3, 4] 64 | 155181: [1, 3, 4] 65 | 166481: [1, 3, 4] 66 | 166695: [1, 2, 3, 4, 5] 67 | 168346: [2, 3] 68 | 170881: [1, 2, 3, 4] 69 | 177582: [1, 3] 70 | 187343: [2, 3] 71 | 188047: [2, 4, 5] 72 | 188107: [1, 2, 3, 4] 73 | 200235: [2, 3] 74 | 200684: [2, 4] 75 | 212190: [3] 76 | 212737: [1, 3] 77 | 213095: [1, 3] 78 | 213322: [1, 3, 4] 79 | 215011: [2, 4] 80 | 215422: [1, 2, 3] 81 | 217931: [1, 2, 4] 82 | 218935: [1, 2, 3] 83 | 221454: [1, 2, 4] 84 | 222927: [2, 3, 4] 85 | 224483: [1, 3, 4] 86 | 224554: [1, 2, 3] 87 | 235080: [1, 2, 3, 4] 88 | 235255: [2, 4] 89 | 235647: [1, 3] 90 | 236198: [3, 4] 91 | 240253: [1, 3] 92 | 240342: [1, 2, 3, 4] 93 | 261084: [1, 2, 3, 4] 94 | 261738: [1, 2, 3] 95 | 261938: [1, 2] 96 | 265350: [2, 3] 97 | 268546: [1, 2, 4, 5] 98 | 273025: [1, 3] 99 | 273114: [3, 4] 100 | 277435: [3] 101 | -------------------------------------------------------------------------------- /matching_clothes/clothes_match_labeled_data_2.txt: -------------------------------------------------------------------------------- 1 | 1050: [1, 2, 3, 4, 5] 2 | 1349: [1, 2, 3, 4, 5] 3 | 4160: [1, 2, 3] 4 | 12180: [1, 2, 3, 4] 5 | 12234: [2, 3, 4] 6 | 14937: [2, 4] 7 | 19870: [1, 2, 3, 4] 8 | 20988: [1, 2, 3, 4] 9 | 24968: [2, 3] 10 | 29835: [1, 2, 3] 11 | 32552: [2, 4, 5] 12 | 34037: [2, 3] 13 | 35084: [2, 3, 4] 14 | 36152: [1, 2, 4] 15 | 36219: [2, 4] 16 | 38506: [3] 17 | 38556: [1, 3, 4] 18 | 38920: [1, 2, 3, 4, 5] 19 | 40649: [2, 3] 20 | 41177: [1, 3, 4] 21 | 42436: [1, 3, 4] 22 | 42959: [2, 4, 5] 23 | 46151: [1, 3, 4] 24 | 46646: [2, 3, 4] 25 | 46756: [1, 3, 4] 26 | 47808: [2, 3, 4] 27 | 47902: [2, 3, 4] 28 | 51368: [1, 3] 29 | 52007: [2, 4, 5] 30 | 52706: [2, 3, 4] 31 | 53644: [2, 3, 4] 32 | 54017: [2, 3, 4] 33 | 55360: [2, 3] 34 | 65811: [2, 3, 4] 35 | 67989: [1, 2, 3, 4] 36 | 68289: [1, 2, 3, 4] 37 | 68482: [1, 3, 4] 38 | 69438: [1, 3, 4] 39 | 70697: [2, 4] 40 | 72737: [2, 3] 41 | 73993: [3] 42 | 74155: [2, 4] 43 | 75033: [2, 3, 4] 44 | 77414: [3, 4] 45 | 91390: [1, 2, 3, 4] 46 | 93594: [2, 4] 47 | 95829: [1, 3, 4] 48 | 97460: [1, 2, 4] 49 | 98225: [1, 3, 4, 5] 50 | 98781: [2, 3, 4] 51 | 101528: [2, 4] 52 | 101845: [2, 3, 4] 53 | 102004: [1, 3, 4] 54 | 104414: [3, 4] 55 | 104775: [2, 3, 4] 56 | 116996: [2, 4] 57 | 117339: [2, 3, 4] 58 | 138964: [2, 4, 5] 59 | 140240: [2, 4] 60 | 146469: [1, 3, 4] 61 | 148051: [2, 3, 4] 62 | 148756: [2, 3, 4] 63 | 153460: [1, 3, 4] 64 | 155181: [1, 3, 4] 65 | 166481: [1, 3, 4] 66 | 166695: [1, 2, 3, 4, 5] 67 | 168346: [2, 3] 68 | 170881: [1, 2, 3, 4] 69 | 177582: [1, 3] 70 | 187343: [2, 3] 71 | 188047: [2, 4, 5] 72 | 188107: [1, 2, 3, 4] 73 | 200235: [2, 3] 74 | 200684: [2, 4] 75 | 212190: [3] 76 | 212737: [1, 3] 77 | 213095: [1, 3] 78 | 213322: [1, 3, 4] 79 | 215011: [2, 4] 80 | 215422: [1, 2, 3] 81 | 217931: [1, 2, 4] 82 | 218935: [1, 2, 3] 83 | 221454: [1, 2, 4] 84 | 222927: [2, 3, 4] 85 | 224483: [1, 3, 4] 86 | 224554: [1, 2, 3] 87 | 235080: [1, 2, 3, 4] 88 | 235255: [2, 4] 89 | 235647: [1, 3] 90 | 236198: [3, 4] 91 | 240253: [1, 3] 92 | 240342: [1, 2, 3, 4] 93 | 261084: [1, 2, 3, 4] 94 | 261738: [1, 2, 3] 95 | 261938: [1, 2] 96 | 265350: [2, 3] 97 | 268546: [1, 2, 4, 5] 98 | 273025: [1, 3] 99 | 273114: [3, 4] 100 | 277435: [3] 101 | 606: [1, 2, 4, 5] 102 | 4711: [1, 2, 5] 103 | 7971: [1, 2, 4, 5] 104 | 31199: [1, 2, 4, 5] 105 | 993282: [4, 5] 106 | 99999: [2, 4, 5] 107 | 99998: [2, 5] 108 | 99997: [5] 109 | 99996: [1, 2, 5] 110 | 99995: [2, 4, 5] -------------------------------------------------------------------------------- /Fortnite_PUBG/tweet_keywords_analysis.py: -------------------------------------------------------------------------------- 1 | # imports 2 | import json 3 | import re 4 | from tqdm import tqdm 5 | import indicoio 6 | import pandas as pd 7 | 8 | indicoio.config.api_key = "YOUR_API_KEY" 9 | 10 | 11 | def get_keywords_results(tweet_text_array): 12 | parsed_keywords = [] 13 | raw_results = indicoio.keywords(tweet_text_array) 14 | for item_result in raw_results: 15 | tweet_keywords = [] 16 | for keyword, score in item_result.items(): 17 | tweet_keywords.append(keyword) 18 | parsed_keywords.append(tweet_keywords) 19 | return parsed_keywords 20 | 21 | 22 | if __name__ == "__main__": 23 | # Initiate variables 24 | filename = "tweets.json" 25 | path = "data/" 26 | 27 | tweet_dict_list = json.load(open(path+filename)) 28 | list_size = len(tweet_dict_list) 29 | job_size = list_size 30 | job_start = 0 31 | batch_size = 20 32 | 33 | analysed_items_url = [] # ID to pivot on 34 | analysed_items_timestamp = [] 35 | analyzed_items_text = [] 36 | analyzed_items_keywords = [] 37 | keywords_results = [] 38 | 39 | for batch_start in tqdm(range(job_start, job_size, batch_size)): 40 | batch_end = batch_start + batch_size if batch_start + batch_size < list_size else list_size - 1 41 | batch = tweet_dict_list[batch_start:batch_end] 42 | batch_text = [] 43 | batch_timestamps = [] 44 | batch_urls = [] 45 | 46 | for tweet_item in batch: 47 | u_language = re.search(r"lang=....", tweet_item["html"]).group() 48 | u_language_raw = u_language.replace("lang=", " ").replace("\"", " ").strip() 49 | 50 | if u_language_raw == "en": 51 | batch_text.append(tweet_item["text"]) 52 | batch_timestamps.append(tweet_item["timestamp"]) 53 | batch_urls.append(tweet_item["url"]) 54 | 55 | try: 56 | keywords_results.extend(get_keywords_results(batch_text)) 57 | analysed_items_timestamp.extend(batch_timestamps) 58 | analyzed_items_text.extend(batch_text) 59 | analysed_items_url.extend(batch_urls) 60 | 61 | except Exception: 62 | print("Analysis failed at: %i" % batch_start) 63 | pass 64 | 65 | df = pd.DataFrame() 66 | df['date'] = analysed_items_timestamp 67 | df['url'] = analysed_items_url 68 | df['text'] = analyzed_items_text 69 | df['keywords'] = keywords_results 70 | df.to_csv('keywords_results.csv', encoding='utf-8-sig') 71 | -------------------------------------------------------------------------------- /read_from_xlsx/read_from_xlsx.py: -------------------------------------------------------------------------------- 1 | """ 2 | Tutorial on how to go from data in an excel spreadsheet to indico powered analyses 3 | 4 | Setup Guide: 5 | 1. Follow the setup instructions here: https://indico.io/blog/getting-started-indico-tutorial-for-beginning-programmers/ 6 | 2. Install xlrd by running `pip install xlrd` 7 | """ 8 | 9 | import sys, argparse 10 | from operator import attrgetter 11 | from pprint import pprint 12 | 13 | import csv 14 | import xlrd 15 | from itertools import izip 16 | import indicoio 17 | indicoio.config.api_key = "YOUR_API_KEY_HERE" 18 | 19 | def _get_sheet(book, args): 20 | # Both sheet and sheet number provided 21 | if args.sheet and args.sheet_number: 22 | print ("Warning: Provided both sheet name and sheet number. Ignoring sheet number.") 23 | 24 | if not args.sheet and not args.sheet_number: 25 | print("Warning: Neither sheet nor sheet number were provided. Using the first sheet by default") 26 | return book.sheet_by_index(0) 27 | 28 | # Provided sheet does not exist 29 | if args.sheet and args.sheet not in book.sheet_names(): 30 | print("ERROR: {sheet_name} not found in {filename}".format( 31 | sheet_name=sheet_name, 32 | filename=args.filename 33 | )) 34 | sys.exit(1) 35 | 36 | # Provided sheet number is not valid 37 | if args.sheet_number and args.sheet_number > book.nsheets: 38 | print("ERROR: cannot get sheet {num}. {filename} only has {avail} sheets".format( 39 | num=args.sheet_number, 40 | avail=book.nsheets, 41 | filename=args.filename 42 | )) 43 | sys.exit(1) 44 | 45 | return book.sheet_by_name(args.sheet) 46 | 47 | def parse_from_xlsx(args, batch_size=20): 48 | book = xlrd.open_workbook(args.filename) 49 | sheet = _get_sheet(book, args) 50 | data = sheet.col(args.column or 0) 51 | for idx in xrange(1 if args.contains_header else 0, len(data), batch_size): 52 | yield map(attrgetter("value"), data[idx: idx + batch_size]) 53 | 54 | if __name__ == "__main__": 55 | reload(sys) 56 | sys.setdefaultencoding('utf-8') 57 | 58 | parser = argparse.ArgumentParser() 59 | parser.add_argument("filename", type=str, help="path to excel file") 60 | parser.add_argument("--sheet", type=str, help="sheet name") 61 | parser.add_argument("--sheet-number", type=int, help="sheet index from 1") 62 | parser.add_argument("--column", type=int, help="column index from 1") 63 | parser.add_argument("--contains-header", action="store_true", help="use if columns have headers") 64 | 65 | args = parser.parse_args() 66 | with open("predictions.csv", "wb") as f: 67 | writer = csv.writer(f, dialect="excel") 68 | for lines in parse_from_xlsx(args): 69 | not_empty, inputs = zip(*[row for row in enumerate(lines) if row[1].strip()]) 70 | predictions = indicoio.emotion(list(inputs)) 71 | output = [[str(predictions.pop(0))] if idx in not_empty else "" for idx in xrange(len(lines))] 72 | writer.writerows(izip(inputs, output)) 73 | 74 | print "Analysis complete, CSV file generated." 75 | -------------------------------------------------------------------------------- /Fortnite_PUBG/tweet_emotion_analysis.py: -------------------------------------------------------------------------------- 1 | # imports 2 | import json 3 | import re 4 | from tqdm import tqdm 5 | import indicoio 6 | import pandas as pd 7 | 8 | indicoio.config.api_key = "YOUR_API_KEY" 9 | 10 | 11 | # We are simply taking the emotion with the highest score 12 | def get_emotion_results(tweet_text_array): 13 | parsed_sentiment = [] 14 | raw_results = indicoio.emotion(tweet_text_array, top_n=1) 15 | for result in raw_results: 16 | field, value = result.items()[0] 17 | parsed_sentiment.append(field) 18 | return parsed_sentiment 19 | 20 | 21 | # Again, we take the detected language with the highest score 22 | def get_language_results(tweet_text_array): 23 | parsed_languages = [] 24 | raw_results = indicoio.language(tweet_text_array, top_n=1) 25 | for result in raw_results: 26 | field, value = result.items()[0] 27 | parsed_languages.append(field) 28 | return parsed_languages 29 | 30 | 31 | if __name__ == "__main__": 32 | filename = "tweets.json" 33 | path = "data/" 34 | 35 | tweet_dict_list = json.load(open(path+filename)) 36 | list_size = len(tweet_dict_list) 37 | batch_size = 20 # It's recommended to limit batch sizes to 20 items or less 38 | 39 | # Aggregators for data parsed from CSV 40 | analysed_items_url = [] # Use as unique ID to pivot on 41 | analysed_items_timestamp = [] 42 | analyzed_items_text = [] 43 | analysed_items_user_lang = [] 44 | engagement_retweets = [] 45 | engagement_likes = [] 46 | 47 | # Aggregators for indico API results 48 | language_results = [] 49 | sentiment_results = [] 50 | emotion_results = [] 51 | 52 | for batch_start in tqdm(range(0, list_size, batch_size)): 53 | batch_end = batch_start + batch_size if batch_start + batch_size < list_size else list_size - 1 54 | batch = tweet_dict_list[batch_start:batch_end] 55 | batch_text = [] 56 | batch_timestamps = [] 57 | batch_urls = [] 58 | batch_likes = [] 59 | batch_retweets = [] 60 | batch_user_lang = [] 61 | 62 | for tweet_item in batch: 63 | u_language = re.search(r"lang=....", tweet_item["html"]).group() 64 | u_language_raw = u_language.replace("lang=", " ").replace("\"", " ").strip() 65 | 66 | # English based responses work best with the sentiment and emotion APIs. 67 | if u_language_raw == "en": 68 | batch_text.append(tweet_item["text"]) 69 | batch_timestamps.append(tweet_item["timestamp"]) 70 | batch_urls.append(tweet_item["url"]) 71 | batch_likes.append(tweet_item["likes"]) 72 | batch_retweets.append(tweet_item["retweets"]) 73 | batch_user_lang.append(u_language_raw) 74 | 75 | try: 76 | # We attempt to get the API responses first, if that fails, the batch is skipped. 77 | sentiment_results.extend(indicoio.sentiment_hq(batch_text)) 78 | emotion_results.extend(get_emotion_results(batch_text)) 79 | language_results.extend(get_language_results(batch_text)) 80 | 81 | analysed_items_timestamp.extend(batch_timestamps) 82 | analyzed_items_text.extend(batch_text) 83 | analysed_items_user_lang.extend(batch_user_lang) 84 | analysed_items_url.extend(batch_urls) 85 | engagement_likes.extend(batch_likes) 86 | engagement_retweets.extend(batch_retweets) 87 | 88 | except indicoio.IndicoError as e: 89 | print("Analysis failed at: %i" % batch_start) 90 | pass 91 | 92 | df = pd.DataFrame() 93 | df['date'] = analysed_items_timestamp 94 | df['url'] = analysed_items_url 95 | df['text'] = analyzed_items_text 96 | df['likes'] = engagement_likes 97 | df['shares'] = engagement_retweets 98 | df['lang_user'] = analysed_items_user_lang 99 | df['lang_detected'] = language_results 100 | df['sentiment'] = sentiment_results 101 | df['emotion'] = emotion_results 102 | df.to_csv('emotion_results.csv', encoding='utf-8-sig') 103 | -------------------------------------------------------------------------------- /faqs_bot/faqs_bot.py: -------------------------------------------------------------------------------- 1 | import math 2 | import os 3 | from random import sample 4 | import cPickle as pickle 5 | 6 | from scipy.spatial.distance import cdist 7 | import json 8 | import numpy as np 9 | import indicoio 10 | from texttable import Texttable 11 | indicoio.config.api_key = "YOUR_API_KEY_HERE" 12 | 13 | ''' 14 | Use indico's Text Features API to find text similarity and create a customer support bot that automatically responds to FAQs from users. 15 | Tutorial: https://indico.io/blog/faqs-bot-text-features-api/ 16 | ''' 17 | 18 | faqs = { 19 | 'Where can I find my API Key?':'Hi there! You receive an API key upon sign up. After you confirm your email you will be able to log in to your dashboard at indico.io/dashboard and see your API key on the top of the screen.', 20 | 'Can indico be downloaded as a package and used offline?':'Unfortunately, no. However we do have a paid option for on premise deployment for enterprise clients.', 21 | 'What is indico API credit?':'Hello! indico API credit is what we use to keep track of usage. If you send in 100 bits of text into our API you are charged 100 credits, essentially one credit is consumed per datapoint analyzed. Every user gets 10,000 free API credits per month.', 22 | 'Would I be able to set up a Pay as You Go account and have it stop if I reach 10,000 calls so that I won\'t be charged if I accidentally go over the limit?':'Hi there! Yep, the best way for you to do this would be to sign up for a pay as you go account and don\'t put in a credit card (we don\'t require you to). When you hit 10,000 you will be locked out of your account and unable to make more calls until you put a credit card in or you can wait until the first of the month when it resets to 10,000.', 23 | 'Hello! When I try to install indico with pip, I get this error on Windows. Do you know why?':'Hello, please try following the steps listed here: https://indico.io/blog/getting-started-indico-tutorial-for-beginning-programmers/#windows and let us know if you still continue to have problems.' 24 | } 25 | 26 | def make_feats(data): 27 | """ 28 | Send our text data throught the indico API and return each text example's text vector representation 29 | """ 30 | # TODO 31 | 32 | def calculate_distances(feats): 33 | # cosine distance is the most reasonable metric for comparison of these 300d vectors 34 | distances = cdist(feats, feats, 'cosine') 35 | return distances 36 | 37 | def similarity_text(idx, distance_matrix, data, n_similar=5): 38 | """ 39 | idx: the index of the text we're looking for similar questions to 40 | (data[idx] corresponds to the actual text we care about) 41 | distance_matrix: an m by n matrix that stores the distance between 42 | document m and document n at distance_matrix[m][n] 43 | data: a flat list of text data 44 | """ 45 | t = Texttable() 46 | t.set_cols_width([50, 20]) 47 | 48 | # these are the indexes of the texts that are most similar to the text at data[idx] 49 | # note that this list of 10 elements contains the index of text that we're comparing things to at idx 0 50 | sorted_distance_idxs = np.argsort(distance_matrix[idx])[:n_similar] # EX: [252, 102, 239, ...] 51 | # this is the index of the text that is most similar to the query (index 0) 52 | most_sim_idx = sorted_distance_idxs[1] 53 | 54 | # header for texttable 55 | t.add_rows([['Text', 'Similarity']]) 56 | print t.draw() 57 | 58 | # set the variable that will hold our matching FAQ 59 | faq_match = None 60 | 61 | for similar_idx in sorted_distance_idxs: 62 | # actual text data for display 63 | datum = data[similar_idx] 64 | 65 | # distance in cosine space from our text example to the similar text example 66 | distance = distance_matrix[idx][similar_idx] 67 | 68 | # how similar that text data is to our input example 69 | similarity = 1 - distance 70 | 71 | # add the text + the floating point similarity value to our Texttable() object for display 72 | t.add_rows([[datum, str(round(similarity, 2))]]) 73 | print t.draw() 74 | 75 | # set a confidence threshold 76 | # TODO 77 | 78 | # print the appropriate answer to the FAQ, or bring in a human to respond 79 | # TODO 80 | 81 | def input_question(data, feats): 82 | # TODO 83 | 84 | def run(): 85 | # TODO 86 | 87 | 88 | if __name__ == "__main__": 89 | run() 90 | --------------------------------------------------------------------------------