diff --git a/.gitattributes b/.gitattributes index ba03fc06cc16381b3148219e6209c4aa660b80fe..69299a6f82781ee30c44eef3876bf6de31cd75b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -85,3 +85,4 @@ extracted/pairs/sub-homeimprovement.jsonl filter=lfs diff=lfs merge=lfs -text extracted/pairs/sub-learnjavascript.jsonl filter=lfs diff=lfs merge=lfs -text extracted/pairs/sub-rust.jsonl filter=lfs diff=lfs merge=lfs -text extracted/pairs/sub-woodworking.jsonl filter=lfs diff=lfs merge=lfs -text +extracted/pairs/sub-learnpython.jsonl filter=lfs diff=lfs merge=lfs -text diff --git a/extracted/pairs/sub-AskAcademia.jsonl b/extracted/pairs/sub-AskAcademia.jsonl index 62018cb5e84065104bacc7f1e257f70206e77282..88bc500ff9403abd5a7b4c4972d466133beeeab2 100644 --- a/extracted/pairs/sub-AskAcademia.jsonl +++ b/extracted/pairs/sub-AskAcademia.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efac7799e3e743010f05d6b30e97b2f07eb9376be112524a7fb1629fe460d103 -size 75065131 +oid sha256:8a04cf90c15ca478d23ba49513ead8bb5fd229bbac5ecb33ed8b645e0526bb0c +size 83407169 diff --git a/extracted/pairs/sub-AskBaking.jsonl b/extracted/pairs/sub-AskBaking.jsonl index 2010380e38f8a80d2dfe9f33d31d796706520165..8d88590294a9a8417c0d39ca73d37e05fa5fbf87 100644 --- a/extracted/pairs/sub-AskBaking.jsonl +++ b/extracted/pairs/sub-AskBaking.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1776a03439440700af7661d3b7618b5c181598876ea88eca3ff4e89392138f6f -size 32600409 +oid sha256:8b8cbe63a112d221f36ecd490f6b38e8ff655e6eae9e88076ded17418b8079c7 +size 38005514 diff --git a/extracted/pairs/sub-AskCulinary.jsonl b/extracted/pairs/sub-AskCulinary.jsonl index fc20157168ff92b8a77fa263c1eaaa420d5f4bb4..975571f23b21147973cfca8d2635b374571c7ae0 100644 --- a/extracted/pairs/sub-AskCulinary.jsonl +++ b/extracted/pairs/sub-AskCulinary.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:494fd082e78cc51028f373c1b26261d305812c85d02b5141cea24c10514cdf38 -size 95365896 +oid sha256:6514427fe5e7d1eb896aa7ee27fbc079af29ba4736b30e3bb4acdd626dd81f6d +size 110581304 diff --git a/extracted/pairs/sub-AskDocs.jsonl b/extracted/pairs/sub-AskDocs.jsonl index cdd27df1de2626a008034f28469736def9691861..51d9e474c07b33a5bf03f6a17938513b5ba35419 100644 --- a/extracted/pairs/sub-AskDocs.jsonl +++ b/extracted/pairs/sub-AskDocs.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15e96f73a4956b1b77f857245f3eed873800346b7bcffc71bdc4ddcd8f4d29eb -size 274223679 +oid sha256:aa37471aa899bdcb0dbdd9a22a69aec741ea1f8dad284b42e23910d1a9d99a8e +size 317989050 diff --git a/extracted/pairs/sub-AskEngineers.jsonl b/extracted/pairs/sub-AskEngineers.jsonl index 0f0bce720463f64536782065387ff9ac8a2bdad7..f218abe49248a848d5ce2567878b5025746b56b0 100644 --- a/extracted/pairs/sub-AskEngineers.jsonl +++ b/extracted/pairs/sub-AskEngineers.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9ea31f86729fac389ae14394ab3f5f9d63180a16071deff978b86c4f81c04e50 -size 93110891 +oid sha256:4907c1d153fafe9149498456b95af728a7093ebe1ddd99ec3ad5ca451bf3d9a0 +size 104980624 diff --git a/extracted/pairs/sub-AskHistorians.jsonl b/extracted/pairs/sub-AskHistorians.jsonl index f3227299df82f49e406f666ac4784f6666d83dbd..e0c6235916de7fc4e502b86c23c351f112098f19 100644 --- a/extracted/pairs/sub-AskHistorians.jsonl +++ b/extracted/pairs/sub-AskHistorians.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:653582fda912df78f860c1601789e6cfda794e20fe7bc01c572f8f4bce16bc76 -size 433395273 +oid sha256:70b5360632e35081d5e4aa73361f926ab9e7e17c536ac0f28128db5b3343a0ea +size 458036329 diff --git a/extracted/pairs/sub-AskStatistics.jsonl b/extracted/pairs/sub-AskStatistics.jsonl index 35f0e8ffe06b7519a2f595e110a1d19689fc04fb..14410dfa58adf25a2c4d43ca168b3371559397ea 100644 --- a/extracted/pairs/sub-AskStatistics.jsonl +++ b/extracted/pairs/sub-AskStatistics.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:67e3a82f63ee1212ead45a32a3fdfe83a35a62f2d3086e6dc3cd9a8e261c5e9f -size 33309390 +oid sha256:a3968c80c119f02fe99d677704d76e76126a83dba4d836461f0fed925e03123c +size 37326962 diff --git a/extracted/pairs/sub-Coffee.jsonl b/extracted/pairs/sub-Coffee.jsonl index 1dfe89c90daf40540c230f27ae6a40d6d70a31ac..a9514b4e8e3400372bae01cdfe88c51ffb288044 100644 --- a/extracted/pairs/sub-Coffee.jsonl +++ b/extracted/pairs/sub-Coffee.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c784aff97423f9e53d6321fffeef02158a79303f0edd8fdcf8fb6de4f9612518 -size 67711607 +oid sha256:c0ba07530e187dbeb9decca8b8ee0f0bf0b7458f7a9e89d754aacb14584995b4 +size 78454123 diff --git a/extracted/pairs/sub-DIY.jsonl b/extracted/pairs/sub-DIY.jsonl index 343a77e095543d623999093352ba6832a82fba5d..2061d2d130950f02ac965582e6b1452f75256383 100644 --- a/extracted/pairs/sub-DIY.jsonl +++ b/extracted/pairs/sub-DIY.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2db870da7e74e5b13da1eee269eb93acc7067fd5aaa8324fd6fd4476c3e0b5ca -size 86537891 +oid sha256:ddd1c72a44360b16a7e48c88859c163f998c8136f7897bcc5e96d0ed9724ea2d +size 117075509 diff --git a/extracted/pairs/sub-German.jsonl b/extracted/pairs/sub-German.jsonl index 8df4fd4a5e759b1352f6ae99ad9d113584ead002..42492b51bc37e3eb3e0dacf1a5fb0348ff355ff8 100644 --- a/extracted/pairs/sub-German.jsonl +++ b/extracted/pairs/sub-German.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b2b67015717d7d9aea54010c6e46dd3c9915cf0b1ebfd9d38c6b05dc2507c1f -size 65288849 +oid sha256:5ccf811da7eb24872ae79bfb0551a30ebfa56cd243dba435024d66b2a33a08ed +size 76335939 diff --git a/extracted/pairs/sub-JapanTravel.jsonl b/extracted/pairs/sub-JapanTravel.jsonl index 83b5db5bc4f9fcd520c94d12006e3a0c2ca6ad66..728a89256d0e06797220b49f23eab554c6e8e967 100644 --- a/extracted/pairs/sub-JapanTravel.jsonl +++ b/extracted/pairs/sub-JapanTravel.jsonl @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4bd4d5525c746028344fb17917f81a31c3ed261c0a80c5308c0ad4aa26a33d64 -size 47794634 +oid sha256:5a4fbf8a6f6dbb64a647ad5072f93676d0e3d3c22e2d8522cc88c309ac05d6ff +size 53572919 diff --git a/extracted/pairs/sub-LanguageTechnology.jsonl b/extracted/pairs/sub-LanguageTechnology.jsonl index 9328bb1f253dfe34a8da9ffbacadacd83c470858..0eede005d2e87831cd8a1ce6702561931de254b2 100644 --- a/extracted/pairs/sub-LanguageTechnology.jsonl +++ b/extracted/pairs/sub-LanguageTechnology.jsonl @@ -1,2325 +1,2325 @@ -{"user_id":"anon_bea54f748d44fe13","timestamp":"2012-11-10T22:16:22+00:00","subreddit":"LanguageTechnology","query":"Where could I download an English dictionary along with the pronunciation for each word?\n\nI'd like to make a free, offline rhyming dictionary app to help people write poetry and songs. I haven't been able to find a dictionary I could download containing the pronunciation of the words. Perhaps I'm overlooking something. I found this information regarding WordNet: \"Unlike other dictionaries, WordNet does not include information about etymology, pronunciation ...\". The appears to be true of WordWeb and Artha. I had a look at downloading wiktionary ( http://dumps.wikimedia.org/enwiktionary/latest/ ) but I have very limited bandwidth and I don't know which files contain words and their pronunciations. \n\nAny suggestions?","preferred_answer":"The [Moby Pronunciator word list](http://icon.shef.ac.uk/Moby/mpron.html) might help. It was used for the [RhymeBrain web site](http://rhymebrain.com/en).","top_comment":"[CMUDict](http://www.speech.cs.cmu.edu/cgi-bin/cmudict) might work out. There's some room for ambiguity, but I've used it for a couple things and found it to be good enough. It uses ARPABet, but that's really easy to transform to whatever you'd like. The only trick would be instances where stress is different depending on things like part of speech.","metadata":{"post_id":"12zcvi","post_score":6,"answer_comment_id":"c6zfw8a","answer_score":3,"answerer_anon_id":"anon_7b49c7bab949f5a0","top_comment_id":"c6zjr5w","top_comment_score":4,"top_comment_anon_id":"anon_2a6f72e61f313ee5","top_equals_preferred":false,"thanks_reply_id":"c6zonn6","thanks_reply_score":1,"thanks_reply_text":"This is great. Thanks.","thanks_reply_timestamp":"2012-11-11T15:07:56+00:00"}} -{"user_id":"anon_bea54f748d44fe13","timestamp":"2012-11-10T22:16:22+00:00","subreddit":"LanguageTechnology","query":"Where could I download an English dictionary along with the pronunciation for each word?\n\nI'd like to make a free, offline rhyming dictionary app to help people write poetry and songs. I haven't been able to find a dictionary I could download containing the pronunciation of the words. Perhaps I'm overlooking something. I found this information regarding WordNet: \"Unlike other dictionaries, WordNet does not include information about etymology, pronunciation ...\". The appears to be true of WordWeb and Artha. I had a look at downloading wiktionary ( http://dumps.wikimedia.org/enwiktionary/latest/ ) but I have very limited bandwidth and I don't know which files contain words and their pronunciations. \n\nAny suggestions?","preferred_answer":"[CMUDict](http://www.speech.cs.cmu.edu/cgi-bin/cmudict) might work out. There's some room for ambiguity, but I've used it for a couple things and found it to be good enough. It uses ARPABet, but that's really easy to transform to whatever you'd like. The only trick would be instances where stress is different depending on things like part of speech.","top_comment":"[CMUDict](http://www.speech.cs.cmu.edu/cgi-bin/cmudict) might work out. There's some room for ambiguity, but I've used it for a couple things and found it to be good enough. It uses ARPABet, but that's really easy to transform to whatever you'd like. The only trick would be instances where stress is different depending on things like part of speech.","metadata":{"post_id":"12zcvi","post_score":6,"answer_comment_id":"c6zjr5w","answer_score":4,"answerer_anon_id":"anon_2a6f72e61f313ee5","top_comment_id":"c6zjr5w","top_comment_score":4,"top_comment_anon_id":"anon_2a6f72e61f313ee5","top_equals_preferred":true,"thanks_reply_id":"c6zonvy","thanks_reply_score":2,"thanks_reply_text":"This is perfect. Thanks.","thanks_reply_timestamp":"2012-11-11T15:08:38+00:00"}} -{"user_id":"anon_2a6f72e61f313ee5","timestamp":"2013-01-05T07:51:04+00:00","subreddit":"LanguageTechnology","query":"Free pronunciation resources for English Received Pronunciation, similar to CMUdict?\n\nQuick question. Googled around a lot, and have not found something, but maybe someone here knows. Is there an RP equivalent to something like [CMUdict](http://www.speech.cs.cmu.edu/cgi-bin/cmudict), which is a free resource of word pronunciations? Ideally I'd like IPA, but I'd work with something else as long as it is very very consistent.\n\nCMUDict gives, for example, the following: \n\n ABSTON AE1 B S T AH0 N\n ABSTRACT AE0 B S T R AE1 K T\n ABSTRACT(1) AE1 B S T R AE2 K T\n ABSTRACTED AE1 B S T R AE2 K T IH0 D\n ABSTRACTION AE0 B S T R AE1 K SH AH0 N\n ABSTRACTIONS AE0 B S T R AE1 K SH AH0 N Z\n ABSTRACTS AE1 B S T R AE0 K T S\n ABSTRUSE AH0 B S T R UW1 S\n ABSURD AH0 B S ER1 D\n ABSURDIST AH0 B S ER1 D IH0 S T\n ABSURDITIES AH0 B S ER1 D AH0 T IY0 Z\n\nThe right side is ARPABet, which is detailed but not as easily readable as IPA, but easy to convert to IPA... Transcriptions include lexical stress and is phonemic, not phonetic. However, CMUdict is General American... Thanks for any leads!","preferred_answer":"[UNISYN](http://www.cstr.ed.ac.uk/projects/unisyn/ ) is my favorite! I used it as the basis for my thesis's phonetic dictionary.\n\nIt uses [SAMPA](http://en.wikipedia.org/wiki/Speech_Assessment_Methods_Phonetic_Alphabet), which is a rather nice computer-readable version of the IPA.\n\nI've only used it for General American, but I know that it uses \"root\" phonemes that translate into many different english accents, and I'd be shocked if RP wasn't one of them.\n\nYou'll need to run a few scripts to get it into the pronunciation of your choice, but it wasn't too difficult. \n\nJust don't try to use the frequency values from UNISYN. Those values...are less than well-sampled. Nearly threw my whole thesis off track.\n\nBut if you're just using pronunciations, it should be marvelous!\n\nI looked into a few other phonetic dictionaries as well, but UNISYN was the one I liked best.","top_comment":"[UNISYN](http://www.cstr.ed.ac.uk/projects/unisyn/ ) is my favorite! I used it as the basis for my thesis's phonetic dictionary.\n\nIt uses [SAMPA](http://en.wikipedia.org/wiki/Speech_Assessment_Methods_Phonetic_Alphabet), which is a rather nice computer-readable version of the IPA.\n\nI've only used it for General American, but I know that it uses \"root\" phonemes that translate into many different english accents, and I'd be shocked if RP wasn't one of them.\n\nYou'll need to run a few scripts to get it into the pronunciation of your choice, but it wasn't too difficult. \n\nJust don't try to use the frequency values from UNISYN. Those values...are less than well-sampled. Nearly threw my whole thesis off track.\n\nBut if you're just using pronunciations, it should be marvelous!\n\nI looked into a few other phonetic dictionaries as well, but UNISYN was the one I liked best.","metadata":{"post_id":"15zzot","post_score":2,"answer_comment_id":"c7rex4n","answer_score":2,"answerer_anon_id":"anon_5a615468c2f89411","top_comment_id":"c7rex4n","top_comment_score":2,"top_comment_anon_id":"anon_5a615468c2f89411","top_equals_preferred":true,"thanks_reply_id":"c7rizvk","thanks_reply_score":2,"thanks_reply_text":"Oh my, this sounds like more than I was expecting. Thank you! :D","thanks_reply_timestamp":"2013-01-05T17:12:37+00:00"}} -{"user_id":"anon_a6d46d628f2783d8","timestamp":"2013-08-27T15:58:38+00:00","subreddit":"LanguageTechnology","query":"LT grad programs for somebody with a linguistics background?\n\nI'm interested in pursuing a graduate degree in language technology and am currently a senior with a linguistics background. I took a Python programming course recently and am in a Natural Language Technologies course right now. I know this is the field I am interested in but am not really sure which programs are good or would be good for me. Thanks!","preferred_answer":"If you want to use your linguistics knowledge in Language Technology, you should look into the University of Rochester. We've got a strong Linguistics department and one of the best Cognitive Science departments, so our NLP group often uses our knowledge of language to inform our language systems. If you're looking for a strong statistical NLP program, however, there may other places you'd consider first. Not that ours is bad, but half of our NLP department tends towards knowledge representation and hand-built grammars and rules with some statistics thrown in.","top_comment":"Carnegie Mellon has a great program, other than that Stanford or the University of Edinburgh.","metadata":{"post_id":"1l6zxy","post_score":5,"answer_comment_id":"cbwzpab","answer_score":1,"answerer_anon_id":"anon_0cb8a2e18d85f260","top_comment_id":"cbwuxzi","top_comment_score":1,"top_comment_anon_id":"anon_92d04469bd1ecd06","top_equals_preferred":false,"thanks_reply_id":"cbx2sgd","thanks_reply_score":1,"thanks_reply_text":"Thanks! I've done some research and have looked at Ohio State, Arizona, Berkeley and Illinois as well. ","thanks_reply_timestamp":"2013-08-28T17:10:32+00:00"}} -{"user_id":"anon_9f47098a6b8eb31a","timestamp":"2013-10-24T23:31:04+00:00","subreddit":"LanguageTechnology","query":"Newbie Question: What does annotation mean in Natural Language Processing?\n\nI've tried googling but I end up finding an O'Reilly book. I figured I asked it here.\n\nThanks!","preferred_answer":"It's adding information to a sequence of characters in a corpus. POS tagging is a tipical form of annotation, that consists in adding part-of-speech tags (lexical categories) to tokens. So suppose you have the following tokens: ['This', 'is', 'a', 'sentence', '.']. After tagging you'd have: [('This', 'DT'), ('is', 'VBZ'), ('a', 'DT'), ('sentence', 'NN'), ('.', '.')]. There are many other forms of annotation though, but the idea is the same: adding some sort of information to the text.","top_comment":"It's adding information to a sequence of characters in a corpus. POS tagging is a tipical form of annotation, that consists in adding part-of-speech tags (lexical categories) to tokens. So suppose you have the following tokens: ['This', 'is', 'a', 'sentence', '.']. After tagging you'd have: [('This', 'DT'), ('is', 'VBZ'), ('a', 'DT'), ('sentence', 'NN'), ('.', '.')]. There are many other forms of annotation though, but the idea is the same: adding some sort of information to the text.","metadata":{"post_id":"1p5p1y","post_score":4,"answer_comment_id":"ccz0xry","answer_score":6,"answerer_anon_id":"anon_00716df6614f488b","top_comment_id":"ccz0xry","top_comment_score":6,"top_comment_anon_id":"anon_00716df6614f488b","top_equals_preferred":true,"thanks_reply_id":"ccz1uah","thanks_reply_score":1,"thanks_reply_text":"Thank you!","thanks_reply_timestamp":"2013-10-25T00:59:22+00:00"}} -{"user_id":"anon_bb32036b52e88836","timestamp":"2013-12-29T06:21:17+00:00","subreddit":"LanguageTechnology","query":"Difference between NLP and computational linguistics?\n\nI have heard that there is a difference between NLP and computational linguistics, namely that NLP is more computer science heavy and that computational linguistics is more like linguistics with a flavor of computer science. Is this true? Are there other differences? Any specific examples of these differences? I'm mostly concerned because I'm thinking about getting certified in compling and I would hate to be barred from diving into NLP because people think I can't handle heavy computer science and programming. Thanks!","preferred_answer":"A lot of people use them interchangeably, and a lot of times that's appropriate. Not everyone agrees on the real difference between the two. The following is just my opinion.\n\nThe difference is that NLP seeks to do useful things using human language, while Computational Linguistics seeks to study language using computers and corpora.\n\nSo the means are the same, the goal is different. Often NLP researchers will build a useful system, throw in as many features as they can think of, and show that it works really well, better than everyone else. A CL research would be more interested in which features are useful indicators and why is that the case.\n\nI would say, however, most work usually cannot be cleanly divided into one bin or the other.\n\nSource: PhD student with two advisors. One calls himself an NLP person, the other calls herself a CL person. After interacting with them for three years, this is how I feel. :)","top_comment":"A lot of people use them interchangeably, and a lot of times that's appropriate. Not everyone agrees on the real difference between the two. The following is just my opinion.\n\nThe difference is that NLP seeks to do useful things using human language, while Computational Linguistics seeks to study language using computers and corpora.\n\nSo the means are the same, the goal is different. Often NLP researchers will build a useful system, throw in as many features as they can think of, and show that it works really well, better than everyone else. A CL research would be more interested in which features are useful indicators and why is that the case.\n\nI would say, however, most work usually cannot be cleanly divided into one bin or the other.\n\nSource: PhD student with two advisors. One calls himself an NLP person, the other calls herself a CL person. After interacting with them for three years, this is how I feel. :)","metadata":{"post_id":"1txen4","post_score":13,"answer_comment_id":"cecjx79","answer_score":19,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"cecjx79","top_comment_score":19,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":true,"thanks_reply_id":"cecmqau","thanks_reply_score":0,"thanks_reply_text":"Thanks for the answer. Would you say, though, that people who have official degrees in one or the other can't work in the other? Like having a CompLing degree would bar me from getting an NLP job?","thanks_reply_timestamp":"2013-12-29T17:34:28+00:00"}} -{"user_id":"anon_bb32036b52e88836","timestamp":"2013-12-29T06:21:17+00:00","subreddit":"LanguageTechnology","query":"Difference between NLP and computational linguistics?\n\nI have heard that there is a difference between NLP and computational linguistics, namely that NLP is more computer science heavy and that computational linguistics is more like linguistics with a flavor of computer science. Is this true? Are there other differences? Any specific examples of these differences? I'm mostly concerned because I'm thinking about getting certified in compling and I would hate to be barred from diving into NLP because people think I can't handle heavy computer science and programming. Thanks!","preferred_answer":"Far from it. I'd really say they mostly do the same thing, and it's really just the goal of the work. And a lot of people switch hats as necessary. It's really just a self-chosen philosophy and label, if anything.","top_comment":"A lot of people use them interchangeably, and a lot of times that's appropriate. Not everyone agrees on the real difference between the two. The following is just my opinion.\n\nThe difference is that NLP seeks to do useful things using human language, while Computational Linguistics seeks to study language using computers and corpora.\n\nSo the means are the same, the goal is different. Often NLP researchers will build a useful system, throw in as many features as they can think of, and show that it works really well, better than everyone else. A CL research would be more interested in which features are useful indicators and why is that the case.\n\nI would say, however, most work usually cannot be cleanly divided into one bin or the other.\n\nSource: PhD student with two advisors. One calls himself an NLP person, the other calls herself a CL person. After interacting with them for three years, this is how I feel. :)","metadata":{"post_id":"1txen4","post_score":13,"answer_comment_id":"cecnxff","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"cecjx79","top_comment_score":19,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":false,"thanks_reply_id":"ced5bmp","thanks_reply_score":1,"thanks_reply_text":"Cool, that's all I need to know. Thanks again for the thorough answer. ","thanks_reply_timestamp":"2013-12-30T05:39:36+00:00"}} -{"user_id":"anon_7d3db1085eff226c","timestamp":"2014-05-20T14:26:44+00:00","subreddit":"LanguageTechnology","query":"An approach for extracting (not only named-) entities from text\n\nI am searching for a high accuracy and (possibly) robust NLP/IE method or a tool for the following extraction task: \n- extraction targets: addresses and contact information. These are strings of different lengths and formats, e.g., complete address or a part of an address (e.g. street name, zip-code, city or region name).\n- language: german \n\nSo far, I’ve considered two approaches:\n- set of “hand-made” extraction rules (e.g., based on list of typical tokens found in or around an extraction target), implemented using e.g., a set of regular expressions \n- machine learning approach (e.g. Stanford NER (or more specifically CRFClassifier) trained on a set of annotated instances in a text) \n\nWhat other methods or tools should/could I consider for the task? \nFor the training of a machine learning based solution, any estimates on the required training data size?","preferred_answer":"100-200 training examples in BIO encoding, 1st order linear-chain CRF and a gazetteer (check geonames.org) can give pretty reasonable results for the task of extracting contact information from English pages.\n\nTo develop regular expressions, evaluate how they work and detect regressions you need annotated data anyways. I'd start with collecting annotated data.\n\nRules and ML are not mutually exclusive: hand-written rules can be used as features for ML algorithm.\n\nSometimes grammars are used for address parsing, but I'm not sure they are that useful for address extraction.","top_comment":"100-200 training examples in BIO encoding, 1st order linear-chain CRF and a gazetteer (check geonames.org) can give pretty reasonable results for the task of extracting contact information from English pages.\n\nTo develop regular expressions, evaluate how they work and detect regressions you need annotated data anyways. I'd start with collecting annotated data.\n\nRules and ML are not mutually exclusive: hand-written rules can be used as features for ML algorithm.\n\nSometimes grammars are used for address parsing, but I'm not sure they are that useful for address extraction.","metadata":{"post_id":"2615ya","post_score":4,"answer_comment_id":"chn0iia","answer_score":3,"answerer_anon_id":"anon_b4ff8657b95e6dd0","top_comment_id":"chn0iia","top_comment_score":3,"top_comment_anon_id":"anon_b4ff8657b95e6dd0","top_equals_preferred":true,"thanks_reply_id":"chndped","thanks_reply_score":1,"thanks_reply_text":"thank you for very useful suggestions! ","thanks_reply_timestamp":"2014-05-21T09:25:37+00:00"}} -{"user_id":"anon_d7528a6efff60145","timestamp":"2014-05-24T23:38:54+00:00","subreddit":"LanguageTechnology","query":"Independent clause boundary disambiguation, and independent clause segmentation – any tools to do this?\n\n(I have no knowledge in the field of NLP, so if the following question is inappropriate, I’ll delete it).\n\nI remember skimming the sentence segmentation section from the NLTK site a long time ago. \n\nI use a crude text replacement of “period” “space” with “period” “manual line break” to achieve sentence segmentation, instead of something like the Punkt tokenizer of NLTK. \n\nI segment to help me more easily locate and reread sentences, which can sometimes help with reading comprehension. \n\nWhat about independent clause boundary disambiguation, and independent clause segmentation? Are there any tools that attempt to do this?\n\nBelow is some example text. If an independent clause can be identified within a sentence, there’s a split. Starting from the end of a sentence, it moves left, and greedily splits:\n\nE.g.\n\n> **Sentence** boundary disambiguation\n> (SBD), also known as sentence\n> breaking, is the problem in natural\n> language processing of deciding where \n> \n> sentences begin and end. \n> \n> **Often**, natural language processing\n> tools \n> \n> require their input to be divided into\n> sentences for a number of reasons. \n> \n> **However**, sentence boundary\n> identification is challenging because punctuation \n> \n> marks are often ambiguous.\n> \n> \n> **For** example, a period may \n> \n> denote an abbreviation, decimal point,\n> an ellipsis, or an email address - not\n> the end of a sentence. \n> \n> **About** 47% of the periods in the Wall\n> Street Journal corpus \n> \n> denote abbreviations.[1] \n> \n> **As** well, question marks and\n> exclamation marks may \n> \n> appear in embedded quotations,\n> emoticons, computer code, and slang.\n> \n> **Another** approach is to automatically \n> \n> learn a set of rules from a set of\n> documents where the sentence\n> \n> breaks are pre-marked. \n> \n> **Languages** like Japanese and Chinese \n> \n> have unambiguous sentence-ending\n> markers.\n> \n> **The** standard 'vanilla' approach to \n> \n> locate the end of a sentence:\n> \n> (a) **If** \n> \n> it's a period, \n> \n> it ends a sentence.\n> \n> (b) **If** the preceding \n> \n> token is on my hand-compiled list of\n> abbreviations, then \n> \n> it doesn't end a sentence.\n> \n> (c) **If** the next \n> \n> token is capitalized, then \n> \n> it ends a sentence.\n> \n> **This** \n> \n> strategy gets about 95% of sentences\n> correct.[2]\n> \n> **Solutions** have been based on a maximum\n> entropy model.[3] \n> \n> **The** SATZ architecture uses a neural\n> network to \n> \n> disambiguate sentence boundaries and\n> achieves 98.5% accuracy.\n\n(I’m not sure if I split it properly.)\n\nIf there are no means to segment independent clauses, are there any search terms that I can use to further explore this topic?\n\nThanks.","preferred_answer":"I would check out Stanford's CoreNLP. I believe you can customize how a sentence is broken up.","top_comment":"I would check out Stanford's CoreNLP. I believe you can customize how a sentence is broken up.","metadata":{"post_id":"26erif","post_score":3,"answer_comment_id":"chqr6i2","answer_score":2,"answerer_anon_id":"anon_03ef50f966d6fee6","top_comment_id":"chqr6i2","top_comment_score":2,"top_comment_anon_id":"anon_03ef50f966d6fee6","top_equals_preferred":true,"thanks_reply_id":"chqwve3","thanks_reply_score":1,"thanks_reply_text":"Thanks. I’ll check it out.","thanks_reply_timestamp":"2014-05-25T20:11:52+00:00"}} -{"user_id":"anon_9e47c4c25b0bf728","timestamp":"2014-06-13T18:31:34+00:00","subreddit":"LanguageTechnology","query":"How to make a spell checker for Firefox?\n\nI want to make a spell checker, I knew all steps but only one thing I didn't understand.. what I should put in .aff file? what's the suffix and prefix and how I use them? does it make the work faster? \n\nI downloaded a book about Huspell but I understood nothing, so please explain that to me.. \n\nfor example what's that\n>SFX N å ogs slå\n\nwhy they put *slå* in the end of the line? \nplease if you know another place where I can get the answer of my question tell me.","preferred_answer":"You could implement it as a hashtable, and check if a word is inside your dictionary already, also a bloom filter would be legitimate. You could also tie in some type of fuzzy string matching to suggest words that are similar.","top_comment":"You could implement it as a hashtable, and check if a word is inside your dictionary already, also a bloom filter would be legitimate. You could also tie in some type of fuzzy string matching to suggest words that are similar.","metadata":{"post_id":"282kza","post_score":2,"answer_comment_id":"ci7fm74","answer_score":1,"answerer_anon_id":"anon_862588be3a4358cd","top_comment_id":"ci7fm74","top_comment_score":1,"top_comment_anon_id":"anon_862588be3a4358cd","top_equals_preferred":true,"thanks_reply_id":"ci7g4hn","thanks_reply_score":1,"thanks_reply_text":"Thank you, I discovered how to do it myself yesterday just by editing other spell checkers add-ons :) (just like what I did when I was learning Blogger) .. and I understood how to do everything","thanks_reply_timestamp":"2014-06-14T16:36:38+00:00"}} -{"user_id":"anon_1fe0e6508784a16c","timestamp":"2014-06-17T15:22:05+00:00","subreddit":"LanguageTechnology","query":"How to prepare for a Natural Language Programming coding interview?\n\nHi,\n\nI am an ECE major with focus on machine learning and am in the job market. I have many interviews coming up and two companies have set up interviews which would involve \"NLP tasks\". Can someone advise me regarding what to expect and how to prepare, given my background in machine learning and data analysis. \n\nThank you very much!","preferred_answer":"Depends on the role, but odds are they'll probably ask you questions about regular expressions, or other methods for finding specific substrings. Focus on computational complexity. As rarely as someone sits down and tries to find the Big-O notation complexity of something they're working on in the real world, almost every single interviewer will ask about it. This is ludicrous and lazy, but it's the state of tech hiring these days.","top_comment":"> As rarely as someone sits down and tries to find the Big-O notation complexity of something they're working on in the real world, almost every single interviewer will ask about it. This is ludicrous and lazy, but it's the state of tech hiring these days.\n\nTo be fair it shows that the candidate is able to reason about complexity and performance. When I asked these types of questions it's been to see if he/she is in the ballpark and not presented like a CS quiz.","metadata":{"post_id":"28dhso","post_score":3,"answer_comment_id":"cia8fag","answer_score":2,"answerer_anon_id":"anon_0cf15fe0fd470aca","top_comment_id":"ciaaot7","top_comment_score":6,"top_comment_anon_id":"anon_1fb10f93b363ef2b","top_equals_preferred":false,"thanks_reply_id":"ciaehrd","thanks_reply_score":2,"thanks_reply_text":"Thank you! I had googled NLP tasks and was going through topics like information extraction, text classification and sentiment analysis. I will also concentrate on string manipulation operations and regex. \n\nThanks for info again! Really appreciate it.","thanks_reply_timestamp":"2014-06-18T02:58:05+00:00"}} -{"user_id":"anon_2537fab8d1118eb2","timestamp":"2014-06-24T07:43:19+00:00","subreddit":"LanguageTechnology","query":"Where do I begin to gain an understanding of Semantic Analysis?\n\nI'm pretty new to NLP and text mining. Is there a gentle introduction to this field of NLP?","preferred_answer":"Sure, but Semantics isn't at all a solved issue. There's a lot of approaches which attempt to solve a variety of issues.\n\n(Disclosure: this list is heavily biased by my own experience and exposure in the field.)\n\nYou could look at Distributional Semantics, which assigns word meaning as a point in a high-dimensional vector space. Peter Turing has a good intro for that.\n\nYou could look at Semantic Parsing, which tries to parse natural language into a formal language which can be reasoned about. Ray Mooney and Luke Zettlemoyer's homepages aren't bad places to start.\n\nSentiment Analysis is a popular, but narrow semantics issue that's got a lot of work done on it today. Wikipedia will be about as gentle as you can hope for there.\n\nThere's Formal Semantics, which is Semantics from a linguistic and philosophy of language perspective. I don't know the best *gentle* introduction to this, but Heim and Kratzer is a good place to start, being one of the more influential paradigms. (You could start with Frege, but he's pretty difficult even when you already know the gist of his works).\n\nJurafsky and Martin also has a chapter on Computational Semantics. That might be a good read (I haven't looked at it in a while). It's incomplete and out of date, but this is a highly active research area, so that's inevitable. (The largest NLP/CompLing conference is going on right now :)","top_comment":"Sure, but Semantics isn't at all a solved issue. There's a lot of approaches which attempt to solve a variety of issues.\n\n(Disclosure: this list is heavily biased by my own experience and exposure in the field.)\n\nYou could look at Distributional Semantics, which assigns word meaning as a point in a high-dimensional vector space. Peter Turing has a good intro for that.\n\nYou could look at Semantic Parsing, which tries to parse natural language into a formal language which can be reasoned about. Ray Mooney and Luke Zettlemoyer's homepages aren't bad places to start.\n\nSentiment Analysis is a popular, but narrow semantics issue that's got a lot of work done on it today. Wikipedia will be about as gentle as you can hope for there.\n\nThere's Formal Semantics, which is Semantics from a linguistic and philosophy of language perspective. I don't know the best *gentle* introduction to this, but Heim and Kratzer is a good place to start, being one of the more influential paradigms. (You could start with Frege, but he's pretty difficult even when you already know the gist of his works).\n\nJurafsky and Martin also has a chapter on Computational Semantics. That might be a good read (I haven't looked at it in a while). It's incomplete and out of date, but this is a highly active research area, so that's inevitable. (The largest NLP/CompLing conference is going on right now :)","metadata":{"post_id":"28y5do","post_score":7,"answer_comment_id":"cifuldd","answer_score":4,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"cifuldd","top_comment_score":4,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":true,"thanks_reply_id":"cifuoum","thanks_reply_score":2,"thanks_reply_text":"This is great, I can't wait to read up on the topics you mentioned. Thank you!","thanks_reply_timestamp":"2014-06-24T16:33:00+00:00"}} -{"user_id":"anon_7a85070644937fc1","timestamp":"2014-06-24T22:12:28+00:00","subreddit":"LanguageTechnology","query":"Can 'Themes and Messages' be parsed?\n\nI am using 'parsed' rather loosely, but here's the deal...\n\nA friend of mine is doing his PhD dissertation in Political Science, and his topic involves how the 'national security establishment' persuades the general populace to go to war.\n\nHe intends to analyze speeches by Presidents, Vice Presidents, SecDefs, SecStates, NSAs, etc., leading up to five or six wars starting with WWII and ending with Iraq. The idea, as I said, is to tease out common underlying themes and messages.\n\nI have suggested to him that some of the NLP tools, such as Python's Natural Language Toolkit (NLTK), might help. But I'm not an NLTK guy, and I'm not really sure than I'm giving him good advice. I've looked casually at NLTK and a few other NLP tools, and what I see is a lot of 'sentiment analysis,' but not a whole lot that goes beyond that or deeper than that.\n\nSo...am I missing something, or is sentiment analysis about the limit of what NLP can do just now? If NLP tools and methods can do more, and in particular if parse (or tease) out more complex patterns such as themes and messages, could someone please provide me with a little direction and guidance on where to look?\n\nThanks.","preferred_answer":"A number of ideas come to mind.\n\nAt the most basic, one can use [LIWC](http://www.liwc.net/), a tool used in psychology to classify text based on word counts from a categorized dictionary. It's pretty simple to use, easy to analyze, does not need much tweaking and is an established research tool. Beyond sentiment words, it counts words in categories like self-references, social words, articles, longer words etc. It is free to use as a research tool.\n\nOne could modify this method and use a custom dictionary. The domain being very specific, a dictionary of \"trigger\" words may be interesting. Watching for deviations in document frequency from Zipf's law may bring insights. I would definitly try to incorporate newspapers of the time to get some \"control\". Analyzing newspaper texts from before and after the speeches may be interesting. It also could provide some much needed data, as the speeches are not much to work with.\n\nOne can try something like document clustering (for example using Stanford NLP; NLTK has basic clustering too) to categorize the speeches unsupervisedly. But I fear there is not enough material there to work very well. Supervised methods would imply training data which would have to be created and may be a lot of effort. \n\nLatent Semantic Analysis is worth a shot. [Gensim](http://radimrehurek.com/gensim/index.html) may offer what you are looking for.","top_comment":"A number of ideas come to mind.\n\nAt the most basic, one can use [LIWC](http://www.liwc.net/), a tool used in psychology to classify text based on word counts from a categorized dictionary. It's pretty simple to use, easy to analyze, does not need much tweaking and is an established research tool. Beyond sentiment words, it counts words in categories like self-references, social words, articles, longer words etc. It is free to use as a research tool.\n\nOne could modify this method and use a custom dictionary. The domain being very specific, a dictionary of \"trigger\" words may be interesting. Watching for deviations in document frequency from Zipf's law may bring insights. I would definitly try to incorporate newspapers of the time to get some \"control\". Analyzing newspaper texts from before and after the speeches may be interesting. It also could provide some much needed data, as the speeches are not much to work with.\n\nOne can try something like document clustering (for example using Stanford NLP; NLTK has basic clustering too) to categorize the speeches unsupervisedly. But I fear there is not enough material there to work very well. Supervised methods would imply training data which would have to be created and may be a lot of effort. \n\nLatent Semantic Analysis is worth a shot. [Gensim](http://radimrehurek.com/gensim/index.html) may offer what you are looking for.","metadata":{"post_id":"29075q","post_score":3,"answer_comment_id":"cig9ao2","answer_score":3,"answerer_anon_id":"anon_cdabff0e3d65ab50","top_comment_id":"cig9ao2","top_comment_score":3,"top_comment_anon_id":"anon_cdabff0e3d65ab50","top_equals_preferred":true,"thanks_reply_id":"ciga08r","thanks_reply_score":1,"thanks_reply_text":"Thanks. Several good ideas there I hadn't known about or considered. Gensim looks interesting.\n\nActually I recommended that he analyze newspaper editorials and opinions from before and after speeches, and I think he's considering it. One of the issues is going to be that the vernacular changes over time. What might have constituted a theme or message in 1940, say, would probably be different from what constituted a theme in 2003. And so newspapers might provide some necessary context for the language being used.\n\nThanks again.","thanks_reply_timestamp":"2014-06-25T00:45:05+00:00"}} -{"user_id":"anon_61c7ef8e0f39fe7c","timestamp":"2014-07-25T10:19:07+00:00","subreddit":"LanguageTechnology","query":"Python or C++?\n\nPython has NLTK and other tools, and C++ is C++. As far as I know serious scientific institutions prefer C++ but science in my country sucks anyway.\n\nI feel more prone to working with Python now, but I am curious about your opinion. What are advantages or disadvantages of these languages?","preferred_answer":"Don't learn C++. Learn either Java or Python since these are the two dominant languages in Natural Language Processing (NLP). \n\nI would go for Python over Java for two reasons: the huge number of modules (which you mentioned, but which Java also has), like nltk, scipy, numpy, sklearn; and because it is so fast to get things written in Python. Experimentation is really critical in NLP. \n\nIf you need speed that Python can't provide, Java and [Cython](http://en.wikipedia.org/wiki/Cython) are good options, but not magic bullets. If a Python program takes weeks to run, it's not because it's in Python, and a direct port won't make it run quickly all of the sudden.\n\nThere are tons of serious researchers in NLP who use Python/Cython all the time. Check out [Matthew Honnibal's blog](http://honnibal.wordpress.com/) for some good exposition of writing real NLP tools in Python (as opposed to toy tools that will, say, parse a single sentence with <5 words in it).\n\nSource: I'm a PhD student researching NLP","top_comment":"Don't learn C++. Learn either Java or Python since these are the two dominant languages in Natural Language Processing (NLP). \n\nI would go for Python over Java for two reasons: the huge number of modules (which you mentioned, but which Java also has), like nltk, scipy, numpy, sklearn; and because it is so fast to get things written in Python. Experimentation is really critical in NLP. \n\nIf you need speed that Python can't provide, Java and [Cython](http://en.wikipedia.org/wiki/Cython) are good options, but not magic bullets. If a Python program takes weeks to run, it's not because it's in Python, and a direct port won't make it run quickly all of the sudden.\n\nThere are tons of serious researchers in NLP who use Python/Cython all the time. Check out [Matthew Honnibal's blog](http://honnibal.wordpress.com/) for some good exposition of writing real NLP tools in Python (as opposed to toy tools that will, say, parse a single sentence with <5 words in it).\n\nSource: I'm a PhD student researching NLP","metadata":{"post_id":"2boijk","post_score":4,"answer_comment_id":"cj7f986","answer_score":7,"answerer_anon_id":"anon_82777c1febdcad85","top_comment_id":"cj7f986","top_comment_score":7,"top_comment_anon_id":"anon_82777c1febdcad85","top_equals_preferred":true,"thanks_reply_id":"cj7h3p7","thanks_reply_score":1,"thanks_reply_text":"Thanks. Hopefully I will have more questions in a week or a couple of weeks.","thanks_reply_timestamp":"2014-07-25T14:59:23+00:00"}} -{"user_id":"anon_61c7ef8e0f39fe7c","timestamp":"2014-07-25T10:19:07+00:00","subreddit":"LanguageTechnology","query":"Python or C++?\n\nPython has NLTK and other tools, and C++ is C++. As far as I know serious scientific institutions prefer C++ but science in my country sucks anyway.\n\nI feel more prone to working with Python now, but I am curious about your opinion. What are advantages or disadvantages of these languages?","preferred_answer":"A lot of it depends on what you're going to do with it. Python is great for writing things quickly and NLTK is really useful. \n\nOn the other hand, C++ give you more control so you can optimize better for large or more complicated problems.","top_comment":"Don't learn C++. Learn either Java or Python since these are the two dominant languages in Natural Language Processing (NLP). \n\nI would go for Python over Java for two reasons: the huge number of modules (which you mentioned, but which Java also has), like nltk, scipy, numpy, sklearn; and because it is so fast to get things written in Python. Experimentation is really critical in NLP. \n\nIf you need speed that Python can't provide, Java and [Cython](http://en.wikipedia.org/wiki/Cython) are good options, but not magic bullets. If a Python program takes weeks to run, it's not because it's in Python, and a direct port won't make it run quickly all of the sudden.\n\nThere are tons of serious researchers in NLP who use Python/Cython all the time. Check out [Matthew Honnibal's blog](http://honnibal.wordpress.com/) for some good exposition of writing real NLP tools in Python (as opposed to toy tools that will, say, parse a single sentence with <5 words in it).\n\nSource: I'm a PhD student researching NLP","metadata":{"post_id":"2boijk","post_score":4,"answer_comment_id":"cj7eiyd","answer_score":5,"answerer_anon_id":"anon_d202387b3f3d1658","top_comment_id":"cj7f986","top_comment_score":7,"top_comment_anon_id":"anon_82777c1febdcad85","top_equals_preferred":false,"thanks_reply_id":"cj7h3xi","thanks_reply_score":1,"thanks_reply_text":"Thanks, that was useful.\n","thanks_reply_timestamp":"2014-07-25T14:59:36+00:00"}} -{"user_id":"anon_1c2a5e5639bd941f","timestamp":"2014-08-04T12:55:51+00:00","subreddit":"LanguageTechnology","query":"Does anyone know of good repositories of trained models for word similarity?\n\nAs the title says, I am looking for pre-trained models to play with. Anything is welcome: LSA models, RNN models, word2vec output, you name it! Here is a short list I compiled so far.\n\nLSA models:\n\n* [English, Dutch, German](http://www.lingexp.uni-tuebingen.de/z2/LSAspaces/) LSA spaces for use with R. (I also wrote some scripts to use these LSA spaces in Python, using Rpy. I can post these as well if you're interested.)\n\nWord2Vec models:\n\n* [Biomedical](http://evexdb.org/pmresources/vec-space-models/)\n\n* [News](https://code.google.com/p/word2vec/)\n\nRNNLM models:\n\n* [on the RNNLM Toolkit site](http://rnnlm.org/)\n\nBullinaria & Levy (2012):\n\n* [Vectors in MATLAB formatted binary files](http://www.cs.bham.ac.uk/~jxb/corpus.html)","preferred_answer":"[Turian's word clusters](http://metaoptimize.com/projects/wordreprs/) - He wrote a paper a few years ago comparing different kinds of word clustering and posted vectors and source code for them.\n\n[Here](http://www.ark.cs.cmu.edu/TweetNLP/#resources) are some clusters from tweets made using Brown clustering. You can also visualize the clusters [here](http://www.ark.cs.cmu.edu/TweetNLP/cluster_viewer.html)\n\nI don't know how useful it is, but you can find the English WordNet synonym set [here](http://www.cs.sfu.ca/CourseCentral/413/popowich/programs/wn/wn_s.pl). There are WordNets for other languages out there too.","top_comment":"[Turian's word clusters](http://metaoptimize.com/projects/wordreprs/) - He wrote a paper a few years ago comparing different kinds of word clustering and posted vectors and source code for them.\n\n[Here](http://www.ark.cs.cmu.edu/TweetNLP/#resources) are some clusters from tweets made using Brown clustering. You can also visualize the clusters [here](http://www.ark.cs.cmu.edu/TweetNLP/cluster_viewer.html)\n\nI don't know how useful it is, but you can find the English WordNet synonym set [here](http://www.cs.sfu.ca/CourseCentral/413/popowich/programs/wn/wn_s.pl). There are WordNets for other languages out there too.","metadata":{"post_id":"2cl1l4","post_score":8,"answer_comment_id":"cjgm547","answer_score":5,"answerer_anon_id":"anon_14b6d50ba1edca44","top_comment_id":"cjgm547","top_comment_score":5,"top_comment_anon_id":"anon_14b6d50ba1edca44","top_equals_preferred":true,"thanks_reply_id":"cjgr086","thanks_reply_score":2,"thanks_reply_text":"Ah thanks, this looks great! I had already used WordNet synsets, but they're of limited use in my project. Another data resource I hadn't mentioned but might be useful is Grady Ward's [Moby collection](http://icon.shef.ac.uk/Moby/).","thanks_reply_timestamp":"2014-08-04T18:21:30+00:00"}} -{"user_id":"anon_1c2a5e5639bd941f","timestamp":"2014-08-04T12:55:51+00:00","subreddit":"LanguageTechnology","query":"Does anyone know of good repositories of trained models for word similarity?\n\nAs the title says, I am looking for pre-trained models to play with. Anything is welcome: LSA models, RNN models, word2vec output, you name it! Here is a short list I compiled so far.\n\nLSA models:\n\n* [English, Dutch, German](http://www.lingexp.uni-tuebingen.de/z2/LSAspaces/) LSA spaces for use with R. (I also wrote some scripts to use these LSA spaces in Python, using Rpy. I can post these as well if you're interested.)\n\nWord2Vec models:\n\n* [Biomedical](http://evexdb.org/pmresources/vec-space-models/)\n\n* [News](https://code.google.com/p/word2vec/)\n\nRNNLM models:\n\n* [on the RNNLM Toolkit site](http://rnnlm.org/)\n\nBullinaria & Levy (2012):\n\n* [Vectors in MATLAB formatted binary files](http://www.cs.bham.ac.uk/~jxb/corpus.html)","preferred_answer":"Pennington, Socher & Manning (2014): http://nlp.stanford.edu/projects/glove/ is a recent development","top_comment":"[Turian's word clusters](http://metaoptimize.com/projects/wordreprs/) - He wrote a paper a few years ago comparing different kinds of word clustering and posted vectors and source code for them.\n\n[Here](http://www.ark.cs.cmu.edu/TweetNLP/#resources) are some clusters from tweets made using Brown clustering. You can also visualize the clusters [here](http://www.ark.cs.cmu.edu/TweetNLP/cluster_viewer.html)\n\nI don't know how useful it is, but you can find the English WordNet synonym set [here](http://www.cs.sfu.ca/CourseCentral/413/popowich/programs/wn/wn_s.pl). There are WordNets for other languages out there too.","metadata":{"post_id":"2cl1l4","post_score":8,"answer_comment_id":"cjquy8q","answer_score":2,"answerer_anon_id":"anon_b4ff8657b95e6dd0","top_comment_id":"cjgm547","top_comment_score":5,"top_comment_anon_id":"anon_14b6d50ba1edca44","top_equals_preferred":false,"thanks_reply_id":"cjqv6x9","thanks_reply_score":1,"thanks_reply_text":"This looks very useful, thanks!","thanks_reply_timestamp":"2014-08-15T09:08:42+00:00"}} -{"user_id":"anon_6308d3cafa493586","timestamp":"2014-11-12T02:08:29+00:00","subreddit":"LanguageTechnology","query":"How to measure the generality of word?\n\nI am currently working on a project in which I want to infer \"food\" when I see \"sandwich\", while I don't want \"object\" or \"thing\" from \"food\", because they are too general and doesn't help understand the text. Then I would like to know, how do you formulate or compute the degree of generality of a word from a given context (a large corpus)? How can you tell that \"thing\" or \"object\" is too general while \"food\" is OK (for this corpus)? I am currently using ontologies like ProBase and WordNet, but don't have idea how to approach this problem. Any insight will be appreciated. Thanks.","preferred_answer":"Ahh, so I've worked on this problem a bit. It's hard.\n\nMostly my work was on detecting hypernymy without the use of an ontology. If you can use WordNet, you'll be much better off.\n\nWhat you basically want is to find something akin to Basic Level Categories (http://cogling.wikia.com/wiki/Levels_of_categorization). This is (hypothesized) more or less the terms we think in. For example, you don't typically think of calling it a golden retriever, you call it a dog. Dog, or even maybe animal, would be a basic level category.'\n\nUse WordNet and basically look at the (log) frequency of a word in the corpus. What I *think* you'll find is that terms that are general, but not ridiculously general, should have a nice high frequency associated with them. Words that are too general (object) or too specific (golden retriever) should be much lower frequency.\n\nSo my suggestion: Find your word in WordNet, and follow the chain all the way to the top of the hierarchy. Choose the word in the chain that has the highest word frequency.\n\nA paper that attempts to do what you want in an unsupervised fashion: http://aclweb.org/anthology/E/E14/E14-4008.pdf, but I haven't tried to use the approach myself.","top_comment":"Ahh, so I've worked on this problem a bit. It's hard.\n\nMostly my work was on detecting hypernymy without the use of an ontology. If you can use WordNet, you'll be much better off.\n\nWhat you basically want is to find something akin to Basic Level Categories (http://cogling.wikia.com/wiki/Levels_of_categorization). This is (hypothesized) more or less the terms we think in. For example, you don't typically think of calling it a golden retriever, you call it a dog. Dog, or even maybe animal, would be a basic level category.'\n\nUse WordNet and basically look at the (log) frequency of a word in the corpus. What I *think* you'll find is that terms that are general, but not ridiculously general, should have a nice high frequency associated with them. Words that are too general (object) or too specific (golden retriever) should be much lower frequency.\n\nSo my suggestion: Find your word in WordNet, and follow the chain all the way to the top of the hierarchy. Choose the word in the chain that has the highest word frequency.\n\nA paper that attempts to do what you want in an unsupervised fashion: http://aclweb.org/anthology/E/E14/E14-4008.pdf, but I haven't tried to use the approach myself.","metadata":{"post_id":"2m1426","post_score":12,"answer_comment_id":"cm00pw4","answer_score":7,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"cm00pw4","top_comment_score":7,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":true,"thanks_reply_id":"cm00zg9","thanks_reply_score":1,"thanks_reply_text":"Thanks for reply!\n\nI use ProBase, which imo is a perfect ontology for this task, but using the frequency doesn't work. Maybe it's due to the corpus I use.\n\nThanks for the link, I will check it out.","thanks_reply_timestamp":"2014-11-12T02:57:27+00:00"}} -{"user_id":"anon_6308d3cafa493586","timestamp":"2014-11-12T02:08:29+00:00","subreddit":"LanguageTechnology","query":"How to measure the generality of word?\n\nI am currently working on a project in which I want to infer \"food\" when I see \"sandwich\", while I don't want \"object\" or \"thing\" from \"food\", because they are too general and doesn't help understand the text. Then I would like to know, how do you formulate or compute the degree of generality of a word from a given context (a large corpus)? How can you tell that \"thing\" or \"object\" is too general while \"food\" is OK (for this corpus)? I am currently using ontologies like ProBase and WordNet, but don't have idea how to approach this problem. Any insight will be appreciated. Thanks.","preferred_answer":"I tried doing something similar once.^1 I needed a bunch of lexical sets grouped by general category (such as all food items, all things that fly, all things that are tools) and I tried deriving these sets automatically from WordNet.\n\nI came to the conclusion that WordNet is not a good place to look for this because its ontology is too \"scientific\" and not \"intuitive\" enough. For example, it categorizes *human* as *animal*, which is correct scientifically but unhelpful for analysing most language in use because, in popular parlance, humans and animals are contrastive categories.\n\nA better ontology for this purpose would be one that's built, not from introspection, but from observation of language in use. The [CPA Ontology](http://pdev.org.uk/#onto) by Patrick Hanks *et al.* would be a good fit if it had wider lexical coverage. It has *human* and *animal* as two separate categories (both subcategories of *animate*).\n\n----\n\n^1 In my Master's dissertation, many moons ago: [Selectional Preferences, Corpora and Ontologies](http://www.lexiconista.com/diss.pdf)","top_comment":"Ahh, so I've worked on this problem a bit. It's hard.\n\nMostly my work was on detecting hypernymy without the use of an ontology. If you can use WordNet, you'll be much better off.\n\nWhat you basically want is to find something akin to Basic Level Categories (http://cogling.wikia.com/wiki/Levels_of_categorization). This is (hypothesized) more or less the terms we think in. For example, you don't typically think of calling it a golden retriever, you call it a dog. Dog, or even maybe animal, would be a basic level category.'\n\nUse WordNet and basically look at the (log) frequency of a word in the corpus. What I *think* you'll find is that terms that are general, but not ridiculously general, should have a nice high frequency associated with them. Words that are too general (object) or too specific (golden retriever) should be much lower frequency.\n\nSo my suggestion: Find your word in WordNet, and follow the chain all the way to the top of the hierarchy. Choose the word in the chain that has the highest word frequency.\n\nA paper that attempts to do what you want in an unsupervised fashion: http://aclweb.org/anthology/E/E14/E14-4008.pdf, but I haven't tried to use the approach myself.","metadata":{"post_id":"2m1426","post_score":12,"answer_comment_id":"cm1awxh","answer_score":1,"answerer_anon_id":"anon_3aa9880d37e29a38","top_comment_id":"cm00pw4","top_comment_score":7,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":false,"thanks_reply_id":"cm1ftwe","thanks_reply_score":1,"thanks_reply_text":"Thanks for reply.\n\nI am also using Selectional Preference now. \n\nInteresting observation you've made there, I will look into CPA ontology, thanks!","thanks_reply_timestamp":"2014-11-13T16:18:47+00:00"}} -{"user_id":"anon_845bff1c6e5eec08","timestamp":"2014-11-15T22:47:07+00:00","subreddit":"LanguageTechnology","query":"Use of genetic algorithms in NLP\n\nAre genetic algorithms used for any NLP tasks in real world? Recently I stumbled upon these two papers that use them for summarization and got curious:\n\n* [Using Genetic Algorithms With Lexical Chains For Automatic Text Summarization](http://www.cmpe.boun.edu.tr/~gungort/papers/Using%20Genetic%20Algorithms%20with%20Lexical%20Chains%20for%20Automatic%20Text%20Summarization.pdf)\n* [Genetic Algorithm Based Sentence Extraction For Text Summarization](http://se.fsksm.utm.my/ijic/index.php/ijic/article/view/6)\n\nFrom these two discussions I found on reddit and StackExchange I concluded that GAs can be good for brute force search problems, but generally machine learning methods are much more efficient:\n\n* [are Genetic Algorithms anymore than an academic exercise?](https://www.reddit.com/r/MachineLearning/comments/1ggp3s/are_genetic_algorithms_anymore_than_an_academic/)\n* [Why has research on genetic algorithms slowed?](http://cs.stackexchange.com/questions/561/why-has-research-on-genetic-algorithms-slowed)\n\nWhat do you people think of GAs in relation to NLP tasks (and the linked papers in particular)?","preferred_answer":"I haven't read the papers you linked to, and I've only toyed with GAs in a class and once or twice. I haven't used them for NLP, so my opinion is that of an NLP researcher who hasn't actually tried them for NLP. Take with a grain of salt, and I'd love to be proven wrong.\n\nMy impression is they tend to be too slow for NLP domains. Aside from that, many NLP problems aren't naturally expressed in a \"genetic\" way, at least not as I understand it.\n\nFor example, if each bit in your gene string represented whether two nodes were attached in a parse tree, crossing two random parses is likely to give you a malformed parse tree. Even if you encoded this in the objective function, likely the GA would end up settling on any *valid* parse, rather than the correct parse, because the cost of leaving that local optima to go to a temporarily invalid parse would be too high.","top_comment":"I haven't read the papers you linked to, and I've only toyed with GAs in a class and once or twice. I haven't used them for NLP, so my opinion is that of an NLP researcher who hasn't actually tried them for NLP. Take with a grain of salt, and I'd love to be proven wrong.\n\nMy impression is they tend to be too slow for NLP domains. Aside from that, many NLP problems aren't naturally expressed in a \"genetic\" way, at least not as I understand it.\n\nFor example, if each bit in your gene string represented whether two nodes were attached in a parse tree, crossing two random parses is likely to give you a malformed parse tree. Even if you encoded this in the objective function, likely the GA would end up settling on any *valid* parse, rather than the correct parse, because the cost of leaving that local optima to go to a temporarily invalid parse would be too high.","metadata":{"post_id":"2mf0yj","post_score":9,"answer_comment_id":"cm45fyt","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"cm45fyt","top_comment_score":2,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":true,"thanks_reply_id":"cm4id1i","thanks_reply_score":1,"thanks_reply_text":"Thanks for the insight!","thanks_reply_timestamp":"2014-11-17T00:09:49+00:00"}} -{"user_id":"anon_82777c1febdcad85","timestamp":"2014-11-20T22:09:50+00:00","subreddit":"LanguageTechnology","query":"K-best dependency parsing?\n\nI'm trying to get k-best output from a dependency parser. Malt and Redshift don't seem to do this, and I don't think that MST does (although Hall et al published a paper about k-best MST in 2007). Does anyone know of a dependency parser that can be trained, and that will give k-best output? Maybe I just missed something in the documentation of those 3...","preferred_answer":"A colleague of mine modified C&C to give the best k parses. I don't know if he upstreamed the patch though, but he said it wasn't too difficult.","top_comment":"I think some k-best parsers exist for shift-reduce parsing. Do you need something more like a beam for CKY though?","metadata":{"post_id":"2mx432","post_score":2,"answer_comment_id":"cm8rzet","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"cm8e9nd","top_comment_score":2,"top_comment_anon_id":"anon_227bc60c644eec5d","top_equals_preferred":false,"thanks_reply_id":"cm90fok","thanks_reply_score":1,"thanks_reply_text":"Cool, thanks! Looks like the patch isn't up, but I'll see how hard it is to modify it. \n\nAny chance your colleague would be able to send me the patch? If so, please PM me his contact info.","thanks_reply_timestamp":"2014-11-21T15:55:44+00:00"}} -{"user_id":"anon_845bff1c6e5eec08","timestamp":"2014-11-24T18:33:26+00:00","subreddit":"LanguageTechnology","query":"How to harvest a corpus from Wikipedia for a particular domain?\n\nThere's a [tool](https://github.com/bwbaugh/wikipedia-extractor) that allows to produce a plain text corpus from [Wikipedia dumps](http://dumps.wikimedia.org). I'd like to get it for a particular domain (say for Computer Science or Biology). Anyone have an idea how I could get such a domain-specific dump?","preferred_answer":"Extracting plain text from Wikipedia is kinda hard, because they have lots of templates and embedded LUA scripts for formatting and other things. The tool you link cannot handle these templates. I think you should just crawl the API:\n\nhttps://www.mediawiki.org/wiki/Extension:TextExtracts\n\nExample:\nhttp://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Earth&format=jsonfm&explaintext&continue=\n\nReturns you plain text JSON. Now you want it for a particular domain, so what you need is a number of page titles to put into the query. I would use [DBpedia](http://dbpedia.org) for this and try to leverage Wikipedia categories. You could for example do a SPARQL query to the [DBpedia endpoint](http://dbpedia.org/sparql):\n\n SELECT DISTINCT * WHERE {\n ?sub skos:broader{1,5} . \n ?article . \n } \n\nTo obtain a list of wikipedia articles and related categories for the category \"Biology\" and 5 levels of sub categories. You may need to filter the URLs to get a better sense of what considers \"domain specific\". Then you can use the URL list to get a list of article titles you can crawl using the official API. Please be a nice crawler and wait a few ms between pages. Then parse the JSON you get back and save in your format of choice. Consider publishing the data openly, so others can build on your work.","top_comment":"Extracting plain text from Wikipedia is kinda hard, because they have lots of templates and embedded LUA scripts for formatting and other things. The tool you link cannot handle these templates. I think you should just crawl the API:\n\nhttps://www.mediawiki.org/wiki/Extension:TextExtracts\n\nExample:\nhttp://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Earth&format=jsonfm&explaintext&continue=\n\nReturns you plain text JSON. Now you want it for a particular domain, so what you need is a number of page titles to put into the query. I would use [DBpedia](http://dbpedia.org) for this and try to leverage Wikipedia categories. You could for example do a SPARQL query to the [DBpedia endpoint](http://dbpedia.org/sparql):\n\n SELECT DISTINCT * WHERE {\n ?sub skos:broader{1,5} . \n ?article . \n } \n\nTo obtain a list of wikipedia articles and related categories for the category \"Biology\" and 5 levels of sub categories. You may need to filter the URLs to get a better sense of what considers \"domain specific\". Then you can use the URL list to get a list of article titles you can crawl using the official API. Please be a nice crawler and wait a few ms between pages. Then parse the JSON you get back and save in your format of choice. Consider publishing the data openly, so others can build on your work.","metadata":{"post_id":"2naapx","post_score":9,"answer_comment_id":"cmc7o5l","answer_score":6,"answerer_anon_id":"anon_cdabff0e3d65ab50","top_comment_id":"cmc7o5l","top_comment_score":6,"top_comment_anon_id":"anon_cdabff0e3d65ab50","top_equals_preferred":true,"thanks_reply_id":"cmciqwt","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot for your answer, the idea sounds rather feasible.\n\nI just thought maybe it was possible to filter those dumps somehow, but seems it isn't. DBpedia seems like a great resource, so I'll try using it.\n\nDoes it work with languages other than English though? I need a Russian corpus in particular. And I see the link \"http://ru.dbpedia.org/resource/Гендер\" on http://dbpedia.org/page/Gender for example, but [ru.dbpedia.org](http://www.downforeveryoneorjustme.com/ru.dbpedia.org) doesn't open :-(","thanks_reply_timestamp":"2014-11-25T12:21:15+00:00"}} -{"user_id":"anon_845bff1c6e5eec08","timestamp":"2014-11-24T18:33:26+00:00","subreddit":"LanguageTechnology","query":"How to harvest a corpus from Wikipedia for a particular domain?\n\nThere's a [tool](https://github.com/bwbaugh/wikipedia-extractor) that allows to produce a plain text corpus from [Wikipedia dumps](http://dumps.wikimedia.org). I'd like to get it for a particular domain (say for Computer Science or Biology). Anyone have an idea how I could get such a domain-specific dump?","preferred_answer":"From today's Corpora List:\n\nMessage: 2\nDate: Thu, 27 Nov 2014 09:21:44 +0100\nFrom: Peter Kolb \nSubject: [Corpora-List] Release of Wikipedia-based monolingual,\n\tcomparable,\tand parallel corpora\nTo: CORPORA List , mt-list@eamt.org\n\nDear colleagues,\n\nwe have released three types of corpora extracted from 23 language versions\nof Wikipedia:\n\n1. Wikipedia Monolingual Corpora: more than 5 billion tokens of text in 23\nlanguages extracted from the Wikipedia. The corpora are annotated with\narticle and paragraph boundaries, number of incoming links for each\narticle, anchor texts used to refer to each article (textlinks) and their\nfrequencies, crosslanguage links, categories and more (\nhttp://linguatools.org/tools/corpora/wikipedia-monolingual-corpora/). There\nis also a script that allows to extract domain-specific sub-corpora if you\nprovide a list of desired categories.\n\n2. Wikipedia Comparable Corpora: more than 41 million bilingually aligned\nWikipedia articles for 253 language pairs (\nhttp://linguatools.org/tools/corpora/wikipedia-comparable-corpora/).\n\n3. Wikipedia Parallel Titles Corpora: bilingual titles of Wikipedia\narticles, extended with redirects and textlinks. 487,406,497 unique\nparallel segments for 253 language pairs (\nhttp://linguatools.org/tools/corpora/wikipedia-parallel-titles-corpora/).\n\nAdditionally, there is a tiny German-English parallel corpus containing\n6,802 sentence pairs extracted from bilingual quotations in the German\nWikipedia:\nhttp://linguatools.org/tools/corpora/wikipedia-parallel-quotations-corpora/.\n\nAll corpora are released under a Creative Commons Attribution Share-alike\nlicense and are freely available at http://linguatools.org/tools/corpora/.\n\nBest regards,\nPeter Kolb","top_comment":"Extracting plain text from Wikipedia is kinda hard, because they have lots of templates and embedded LUA scripts for formatting and other things. The tool you link cannot handle these templates. I think you should just crawl the API:\n\nhttps://www.mediawiki.org/wiki/Extension:TextExtracts\n\nExample:\nhttp://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Earth&format=jsonfm&explaintext&continue=\n\nReturns you plain text JSON. Now you want it for a particular domain, so what you need is a number of page titles to put into the query. I would use [DBpedia](http://dbpedia.org) for this and try to leverage Wikipedia categories. You could for example do a SPARQL query to the [DBpedia endpoint](http://dbpedia.org/sparql):\n\n SELECT DISTINCT * WHERE {\n ?sub skos:broader{1,5} . \n ?article . \n } \n\nTo obtain a list of wikipedia articles and related categories for the category \"Biology\" and 5 levels of sub categories. You may need to filter the URLs to get a better sense of what considers \"domain specific\". Then you can use the URL list to get a list of article titles you can crawl using the official API. Please be a nice crawler and wait a few ms between pages. Then parse the JSON you get back and save in your format of choice. Consider publishing the data openly, so others can build on your work.","metadata":{"post_id":"2naapx","post_score":9,"answer_comment_id":"cmeio4e","answer_score":2,"answerer_anon_id":"anon_1c2a5e5639bd941f","top_comment_id":"cmc7o5l","top_comment_score":6,"top_comment_anon_id":"anon_cdabff0e3d65ab50","top_equals_preferred":false,"thanks_reply_id":"cmem1dk","thanks_reply_score":1,"thanks_reply_text":"Oh, just in time! Thank you, downloading the Russian corpus now. Sounds really promising.\n\nUPD: It works!","thanks_reply_timestamp":"2014-11-27T17:59:55+00:00"}} -{"user_id":"anon_845bff1c6e5eec08","timestamp":"2014-11-24T18:33:26+00:00","subreddit":"LanguageTechnology","query":"How to harvest a corpus from Wikipedia for a particular domain?\n\nThere's a [tool](https://github.com/bwbaugh/wikipedia-extractor) that allows to produce a plain text corpus from [Wikipedia dumps](http://dumps.wikimedia.org). I'd like to get it for a particular domain (say for Computer Science or Biology). Anyone have an idea how I could get such a domain-specific dump?","preferred_answer":"At the moment, I think the russian DBpedia is not working. You can however use it locally:\n\nhttp://downloads.dbpedia.org/current/ru\n\ncontains the Russian version. What files you download will depend on what data you need. For the original query, I think the data is in skos_categories and article_categories files. You can find other languages on there, too. If you want to query the data using SPARQL, you might have to install a local triplestore, like [Virtuoso](http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSBuild), then import the data. The process is not exactly straight forward, so you might want to just parse the dump files if possible. \n\nA good format for you might be .nt. It contains the links in the format of one triple per line. So according to the original query:\n\n . \n\nThis is semantic web technology. For future Wikipedia related questions or research, it is worth looking into it, even if the technology stack is a bit of a hassle.","top_comment":"Extracting plain text from Wikipedia is kinda hard, because they have lots of templates and embedded LUA scripts for formatting and other things. The tool you link cannot handle these templates. I think you should just crawl the API:\n\nhttps://www.mediawiki.org/wiki/Extension:TextExtracts\n\nExample:\nhttp://en.wikipedia.org/w/api.php?action=query&prop=extracts&titles=Earth&format=jsonfm&explaintext&continue=\n\nReturns you plain text JSON. Now you want it for a particular domain, so what you need is a number of page titles to put into the query. I would use [DBpedia](http://dbpedia.org) for this and try to leverage Wikipedia categories. You could for example do a SPARQL query to the [DBpedia endpoint](http://dbpedia.org/sparql):\n\n SELECT DISTINCT * WHERE {\n ?sub skos:broader{1,5} . \n ?article . \n } \n\nTo obtain a list of wikipedia articles and related categories for the category \"Biology\" and 5 levels of sub categories. You may need to filter the URLs to get a better sense of what considers \"domain specific\". Then you can use the URL list to get a list of article titles you can crawl using the official API. Please be a nice crawler and wait a few ms between pages. Then parse the JSON you get back and save in your format of choice. Consider publishing the data openly, so others can build on your work.","metadata":{"post_id":"2naapx","post_score":9,"answer_comment_id":"cmcj3hp","answer_score":2,"answerer_anon_id":"anon_cdabff0e3d65ab50","top_comment_id":"cmc7o5l","top_comment_score":6,"top_comment_anon_id":"anon_cdabff0e3d65ab50","top_equals_preferred":false,"thanks_reply_id":"cmem3qm","thanks_reply_score":1,"thanks_reply_text":"Thanks, it's very insightful. I haven't figured out how to work with Virtuoso yet, but I'll keep that in mind. It takes some effort to build it from sources, so there's some work to be done (I'm using a Mac which makes it a bit more difficult than with Linux).\n\nThe comment below seems to provide an easier solution, will see how it goes!","thanks_reply_timestamp":"2014-11-27T18:02:18+00:00"}} -{"user_id":"anon_fd5519744b55af55","timestamp":"2014-12-02T00:11:05+00:00","subreddit":"LanguageTechnology","query":"What are the states and observation in HMM speech recognition?\n\nI am having trouble understanding how HMM matches to the physical quantities can anyone help me out?\n\nFor example:\n\nGiven a two state HMM\n\n\na and b\n\nIf I defined \n\n a -> b = #\n a -> a = #\n b -> b = #\n b -> a = #\n\n Pr(A|a) = #\n Pr(A|b) = #\n Pr(B|a) = #\n Pr(B|b) = #\n\nWhat is a, b, A and B in speech recognition if I am training for the sound of \"one\" and \"two\"?\n\nAny advice will be appreciated\n\nThanks","preferred_answer":"Check out the slides here: [http://www.cslu.ogi.edu/people/hosom/cs552/](http://www.cslu.ogi.edu/people/hosom/cs552/)\n\nBasically though, states are words or phones (words if small vocab, like a digit recognizer, and phones if larger vocab), and observations are features. The most basic features would probably be some cepstral coefficients.","top_comment":"Check out the slides here: [http://www.cslu.ogi.edu/people/hosom/cs552/](http://www.cslu.ogi.edu/people/hosom/cs552/)\n\nBasically though, states are words or phones (words if small vocab, like a digit recognizer, and phones if larger vocab), and observations are features. The most basic features would probably be some cepstral coefficients.","metadata":{"post_id":"2nzri6","post_score":4,"answer_comment_id":"cmihn1m","answer_score":3,"answerer_anon_id":"anon_82777c1febdcad85","top_comment_id":"cmihn1m","top_comment_score":3,"top_comment_anon_id":"anon_82777c1febdcad85","top_equals_preferred":true,"thanks_reply_id":"cmisomp","thanks_reply_score":1,"thanks_reply_text":"Thanks, this is awesome, btw if you don't mind, I am reading lecture 4 right now and I find myself confused in the following \n\n Common use in speech is to have one HMM per phoneme,\n and three states per phoneme. Then, the phoneme-level\n HMMs can be connected to form word-level HMMs\n\nso from this website \n\nhttp://www.cs.dartmouth.edu/~dwagn/aiproj/speech.html\n\nI know there are 17 vowel phones and 29 consonant phoneme, but what does it mean to have \n\n one HMM per phoneme, and three states per phoneme.\n\n?\n\n","thanks_reply_timestamp":"2014-12-02T12:23:25+00:00"}} -{"user_id":"anon_6308d3cafa493586","timestamp":"2014-12-09T21:04:43+00:00","subreddit":"LanguageTechnology","query":"What are the best LDA variants for Opinion Mining?\n\nIn paper [On the design of IDA models for aspect-based opinion mining] (CIKM'12), the authors introduced some LDA variants and discussed their performance. But those models are a bit simple. Also, some nice models like mgLDA were not mentioned.\n\nI am interested but new to Opinion Mining, so can you list some of the best LDA variants for aspect based opinion mining so far?\n\nThanks.","preferred_answer":"LDA is used to extract the aspects of opinions in the paper you mention. Although topic modeling has many drawbacks for aspect extraction, a nice approach is [lifelong topic modeling](http://www.cs.uic.edu/~zchen/papers/ICML2014-Zhiyuan%28Brett%29Chen.pdf). This approach has been used for aspect extraction.","top_comment":"LDA is used to extract the aspects of opinions in the paper you mention. Although topic modeling has many drawbacks for aspect extraction, a nice approach is [lifelong topic modeling](http://www.cs.uic.edu/~zchen/papers/ICML2014-Zhiyuan%28Brett%29Chen.pdf). This approach has been used for aspect extraction.","metadata":{"post_id":"2osjy1","post_score":4,"answer_comment_id":"cmq47cz","answer_score":1,"answerer_anon_id":"anon_7fbff8c1b11a5731","top_comment_id":"cmq47cz","top_comment_score":1,"top_comment_anon_id":"anon_7fbff8c1b11a5731","top_equals_preferred":true,"thanks_reply_id":"cmvqu2w","thanks_reply_score":1,"thanks_reply_text":"Thanks for reply. I have read the paper, it's really novel to exploit prior knowledge, but this model seems to me it's considering a problem slightly different (input set is multi domain, while previous methods focus on simple domain) instead of improving LDA with some variants that exploits the nature of review texts. Anyway, thanks. And maybe you know some other model?","thanks_reply_timestamp":"2014-12-15T19:13:08+00:00"}} -{"user_id":"anon_6308d3cafa493586","timestamp":"2014-12-15T18:52:55+00:00","subreddit":"LanguageTechnology","query":"How to find the summarization word from a cluster?\n\nGiven a cluster of words of presumably a common topic, how do you find a single word that best summarize the cluster?\n\nNote that for this task, this summarization word (preferably a noun) can be selected from the cluster or generated from some ontology.\n\nFor example, from a cluster \"expensive, cost, price, cheap\" I want to infer \"price\" as a summarization of the cluster. In another case from \"fish, bread, apple, beef\" I want to infer \"food\".\n\nNotice this task is a little different from text summarization because the cluster is presumed to be about the same topic. But another nature of this task is that the words in the cluster may vary in many ways: pos-tag, level of generality, relatedness to the topic.\n\nWhat I have done for this task is to use **WordNet**, calculate a score which consists of path similarity and definition overlap for each word with the whole cluster and select the one with highest score, with a basic idea similar to basic WSD methods. This methods can only select but not generate and it seems too naive for me.\n\nCan you offer some insights on this problem or tell me what to look at (papers) for this problem?\n\nThank you.","preferred_answer":"If you can model your problem as a graph (i.e. word are vertices and their edges could indicate co-ocurrence in a document), you could determine the [centrality](http://en.wikipedia.org/wiki/Centrality) to determine the most important word. Similarly, you could use the [PageRank](http://en.wikipedia.org/wiki/PageRank) algorithm.\n\n[Here](http://www.aaai.org/Papers/JAIR/Vol22/JAIR-2214.pdf) is an article with a similar approach, but they extract sentences insteado of words.","top_comment":"If you can model your problem as a graph (i.e. word are vertices and their edges could indicate co-ocurrence in a document), you could determine the [centrality](http://en.wikipedia.org/wiki/Centrality) to determine the most important word. Similarly, you could use the [PageRank](http://en.wikipedia.org/wiki/PageRank) algorithm.\n\n[Here](http://www.aaai.org/Papers/JAIR/Vol22/JAIR-2214.pdf) is an article with a similar approach, but they extract sentences insteado of words.","metadata":{"post_id":"2pdtil","post_score":6,"answer_comment_id":"cmvx7ql","answer_score":2,"answerer_anon_id":"anon_7fbff8c1b11a5731","top_comment_id":"cmvx7ql","top_comment_score":2,"top_comment_anon_id":"anon_7fbff8c1b11a5731","top_equals_preferred":true,"thanks_reply_id":"cmw4lm5","thanks_reply_score":1,"thanks_reply_text":"Thanks, it seems reasonable.","thanks_reply_timestamp":"2014-12-16T02:01:37+00:00"}} -{"user_id":"anon_6308d3cafa493586","timestamp":"2014-12-23T02:18:18+00:00","subreddit":"LanguageTechnology","query":"How to get the set of adjectives related to a noun?\n\nGiven a noun (entity), I want to find the set of high-frequency adjectives that people use to describe it. Better, I want the score (weight) for each adjective.\n\nI'm thinking that Word2Vec can probably do this, but exhaustive search may cost too much time.","preferred_answer":"Personally, I would write a simple script to pull this info from the Google syntactic ngrams sets. Or, you could dependency parse your own corpus and count get counts for all the dependencies involving a noun as head of an adjective, and go from there.","top_comment":"Personally, I would write a simple script to pull this info from the Google syntactic ngrams sets. Or, you could dependency parse your own corpus and count get counts for all the dependencies involving a noun as head of an adjective, and go from there.","metadata":{"post_id":"2q4s9g","post_score":3,"answer_comment_id":"cn2wblh","answer_score":3,"answerer_anon_id":"anon_80af6dda1f71bcb5","top_comment_id":"cn2wblh","top_comment_score":3,"top_comment_anon_id":"anon_80af6dda1f71bcb5","top_equals_preferred":true,"thanks_reply_id":"cn40ctx","thanks_reply_score":1,"thanks_reply_text":"Thanks for replay.\n\nDo you have any tutorial about how to extract such data from Google syntactic ngrams?","thanks_reply_timestamp":"2014-12-24T06:15:28+00:00"}} -{"user_id":"anon_ad2f72ab89b980b4","timestamp":"2015-01-07T08:43:34+00:00","subreddit":"LanguageTechnology","query":"Is Segmentation a Solved Problem?","preferred_answer":"I programmed only these rules in my own NLP to detect non-endings: \n\n1. If the word in front of the period does not contain vowels (\"mr.\"). \n2. If no space, newline nor capital follows after a period (\"14.000\"). \n3. If a period follows a series of single-character \"words\" (\"A.I.\"). \n\nI like the article for its ideas, but like it says, existing systems already have high accuracies. There will always be exceptions (e.g. When someone neglects to type a space inbetween sentences).","top_comment":"> While there are tools that can obtain high accuracy in specific languages and specific domains, there still does not exist a free, open-source tool that can handle many languages [...]\n\nIf this is what determines whether a problem is solved, we haven't solved any problems at all.","metadata":{"post_id":"2rm1ve","post_score":12,"answer_comment_id":"cnkjbov","answer_score":2,"answerer_anon_id":"anon_145d19078cf8e613","top_comment_id":"cnhe3ah","top_comment_score":9,"top_comment_anon_id":"anon_2a6f72e61f313ee5","top_equals_preferred":false,"thanks_reply_id":"cnkxoti","thanks_reply_score":1,"thanks_reply_text":"Thanks! That is a great idea for Golden Rule #52 **No whitespace in between sentences**. I'll work on adding that and credit you. I'll report back the results.","thanks_reply_timestamp":"2015-01-10T23:35:12+00:00"}} -{"user_id":"anon_107c71fa2d8f065f","timestamp":"2015-02-03T08:36:09+00:00","subreddit":"LanguageTechnology","query":"POS database in German?\n\nI have a list of German words (~200 items) and wish to mark each of them with the correct POS. Is there a free resource that would allow me to do that programmatically?","preferred_answer":"German native here.\n\nI'm afaraid that this is near to impossible only from a list of words without contextual information (even for a human) since German tends to reuse a lot of words. I.e. the word \"frische\" is used as and noun and as an adjective:\n\n- \"Das ist eine *frische* Kartoffel\" (This is a *fresh* potato)\n- \"Die *Frische* der Kartoffeln...\" (The *freshness* der Kartoffeln...)\n\nIt gets a little bit easier because German nouns are always written capitalized but you can easily construct a sentence where use an adjective as first word of a sentence so it's also written capitalized: \"*Frische* Kartoffeln sind heute günstiger\" (*Fresh* potatoes are cheaper today).\n\nOn the other hand: If it's only a list of 200 words you could post it to /r/Germany with information on how to tag them and maybe someone will help.","top_comment":"German native here.\n\nI'm afaraid that this is near to impossible only from a list of words without contextual information (even for a human) since German tends to reuse a lot of words. I.e. the word \"frische\" is used as and noun and as an adjective:\n\n- \"Das ist eine *frische* Kartoffel\" (This is a *fresh* potato)\n- \"Die *Frische* der Kartoffeln...\" (The *freshness* der Kartoffeln...)\n\nIt gets a little bit easier because German nouns are always written capitalized but you can easily construct a sentence where use an adjective as first word of a sentence so it's also written capitalized: \"*Frische* Kartoffeln sind heute günstiger\" (*Fresh* potatoes are cheaper today).\n\nOn the other hand: If it's only a list of 200 words you could post it to /r/Germany with information on how to tag them and maybe someone will help.","metadata":{"post_id":"2um9xi","post_score":2,"answer_comment_id":"co9olch","answer_score":3,"answerer_anon_id":"anon_f6e6e3d5bc5f1952","top_comment_id":"co9olch","top_comment_score":3,"top_comment_anon_id":"anon_f6e6e3d5bc5f1952","top_equals_preferred":true,"thanks_reply_id":"co9pbjs","thanks_reply_score":1,"thanks_reply_text":"Thanks for your advice, although I should have perhaps clarified that identifying the most common POS for each word is good enough for me. My list does not unfortunately follow any particular capitalization rules and one of the reasons why I wanted to tag each of the words is to capitalize the Nouns in it. ","thanks_reply_timestamp":"2015-02-03T10:48:58+00:00"}} -{"user_id":"anon_61ea34fbfe494be4","timestamp":"2015-03-13T18:18:55+00:00","subreddit":"LanguageTechnology","query":"Ran code snippet in NLTK book -- got very different result\n\nI'm not posting this to the github issue tracker for NLTK, because I'm not yet convinced that I'm not doing something wrong. Here's the deal:\n\nIn section 4.3 of [Chapter 5](http://www.nltk.org/book/ch05.html) on tagging, there is [code](http://www.nltk.org/book/pylisting/code_baseline_tagger.py) for a simple tagger. They show what [the resulting figure](http://www.nltk.org/images/tag-lookup.png) should look like. I ran that code ([this exact gist](https://gist.github.com/drussellmrichie/ee9ebe63610553bd2d27)), and got [a very different result](http://i.imgur.com/pgcIQeh.png). What gives? I'm using NLTK 3.x, and have Python 2.7. I believe they generate those code snippets from Python 3.x; is it possible that is causing the error?","preferred_answer":"I get the same results you have using both python2 and python3 and NLTK 3.0.2","top_comment":"I get the same results you have using both python2 and python3 and NLTK 3.0.2","metadata":{"post_id":"2yxnnr","post_score":2,"answer_comment_id":"cpe7c44","answer_score":2,"answerer_anon_id":"anon_2d07d862e9158e59","top_comment_id":"cpe7c44","top_comment_score":2,"top_comment_anon_id":"anon_2d07d862e9158e59","top_equals_preferred":true,"thanks_reply_id":"cpe8nof","thanks_reply_score":1,"thanks_reply_text":"Okay, I think I'll open an issue for this. Thanks for checking this.","thanks_reply_timestamp":"2015-03-14T00:33:20+00:00"}} -{"user_id":"anon_8bd41299cf933534","timestamp":"2015-03-15T05:24:34+00:00","subreddit":"LanguageTechnology","query":"Writing a paper on NLP\n\nFor the capstone course in my CIS Associate Degree program, I have to write an essay on an \"emerging\" topic, and I chose NLP. I'm wondering if you guys had some ideas on how to approach the paper.\n\nThe only criteria is it must have an executive summary at the beginning, show examples to better explain concepts, and have a conclusive summary at the end. The length should be a little over five pages.\n\nI was thinking of including some mentions of Chomsky's work, a history of some AI breakthroughs, identifying problems currently faced, and then giving examples through Python/NLTK. I do enjoy writing persuasive papers, but I don't know enough about the field to hold any strong opinions yet. So, any books, films, coding examples, or perhaps other Reddit posts that would get me started?","preferred_answer":"I liked these videos. They helped me get my feet wet. \n\nhttps://class.coursera.org/nlp/lecture/preview","top_comment":"This is the standard introductory book to the field: http://www.amazon.co.uk/Language-Processing-Prentice-Artificial-Intelligence/dp/0131873210","metadata":{"post_id":"2z3j0q","post_score":4,"answer_comment_id":"cpfdp7i","answer_score":4,"answerer_anon_id":"anon_59cbc14ec66498c2","top_comment_id":"cpfkeh2","top_comment_score":5,"top_comment_anon_id":"anon_f330df7413309986","top_equals_preferred":false,"thanks_reply_id":"cpfy0mu","thanks_reply_score":1,"thanks_reply_text":"These are incredible, thank you so much!","thanks_reply_timestamp":"2015-03-15T21:44:19+00:00"}} -{"user_id":"anon_19b138774248c446","timestamp":"2015-03-19T18:38:50+00:00","subreddit":"LanguageTechnology","query":"Tf-Idf: How do I get general word frequencies?\n\nI'm attempting to implement the [TF-Idf algorithm](http://en.wikipedia.org/wiki/Tf%E2%80%93idf) in order to try and determine the topic of a set of text (and eventually generate a text summary with that topic in mind). I'm using [this tutorial](http://stevenloria.com/finding-important-words-in-a-document-using-tf-idf/) which uses TexBlob (http://textblob.readthedocs.org/en/dev/) and NLTK as my starting point.\n\nIn general, I've found that the tf-idf algorithm is meant to use frequencies from the text corpus which contains the text you are attempting to process (at least this is what the implementations I've seen so far do). However, I would like to create a more general algorithm in which I can process any input piece of text without needing the larger corpus it is part of. I'm considering using the [Google Ngrams](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html), but that seems like it may be a little bit of overkill.\n\nIs there any sort of standard for doing this or is there a standard dataset other implementations of the Tf-Idf algorithm use?\n\nThanks for the help!","preferred_answer":"Yes, you need a corpus. There are tons of free corpora available online. This might be a good place to get started: http://www-nlp.stanford.edu/links/statnlp.html","top_comment":"Tf-idf inherently requires that you define your corpus. \"idf\" stands for \"inverse *document* frequency,\" and this is part of what makes it so powerful.\n\nYou can perform classification just using Term Frequency. There is nothing wrong with that, and many classifications tasks only do term frequency.\n\nYou don't really need to look for a corpus, though. Your corpus *is* the collection of texts that you're using to train your classifier.","metadata":{"post_id":"2zm25i","post_score":7,"answer_comment_id":"cpkwtn3","answer_score":1,"answerer_anon_id":"anon_03ef50f966d6fee6","top_comment_id":"cpkgrf7","top_comment_score":5,"top_comment_anon_id":"anon_03ef50f966d6fee6","top_equals_preferred":false,"thanks_reply_id":"cple7g1","thanks_reply_score":1,"thanks_reply_text":"This resource is very helpful, thank you. I've found a variety of different corpra online, mainly the Enron dataset, but I'd been trying to find a larger more general set.\n\nDo you have any suggestion of which corpus might be best to use for personal communications? Email, SMS, etc? If there is nothing that fits directly I suppose I'll need to attempt to gather this information myself, but is there one that could be used as a starting point which I could then augment with my own data?","thanks_reply_timestamp":"2015-03-20T20:47:54+00:00"}} -{"user_id":"anon_19b138774248c446","timestamp":"2015-03-19T18:38:50+00:00","subreddit":"LanguageTechnology","query":"Tf-Idf: How do I get general word frequencies?\n\nI'm attempting to implement the [TF-Idf algorithm](http://en.wikipedia.org/wiki/Tf%E2%80%93idf) in order to try and determine the topic of a set of text (and eventually generate a text summary with that topic in mind). I'm using [this tutorial](http://stevenloria.com/finding-important-words-in-a-document-using-tf-idf/) which uses TexBlob (http://textblob.readthedocs.org/en/dev/) and NLTK as my starting point.\n\nIn general, I've found that the tf-idf algorithm is meant to use frequencies from the text corpus which contains the text you are attempting to process (at least this is what the implementations I've seen so far do). However, I would like to create a more general algorithm in which I can process any input piece of text without needing the larger corpus it is part of. I'm considering using the [Google Ngrams](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html), but that seems like it may be a little bit of overkill.\n\nIs there any sort of standard for doing this or is there a standard dataset other implementations of the Tf-Idf algorithm use?\n\nThanks for the help!","preferred_answer":"I thought this resource was pretty useful: http://www.wordfrequency.info/\n Otherwise, look around on Github: A lot of summarization projects use textfiles with all the most common words listed.","top_comment":"Tf-idf inherently requires that you define your corpus. \"idf\" stands for \"inverse *document* frequency,\" and this is part of what makes it so powerful.\n\nYou can perform classification just using Term Frequency. There is nothing wrong with that, and many classifications tasks only do term frequency.\n\nYou don't really need to look for a corpus, though. Your corpus *is* the collection of texts that you're using to train your classifier.","metadata":{"post_id":"2zm25i","post_score":7,"answer_comment_id":"cplarvt","answer_score":1,"answerer_anon_id":"anon_145d19078cf8e613","top_comment_id":"cpkgrf7","top_comment_score":5,"top_comment_anon_id":"anon_03ef50f966d6fee6","top_equals_preferred":false,"thanks_reply_id":"cpledxz","thanks_reply_score":1,"thanks_reply_text":"This is an excellent resource, thank you.","thanks_reply_timestamp":"2015-03-20T20:52:59+00:00"}} -{"user_id":"anon_b94395df15413c45","timestamp":"2015-05-10T16:22:44+00:00","subreddit":"LanguageTechnology","query":"I'm trying to make a cards against humanity bot, what is a good approach I can take?\n\nI am trying to build a cards against humanity bot. Basically, it takes as input a string with either a single or multiple blank spaces, which need to be filled with phrases from multiple choices to create a funny phrase. If humor is too difficult then I can ignore that for now, and focus first on just making sense. I'm trying to build two versions, one that has the black (phrases with blank spaces) and white (answers to fill in blanks) cards predefined, and another one where you can enter new black and white cards it has never seen before. Are there any good techniques to tackle this problem?","preferred_answer":"The work of [Tony Veale](http://robotcomix.com/comix/Catalogue/mobile/) is very relevant here. His website explains a lot of stuff in the form of comics. One cool observation is that people are pretty charitable in attributing deeper insights to bots, which in part explains /u/nexe's experiences.","top_comment":"I'd consider getting a large dataset of very funny combinations, strip out stop words (a, an, the, etc) and feed it to a machine learning algorithm to train it to rate combinations of black and white cards. You might consider using something like word2vec so that similar words would get similar rankings. Then each round, you just rank every combination using the trained classifier you have based on the cards in hand and pick the best.","metadata":{"post_id":"35i3ii","post_score":5,"answer_comment_id":"crczuce","answer_score":3,"answerer_anon_id":"anon_1c2a5e5639bd941f","top_comment_id":"cr4nm7a","top_comment_score":3,"top_comment_anon_id":"anon_ee9f639443aa0b96","top_equals_preferred":false,"thanks_reply_id":"crdjogi","thanks_reply_score":1,"thanks_reply_text":"thanks, I'll take a look at his work","thanks_reply_timestamp":"2015-05-19T00:37:54+00:00"}} -{"user_id":"anon_549292b95a87116e","timestamp":"2015-05-19T17:28:31+00:00","subreddit":"LanguageTechnology","query":"Beginner : Need to read technical documents and extract information. Where do I start?\n\nHello!\n\nI'm developing a system where I would have to read technical documents and make the system understand it.\n\nCan anyone recommend any books/resources for me to start learning NLP? My confusion is if I have to learn from the basics or if there are any hacks where I can start learning at a certain level and use tools that already do most of the low level stuff like word and grammer extraction?\n\nThanks in advance!","preferred_answer":"Natural Language Processing with Python\nIs a classic to start with. After that there are NLP libraries in most programming languages.","top_comment":"Could you elaborate the information you want to extract from the documents? In a general sense, you could consider it as a tagging/Named-Entity Recognition problem.","metadata":{"post_id":"36ike7","post_score":3,"answer_comment_id":"cred8mb","answer_score":1,"answerer_anon_id":"anon_2d07d862e9158e59","top_comment_id":"creb8ef","top_comment_score":1,"top_comment_anon_id":"anon_1c4cc86bf9421bb4","top_equals_preferred":false,"thanks_reply_id":"crefpm0","thanks_reply_score":1,"thanks_reply_text":"Thanks. Which , in your opinion, is the most powerful NLP library? I've heard good things about the Stanford NLP toolkit.","thanks_reply_timestamp":"2015-05-19T20:21:33+00:00"}} -{"user_id":"anon_549292b95a87116e","timestamp":"2015-05-19T17:28:31+00:00","subreddit":"LanguageTechnology","query":"Beginner : Need to read technical documents and extract information. Where do I start?\n\nHello!\n\nI'm developing a system where I would have to read technical documents and make the system understand it.\n\nCan anyone recommend any books/resources for me to start learning NLP? My confusion is if I have to learn from the basics or if there are any hacks where I can start learning at a certain level and use tools that already do most of the low level stuff like word and grammer extraction?\n\nThanks in advance!","preferred_answer":"try NLTK: http://www.nltk.org/book_1ed/ch07.html","top_comment":"Could you elaborate the information you want to extract from the documents? In a general sense, you could consider it as a tagging/Named-Entity Recognition problem.","metadata":{"post_id":"36ike7","post_score":3,"answer_comment_id":"cretjzo","answer_score":1,"answerer_anon_id":"anon_1c4cc86bf9421bb4","top_comment_id":"creb8ef","top_comment_score":1,"top_comment_anon_id":"anon_1c4cc86bf9421bb4","top_equals_preferred":false,"thanks_reply_id":"crews6s","thanks_reply_score":1,"thanks_reply_text":"Thanks. I started reading it and using it now.","thanks_reply_timestamp":"2015-05-20T04:45:44+00:00"}} -{"user_id":"anon_eb91461c5705fab9","timestamp":"2015-05-20T02:37:09+00:00","subreddit":"LanguageTechnology","query":"How do phonetic transcription programs work?\n\nI'm not sure if this is the right place to ask, but I figured it's worth a shot.\n\nI just started learning NLTK in Python and I got a section dealing with the CMU pronunciation corpus. It sparked an idea for a program that would transcribe those words according to the IPA.\n\nI cobbled together a nice little program that does such, but it's limited to the 100k or so words in that corpus.\n\nHow do sites such as http://lingorado.com/ipa/ do it? Do they just have a larger corpus?","preferred_answer":"Not necessarily a larger corpus, but they could have that. You can build these programs using n-gram models of the source language. I just recently built a small program that does this, though I stopped at the same point as you did (just find the word and output it, if unknown then output '?'). I had a corpus in which each line looked something like this:\n\n <# of syllables> \n\nIt is simple enough to match the POS to the orthographic word and output the IPA transcription given directly in your training set. You could go further by creating a statistical model of a given IPA transcription n-gram given an orthographic representation within a certain POS, and then match this to unknown words that you get in some test set. Then you just run your program and if it finds a POS + orthographic word match in the training set, you output that; otherwise, you use a tagger to determine a POS for the unknown word, and then find the best IPA transcription match for the word and output that. Of course, there are probably many ways to solve this problem, but that is my initial take on how I would do it.","top_comment":"Not necessarily a larger corpus, but they could have that. You can build these programs using n-gram models of the source language. I just recently built a small program that does this, though I stopped at the same point as you did (just find the word and output it, if unknown then output '?'). I had a corpus in which each line looked something like this:\n\n <# of syllables> \n\nIt is simple enough to match the POS to the orthographic word and output the IPA transcription given directly in your training set. You could go further by creating a statistical model of a given IPA transcription n-gram given an orthographic representation within a certain POS, and then match this to unknown words that you get in some test set. Then you just run your program and if it finds a POS + orthographic word match in the training set, you output that; otherwise, you use a tagger to determine a POS for the unknown word, and then find the best IPA transcription match for the word and output that. Of course, there are probably many ways to solve this problem, but that is my initial take on how I would do it.","metadata":{"post_id":"36kqx3","post_score":6,"answer_comment_id":"crfc2nk","answer_score":2,"answerer_anon_id":"anon_61dd78c473c8628e","top_comment_id":"crfc2nk","top_comment_score":2,"top_comment_anon_id":"anon_61dd78c473c8628e","top_equals_preferred":true,"thanks_reply_id":"crfyp39","thanks_reply_score":1,"thanks_reply_text":"Thanks. This all seems pretty advance for me. Hopefully as I get further in my studies, it will make more sense.\n\nLet me see if I have a grasp on it. Basically, there could be this model to predict an unknown word's transcription?","thanks_reply_timestamp":"2015-05-21T02:40:55+00:00"}} -{"user_id":"anon_eb91461c5705fab9","timestamp":"2015-05-20T02:37:09+00:00","subreddit":"LanguageTechnology","query":"How do phonetic transcription programs work?\n\nI'm not sure if this is the right place to ask, but I figured it's worth a shot.\n\nI just started learning NLTK in Python and I got a section dealing with the CMU pronunciation corpus. It sparked an idea for a program that would transcribe those words according to the IPA.\n\nI cobbled together a nice little program that does such, but it's limited to the 100k or so words in that corpus.\n\nHow do sites such as http://lingorado.com/ipa/ do it? Do they just have a larger corpus?","preferred_answer":"There's some useful links here: http://www.voxforge.org/home/docs/faq/faq/what-is-g2p","top_comment":"Not necessarily a larger corpus, but they could have that. You can build these programs using n-gram models of the source language. I just recently built a small program that does this, though I stopped at the same point as you did (just find the word and output it, if unknown then output '?'). I had a corpus in which each line looked something like this:\n\n <# of syllables> \n\nIt is simple enough to match the POS to the orthographic word and output the IPA transcription given directly in your training set. You could go further by creating a statistical model of a given IPA transcription n-gram given an orthographic representation within a certain POS, and then match this to unknown words that you get in some test set. Then you just run your program and if it finds a POS + orthographic word match in the training set, you output that; otherwise, you use a tagger to determine a POS for the unknown word, and then find the best IPA transcription match for the word and output that. Of course, there are probably many ways to solve this problem, but that is my initial take on how I would do it.","metadata":{"post_id":"36kqx3","post_score":6,"answer_comment_id":"crfptc7","answer_score":2,"answerer_anon_id":"anon_1c3956e7f959e787","top_comment_id":"crfc2nk","top_comment_score":2,"top_comment_anon_id":"anon_61dd78c473c8628e","top_equals_preferred":false,"thanks_reply_id":"crfytlg","thanks_reply_score":1,"thanks_reply_text":"Interesting, I will look through this. Thanks.","thanks_reply_timestamp":"2015-05-21T02:44:23+00:00"}} -{"user_id":"anon_eb91461c5705fab9","timestamp":"2015-05-20T02:37:09+00:00","subreddit":"LanguageTechnology","query":"How do phonetic transcription programs work?\n\nI'm not sure if this is the right place to ask, but I figured it's worth a shot.\n\nI just started learning NLTK in Python and I got a section dealing with the CMU pronunciation corpus. It sparked an idea for a program that would transcribe those words according to the IPA.\n\nI cobbled together a nice little program that does such, but it's limited to the 100k or so words in that corpus.\n\nHow do sites such as http://lingorado.com/ipa/ do it? Do they just have a larger corpus?","preferred_answer":"Sorry, I just realized that I assumed you know a lot more than someone who \"just started learning NLTK\" would. \n\nSo what I was talking about is an [n-gram model](http://en.wikipedia.org/wiki/N-gram), and [here is a Coursera video on language models](https://class.coursera.org/nlp/lecture/14) (note this is an entire and free online class on NLP). If you haven't looked at it, I would highly suggest trying to find [Speech and Language Processing by Jurafsky and Martin](http://www.amazon.com/Speech-Language-Processing-Daniel-Jurafsky/dp/0131873210/ref=sr_1_1?ie=UTF8&qid=1432303716) (if your local college has a computer or linguistics department, it's likely there, or you can order it in). This subject is in Chapter 8 p. 259. The VoxForge page even cites it, it's really *the* book on the broader subject. Grapheme-to-phoneme conversion is the more technical name for this sort of program, and basically what you do is build a model that maps the letters in the orthography (graphemes) onto the sounds (phones) of the word. If you Google \"grapheme to phoneme conversion,\" you will get a ton of academic papers that explore the many ways to do this, though the VoxForge website posted here is a good starting point as well.","top_comment":"Not necessarily a larger corpus, but they could have that. You can build these programs using n-gram models of the source language. I just recently built a small program that does this, though I stopped at the same point as you did (just find the word and output it, if unknown then output '?'). I had a corpus in which each line looked something like this:\n\n <# of syllables> \n\nIt is simple enough to match the POS to the orthographic word and output the IPA transcription given directly in your training set. You could go further by creating a statistical model of a given IPA transcription n-gram given an orthographic representation within a certain POS, and then match this to unknown words that you get in some test set. Then you just run your program and if it finds a POS + orthographic word match in the training set, you output that; otherwise, you use a tagger to determine a POS for the unknown word, and then find the best IPA transcription match for the word and output that. Of course, there are probably many ways to solve this problem, but that is my initial take on how I would do it.","metadata":{"post_id":"36kqx3","post_score":6,"answer_comment_id":"crhg2xh","answer_score":2,"answerer_anon_id":"anon_61dd78c473c8628e","top_comment_id":"crfc2nk","top_comment_score":2,"top_comment_anon_id":"anon_61dd78c473c8628e","top_equals_preferred":false,"thanks_reply_id":"criiagk","thanks_reply_score":1,"thanks_reply_text":"Wow, thanks for that class link. I have the summer off of school and it would be really cool to go through that. That book sounds familiar too, I'm sure I can find it.\n\nI did a quick Grapheme-to-phoneme conversion search and found some pretty in-depth looking papers.\n\nDo you think going through the NLTK book and this online course will be a good foundation for my learning?","thanks_reply_timestamp":"2015-05-23T16:08:33+00:00"}} -{"user_id":"anon_16e78fee3f79e205","timestamp":"2015-06-02T09:28:14+00:00","subreddit":"LanguageTechnology","query":"I'm working on an open source project called The Plagiarizer. Are there any ready-baked open source paraphrasing tools I can implement? Can anybody help?\n\nHey guys! Thanks for reading. I think this is the best place on Reddit to ask about:\n\nhttps://github.com/nabilfreeman/the-plagiarizer\n\nI'm making it because it was an idea I constantly thought of at school. The world deserves it for better or for worse! It works terribly though.\n\nI already tried:\n\n- Using a giant thesaurus, and running a simple replace on every word in the input text. The problem here was that there was absolutely no context so the text was unreadable.\n- Hand writing a small, no-context thesaurus ( words like and, also, that, etc) to try and preserve context.\n\nI think I need something smarter than a simple word -> word process.\n\nAre there existing solutions that might fill my need? The (both paid-for) Words API and Spinbot API work really well, which led me to think there MUST be something open source out there...","preferred_answer":"You might take a look at using FrameNet and its large corpus of example sentences per frame. The [FrameNet book](https://framenet.icsi.berkeley.edu/fndrupal/the_book) talks about paraphrasing a lot and even says \"In many ways, paraphrasing is at the core of what we intend FrameNet to facilitate.\"\n\nBasically, you'd have to identify frame evoking words and their frame entities, then pick one of the example corpus sentences for that frame word as a template to build the paraphrased sentence by plugging in the frame entities.\n\nHaving built something to pick out frames and their entities myself, I can definitely say it's not an easy task, though there are some existing [semantic role labeling systems](https://framenet.icsi.berkeley.edu/fndrupal/ASRL). You could try one of those.\n\nThe second part of plugging in entities to an example sentence should be easier.\n\nEdit: grammar","top_comment":"It doesn't really answer your question but have you considered taking a large text collection and mining it for reformulations in order to populate your thesaurus? I'm thinking detecting markers like:\n\n* \"[something] a.k.a. [something else]\"\n* \"[something], or [something else],\"\n* \"[something] that is to say [something else]\"\n* etc.\n\nYou might get a lot of false positives with these but it's just a matter of adding additional heuristics to filter out the bad ones.","metadata":{"post_id":"3874jj","post_score":5,"answer_comment_id":"crt8spf","answer_score":1,"answerer_anon_id":"anon_ee9f639443aa0b96","top_comment_id":"crswegl","top_comment_score":2,"top_comment_anon_id":"anon_e09f0f9e0c418b93","top_equals_preferred":false,"thanks_reply_id":"crv51pj","thanks_reply_score":1,"thanks_reply_text":"Thanks for the pointer. I will dive in :)\n\nOn the off chance that you might know, is it this kind of technology that something like Spinbot implements? It seems to produce extremely accurate paraphrases (it's aimed at spinning blog posts for search engine optimization though)...","thanks_reply_timestamp":"2015-06-04T09:11:04+00:00"}} -{"user_id":"anon_fde80035532ead75","timestamp":"2015-07-07T23:19:48+00:00","subreddit":"LanguageTechnology","query":"How does wit.ai work ?\n\nWas just wondering how wit.ai work so well with just so few examples in it ? There seem to be quite a few other such services that have popped up recently and was wondering how they all do it. Even the new Amazon Echo is doing similiar stuff. \n\nIf someone can point me to some paper or article explaining the theory behind it, that would be great.","preferred_answer":"This should get you started:\n\n[Xu, Sarikaya 2013: Exploiting Shared Information for Multi-intent Natural Language Sentence\nClassification](http://www.clsp.jhu.edu/~puyang/papers/double_intent.pdf)\n\n\n[Bhargava et al. 2013: Easy contextual intent prediction and slot detection](http://www.cs.toronto.edu/~aditya/publications/contextual.pdf)","top_comment":"This should get you started:\n\n[Xu, Sarikaya 2013: Exploiting Shared Information for Multi-intent Natural Language Sentence\nClassification](http://www.clsp.jhu.edu/~puyang/papers/double_intent.pdf)\n\n\n[Bhargava et al. 2013: Easy contextual intent prediction and slot detection](http://www.cs.toronto.edu/~aditya/publications/contextual.pdf)","metadata":{"post_id":"3chiui","post_score":4,"answer_comment_id":"csw0htf","answer_score":2,"answerer_anon_id":"anon_8d28e5bef56b98ee","top_comment_id":"csw0htf","top_comment_score":2,"top_comment_anon_id":"anon_8d28e5bef56b98ee","top_equals_preferred":true,"thanks_reply_id":"csw1yx7","thanks_reply_score":1,"thanks_reply_text":"Wow. Ty :) ","thanks_reply_timestamp":"2015-07-08T10:57:20+00:00"}} -{"user_id":"anon_498e5cb973636581","timestamp":"2015-07-15T19:01:58+00:00","subreddit":"LanguageTechnology","query":"Is there a Word2Vec tutorial in Java?\n\nI'd like to use word2vec for a NLP project I'm working on, however, I can't seem to find any good tutorials on how to use it in Java. I've got it installed on Linux, but besides looking up coside distances within the Terminal, I'm not sure what to do now.\n\nAlso, side question, are the vectors all normalized sizes?","preferred_answer":"I guess by normalized sizes they mean is the dimensionality of each word vector the same? To which the answer is yes.","top_comment":"Yes there is http://deeplearning4j.org/word2vec.html\n\nIt is the first result on google for \"word2vec java\"\n\nI do not know what you mean by normalized sizes.","metadata":{"post_id":"3dews1","post_score":0,"answer_comment_id":"ct4v5nr","answer_score":1,"answerer_anon_id":"anon_d6d3ddb15edaca03","top_comment_id":"ct4rv2q","top_comment_score":3,"top_comment_anon_id":"anon_8dd5ec0aaafc0b3c","top_equals_preferred":false,"thanks_reply_id":"ct8nrxg","thanks_reply_score":1,"thanks_reply_text":"Yes! Thanks!","thanks_reply_timestamp":"2015-07-19T14:58:27+00:00"}} -{"user_id":"anon_6cd70c437ebb81da","timestamp":"2015-07-20T12:30:41+00:00","subreddit":"LanguageTechnology","query":"Sentence segmentation metric?\n\nHi folks,\n\nI'm currently working on (what will be but is not yet publically available) an open source sentence segmentation tool for XML research publication formats (currently: SciXML, Pubmed DTD).\n\nCurrently I'm building a rule-based segmenter inside a DOM XML parser (which is exactly as painful as it sounds but less painful than using regular expressions to parse and segment the sentences without any formal XML parsing which was the technique my predecessor used).\n\nI've build a rudimentary performance tool that measures how the sentence boundaries my tool spits out match up with manually segmented papers in a large subset of the [ChemAZ corpus](http://www.cl.cam.ac.uk/~sht25/AZ_corpus.html). All it does is return true if the first and last words of the sentences match and false if not. \n\nThis method has a major flaw, in that, as soon as the sentences go out of alignment, every sentence after that is also out of alignment. and comes back as \"false\". I don't believe this gives me a true reflection of how good the segmenter is. \n\nIs anyone aware of any metrics for measuring segmentation performance that are better than mine? I was considering using diffs but I couldn't get my head around how that would work.\n\nThanks in advance","preferred_answer":"I'm not quite sure what you mean by alignment, but if subsequent sentences aren't properly recognized if a previous sentence wasn't recognized, that would indicate a general problem with your approach to me. But maybe I misunderstood what you mean by that.\n\nAs far as I know, the standard way of measuring segmentation performance is in terms of precision/recall. I would assign each token at the end of the sentence a tag (e.g. EOS or something) indicating it is sentence final. Precision is the percentage of correct sentence boundaries among those you predicted, and recall is the amount of sentence boundaries in the gold data that you predicted correctly.","top_comment":"1. Assign a position to each token in the corpus. \n2. Construct your corpus of sentences as tuples of the positions of the first and last tokens in the sentence. \n3. For each sentence your technique constructs, find the corresponding sentence by matching on the position of the first token.\n4. Define a sentence as correctly segmented if the position of the last tokens matches up.\n4. Rinse and repeat to count correctly segmented sentences. \n\nI'm not a sentence segmentation expert so there may be better (or at least more standard) approaches in the literature. This method at least resolves the \"sentence shift\" problem you described.","metadata":{"post_id":"3dxt8j","post_score":3,"answer_comment_id":"ct9x9le","answer_score":3,"answerer_anon_id":"anon_3cfa436c248c31d2","top_comment_id":"ct9oank","top_comment_score":3,"top_comment_anon_id":"anon_816c471f4248d954","top_equals_preferred":false,"thanks_reply_id":"ct9xjrm","thanks_reply_score":1,"thanks_reply_text":"Thanks for your help! Perhaps you're right! I'm doing things in serial so each sentence \"starts\" where the previous one ends. That's why a missing boundary causes the others to \"Budge\" along. I hadn't even considered that there might be another way of looking at this. Any notable examples? ","thanks_reply_timestamp":"2015-07-20T18:01:49+00:00"}} -{"user_id":"anon_ef7c6bfd47261eca","timestamp":"2015-07-22T23:58:35+00:00","subreddit":"LanguageTechnology","query":"NLP tools for Math text??\n\nhow difficult is the task of semantic understanding of text in mathematical documents (text + formula) to construct a KB using existing NLP tools?","preferred_answer":"So you want to use wiki mark-up as a starting point? \nIf you use mark-up or latex as a raw input than it's relatively easy to seperate the math parts from the text (If the author consistently used equation box when refering to mathematical symbols).\nThe problem is that there are to my knowledge no grammars for mathematical texts and no annotated corpus to train one.\nSo your best bet would probably be to use a system like Jape (www.gate.co.uk) or Unitex (www-igm.univ-mlv.fr/~unitex/) to create rules for the text part and build a parser for the equation part. \nIn short, no there are no tools but you could make your own using existing ones.","top_comment":"Perhaps you should do some prototyping and let us know what you find.","metadata":{"post_id":"3e9gd2","post_score":3,"answer_comment_id":"ctgehbb","answer_score":1,"answerer_anon_id":"anon_2d07d862e9158e59","top_comment_id":"ctd20bx","top_comment_score":2,"top_comment_anon_id":"anon_0c8203371056573e","top_equals_preferred":false,"thanks_reply_id":"ctkh5gm","thanks_reply_score":1,"thanks_reply_text":"thanks :)","thanks_reply_timestamp":"2015-07-29T17:18:14+00:00"}} -{"user_id":"anon_a7bc342e4f6651da","timestamp":"2015-08-17T21:42:09+00:00","subreddit":"LanguageTechnology","query":"Can I get some help with LDA? (Spark)\n\nIf I generate N topics, I keep getting all N topics to be exactly the same. I'm using the Gist below and you can see my comment at the end where I import that data.\n\nhttps://gist.github.com/jkbradley/ab8ae22a8282b2c8ce33\n\nI've already removed stop words so I don't think that would be the issue. I am stuck.","preferred_answer":"The topics are not the same. In the page you linked to, p(\"more\" | topic1) = 0.00521..., and p(\"more\" | topic2) = 0.00492.. . Furthermore, the *ranking* of the words within the topics are not even the same: university looks to be word #6, 4, and 8 in the first three topics, respectively (ie it has the 6th highest probability in topic 1, 4th highest in 2, and 8th highest in 3).\n\nCheck these slides out: http://mimno.infosci.cornell.edu/slides/details.pdf . \n\nIn topic modeling we have/infer a probability distribution over T topics, and each topic is a probability distribution over *all* words in the vocabulary. To \"write\" a document, we choose a topic following the probability distribution over topics, then choose a word following that topic's probability distribution over words. Repeat this for as many words as you need. \n\nIt's really the probabilities that will differ between topics, as will the top N words in many cases (but not the top 10 in your example). Obviously *all* of the words in each topic are the same, since each topic has a probability for every word in the vocabulary. Finally, when you see interpretations saying things like \"topic 1 is about X and topic 2 is about Y\", this means that the most probable words in 1 seem to have to do with X and the most probable words in 2 seem to have to do with Y.","top_comment":"The topics are not the same. In the page you linked to, p(\"more\" | topic1) = 0.00521..., and p(\"more\" | topic2) = 0.00492.. . Furthermore, the *ranking* of the words within the topics are not even the same: university looks to be word #6, 4, and 8 in the first three topics, respectively (ie it has the 6th highest probability in topic 1, 4th highest in 2, and 8th highest in 3).\n\nCheck these slides out: http://mimno.infosci.cornell.edu/slides/details.pdf . \n\nIn topic modeling we have/infer a probability distribution over T topics, and each topic is a probability distribution over *all* words in the vocabulary. To \"write\" a document, we choose a topic following the probability distribution over topics, then choose a word following that topic's probability distribution over words. Repeat this for as many words as you need. \n\nIt's really the probabilities that will differ between topics, as will the top N words in many cases (but not the top 10 in your example). Obviously *all* of the words in each topic are the same, since each topic has a probability for every word in the vocabulary. Finally, when you see interpretations saying things like \"topic 1 is about X and topic 2 is about Y\", this means that the most probable words in 1 seem to have to do with X and the most probable words in 2 seem to have to do with Y.","metadata":{"post_id":"3hd7at","post_score":2,"answer_comment_id":"cu6jzo4","answer_score":2,"answerer_anon_id":"anon_82777c1febdcad85","top_comment_id":"cu6jzo4","top_comment_score":2,"top_comment_anon_id":"anon_82777c1febdcad85","top_equals_preferred":true,"thanks_reply_id":"cu6kwri","thanks_reply_score":1,"thanks_reply_text":"Thanks for explaining. I'm having the same issue in my working set as in the sample above. My worry is I've already done a round of classification on my documents set to determine if a doc is about breakfast and now all I get the same top 10 terms for each topic, which is not very insightful.\n\nI'm wondering if I can't do something like take the top 100 terms for each topic and then have each topic be described by the most unique terms like a TFIDF.","thanks_reply_timestamp":"2015-08-18T01:45:18+00:00"}} -{"user_id":"anon_a7bc342e4f6651da","timestamp":"2015-08-17T21:42:09+00:00","subreddit":"LanguageTechnology","query":"Can I get some help with LDA? (Spark)\n\nIf I generate N topics, I keep getting all N topics to be exactly the same. I'm using the Gist below and you can see my comment at the end where I import that data.\n\nhttps://gist.github.com/jkbradley/ab8ae22a8282b2c8ce33\n\nI've already removed stop words so I don't think that would be the issue. I am stuck.","preferred_answer":"There should be a parameter that you can set, I think typically referred to as eta (but not positive). This controls the expected distribution over topics in each document. If you turn it one way, you basically expect each topic to be in each document, and if you turn it the other, then basically one topic per document. Try fooling around with that, expecting fewer topics per document, and you might find better topic separation.","top_comment":"The topics are not the same. In the page you linked to, p(\"more\" | topic1) = 0.00521..., and p(\"more\" | topic2) = 0.00492.. . Furthermore, the *ranking* of the words within the topics are not even the same: university looks to be word #6, 4, and 8 in the first three topics, respectively (ie it has the 6th highest probability in topic 1, 4th highest in 2, and 8th highest in 3).\n\nCheck these slides out: http://mimno.infosci.cornell.edu/slides/details.pdf . \n\nIn topic modeling we have/infer a probability distribution over T topics, and each topic is a probability distribution over *all* words in the vocabulary. To \"write\" a document, we choose a topic following the probability distribution over topics, then choose a word following that topic's probability distribution over words. Repeat this for as many words as you need. \n\nIt's really the probabilities that will differ between topics, as will the top N words in many cases (but not the top 10 in your example). Obviously *all* of the words in each topic are the same, since each topic has a probability for every word in the vocabulary. Finally, when you see interpretations saying things like \"topic 1 is about X and topic 2 is about Y\", this means that the most probable words in 1 seem to have to do with X and the most probable words in 2 seem to have to do with Y.","metadata":{"post_id":"3hd7at","post_score":2,"answer_comment_id":"cu6zhhl","answer_score":2,"answerer_anon_id":"anon_82777c1febdcad85","top_comment_id":"cu6jzo4","top_comment_score":2,"top_comment_anon_id":"anon_82777c1febdcad85","top_equals_preferred":false,"thanks_reply_id":"cu70sw0","thanks_reply_score":1,"thanks_reply_text":"Thanks man! ","thanks_reply_timestamp":"2015-08-18T13:55:42+00:00"}} -{"user_id":"anon_36fa022bb576d6b4","timestamp":"2015-08-24T16:55:55+00:00","subreddit":"LanguageTechnology","query":"How to do multiclass classification properly with NLTK? Predicting a product star rating based in its text Reviews\n\nI have a problem in hands that can not be solved with binary classification positive/negative (0 or 1) sentiment analysis like: http://www.laurentluce.com/posts/twitter-sentiment-analysis-using-python-and-nltk/\n\nI need to classify a product review with an rating variable from 0 to 5 from its text... like this example: 'Predicting a Business’ Star in Yelp from Its Reviews’ \nText Alone' (http://arxiv.org/ftp/arxiv/papers/1401/1401.0864.pdf)\n\nWhat are the main requirements for rating automatic estimation??\n\nI have read several articles, but I have no engineering background, I needed a practical example, not all those mathematical rules or hypothetical methods. This article is particulary good 'Assigning Polarity Scores to Reviews\nUsing Machine Learning Techniques' - http://www.aclweb.org/anthology/I05-1028\n\nAny help from you redditors? I am willing to learn, but prefer to see some code examples, or nltk tutorials.","preferred_answer":"Just a small hint. \n\nYou'll probably want to use at least bi-grams. Otherwise reviews like \"this product is not good\" will break your model (and be mis-trained).","top_comment":"Use a regression model instead. The labels 0-5 aren't categorical like, say, part of speech (POS) tags: noun, verb, etc. There aren't relationships between the POS tags, so you can't say \"noun > verb\" or whatver, but you can say 1 star > 0 stars. Just round for fractional stars.\n\nAlso, scikit is great for machine learning, so go with that, and maybe use NLTK for feature extraction.","metadata":{"post_id":"3i7z2q","post_score":2,"answer_comment_id":"cufx90n","answer_score":1,"answerer_anon_id":"anon_335751d09e61cb5a","top_comment_id":"cue4cw9","top_comment_score":4,"top_comment_anon_id":"anon_82777c1febdcad85","top_equals_preferred":false,"thanks_reply_id":"cug1yne","thanks_reply_score":1,"thanks_reply_text":"thanks so much nick. I need all the help and advices! ","thanks_reply_timestamp":"2015-08-26T08:07:35+00:00"}} -{"user_id":"anon_d28e76ca52f1c0a8","timestamp":"2015-08-26T03:03:17+00:00","subreddit":"LanguageTechnology","query":"Where can I download a French-English dictionary database that includes parts of speech?\n\nHi,\n\nI've been looking all over for a French English dictionary for some basic NLP but I'm having no luck finding anything. Anyone know where I can get a word database with parts of speech (noun, verb, etc)? I really appreciate any help\n\nFor example: \n\ncat, noun, chat","preferred_answer":"Personally I haven't used it, but you may want to check out the [EuroParl corpus](http://www.statmt.org/europarl):","top_comment":"Personally I haven't used it, but you may want to check out the [EuroParl corpus](http://www.statmt.org/europarl):","metadata":{"post_id":"3if4jb","post_score":1,"answer_comment_id":"cufyttp","answer_score":3,"answerer_anon_id":"anon_da72adb6dc3bfa00","top_comment_id":"cufyttp","top_comment_score":3,"top_comment_anon_id":"anon_da72adb6dc3bfa00","top_equals_preferred":true,"thanks_reply_id":"cugm545","thanks_reply_score":1,"thanks_reply_text":"I appreciate the link. Looks like it is sentences in both languages. What I really need are words in both langauges","thanks_reply_timestamp":"2015-08-26T19:35:31+00:00"}} -{"user_id":"anon_ba4367c0fc882fa0","timestamp":"2015-09-06T20:42:32+00:00","subreddit":"LanguageTechnology","query":"Is there such thing as an \"un-stemmer\"?\n\nI've lately been into using natural language generation, mostly to make jokes. (Markov chains and _ebooks Twitter accounts are SO 2014.) \n\nI don't really have a good sense of what kinds of techniques already exist in the NLG space, so it's hard to find tools to do what I want. Here's what I'm looking for.\n\nI want to be able to take an English word, stem it, do something fun with it, then -- and this is the step where I want your help -- return the root word to the same part of speech as the original word. For instance, I might take the word \"kicking\", stem it to \"kick\", do some magic to get back another word like \"hug\" and then _unstem_ that word to get \"hugging\".\n\nWhat should I be looking for here? \"unstemmer\" doesn't return a lot of useful results, and as far as I know there's no stemmer that's also a tagger that will give the grammatical information about my input form \"kicking\" (e.g. _that's a gerund_) that I can then use to add back the morphology to \"hug\".","preferred_answer":"You could look at using the [CLiPS pattern.en](http://www.clips.ua.ac.be/pages/pattern-en) module in Python. It can do verb conjugation, comparative/superlatives, and pluralization/singularization among other things.","top_comment":"You could look at using the [CLiPS pattern.en](http://www.clips.ua.ac.be/pages/pattern-en) module in Python. It can do verb conjugation, comparative/superlatives, and pluralization/singularization among other things.","metadata":{"post_id":"3jw7r8","post_score":2,"answer_comment_id":"cut3ljk","answer_score":3,"answerer_anon_id":"anon_ee9f639443aa0b96","top_comment_id":"cut3ljk","top_comment_score":3,"top_comment_anon_id":"anon_ee9f639443aa0b96","top_equals_preferred":true,"thanks_reply_id":"cutmf6s","thanks_reply_score":1,"thanks_reply_text":"Thank you, I'll check this out!","thanks_reply_timestamp":"2015-09-07T17:50:00+00:00"}} -{"user_id":"anon_ba4367c0fc882fa0","timestamp":"2015-09-06T20:42:32+00:00","subreddit":"LanguageTechnology","query":"Is there such thing as an \"un-stemmer\"?\n\nI've lately been into using natural language generation, mostly to make jokes. (Markov chains and _ebooks Twitter accounts are SO 2014.) \n\nI don't really have a good sense of what kinds of techniques already exist in the NLG space, so it's hard to find tools to do what I want. Here's what I'm looking for.\n\nI want to be able to take an English word, stem it, do something fun with it, then -- and this is the step where I want your help -- return the root word to the same part of speech as the original word. For instance, I might take the word \"kicking\", stem it to \"kick\", do some magic to get back another word like \"hug\" and then _unstem_ that word to get \"hugging\".\n\nWhat should I be looking for here? \"unstemmer\" doesn't return a lot of useful results, and as far as I know there's no stemmer that's also a tagger that will give the grammatical information about my input form \"kicking\" (e.g. _that's a gerund_) that I can then use to add back the morphology to \"hug\".","preferred_answer":"You could reuse the flexer from them and inverse it.\nhttp://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/process/Morphology.html\nThe code is opensource","top_comment":"You could look at using the [CLiPS pattern.en](http://www.clips.ua.ac.be/pages/pattern-en) module in Python. It can do verb conjugation, comparative/superlatives, and pluralization/singularization among other things.","metadata":{"post_id":"3jw7r8","post_score":2,"answer_comment_id":"cutk6ak","answer_score":1,"answerer_anon_id":"anon_2d07d862e9158e59","top_comment_id":"cut3ljk","top_comment_score":3,"top_comment_anon_id":"anon_ee9f639443aa0b96","top_equals_preferred":false,"thanks_reply_id":"cutmgyc","thanks_reply_score":1,"thanks_reply_text":"Will check that out, thanks!","thanks_reply_timestamp":"2015-09-07T17:51:35+00:00"}} -{"user_id":"anon_d28e76ca52f1c0a8","timestamp":"2015-08-26T03:03:17+00:00","subreddit":"LanguageTechnology","query":"Where can I download a French-English dictionary database that includes parts of speech?\n\nHi,\n\nI've been looking all over for a French English dictionary for some basic NLP but I'm having no luck finding anything. Anyone know where I can get a word database with parts of speech (noun, verb, etc)? I really appreciate any help\n\nFor example: \n\ncat, noun, chat","preferred_answer":"I never used it but Apertium has one: http://sourceforge.net/p/apertium/svn/HEAD/tree/incubator/apertium-en-fr/apertium-en-fr.en-fr.dix","top_comment":"Personally I haven't used it, but you may want to check out the [EuroParl corpus](http://www.statmt.org/europarl):","metadata":{"post_id":"3if4jb","post_score":1,"answer_comment_id":"cutu2gn","answer_score":2,"answerer_anon_id":"anon_73fe13c3d8b2e0aa","top_comment_id":"cufyttp","top_comment_score":3,"top_comment_anon_id":"anon_da72adb6dc3bfa00","top_equals_preferred":false,"thanks_reply_id":"cuuqn4x","thanks_reply_score":1,"thanks_reply_text":"I can't thank you enough for this. I had pretty much given up on the idea that this existed.","thanks_reply_timestamp":"2015-09-08T19:22:48+00:00"}} -{"user_id":"anon_3c9f147d935d1b49","timestamp":"2015-09-08T20:06:06+00:00","subreddit":"LanguageTechnology","query":"Deep Learning NLP conferences?\n\nDoes anyone know of any upcoming Deep Learning NLP conferences?\n\nsomething like \"text by the bay\"? http://text.bythebay.io/","preferred_answer":"You might want to check out CS 224d from Stanford: http://cs224d.stanford.edu","top_comment":"You might want to check out CS 224d from Stanford: http://cs224d.stanford.edu","metadata":{"post_id":"3k4wns","post_score":3,"answer_comment_id":"cuv77th","answer_score":3,"answerer_anon_id":"anon_2e4cf4f92026fc81","top_comment_id":"cuv77th","top_comment_score":3,"top_comment_anon_id":"anon_2e4cf4f92026fc81","top_equals_preferred":true,"thanks_reply_id":"cuv7oh2","thanks_reply_score":1,"thanks_reply_text":"Yeh, thanks, I am going through the lectures... ","thanks_reply_timestamp":"2015-09-09T03:12:10+00:00"}} -{"user_id":"anon_c56960166275f2cf","timestamp":"2015-09-22T12:03:03+00:00","subreddit":"LanguageTechnology","query":"Distinguish different types of text?\n\nHey I'm looking for input in distinguishing different types of text. For example away to tell apart novel like text, user comment like text, and scientific paper from each other. Are there papers or standard approaches in doing this?","preferred_answer":"I apologize for the brevity, I'm on mobile. But hopefully this will give you some terms to look into more.\n\nIn machine learning lingo, this is referred to as a classification problem. If you have a training set, that is, a list of texts that you know are novel text, or user comment text, etc., you can train a classifier to distinguish between them. There are many different types of classification algorithms. Which one you use may depend on how you represent your documents.\n\nYou need some way to represent your text documents as a vector of numbers. One approach to this is called bag of words, where your vector represents word counts. You could also represent a document by things like the total number of words, average word length, etc.\n\nIf you don't have a set of discrete categories that you're starting with, you can look into clustering algorithms. That will give you sets of documents that are similar to each other.","top_comment":"I apologize for the brevity, I'm on mobile. But hopefully this will give you some terms to look into more.\n\nIn machine learning lingo, this is referred to as a classification problem. If you have a training set, that is, a list of texts that you know are novel text, or user comment text, etc., you can train a classifier to distinguish between them. There are many different types of classification algorithms. Which one you use may depend on how you represent your documents.\n\nYou need some way to represent your text documents as a vector of numbers. One approach to this is called bag of words, where your vector represents word counts. You could also represent a document by things like the total number of words, average word length, etc.\n\nIf you don't have a set of discrete categories that you're starting with, you can look into clustering algorithms. That will give you sets of documents that are similar to each other.","metadata":{"post_id":"3lxdc6","post_score":3,"answer_comment_id":"cvab029","answer_score":2,"answerer_anon_id":"anon_82fab1de64f6073b","top_comment_id":"cvab029","top_comment_score":2,"top_comment_anon_id":"anon_82fab1de64f6073b","top_equals_preferred":true,"thanks_reply_id":"cvadhm9","thanks_reply_score":1,"thanks_reply_text":"Thx for your answer! I'm familiar with the document vector I was just not sure if it can be used for this. Are there any papers or text book examples on the kind of problem I described?","thanks_reply_timestamp":"2015-09-22T17:19:04+00:00"}} -{"user_id":"anon_1b25b9bae871da9a","timestamp":"2015-10-04T06:57:16+00:00","subreddit":"LanguageTechnology","query":"Machine Translation\n\nA friend wants to work on an English-Japanese translator app, but isn't sure where to start. What would be the best resources for her to gain some insight into building an app for machine translation, and what are some major issues she could run into?","preferred_answer":"She first needs to be aware of the enormous magnitude of the task. If you take Google Translate for example, which uses the statistical method based on bilingual text corpora, the quality of the English to Japanese or Japanese to English translations are quite poor, even with the ocean of resources they have that their disposal. Whichever method one uses, one has to tackle the issue of major syntactical differences between the two languages (i.e. the word orders will be jumbled up when translated).\n\nI won't be able to help your friend much, but for other commenters who might be able to help, could you clarify if your friend has already worked on machine translation and is seeking advice specifically on English-Japanese? And what is the scope of her app? Things get somewhat easier once one restricts the domain of the sentences being translated.","top_comment":"This is a big task even if she uses an existing toolkit. Developing her own system would take her upwards of several months to several years depending on her knowledge of NLP and ML as well as software engineering. \n\nMoses is the toolkit to look into as it is most streamlined and probably the easiest to get working after she finds the data to train it with. She could start small by using the [Kyoto Free Translation Task](http://www.phontron.com/kftt/) (KFTT). [Travatar](http://www.phontron.com/travatar/) is a good alternative for Japanese-English and English-Japanese as it achieves state of the art results on those language pairs.\n\nIn general, [Graham Neubig's](http://www.phontron.com) work is worth looking into if you are thinking of doing ja-en or en-ja translation.\n\nSince you use the word 'app' several clarifications are in order:\n\n* Translation in these systems is done in batch mode. That means you translate a test set of (usually) several thousand sentences at a time. This test set goes through many transformation steps before actually being translated. So the result won't be an 'online' system where you just put in a sentence and get a translation out.\n* These approaches will most likely not work on a mobile platform. There is a line of research into this and how to make models efficient enough to run in such an environment. Maybe there are toolkits out there that do this. But they are not the ones you see being recommended here.\n\n* The translation quality of en-ja **will be** poor. You can see the quality of Google Translate's outputs and then imagine something that is quite a bit worse than that. This is because of three reasons: 1) The blackbox approaches used by your friend will not match Google's; 2) She will have orders of magnitude less data than Google; 3) She does not have the expertise to build a (relatively) good translation system.\n\nGood luck!","metadata":{"post_id":"3nfhg4","post_score":3,"answer_comment_id":"cvnm5nm","answer_score":2,"answerer_anon_id":"anon_e03b780039067511","top_comment_id":"cvnobq9","top_comment_score":5,"top_comment_anon_id":"anon_f330df7413309986","top_equals_preferred":false,"thanks_reply_id":"cvnmmxn","thanks_reply_score":1,"thanks_reply_text":"Interesting, thanks for the info. She's never worked on machine translation, but has a good understanding of common ML algorithms and is looking to do this as an exercise.","thanks_reply_timestamp":"2015-10-04T09:28:04+00:00"}} -{"user_id":"anon_1b25b9bae871da9a","timestamp":"2015-10-04T06:57:16+00:00","subreddit":"LanguageTechnology","query":"Machine Translation\n\nA friend wants to work on an English-Japanese translator app, but isn't sure where to start. What would be the best resources for her to gain some insight into building an app for machine translation, and what are some major issues she could run into?","preferred_answer":"I suggest going the deep learning route... it requires much less resources than traditional NLP methods, it is challenging the state of the art, and shows promise because of success in other fields.\n\n1 Learn fundamentals of NNs, RNNs and LSTM.\n\nhttps://class.coursera.org/neuralnets-2012-001/lecture\n\n2 learn deep learning for NLP\n\nhttp://cs224d.stanford.edu/syllabus.html\n\nhttp://u.cs.biu.ac.il/~yogo/nnlp.pdf\n\n3 find a parallel corpus for japanese and english.\n\n4 find state of the art papers on machine translation and try to replicate or improve on them. \n\nHere is an example.\nhttp://arxiv.org/abs/1412.2007\n\nbleu score is an important measure to evaluate the quality of a transalation\nhttps://en.wikipedia.org/wiki/BLEU","top_comment":"This is a big task even if she uses an existing toolkit. Developing her own system would take her upwards of several months to several years depending on her knowledge of NLP and ML as well as software engineering. \n\nMoses is the toolkit to look into as it is most streamlined and probably the easiest to get working after she finds the data to train it with. She could start small by using the [Kyoto Free Translation Task](http://www.phontron.com/kftt/) (KFTT). [Travatar](http://www.phontron.com/travatar/) is a good alternative for Japanese-English and English-Japanese as it achieves state of the art results on those language pairs.\n\nIn general, [Graham Neubig's](http://www.phontron.com) work is worth looking into if you are thinking of doing ja-en or en-ja translation.\n\nSince you use the word 'app' several clarifications are in order:\n\n* Translation in these systems is done in batch mode. That means you translate a test set of (usually) several thousand sentences at a time. This test set goes through many transformation steps before actually being translated. So the result won't be an 'online' system where you just put in a sentence and get a translation out.\n* These approaches will most likely not work on a mobile platform. There is a line of research into this and how to make models efficient enough to run in such an environment. Maybe there are toolkits out there that do this. But they are not the ones you see being recommended here.\n\n* The translation quality of en-ja **will be** poor. You can see the quality of Google Translate's outputs and then imagine something that is quite a bit worse than that. This is because of three reasons: 1) The blackbox approaches used by your friend will not match Google's; 2) She will have orders of magnitude less data than Google; 3) She does not have the expertise to build a (relatively) good translation system.\n\nGood luck!","metadata":{"post_id":"3nfhg4","post_score":3,"answer_comment_id":"cvqkeuv","answer_score":1,"answerer_anon_id":"anon_3c9f147d935d1b49","top_comment_id":"cvnobq9","top_comment_score":5,"top_comment_anon_id":"anon_f330df7413309986","top_equals_preferred":false,"thanks_reply_id":"cvqwrjd","thanks_reply_score":1,"thanks_reply_text":"This is fantastic, thank you for this! ","thanks_reply_timestamp":"2015-10-07T03:23:37+00:00"}} -{"user_id":"anon_5970203db536fcf4","timestamp":"2015-10-15T16:05:02+00:00","subreddit":"LanguageTechnology","query":"Any Undergraduate level thesis ideas out there?\n\nHey /r/LanguageTechnology,\n\nI'm an undergraduate student currently looking for a thesis idea that doesn't involve anything overly complicated, but applying basic NLP concepts to a research question. I've read some papers surrounding it's use in social media, detecting sarcasm/lies in tweets, identifying bullying roles etc. (http://pages.cs.wisc.edu/~jerryzhu/pub/naaclhlt2012.pdf)\n\nMy original idea, not necessarily 100% NLP related, was to compare eigenfaces vs. fisherfaces for tinder matching and subsequently initiate conversation using a chatbot to increase good sentimental value, but it got dinged by my school's ethics committee for 1. no public API and 2. subjects could not consent to the research.\n\nSo basically I'm just looking for a little guidance in my search, research questions related to social media and NLP are my current interest!\n\nThanks for any help in advance.","preferred_answer":"Not really new, but still worth Investigating further than current state of the art. Finding hints and confidence of behavioral or mental illnesses in social-media (likes, clicks, logs..). I am sorry to suggest a mostly military interest topic, but that's what I am interested in 😯. And unfortunately the monster named Facebook too.\n\n* [New app would monitor mental health through “selfie” videos, social media](\nhttp://www.rochester.edu/newscenter/mental-health-monitoring-through-selfie-videos-and-social-media-tracking-87632/)\n* [Computers using digital footprints are better judges of personality than friends and family](http://www.cam.ac.uk/research/news/computers-using-digital-footprints-are-better-judges-of-personality-than-friends-and-family)\n* [Who will develop psychosis? Automated speech analysis may have the answer](http://www.sciencedaily.com/releases/2015/08/150824110809.htm)","top_comment":"The [CLPsych](http://clpsych.org/) workshops at ACL have had some good papers on using NLP to address these issues. Reimplementing one of these approaches and applying it to a new dataset, and maybe even tweaking it a little, should be appropriate for an undergraduate thesis.","metadata":{"post_id":"3ove4e","post_score":5,"answer_comment_id":"cw0u1ez","answer_score":1,"answerer_anon_id":"anon_d44356a75eb6d544","top_comment_id":"cw11o1f","top_comment_score":3,"top_comment_anon_id":"anon_ceae4caa35e9b899","top_equals_preferred":false,"thanks_reply_id":"cw0u8bu","thanks_reply_score":3,"thanks_reply_text":"This is very interesting, I'll give your references a once over. Thanks for the suggestion!","thanks_reply_timestamp":"2015-10-15T17:21:54+00:00"}} -{"user_id":"anon_b73b9fd4feb22023","timestamp":"2015-11-15T11:45:29+00:00","subreddit":"LanguageTechnology","query":"Font modification\n\nI teach adult English language students to read. Most of my students can't read in their language(s) of origin, so it is a complicated process for them to start reading English. They are making progress, and I have found that showing which letters make one sound helps a bit (things like sh, ch, ai, ou), and marks to indicate a split digraph. I don't want to simply underline digraphs because there needs to be a little more distance between the marks and the letters.\n\nIn other contexts, split digraphs sometimes are represented as cānɇ, but for my students that doesn't seem to work as well as a line showing the connection between the two letters.\n\nhttp://imgur.com/HF7cXq2\n\nI want to either develop a font that shows marks to indicate sounds, or modify an existing font to show the annotations. The question is, what is the best way to do that? Any suggestions?","preferred_answer":"That's a pretty neat idea, but a) ill-suited for this sub, b) a lot of work to design those custom diacritics (?), c) will always require manual 'annotation' -- whether with computer or pen -- beecuz English.\n\nTry /r/fonts et. al., but prepare to continue to just use your pen. :-/","top_comment":"That's a pretty neat idea, but a) ill-suited for this sub, b) a lot of work to design those custom diacritics (?), c) will always require manual 'annotation' -- whether with computer or pen -- beecuz English.\n\nTry /r/fonts et. al., but prepare to continue to just use your pen. :-/","metadata":{"post_id":"3sw07a","post_score":0,"answer_comment_id":"cx1ymm2","answer_score":1,"answerer_anon_id":"anon_3b12c99a059a0aad","top_comment_id":"cx1ymm2","top_comment_score":1,"top_comment_anon_id":"anon_3b12c99a059a0aad","top_equals_preferred":true,"thanks_reply_id":"cx4e40e","thanks_reply_score":1,"thanks_reply_text":":) Thanks for the suggestion. \n'beecuz English' shapes so much of my job :)\n\n","thanks_reply_timestamp":"2015-11-18T11:05:22+00:00"}} -{"user_id":"anon_70d289352ee067b6","timestamp":"2015-11-24T20:42:17+00:00","subreddit":"LanguageTechnology","query":"Looking for direction on how to read a sentence and formulate response based off of sentence.\n\nSo please bare with me as I have next to zero knowledge other than my youtube and wikipedia research. I'm just looking to learn more about this stuff. \n\nSo Slack is a chat service you can use that allows for you to write your own bots that can integrate into Slack. Then a user can type a command to your service and a sentence. I put together a little bot then helps you find restaurants around your location. It recognizes a couple of specific commands and responds accordingly. The way I went about doing this was pretty basic. I basically just split the sentence up and look for certain words and if they said one of those then I respond. Its literally a series of if statements :). \n\nThis got me to thinking. What is the right way to actually go about doing this? Then I started looking at NLP and IBM's Watson API that allows you to create a classifier. This seemed cool because I could give it a bunch of variations of sentences and it would then respond with a class and then from there I can react based off of the class. However, I still would need to know specifics from the sentence. The example they use is if the user asks something about the weather. For example, \"What is the weather like on Sunday?\". So I could give this sentence a class of \"question\". Then I could respond. However, its asking for specific day. I suppose I could add more classes which is what I think it suggests but I feel like this doesn't lend itself to dynamic data very well. You would constantly have to be updating the data probably daily.\n\nAnyways. Does anyone know the proper way to go about doing this sort of thing? Remember just looking for direction here.\n\nThanks!","preferred_answer":"Semantic parsing is an active topic in NLP. It often involves question answering to a known database of facts.\n\nThe original paper that's spawned the currently used method is Zettlemoyer and Collins, 2005. It uses a CCG that's augmented with lambda calculus to parse sentences. It has a MaxEnt/CRF STYLE probability model. \n\nZettlemoyer has a student, Yoav Artzi who has an open source toolkit. \n\nThere's some need for supervised datasets but people like Jayant Krishnamurthy have worked on using weaker supervision signals to get similar results.","top_comment":"Semantic parsing is an active topic in NLP. It often involves question answering to a known database of facts.\n\nThe original paper that's spawned the currently used method is Zettlemoyer and Collins, 2005. It uses a CCG that's augmented with lambda calculus to parse sentences. It has a MaxEnt/CRF STYLE probability model. \n\nZettlemoyer has a student, Yoav Artzi who has an open source toolkit. \n\nThere's some need for supervised datasets but people like Jayant Krishnamurthy have worked on using weaker supervision signals to get similar results.","metadata":{"post_id":"3u4is3","post_score":9,"answer_comment_id":"cxcifo2","answer_score":3,"answerer_anon_id":"anon_543521c1d3b7f033","top_comment_id":"cxcifo2","top_comment_score":3,"top_comment_anon_id":"anon_543521c1d3b7f033","top_equals_preferred":true,"thanks_reply_id":"cxfwf0t","thanks_reply_score":1,"thanks_reply_text":"This is actually very helpful. Thank you so much. Obviously I don't understand everything that your saying :) but does get me thinking in the right direction.\n\nThanks!","thanks_reply_timestamp":"2015-11-28T18:19:26+00:00"}} -{"user_id":"anon_c77d6df9c806a3cb","timestamp":"2015-12-14T19:57:11+00:00","subreddit":"LanguageTechnology","query":"New to NLP -- Where to I start if I want to process simple sentences?\n\nI'm pretty new to NLP, and I want for a small programming project of mine to process simple sentences and extract informations on the action & target.\n\nFor instance, \"How can I fix the door handle\", \"What can I do to fix a door handle\", and \"Fixing door handles\" would all yield the same result in regards of what I want: \"Fix\" and a \"Door handle\".\n\nAdditionally, I only want to support a restricted grammar & vocabulary.\n\nWhat can I do to achieve this result? I was trying out spaCy and NLTK for python, but the 20 second load time for spaCy makes it inadequate for my purpose, and NLTK requires me to spend a lot of time understanding all of its features (not that it's a problem, but I wanted to be sure I was on the right tracks).","preferred_answer":"The specific task you're interested in is called [semantic role labeling](https://en.wikipedia.org/wiki/Semantic_role_labeling) (SRL).\n\nUIUC has an SRL library that you can check out. There's a demo online: http://cogcomp.cs.illinois.edu/page/demo_view/srl.","top_comment":"The specific task you're interested in is called [semantic role labeling](https://en.wikipedia.org/wiki/Semantic_role_labeling) (SRL).\n\nUIUC has an SRL library that you can check out. There's a demo online: http://cogcomp.cs.illinois.edu/page/demo_view/srl.","metadata":{"post_id":"3wtqyc","post_score":6,"answer_comment_id":"cxzbfyu","answer_score":6,"answerer_anon_id":"anon_bc3e78496b64558c","top_comment_id":"cxzbfyu","top_comment_score":6,"top_comment_anon_id":"anon_bc3e78496b64558c","top_equals_preferred":true,"thanks_reply_id":"cy2u12u","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot. I was missing the right keywords to query google with :)","thanks_reply_timestamp":"2015-12-18T00:04:45+00:00"}} -{"user_id":"anon_0db6833fff6425c9","timestamp":"2015-12-18T13:04:02+00:00","subreddit":"LanguageTechnology","query":"how to apply LDA(latent Dirichlet allocation) model?\n\nI just went through David's paper of LDA. And I have some questions about its application. Do we depend on the param theta of each document to tell its topic? Besides telling topic, what is the other scene of applying LDA?\n\nThanks","preferred_answer":"I found the [Griffiths & Styevers](http://www.pnas.org/content/101/suppl_1/5228.full.pdf) paper easier to follow than Blei, Ng, Jordan's. Give it a read.","top_comment":"I found the [Griffiths & Styevers](http://www.pnas.org/content/101/suppl_1/5228.full.pdf) paper easier to follow than Blei, Ng, Jordan's. Give it a read.","metadata":{"post_id":"3xc9sp","post_score":0,"answer_comment_id":"cy3ft84","answer_score":1,"answerer_anon_id":"anon_68a37e4a4ccf6c0f","top_comment_id":"cy3ft84","top_comment_score":1,"top_comment_anon_id":"anon_68a37e4a4ccf6c0f","top_equals_preferred":true,"thanks_reply_id":"cy8ixzl","thanks_reply_score":1,"thanks_reply_text":"Thanks, I just turned back to this paper, and found it easier to understand, except for the part of Gibbs sampling. Will dig more in MCMC.\n\nRegards,\nSonny","thanks_reply_timestamp":"2015-12-23T02:41:22+00:00"}} -{"user_id":"anon_750aeebdc659bd08","timestamp":"2015-12-27T02:09:59+00:00","subreddit":"LanguageTechnology","query":"How did the FB \"trending\" logic get this summary so wrong?\n\nCan anyone offer some insight into why the FB Trending summary for this story came back with a declarative statement that isn't back up by the source articles?\n\nHere's what the FB \"trending\" summary shows:\nhttp://imgur.com/fH97s4f\n>U.S. Marine Corps: Military Branch Considering Changes to Uniform Regulations, Reports Say \n\n>A survey of Marines showed **a majority would rather wear** service uniforms instead of camouflage. Other suggestions include giving regional commanders the authority to decide on Marines' uniforms.\n\nThe first 10 articles I saw under it were either direct shares of this link, or some repost of this source:\nhttp://www.marinecorpstimes.com/story/military/2015/12/26/marine-corps-uniform-changes-expected-year/77384084/\nand that author wrote this:\n\n> Switching to “bravos” or “charlies” as the uniform of the day and doing away with desert camouflage utility uniforms **are two proposals currently on the table, based in part on a survey** of Marines conducted over the summer by the Marine Corps Uniform Board.\n\n>Marine Corps officials **declined to comment on the results**, ...\n\nSo how did FB's NLP go from that article to a declarative statement that isn't supported with the actual article?","preferred_answer":"Harder to program, [yes and no](http://larseidnes.com/2015/10/13/auto-generating-clickbait-with-recurrent-neural-networks/).","top_comment":"Let's not rule out that this isn't a summary algorithm, but a \"get the user to click this link with interesting text\" algorithm that isn't trying to truthfully summarize anything.","metadata":{"post_id":"3ycou5","post_score":5,"answer_comment_id":"cycvhp0","answer_score":3,"answerer_anon_id":"anon_145d19078cf8e613","top_comment_id":"cycirrz","top_comment_score":8,"top_comment_anon_id":"anon_5888a270451b34da","top_equals_preferred":false,"thanks_reply_id":"cycw326","thanks_reply_score":2,"thanks_reply_text":"wow, sweet link. Thanks.","thanks_reply_timestamp":"2015-12-27T18:09:18+00:00"}} -{"user_id":"anon_cd1c83a3aa733507","timestamp":"2016-01-22T20:32:56+00:00","subreddit":"LanguageTechnology","query":"Generate FAQ from a list of questions? [xpost from r/learnprogramming]\n\nI posted [this question](https://www.reddit.com/r/learnprogramming/comments/424bvv/generate_faq_from_a_list_of_questions/) in r/learnprogramming yesterday, but based on the tepid response there, I'm guessing it's really not the right place to ask.\n\nSince yesterday, I tried to implement the word-based matching that I described in the post, and the results were less than inspiring. For ease of interpreting the quality of my results, I truncated the comparison after the first iteration. \n\nThis was the [first question post](https://www.reddit.com/r/Disney_Infinity/comments/2h20rh/thinking_of_buying_in_for_the_first_time_may_i/), and its best match was with [this post](https://www.reddit.com/r/Disney_Infinity/comments/3x2uz8/curious_about_characters/), at 17.8% similarity. As you can see, though, the questions aren't very similar at all. The next best match was [this one](https://www.reddit.com/r/Disney_Infinity/comments/3wkz9r/some_disney_infinity_questions/) at 17.5%, and it shows the fundamental problem with my approach (the content of the questions wasn't very similar, but the way they presented their questions was very similar, both starting with a \"Hi all/everyone!\", with a \"But I hear/But I feel\" near the end, and closing with a \"Thanks\" of some kind).\n\nSo I definitely am going to require more sophistication if I want to extract useful results in this way. I've read some previous discussion on this sub, and I've seen the suggestions of using the spaCy module and/or NLTK to categorize the subjects/verbs/objects in a sample of text. \n\nUnfortunately, I'm absolutely new to NLP, so I'm not sure where I would proceed from there. I figure if I could identify a list of subjects mentioned in each post, then when I find two posts which have similar subjects, I would compare them further to see if they have similar verbs/objects. \n\nBut this is all still pretty hand-wavy, and I don't have a good implementation worked out either in my mind or on the page yet. Can anyone direct me to a good resource for exploring more on this topic?","preferred_answer":"You should check out the gensim topic modelling package. It has great tutorials to get you started. I'm in mobile now, but I've done a bit of work in the same general domain, so id be happy to try to answer some questions. The developer of that package is also very active on the email list for that package, so that's also a good resource.","top_comment":"Are you saying you did something like [what is done with the 20 newsgroup corpus in scikit-learn here](http://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html)? If you scroll down, it talks about a bag-of-words model, which is what it sounds like you have implemented from scratch. I would say making the numbers into term frequency is your next step, and I would highly suggest using scikit-learn for easy implementation.","metadata":{"post_id":"427f97","post_score":3,"answer_comment_id":"cz9lluu","answer_score":2,"answerer_anon_id":"anon_f55c8bd6c6cd7e8b","top_comment_id":"cz88xsc","top_comment_score":3,"top_comment_anon_id":"anon_61dd78c473c8628e","top_equals_preferred":false,"thanks_reply_id":"cz9qctp","thanks_reply_score":1,"thanks_reply_text":"Thanks for the tip! I got the gensim module installed (not without some ordeal, since I didn't have numpy and scipy...which each also presented their own install issues). \n\nI'll be taking a look at this again in the coming days and seeing what I can come up with.","thanks_reply_timestamp":"2016-01-24T05:09:01+00:00"}} -{"user_id":"anon_cddf34ed0b5f7b83","timestamp":"2016-01-29T17:44:13+00:00","subreddit":"LanguageTechnology","query":"Why is add one smoothing used for text classification? Why not just eliminate unknown words from the bag of words?\n\nI'm watching the Jurafsky-Manning videos on NLP, currently on the text classification section. They talk about using add one smoothing to deal with words that do not appear in the training sets and gives the following logic:\n\n>A word that does not appear in training has a prior probability of zero for that class, and since MLE is calculated as a product of probabilities, any zero among the multiplied terms results in a zero estimate of likelihood for the class.\n\nBut it seems to me that this problem would simply go away if just didn't include unknown words in the MLE calculation, and given how much MLE skews the probabilities of known words that this would give a more accurate estimate.\n\nWhat am I missing here?","preferred_answer":"Here's something that comes to mind for me. Say that your classification problem is sorting \"ham\" email from \"spam\" email. Consider the document \"the meeting tomorrow has been cancelled.\"\n\nLet's say that you saw each word from this document in both classes in the training data, except for \"meeting,\" which only occurred in the \"ham\" training set.\n\nIf you skip unknown words instead of smoothing them, as you suggest, then you're multiplying 5 estimated probabilities together to estimate the probability of the class \"spam\" and 6 probabilities together to estimate the probability of \"ham.\" This would be very bad, since your probability estimates for each class are not really comparable anymore. Smoothing gets around this problem.\n\nI'm sure there are plenty of other good theoretical reasons too, but this is what sprang into my mind when I read this. I hope it helps!","top_comment":"You are trying to classify text into two categories: medical and legal. Let's say the word \"biconvex\" appears once in the medical corpus and zero times in the legal corpus. This word is obviously rare in general English, but does carry a little weight in favor of medical. However, without Laplace smoothing, it would be an overpowering vote in favor of the medical category.\n\nIf you had corpi of infinite size, every word, albeit rarely in many cases, would eventually show up, and thus have a small but defined probability. With finite corpi, we must protect ourselves to better handle rare tokens.","metadata":{"post_id":"439vrg","post_score":9,"answer_comment_id":"czgvfqe","answer_score":2,"answerer_anon_id":"anon_ae60fa643aebc888","top_comment_id":"czgurfe","top_comment_score":5,"top_comment_anon_id":"anon_c8bc701f605a1cab","top_equals_preferred":false,"thanks_reply_id":"czhgtyj","thanks_reply_score":1,"thanks_reply_text":"Ah that makes sense, thanks!","thanks_reply_timestamp":"2016-01-30T11:29:01+00:00"}} -{"user_id":"anon_cddf34ed0b5f7b83","timestamp":"2016-01-29T17:44:13+00:00","subreddit":"LanguageTechnology","query":"Why is add one smoothing used for text classification? Why not just eliminate unknown words from the bag of words?\n\nI'm watching the Jurafsky-Manning videos on NLP, currently on the text classification section. They talk about using add one smoothing to deal with words that do not appear in the training sets and gives the following logic:\n\n>A word that does not appear in training has a prior probability of zero for that class, and since MLE is calculated as a product of probabilities, any zero among the multiplied terms results in a zero estimate of likelihood for the class.\n\nBut it seems to me that this problem would simply go away if just didn't include unknown words in the MLE calculation, and given how much MLE skews the probabilities of known words that this would give a more accurate estimate.\n\nWhat am I missing here?","preferred_answer":"In the sense that it gives you the same outcome. p(a) * p(b) * p(c) = p(a) * p(b) if p(c) = 1","top_comment":"You are trying to classify text into two categories: medical and legal. Let's say the word \"biconvex\" appears once in the medical corpus and zero times in the legal corpus. This word is obviously rare in general English, but does carry a little weight in favor of medical. However, without Laplace smoothing, it would be an overpowering vote in favor of the medical category.\n\nIf you had corpi of infinite size, every word, albeit rarely in many cases, would eventually show up, and thus have a small but defined probability. With finite corpi, we must protect ourselves to better handle rare tokens.","metadata":{"post_id":"439vrg","post_score":9,"answer_comment_id":"czhhlmp","answer_score":3,"answerer_anon_id":"anon_849c3c3a92780330","top_comment_id":"czgurfe","top_comment_score":5,"top_comment_anon_id":"anon_c8bc701f605a1cab","top_equals_preferred":false,"thanks_reply_id":"cziphrh","thanks_reply_score":2,"thanks_reply_text":"Ahhh, I see, that makes sense! Thanks!\n\nNow I'm feeling a bit dense haha","thanks_reply_timestamp":"2016-01-31T17:13:47+00:00"}} -{"user_id":"anon_1238a10e0569a83f","timestamp":"2016-02-02T18:27:46+00:00","subreddit":"LanguageTechnology","query":"What are some good Information Retrieval libraries?\n\nI am trying to test my search engine algorithm. I want to find out some good information retrieval libraries to implement the algorithms. Preferably, Python or C++. I tried Lucene and MeTa, but they were a bit inflexible to work with their functions.","preferred_answer":"If you're not too attached to Python or C++, [Terrier](http://terrier.org/) has a good reputation.","top_comment":"If you're not too attached to Python or C++, [Terrier](http://terrier.org/) has a good reputation.","metadata":{"post_id":"43vixk","post_score":6,"answer_comment_id":"czlngiw","answer_score":2,"answerer_anon_id":"anon_e09f0f9e0c418b93","top_comment_id":"czlngiw","top_comment_score":2,"top_comment_anon_id":"anon_e09f0f9e0c418b93","top_equals_preferred":true,"thanks_reply_id":"cznuf6b","thanks_reply_score":1,"thanks_reply_text":"Thanks. I will check it out.","thanks_reply_timestamp":"2016-02-04T18:51:59+00:00"}} -{"user_id":"anon_1238a10e0569a83f","timestamp":"2016-02-02T18:27:46+00:00","subreddit":"LanguageTechnology","query":"What are some good Information Retrieval libraries?\n\nI am trying to test my search engine algorithm. I want to find out some good information retrieval libraries to implement the algorithms. Preferably, Python or C++. I tried Lucene and MeTa, but they were a bit inflexible to work with their functions.","preferred_answer":"In Python your main options are [Whoosh](https://bitbucket.org/mchaput/whoosh/overview) and [Caterpillar](https://github.com/Kapiche/caterpillar).","top_comment":"If you're not too attached to Python or C++, [Terrier](http://terrier.org/) has a good reputation.","metadata":{"post_id":"43vixk","post_score":6,"answer_comment_id":"czltgsi","answer_score":2,"answerer_anon_id":"anon_b7de706aacf25ac4","top_comment_id":"czlngiw","top_comment_score":2,"top_comment_anon_id":"anon_e09f0f9e0c418b93","top_equals_preferred":false,"thanks_reply_id":"cznufhp","thanks_reply_score":1,"thanks_reply_text":"Thanks.","thanks_reply_timestamp":"2016-02-04T18:52:11+00:00"}} -{"user_id":"anon_1238a10e0569a83f","timestamp":"2016-02-02T18:27:46+00:00","subreddit":"LanguageTechnology","query":"What are some good Information Retrieval libraries?\n\nI am trying to test my search engine algorithm. I want to find out some good information retrieval libraries to implement the algorithms. Preferably, Python or C++. I tried Lucene and MeTa, but they were a bit inflexible to work with their functions.","preferred_answer":"one such best Libraries are Open Ephyra which is a Carnegie Mellon and Stanford NLP Centre , Collaborated Project .\nhttps://mu.lti.cs.cmu.edu/trac/Ephyra/wiki/OpenEphyra\n\nhttp://www.ephyra.info/\n\nhttps://github.com/TScottJ/OpenEphyra","top_comment":"If you're not too attached to Python or C++, [Terrier](http://terrier.org/) has a good reputation.","metadata":{"post_id":"43vixk","post_score":6,"answer_comment_id":"cznsta7","answer_score":2,"answerer_anon_id":"anon_36517a072021051a","top_comment_id":"czlngiw","top_comment_score":2,"top_comment_anon_id":"anon_e09f0f9e0c418b93","top_equals_preferred":false,"thanks_reply_id":"cznufvz","thanks_reply_score":1,"thanks_reply_text":"Thank you for recommending.","thanks_reply_timestamp":"2016-02-04T18:52:25+00:00"}} -{"user_id":"anon_8a80e190e420396d","timestamp":"2016-02-08T14:01:37+00:00","subreddit":"LanguageTechnology","query":"Is there a large and open English word corpus?\n\nHey everyone in this subreddit, Does anyone know where can i find a large (say about 500Mbytes or bigger, I.E similar to BNC in size) English word corpus? That is either fairly cheap or free too download?","preferred_answer":"[Billion word corpus?](http://www.statmt.org/lm-benchmark/)","top_comment":"[Billion word corpus?](http://www.statmt.org/lm-benchmark/)","metadata":{"post_id":"44r0h2","post_score":7,"answer_comment_id":"czs6y5n","answer_score":4,"answerer_anon_id":"anon_f038f2ea7b8ea7c0","top_comment_id":"czs6y5n","top_comment_score":4,"top_comment_anon_id":"anon_f038f2ea7b8ea7c0","top_equals_preferred":true,"thanks_reply_id":"czsbacv","thanks_reply_score":1,"thanks_reply_text":"Thanks, I think this is just what im looking for.","thanks_reply_timestamp":"2016-02-08T16:20:21+00:00"}} -{"user_id":"anon_8a80e190e420396d","timestamp":"2016-02-08T14:01:37+00:00","subreddit":"LanguageTechnology","query":"Is there a large and open English word corpus?\n\nHey everyone in this subreddit, Does anyone know where can i find a large (say about 500Mbytes or bigger, I.E similar to BNC in size) English word corpus? That is either fairly cheap or free too download?","preferred_answer":"It's certainly a specific genre, but so is newswire, which can be issues. But it is free. There's also common crawl https://commoncrawl.org/","top_comment":"[Billion word corpus?](http://www.statmt.org/lm-benchmark/)","metadata":{"post_id":"44r0h2","post_score":7,"answer_comment_id":"czsc37j","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"czs6y5n","top_comment_score":4,"top_comment_anon_id":"anon_f038f2ea7b8ea7c0","top_equals_preferred":false,"thanks_reply_id":"czslfgn","thanks_reply_score":1,"thanks_reply_text":"Thanks for the good advice!\nI'll look into common crawl!","thanks_reply_timestamp":"2016-02-08T20:19:11+00:00"}} -{"user_id":"anon_07947cb842792b57","timestamp":"2016-02-11T22:00:59+00:00","subreddit":"LanguageTechnology","query":"Need help: generating new text from dead people's words\n\nHi,\n\nMy name is James, Interaction Design Grad student at the School of Visual Arts. I have been using Nupic to design an algorithm that allows me to merge and generate new text from artists, authors, comedians and more. Nupic mimics the neocortex of the human brain– it has been really awesome to work with so far! So far, I have made some interesting combinations. For example, I mixed 2 Chainz and the Beatles... 2 Beatles!\n\nI am currently crowdsourcing any combinations (people and collaboration name) for this project. If I end up going with your idea, I will list you as a contributor and you will get a print that consists of:\n\n-text generated from a theory of the neocortex and your collaboration idea\n\n-art (this is still in the works, but it will represent the collaboration)\n\nThank you.","preferred_answer":"It's not clear to me what you are asking us. Are you just looking for interesting combinations? You could try your hand at [King James Programming](http://kingjamesprogramming.tumblr.com/), that's a fun one.","top_comment":"I'm confused... are you using machine learning to generate the names of fictional combinations of people? Or something else?","metadata":{"post_id":"45bccd","post_score":4,"answer_comment_id":"czwmk1s","answer_score":1,"answerer_anon_id":"anon_816c471f4248d954","top_comment_id":"czwm3xr","top_comment_score":2,"top_comment_anon_id":"anon_ae60fa643aebc888","top_equals_preferred":false,"thanks_reply_id":"czwp3ru","thanks_reply_score":1,"thanks_reply_text":"thank you for sharing. this looks awesome. I'm just looking for combination ideas.\n","thanks_reply_timestamp":"2016-02-12T00:20:35+00:00"}} -{"user_id":"anon_9ed0f7addd0e6974","timestamp":"2016-02-14T02:34:57+00:00","subreddit":"LanguageTechnology","query":"Hi - do you know of POS library for Android?\n\nI have an app for iPhone that uses the NSLinguisticTagger to do part-of-speech tagging of sentences. I'm now trying to port it over to Android.\n\nHas anyone here worked with an Android POS tagger (and I don't mean querying a server over HTTP but rather running it locally on an Android device).\n\nThank you!","preferred_answer":"Have not tried on Android, but the Stanford POS tagger is in Java and should probably work? http://nlp.stanford.edu/software/tagger.html","top_comment":"Have not tried on Android, but the Stanford POS tagger is in Java and should probably work? http://nlp.stanford.edu/software/tagger.html","metadata":{"post_id":"45o4nv","post_score":3,"answer_comment_id":"czztogw","answer_score":2,"answerer_anon_id":"anon_cd6cf68da8dd8d6a","top_comment_id":"czztogw","top_comment_score":2,"top_comment_anon_id":"anon_cd6cf68da8dd8d6a","top_equals_preferred":true,"thanks_reply_id":"d007wvx","thanks_reply_score":1,"thanks_reply_text":"Thanks - the problem with this one is that it uses at least 200MB of memory. My Android app hits OOM if it hits 100MB and it's already pretty close to that. I feel like the effort for me to make the Stanford POS work on Android and to make fixes so that it fits within say 10MB might be too much.","thanks_reply_timestamp":"2016-02-15T02:30:13+00:00"}} -{"user_id":"anon_9ed0f7addd0e6974","timestamp":"2016-02-14T02:34:57+00:00","subreddit":"LanguageTechnology","query":"Hi - do you know of POS library for Android?\n\nI have an app for iPhone that uses the NSLinguisticTagger to do part-of-speech tagging of sentences. I'm now trying to port it over to Android.\n\nHas anyone here worked with an Android POS tagger (and I don't mean querying a server over HTTP but rather running it locally on an Android device).\n\nThank you!","preferred_answer":"Or you can write your own. A POS tagger based on a MEMM model takes less than 100 lines of code, training aside.","top_comment":"Have not tried on Android, but the Stanford POS tagger is in Java and should probably work? http://nlp.stanford.edu/software/tagger.html","metadata":{"post_id":"45o4nv","post_score":3,"answer_comment_id":"d0036ac","answer_score":2,"answerer_anon_id":"anon_a949a616d01e6fe6","top_comment_id":"czztogw","top_comment_score":2,"top_comment_anon_id":"anon_cd6cf68da8dd8d6a","top_equals_preferred":false,"thanks_reply_id":"d0080qr","thanks_reply_score":1,"thanks_reply_text":"Thanks - I was under the impression that MEMM was a little outdated compared to the top-of-the-line POS algorithms currently out there. But you're right, it might be easier to just code it myself.","thanks_reply_timestamp":"2016-02-15T02:33:15+00:00"}} -{"user_id":"anon_bc20fd243869b676","timestamp":"2016-02-21T12:54:26+00:00","subreddit":"LanguageTechnology","query":"What is the current state-of-the-art within aspect-based sentiment analysis?\n\nI've been reading Bing Liu's book on Sentiment Analysis. He mentions all of these slightly different approaches seen in research since 2004, but doesn't talk much about efficacy at all.\n\nThat leaves me - someone who has not done any sentiment analysis before - wondering what approaches are seeing the best results currently. And it specifically needs to be an approach that can extract the sentiments of individual topics found in the text, not just if a document/sentence is positive or negative.\n\nIn case it makes a huge difference: the object of analysis will be reddit comments, not tweets or reviews which seem to be the most common source of data.","preferred_answer":"This is a good place to start for more recent research threads: http://nlp.stanford.edu/sentiment/","top_comment":"Look into conditional random fields and Saif's work at NRC Canada","metadata":{"post_id":"46v5aw","post_score":8,"answer_comment_id":"d0884lz","answer_score":1,"answerer_anon_id":"anon_eefe0617080c002d","top_comment_id":"d088eda","top_comment_score":2,"top_comment_anon_id":"anon_d0e9a3cc526690dc","top_equals_preferred":false,"thanks_reply_id":"d08dk7p","thanks_reply_score":1,"thanks_reply_text":"Thanks, that looks interesting, although as far as I can see the granularity is not fine enough as they seem focused on sentence level at the lowest. Well, I guess it can be quite useful still if the sentence has a single topic, but otherwise it might not be accurate enough. ","thanks_reply_timestamp":"2016-02-21T19:22:14+00:00"}} -{"user_id":"anon_bc20fd243869b676","timestamp":"2016-02-21T12:54:26+00:00","subreddit":"LanguageTechnology","query":"What is the current state-of-the-art within aspect-based sentiment analysis?\n\nI've been reading Bing Liu's book on Sentiment Analysis. He mentions all of these slightly different approaches seen in research since 2004, but doesn't talk much about efficacy at all.\n\nThat leaves me - someone who has not done any sentiment analysis before - wondering what approaches are seeing the best results currently. And it specifically needs to be an approach that can extract the sentiments of individual topics found in the text, not just if a document/sentence is positive or negative.\n\nIn case it makes a huge difference: the object of analysis will be reddit comments, not tweets or reviews which seem to be the most common source of data.","preferred_answer":"Look into conditional random fields and Saif's work at NRC Canada","top_comment":"Look into conditional random fields and Saif's work at NRC Canada","metadata":{"post_id":"46v5aw","post_score":8,"answer_comment_id":"d088eda","answer_score":2,"answerer_anon_id":"anon_d0e9a3cc526690dc","top_comment_id":"d088eda","top_comment_score":2,"top_comment_anon_id":"anon_d0e9a3cc526690dc","top_equals_preferred":true,"thanks_reply_id":"d08dmyt","thanks_reply_score":1,"thanks_reply_text":"I Googled him and it looks interesting. Thanks a lot.","thanks_reply_timestamp":"2016-02-21T19:24:20+00:00"}} -{"user_id":"anon_f155ffc11d27fc73","timestamp":"2016-02-11T03:46:44+00:00","subreddit":"LanguageTechnology","query":"Where can I find plain text of novels?\n\nI'm looking for plain text versions of novels by specific authors -- e.g., Pynchon, DFW. Is there any source for stuff like this? Even if I had to pay.","preferred_answer":"[Calibre](http://manual.calibre-ebook.com/faq.html#what-formats-does-app-support-conversion-to-from) can convert from a large number of ebook formats to text.","top_comment":"[Project Gutenberg](https://www.gutenberg.org/) has a large collection. Anything else I can think of violates copyright laws.\n\nEdit: link","metadata":{"post_id":"456w1m","post_score":3,"answer_comment_id":"czw574m","answer_score":6,"answerer_anon_id":"anon_d73aaa550bdb8095","top_comment_id":"czvomnw","top_comment_score":8,"top_comment_anon_id":"anon_2d07d862e9158e59","top_equals_preferred":false,"thanks_reply_id":"d08yxoe","thanks_reply_score":1,"thanks_reply_text":"This is great! Thank you!","thanks_reply_timestamp":"2016-02-22T05:08:58+00:00"}} -{"user_id":"anon_2062648a745135fb","timestamp":"2016-02-22T13:20:17+00:00","subreddit":"LanguageTechnology","query":"I want to build a spam classifier. But where do I start?\n\nI have a decent grasp of `python` and have been dabbling with it since the last 5 months. \n\nI was messing around with the videos uploaded by `/u/sentdex` on `nlp`. and I found them really interesting. \n\nRight now I have tried implementing the following using `nltk`\n\n- stopwords\n- pos_tagging\n- chunking and chinking\n- named entity recognition \n- stemming\n- synsets\n\net el \n\nI searched a bit but couldn't find anything much useful on how to get started with building the spam classifier. \n\nAny inputs would be highly appreciated.","preferred_answer":"For spam detection you would typically create a classifier using machine learning (say, using a Bayesian model).\n\nBayesian mathematics is easy enough to understand (I'm no math wiz myself) and I find that it serves as a good introduction to classifiers in machine learning, which is also why it tends to be used to introduce the concept in textbooks, but in principle it doesn't matter much which type of classifier (e.g. SVM) you use unless you're developing it yourself.\n\nBasically what you do is you collect a lot of spam messages and a lot of non-spam messages - this is your dataset. Then you preprocess them as you would, removing stopwords etc. and perhaps doing TF-IDF of both categories of message to get the most meaningful words.\n\nThen you either train your own classifier or train one from a library such as Scikit-Learn using these messages. The way it is typically done is by a bag-of-words approach where the list of features representing each message are ones and zeros indicating existence in the message for each those words you found using TF-IDF.\n\nFor example this array \n\n> [0, 1, 0, 0, 0, 1, 0, 1]\n\nmight be what one of the spam messages look like, where the first \"0\" might be the existence of the word \"birthday\" and the \"1\" in second place might be whether or not the message contains the word \"penis\", etc. - imagine a 20K long array of this kind of binary data.\n\nSo for each array of ones and zeros you have a label of \"spam\" or \"not-spam\" also provided to the classifier during training. Then your classifier learns how to distinguish spam messages based on this dataset (the more training messages the better, typically) and it can establish whether an unknown message, also converted in the same way, is a spam message.\n\nBut anyway, **grab a texbook on machine learning**. Spam detection ought to be one of the earliest examples in the book.","top_comment":"For spam detection you would typically create a classifier using machine learning (say, using a Bayesian model).\n\nBayesian mathematics is easy enough to understand (I'm no math wiz myself) and I find that it serves as a good introduction to classifiers in machine learning, which is also why it tends to be used to introduce the concept in textbooks, but in principle it doesn't matter much which type of classifier (e.g. SVM) you use unless you're developing it yourself.\n\nBasically what you do is you collect a lot of spam messages and a lot of non-spam messages - this is your dataset. Then you preprocess them as you would, removing stopwords etc. and perhaps doing TF-IDF of both categories of message to get the most meaningful words.\n\nThen you either train your own classifier or train one from a library such as Scikit-Learn using these messages. The way it is typically done is by a bag-of-words approach where the list of features representing each message are ones and zeros indicating existence in the message for each those words you found using TF-IDF.\n\nFor example this array \n\n> [0, 1, 0, 0, 0, 1, 0, 1]\n\nmight be what one of the spam messages look like, where the first \"0\" might be the existence of the word \"birthday\" and the \"1\" in second place might be whether or not the message contains the word \"penis\", etc. - imagine a 20K long array of this kind of binary data.\n\nSo for each array of ones and zeros you have a label of \"spam\" or \"not-spam\" also provided to the classifier during training. Then your classifier learns how to distinguish spam messages based on this dataset (the more training messages the better, typically) and it can establish whether an unknown message, also converted in the same way, is a spam message.\n\nBut anyway, **grab a texbook on machine learning**. Spam detection ought to be one of the earliest examples in the book.","metadata":{"post_id":"470s97","post_score":4,"answer_comment_id":"d09at24","answer_score":4,"answerer_anon_id":"anon_bc20fd243869b676","top_comment_id":"d09at24","top_comment_score":4,"top_comment_anon_id":"anon_bc20fd243869b676","top_equals_preferred":true,"thanks_reply_id":"d09bvwo","thanks_reply_score":1,"thanks_reply_text":"Thanks for the detailed intro. I think I learn best when I apply it to something, so would the text by norvig be too theory heavy for me?","thanks_reply_timestamp":"2016-02-22T15:25:19+00:00"}} -{"user_id":"anon_2062648a745135fb","timestamp":"2016-02-22T13:20:17+00:00","subreddit":"LanguageTechnology","query":"I want to build a spam classifier. But where do I start?\n\nI have a decent grasp of `python` and have been dabbling with it since the last 5 months. \n\nI was messing around with the videos uploaded by `/u/sentdex` on `nlp`. and I found them really interesting. \n\nRight now I have tried implementing the following using `nltk`\n\n- stopwords\n- pos_tagging\n- chunking and chinking\n- named entity recognition \n- stemming\n- synsets\n\net el \n\nI searched a bit but couldn't find anything much useful on how to get started with building the spam classifier. \n\nAny inputs would be highly appreciated.","preferred_answer":"I'm not sure, I haven't used it myself. You could try? See if it's at the right level. My advice would be to take a look at some textbooks or tutorials and simply do a keyword search for \"spam\" since that is what you want to do and spam detection is one the most common ways to introduce people to machine learning. Maybe it would be helpful if you looked specifically for Python stuff.","top_comment":"For spam detection you would typically create a classifier using machine learning (say, using a Bayesian model).\n\nBayesian mathematics is easy enough to understand (I'm no math wiz myself) and I find that it serves as a good introduction to classifiers in machine learning, which is also why it tends to be used to introduce the concept in textbooks, but in principle it doesn't matter much which type of classifier (e.g. SVM) you use unless you're developing it yourself.\n\nBasically what you do is you collect a lot of spam messages and a lot of non-spam messages - this is your dataset. Then you preprocess them as you would, removing stopwords etc. and perhaps doing TF-IDF of both categories of message to get the most meaningful words.\n\nThen you either train your own classifier or train one from a library such as Scikit-Learn using these messages. The way it is typically done is by a bag-of-words approach where the list of features representing each message are ones and zeros indicating existence in the message for each those words you found using TF-IDF.\n\nFor example this array \n\n> [0, 1, 0, 0, 0, 1, 0, 1]\n\nmight be what one of the spam messages look like, where the first \"0\" might be the existence of the word \"birthday\" and the \"1\" in second place might be whether or not the message contains the word \"penis\", etc. - imagine a 20K long array of this kind of binary data.\n\nSo for each array of ones and zeros you have a label of \"spam\" or \"not-spam\" also provided to the classifier during training. Then your classifier learns how to distinguish spam messages based on this dataset (the more training messages the better, typically) and it can establish whether an unknown message, also converted in the same way, is a spam message.\n\nBut anyway, **grab a texbook on machine learning**. Spam detection ought to be one of the earliest examples in the book.","metadata":{"post_id":"470s97","post_score":4,"answer_comment_id":"d09ht3o","answer_score":1,"answerer_anon_id":"anon_bc20fd243869b676","top_comment_id":"d09at24","top_comment_score":4,"top_comment_anon_id":"anon_bc20fd243869b676","top_equals_preferred":false,"thanks_reply_id":"d09iwkl","thanks_reply_score":1,"thanks_reply_text":"Thanks for your advice :)\n\nOn it!","thanks_reply_timestamp":"2016-02-22T18:15:53+00:00"}} -{"user_id":"anon_2062648a745135fb","timestamp":"2016-02-22T13:20:17+00:00","subreddit":"LanguageTechnology","query":"I want to build a spam classifier. But where do I start?\n\nI have a decent grasp of `python` and have been dabbling with it since the last 5 months. \n\nI was messing around with the videos uploaded by `/u/sentdex` on `nlp`. and I found them really interesting. \n\nRight now I have tried implementing the following using `nltk`\n\n- stopwords\n- pos_tagging\n- chunking and chinking\n- named entity recognition \n- stemming\n- synsets\n\net el \n\nI searched a bit but couldn't find anything much useful on how to get started with building the spam classifier. \n\nAny inputs would be highly appreciated.","preferred_answer":"Currently a CS Undergrad senior taking Machine Learning right now. Check out using a decision tree to classify spam from non-spam emails. Basically as /u/SimonGray said, you have some large set of data (typically a few thousand to tens of thousands of emails) each of which has been hand-marked as not spam (0) and spam (1). You would create a training set, which is typically 3/4 to 9/10 of the original data set, and a test set. You would build the decision tree using an algorithm that splits the training set along features of the data set, until a certain cut off point, either the tree depth or below a certain uncertainty threshold. In order to determine the feature and threshold to split along, you would attempt to maximize the uncertainty reduction per split. Once you reach a leaf node, you take the mode of the data points, and assign the leaf node a label (either 0 or 1). Now that you have your decision tree, you would feed the test data points into it and calculate the error rate of the classifier. That is, for each data point in test, you would traverse the decision tree until you reach a leaf. At the leaf, you would take the label of the leaf and compare it to the real label of the data point. If they are different, you increment the error by one. After checking all the test vectors, you would divide the number of errors by the number of test points, which should give you a number between 0 and 1. That's your test error rate, you'll want that to be very low.\n\nObviously, I glossed over some of the more math-heavy aspects of this tree, so be sure to pick up a good ML textbook that you understand. My course has three textbooks, one that is insanely dense and two that are pretty straight-forward.\n\nHere's a link to one of the texts we use in the course, it's still a draft, but it isn't as math dense as the other books I've read: http://ciml.info/","top_comment":"For spam detection you would typically create a classifier using machine learning (say, using a Bayesian model).\n\nBayesian mathematics is easy enough to understand (I'm no math wiz myself) and I find that it serves as a good introduction to classifiers in machine learning, which is also why it tends to be used to introduce the concept in textbooks, but in principle it doesn't matter much which type of classifier (e.g. SVM) you use unless you're developing it yourself.\n\nBasically what you do is you collect a lot of spam messages and a lot of non-spam messages - this is your dataset. Then you preprocess them as you would, removing stopwords etc. and perhaps doing TF-IDF of both categories of message to get the most meaningful words.\n\nThen you either train your own classifier or train one from a library such as Scikit-Learn using these messages. The way it is typically done is by a bag-of-words approach where the list of features representing each message are ones and zeros indicating existence in the message for each those words you found using TF-IDF.\n\nFor example this array \n\n> [0, 1, 0, 0, 0, 1, 0, 1]\n\nmight be what one of the spam messages look like, where the first \"0\" might be the existence of the word \"birthday\" and the \"1\" in second place might be whether or not the message contains the word \"penis\", etc. - imagine a 20K long array of this kind of binary data.\n\nSo for each array of ones and zeros you have a label of \"spam\" or \"not-spam\" also provided to the classifier during training. Then your classifier learns how to distinguish spam messages based on this dataset (the more training messages the better, typically) and it can establish whether an unknown message, also converted in the same way, is a spam message.\n\nBut anyway, **grab a texbook on machine learning**. Spam detection ought to be one of the earliest examples in the book.","metadata":{"post_id":"470s97","post_score":4,"answer_comment_id":"d09cg65","answer_score":1,"answerer_anon_id":"anon_ac1ca823e1ce43af","top_comment_id":"d09at24","top_comment_score":4,"top_comment_anon_id":"anon_bc20fd243869b676","top_equals_preferred":false,"thanks_reply_id":"d0aior6","thanks_reply_score":1,"thanks_reply_text":"Thanks for the detailed explanation or decision trees. :)\n\nSomebody suggested me `Artificial Intelligence: A Modern Approach`. Would you recommend it for this project?","thanks_reply_timestamp":"2016-02-23T13:02:13+00:00"}} -{"user_id":"anon_2062648a745135fb","timestamp":"2016-02-22T13:20:17+00:00","subreddit":"LanguageTechnology","query":"I want to build a spam classifier. But where do I start?\n\nI have a decent grasp of `python` and have been dabbling with it since the last 5 months. \n\nI was messing around with the videos uploaded by `/u/sentdex` on `nlp`. and I found them really interesting. \n\nRight now I have tried implementing the following using `nltk`\n\n- stopwords\n- pos_tagging\n- chunking and chinking\n- named entity recognition \n- stemming\n- synsets\n\net el \n\nI searched a bit but couldn't find anything much useful on how to get started with building the spam classifier. \n\nAny inputs would be highly appreciated.","preferred_answer":"It boils down to how you interpret what a probability is. Under the [Frequentist interpretation](https://en.wikipedia.org/wiki/Frequentist_probability), a probability is an expected frequency, so if I say some event has a probability of .2, I'm saying that I expect the event to occur about 20 times in 100 trials. [Bayesian probability](https://en.wikipedia.org/wiki/Bayesian_probability) is a bit weirder but actually more closely resembles colloquial usage. If I say that I believe there is a 99.9999% chance the sun will rise tomorrow, I'm not asserting that I would not be surprised if 1 in every 1Million mornings the sun did not rise, or that for every one million possible words, in one of them the sun does not rise tomorrow. It's more like I'm making a statement about how I would place a bet, and how surprised I would be if I lost that bet. \n\nThis is a bit of a simplification, and I strongly recommend you investigate this more on your own. Bayesian inference is fascinating.","top_comment":"For spam detection you would typically create a classifier using machine learning (say, using a Bayesian model).\n\nBayesian mathematics is easy enough to understand (I'm no math wiz myself) and I find that it serves as a good introduction to classifiers in machine learning, which is also why it tends to be used to introduce the concept in textbooks, but in principle it doesn't matter much which type of classifier (e.g. SVM) you use unless you're developing it yourself.\n\nBasically what you do is you collect a lot of spam messages and a lot of non-spam messages - this is your dataset. Then you preprocess them as you would, removing stopwords etc. and perhaps doing TF-IDF of both categories of message to get the most meaningful words.\n\nThen you either train your own classifier or train one from a library such as Scikit-Learn using these messages. The way it is typically done is by a bag-of-words approach where the list of features representing each message are ones and zeros indicating existence in the message for each those words you found using TF-IDF.\n\nFor example this array \n\n> [0, 1, 0, 0, 0, 1, 0, 1]\n\nmight be what one of the spam messages look like, where the first \"0\" might be the existence of the word \"birthday\" and the \"1\" in second place might be whether or not the message contains the word \"penis\", etc. - imagine a 20K long array of this kind of binary data.\n\nSo for each array of ones and zeros you have a label of \"spam\" or \"not-spam\" also provided to the classifier during training. Then your classifier learns how to distinguish spam messages based on this dataset (the more training messages the better, typically) and it can establish whether an unknown message, also converted in the same way, is a spam message.\n\nBut anyway, **grab a texbook on machine learning**. Spam detection ought to be one of the earliest examples in the book.","metadata":{"post_id":"470s97","post_score":4,"answer_comment_id":"d0al6gi","answer_score":1,"answerer_anon_id":"anon_816c471f4248d954","top_comment_id":"d09at24","top_comment_score":4,"top_comment_anon_id":"anon_bc20fd243869b676","top_equals_preferred":false,"thanks_reply_id":"d0aszie","thanks_reply_score":1,"thanks_reply_text":"Sounds cool. Thanks for the explanation! :)","thanks_reply_timestamp":"2016-02-23T17:41:47+00:00"}} -{"user_id":"anon_f155ffc11d27fc73","timestamp":"2016-02-11T03:46:44+00:00","subreddit":"LanguageTechnology","query":"Where can I find plain text of novels?\n\nI'm looking for plain text versions of novels by specific authors -- e.g., Pynchon, DFW. Is there any source for stuff like this? Even if I had to pay.","preferred_answer":"[Project Gutenberg](https://www.gutenberg.org/) has a large collection. Anything else I can think of violates copyright laws.\n\nEdit: link","top_comment":"[Project Gutenberg](https://www.gutenberg.org/) has a large collection. Anything else I can think of violates copyright laws.\n\nEdit: link","metadata":{"post_id":"456w1m","post_score":3,"answer_comment_id":"czvomnw","answer_score":8,"answerer_anon_id":"anon_2d07d862e9158e59","top_comment_id":"czvomnw","top_comment_score":8,"top_comment_anon_id":"anon_2d07d862e9158e59","top_equals_preferred":true,"thanks_reply_id":"d0ctdmd","thanks_reply_score":1,"thanks_reply_text":"I should also say thank you to this! I did know about Project Gutenberg, but unfortunately they don't have the books I want. :(","thanks_reply_timestamp":"2016-02-25T02:56:54+00:00"}} -{"user_id":"anon_c0488d6cf5411b13","timestamp":"2016-03-02T16:02:00+00:00","subreddit":"LanguageTechnology","query":"How to predict punctuation?\n\nSpeech recognizers return a stream of words. I want to take those words as input and predict when/where to put proper punctuation in the sentences. Are there any research papers on this? Any ideas on what learning techniques to try?","preferred_answer":"* Huang, J., & Zweig, G. (2002). Maximum entropy model for punctuation annotation from speech. In INTERSPEECH.\n * treat it as a word tagging problem (should this word be tagged with punctuation?) and use a maximum entropy model. They seem to get fairly good results.\n* Gravano, A., Jansche, M., & Bacchiani, M. (2009, April). Restoring punctuation and capitalization in transcribed speech. In Acoustics, Speech and Signal Processing, 2009. ICASSP 2009. IEEE International Conference on (pp. 4741-4744). IEEE.\n * Just using an n-gram language model, which seems like the most straight forward approach, but I wouldn't imagine it's particularly good unless you have a massive training set. I think this is pretty much what they find.\n* Lu, W., & Ng, H. T. (2010, October). Better punctuation prediction with dynamic conditional random fields. In Proceedings of the 2010 conference on empirical methods in natural language processing (pp. 177-186). Association for Computational Linguistics.\n * They use dynamic CRF's and outperform some other similarly based approaches.\n\nI honestly don't know what state of the art is considered here. My initial thought was something like CRF's. Unsurprisingly, the most recent article I found related to doing this was a neural net based approach (Tilk, O., & Alumäe, T. (2015). LSTM for Punctuation Restoration in Speech Transcripts. In Sixteenth Annual Conference of the International Speech Communication Association.)\n\nThese are a few different ways about approaching the problem, so hopefully it helps!","top_comment":"* Huang, J., & Zweig, G. (2002). Maximum entropy model for punctuation annotation from speech. In INTERSPEECH.\n * treat it as a word tagging problem (should this word be tagged with punctuation?) and use a maximum entropy model. They seem to get fairly good results.\n* Gravano, A., Jansche, M., & Bacchiani, M. (2009, April). Restoring punctuation and capitalization in transcribed speech. In Acoustics, Speech and Signal Processing, 2009. ICASSP 2009. IEEE International Conference on (pp. 4741-4744). IEEE.\n * Just using an n-gram language model, which seems like the most straight forward approach, but I wouldn't imagine it's particularly good unless you have a massive training set. I think this is pretty much what they find.\n* Lu, W., & Ng, H. T. (2010, October). Better punctuation prediction with dynamic conditional random fields. In Proceedings of the 2010 conference on empirical methods in natural language processing (pp. 177-186). Association for Computational Linguistics.\n * They use dynamic CRF's and outperform some other similarly based approaches.\n\nI honestly don't know what state of the art is considered here. My initial thought was something like CRF's. Unsurprisingly, the most recent article I found related to doing this was a neural net based approach (Tilk, O., & Alumäe, T. (2015). LSTM for Punctuation Restoration in Speech Transcripts. In Sixteenth Annual Conference of the International Speech Communication Association.)\n\nThese are a few different ways about approaching the problem, so hopefully it helps!","metadata":{"post_id":"48mr0w","post_score":8,"answer_comment_id":"d0ldgio","answer_score":5,"answerer_anon_id":"anon_82fab1de64f6073b","top_comment_id":"d0ldgio","top_comment_score":5,"top_comment_anon_id":"anon_82fab1de64f6073b","top_equals_preferred":true,"thanks_reply_id":"d0lyue4","thanks_reply_score":1,"thanks_reply_text":"This is fantastic. Thanks! ","thanks_reply_timestamp":"2016-03-03T13:29:21+00:00"}} -{"user_id":"anon_c0488d6cf5411b13","timestamp":"2016-03-02T16:02:00+00:00","subreddit":"LanguageTechnology","query":"How to predict punctuation?\n\nSpeech recognizers return a stream of words. I want to take those words as input and predict when/where to put proper punctuation in the sentences. Are there any research papers on this? Any ideas on what learning techniques to try?","preferred_answer":"Structured prediction is for sure the way to go, tagging words based on the presence of punctuation or not. State of the art for that is neural networks, probably LSTMs but maybe some others. CRF was state of the art until about a year or so ago, and you'll find it probably more manageable and easier to train unless you've worked with neural networks before.\n\nCRFSuite is implemented in C++ but has Python bindings, that's probably a good place to start. You'll have to think hard about your tags, that's where the real magic is. There's probably a tiny bit of research on that, and proper tags are going to be what really makes the difference here. Good tags/features will make a bigger performance difference than nerual networks vs. CRFs.","top_comment":"* Huang, J., & Zweig, G. (2002). Maximum entropy model for punctuation annotation from speech. In INTERSPEECH.\n * treat it as a word tagging problem (should this word be tagged with punctuation?) and use a maximum entropy model. They seem to get fairly good results.\n* Gravano, A., Jansche, M., & Bacchiani, M. (2009, April). Restoring punctuation and capitalization in transcribed speech. In Acoustics, Speech and Signal Processing, 2009. ICASSP 2009. IEEE International Conference on (pp. 4741-4744). IEEE.\n * Just using an n-gram language model, which seems like the most straight forward approach, but I wouldn't imagine it's particularly good unless you have a massive training set. I think this is pretty much what they find.\n* Lu, W., & Ng, H. T. (2010, October). Better punctuation prediction with dynamic conditional random fields. In Proceedings of the 2010 conference on empirical methods in natural language processing (pp. 177-186). Association for Computational Linguistics.\n * They use dynamic CRF's and outperform some other similarly based approaches.\n\nI honestly don't know what state of the art is considered here. My initial thought was something like CRF's. Unsurprisingly, the most recent article I found related to doing this was a neural net based approach (Tilk, O., & Alumäe, T. (2015). LSTM for Punctuation Restoration in Speech Transcripts. In Sixteenth Annual Conference of the International Speech Communication Association.)\n\nThese are a few different ways about approaching the problem, so hopefully it helps!","metadata":{"post_id":"48mr0w","post_score":8,"answer_comment_id":"d0lgrof","answer_score":3,"answerer_anon_id":"anon_282df68017b8a03d","top_comment_id":"d0ldgio","top_comment_score":5,"top_comment_anon_id":"anon_82fab1de64f6073b","top_equals_preferred":false,"thanks_reply_id":"d0lyvzn","thanks_reply_score":1,"thanks_reply_text":"Thanks! I've been studying LSTMs to see if it's applicable. Still feels like black magic to me. ","thanks_reply_timestamp":"2016-03-03T13:31:02+00:00"}} -{"user_id":"anon_0f68e7b0c91f916b","timestamp":"2016-03-10T18:52:01+00:00","subreddit":"LanguageTechnology","query":"Best way to get at text from PDFs?\n\nHello all,\n\nI'm trying to find an open-source toolkit that easily can extract text from PDFs so I can feed it into other free tools such as NLTK. My first attempt, using PoDoFo (podofotxtextract) gives text like:\n\n (0.000,0.000) Applying an \n (0.000,0.000) externa \n (0.000,0.000) l \n (0.000,0.000) clock \n (0.000,0.000) source t \n (0.000,0.000) o \n (0.000,0.000) \n (0.000,0.000) TO \n (0.000,0.000) SC \n (0.000,0.000) 1 \n (0.000,0.000) requires \n (0.000,0.000) EXCLK in the \n (0.000,0.000) ASSR Regist \n (0.000,0.000) e \n (0.000,0.000) r \n \n(Corresponding to \"Applying an external clock source to TOSC1 requires EXCLK in the ASSR Register\"). This becomes very hard to put together since every entry has both a trailing and a leading space which hides where a word is on multiple lines and where an actual space belongs. \n\nDoes anyone have any other suggestions?","preferred_answer":"Last time I had to do that (about 1 year ago) I spent about two months trying a few different approaches. I had to extract text from a newspaper-like PDF. Many columns, few different text styles, images, etc.\n\nIn Python you can try https://github.com/euske/pdfminer if your layout is simple. Java has a similar tool too https://pdfbox.apache.org/.\n\nThere is another one in Java that's quite good but you'd have to get a license http://itextpdf.com/\n\nThe one that I used was LA-PDFText http://scfbm.biomedcentral.com/articles/10.1186/1751-0473-7-7 it is a Java layout aware PDF text extractor. You can define rules (using Drools API, from JBoss) that include space between letters, font, font size, location, parent element, etc. Took me a long time to grok how it worked and adjust the parameters, but was the one that I had the best results.\n\nBest of luck","top_comment":"Last time I had to do that (about 1 year ago) I spent about two months trying a few different approaches. I had to extract text from a newspaper-like PDF. Many columns, few different text styles, images, etc.\n\nIn Python you can try https://github.com/euske/pdfminer if your layout is simple. Java has a similar tool too https://pdfbox.apache.org/.\n\nThere is another one in Java that's quite good but you'd have to get a license http://itextpdf.com/\n\nThe one that I used was LA-PDFText http://scfbm.biomedcentral.com/articles/10.1186/1751-0473-7-7 it is a Java layout aware PDF text extractor. You can define rules (using Drools API, from JBoss) that include space between letters, font, font size, location, parent element, etc. Took me a long time to grok how it worked and adjust the parameters, but was the one that I had the best results.\n\nBest of luck","metadata":{"post_id":"49uu9m","post_score":10,"answer_comment_id":"d0v27mo","answer_score":5,"answerer_anon_id":"anon_a7155e9757d1f483","top_comment_id":"d0v27mo","top_comment_score":5,"top_comment_anon_id":"anon_a7155e9757d1f483","top_equals_preferred":true,"thanks_reply_id":"d0v3zh2","thanks_reply_score":2,"thanks_reply_text":"Thanks for the feedback. I've been trying to avoid Java since the end-goal is a QT Creator GUI (C++) with an NLTK backend (python) and I don't want to have to manage 3 programming languages in one project. \n\nUnfortunately I just tried PDFminer in python and I was able to crash the pdf2txt tool on at least one of my trial documents. It was similar with PoDoFo but they don't crash on the same documents. I'll have to keep looking for one that can handle anything I throw at it.","thanks_reply_timestamp":"2016-03-10T20:07:16+00:00"}} -{"user_id":"anon_50e54b59052f94f9","timestamp":"2016-03-05T19:09:59+00:00","subreddit":"LanguageTechnology","query":"I have a bunch of sentences of text messages I sent that I tagged. How do I create a concept cloud, where clicking on a word will link it to other words commonly associated with it?","preferred_answer":"Then I'd definitely recommend playing around with Gephi. There's so many things you can do, and it provides a nice interface to compute some interesting statistics on the graph. If you have issues installing it, it's usually something with the Java version on your computer. See e.g. [here](https://forum.gephi.org/viewtopic.php?t=3580&p=10712) for a solution (basically edit `gephi.config` with the correct path to the required JDK version).\n\n[This](https://marketplace.gephi.org/plugin/sigmajs-exporter/) is the exporter I used :) But you could also build your own sigmajs visualization.","top_comment":"I think usually you would do some sort of unsupervised clustering for linking words, unless of course your tags form some sort of word net. \n\nAnyway are you asking about what algorithms to use or how to actually program it?","metadata":{"post_id":"493pgv","post_score":2,"answer_comment_id":"d0qkyc9","answer_score":1,"answerer_anon_id":"anon_1c2a5e5639bd941f","top_comment_id":"d0owkum","top_comment_score":2,"top_comment_anon_id":"anon_dfaac54c3eb80f80","top_equals_preferred":false,"thanks_reply_id":"d0xrjmn","thanks_reply_score":1,"thanks_reply_text":"Hey, so thanks so much for this advice. In these 7 days, I've made my sigmajas visualization and have a file with all the needed stuff. \n\nBut - and this is a terribly beginner question - how do I upload that to a webpage? I used the exporter, so I obviously know I have all the files. Though I honestly know nothing about web stuff (recently started programming!)","thanks_reply_timestamp":"2016-03-13T01:50:14+00:00"}} -{"user_id":"anon_b95a26a8f026343f","timestamp":"2016-03-22T23:46:09+00:00","subreddit":"LanguageTechnology","query":"How to predict class of sentence which someone is about to say in online chats?\n\nHi all,\n\nI have datasets from ChatCoder. I want to build a system that predicts if a user is about to say something sexual in a chat.\n\nMy idea is to use one-class svm. But i have no knowledge other than that. I am very new to NLP.\n\nCan someone guide me / help me out? Or point me to the right direction (or, perhaps a few papers or books.etc.)\n\nThanks","preferred_answer":"You can try something simple like looking at the K words that precede any sexual comment.\nIf you want to use an SVM (or logistic regression), you could implement your binary classifier by using a bag of words for your input. You may not even need to look at all the words. Experiment with keeping just nouns, verbs, and adjectives (in which case you'd need to do some part-of-speech tagging beforehand).","top_comment":"You can try something simple like looking at the K words that precede any sexual comment.\nIf you want to use an SVM (or logistic regression), you could implement your binary classifier by using a bag of words for your input. You may not even need to look at all the words. Experiment with keeping just nouns, verbs, and adjectives (in which case you'd need to do some part-of-speech tagging beforehand).","metadata":{"post_id":"4bk362","post_score":6,"answer_comment_id":"d1am0qv","answer_score":2,"answerer_anon_id":"anon_b01f774993fbb276","top_comment_id":"d1am0qv","top_comment_score":2,"top_comment_anon_id":"anon_b01f774993fbb276","top_equals_preferred":true,"thanks_reply_id":"d1anq2d","thanks_reply_score":2,"thanks_reply_text":"Thanks. I'll try that out. Today i tried Tf-Idf with OneClassSVM. Got training accuracy of 85% and testing accuracy of 70%. Will derp with the features a bit more to see if the accuracy improves. Also, i think neural networks maybe more accurate. Will try this also.","thanks_reply_timestamp":"2016-03-23T16:50:28+00:00"}} -{"user_id":"anon_7dc5c8f169b509bc","timestamp":"2016-04-07T18:44:01+00:00","subreddit":"LanguageTechnology","query":"[Question] Matching dictionary phrases to corpus to form a \"word cloud\" with different weights\n\nNLP newbie here. This may be a loaded question. I'm currently using a Clojure/Java-based stack if that info helps.\n\nI have a large dictionary of keywords/phrases, many with only one word (e.g. \"cancer\") but some with multiple (e.g. \"public health\"). Some phrases are plural, many are not.\n\nWhat's they best way to get a list of all the keywords from the dictionary that are found in a given corpus, along with keyword frequencies, accounting for arbitrary pluralization?\n\nI'm open to any library/platform that will help me achieve this, although Clojure/Java would be preferred. Can OpenNLP help me here?","preferred_answer":"So the goal is to then return an ordered list of corpus' based on a set of keyword search terms?\n\nUse [Solr](http://lucene.apache.org/solr/) to index your various corpus and it's search API to retrieve sets based on your query terms. This will give you an idea of the current state of things, then if you want to go do your own implementation you will have a better understanding. \nIt even has a nice [Java API](https://cwiki.apache.org/confluence/display/solr/Using+SolrJ).","top_comment":"Usually it's better to describe the goal you're trying to achieve than to ask how to specifically implement the thing you have thought of. \n\nWhat is it you actually want to achieve as the end goal here?","metadata":{"post_id":"4dshoj","post_score":2,"answer_comment_id":"d1tyadr","answer_score":1,"answerer_anon_id":"anon_8d89946357e8f59c","top_comment_id":"d1twb9m","top_comment_score":1,"top_comment_anon_id":"anon_8d89946357e8f59c","top_equals_preferred":false,"thanks_reply_id":"d1u3k1x","thanks_reply_score":1,"thanks_reply_text":"Thanks. Although I'd like to maintain a more \"intimate\" relationship with the keywords I have, I think Solr could be handy to use in the background for calculating their weights relative to the corpuses.","thanks_reply_timestamp":"2016-04-07T21:24:55+00:00"}} -{"user_id":"anon_0e29fcfb25f91f00","timestamp":"2016-04-01T03:44:32+00:00","subreddit":"LanguageTechnology","query":"How does Mathematicalmonk on youtube post his lectures?\n\nI just want to do some lectures as well similar to how mathematicalmonk does it, but I just can't get around figuring out how to. Does anyone know something like it?","preferred_answer":"It's the same style that Khan Academy uses as well. A quick google search for that (since it's more popular), yielded this website. Maybe this helps, haven't tried it, though: http://www.labnol.org/internet/khan-academy-style-videos/19875/","top_comment":"It's the same style that Khan Academy uses as well. A quick google search for that (since it's more popular), yielded this website. Maybe this helps, haven't tried it, though: http://www.labnol.org/internet/khan-academy-style-videos/19875/","metadata":{"post_id":"4ctqzf","post_score":7,"answer_comment_id":"d1lj5bm","answer_score":5,"answerer_anon_id":"anon_e5177df5ea035512","top_comment_id":"d1lj5bm","top_comment_score":5,"top_comment_anon_id":"anon_e5177df5ea035512","top_equals_preferred":true,"thanks_reply_id":"d1zspza","thanks_reply_score":1,"thanks_reply_text":"ah thanks ! that helped a great deal :)\n\n","thanks_reply_timestamp":"2016-04-12T14:11:01+00:00"}} -{"user_id":"anon_cfffb8cca3f2659a","timestamp":"2016-04-14T09:49:15+00:00","subreddit":"LanguageTechnology","query":"LIWC or NLTK and n-grams?\n\nHey there, i have to say first that im a total newb to Natural Language Processing, so forgive me my some naive questions ;)\n\nSo for my master thesis id like to analyse some text and i found LIWC and NLTK as options. Does anybody has experiences with it and if so, what is your experience? \n\nCan i calculate n-grams with these programs? If not, do you know any programs/ codes on github (preferably python code) which can do that? \n\nI want to form a weighted word matrix with the text. Does anybody has expereinces witth that? \n\nAny advice or sharing of experiences is highly appreciated :)","preferred_answer":"First thing first, do you know what those things are? If you know how to programme and you know what those things are, you can implement it in maybe less than a 1-200 lines of code.\n\nCalculate n-gram is as easy as (just wrote it down from memory)\n\n words = text.split(' ')\n number_of_words = len(words)\n list_of_bigrams = []\n\n for i in range(number_of_words-1):\n list_of_bigrams.append( ' '.join(words[i], words[i+1]) )\n\n from collections import Counter\n calculated_bigrams = Counter(list_of_bigrams)\n\nAnd you are done. Of course you can do more advanced things, like stem all words and splitting words at spaces is too simpel for some edge cases.\n\nBut basic NLP like what you mentioned is extremely simpel code wise.\n\nNLTK comes with a book (http://www.nltk.org/book/) which is the best starting point for anybody interested in NLP as it assumes little programmatic or linguistic knowledge and will let you know most of the kind of stuff and problems you can encounter. I wouldn't use NLTK in production and I only use it in my own thesis for some of the datasets.","top_comment":"First thing first, do you know what those things are? If you know how to programme and you know what those things are, you can implement it in maybe less than a 1-200 lines of code.\n\nCalculate n-gram is as easy as (just wrote it down from memory)\n\n words = text.split(' ')\n number_of_words = len(words)\n list_of_bigrams = []\n\n for i in range(number_of_words-1):\n list_of_bigrams.append( ' '.join(words[i], words[i+1]) )\n\n from collections import Counter\n calculated_bigrams = Counter(list_of_bigrams)\n\nAnd you are done. Of course you can do more advanced things, like stem all words and splitting words at spaces is too simpel for some edge cases.\n\nBut basic NLP like what you mentioned is extremely simpel code wise.\n\nNLTK comes with a book (http://www.nltk.org/book/) which is the best starting point for anybody interested in NLP as it assumes little programmatic or linguistic knowledge and will let you know most of the kind of stuff and problems you can encounter. I wouldn't use NLTK in production and I only use it in my own thesis for some of the datasets.","metadata":{"post_id":"4eqf7j","post_score":7,"answer_comment_id":"d22erel","answer_score":6,"answerer_anon_id":"anon_dfaac54c3eb80f80","top_comment_id":"d22erel","top_comment_score":6,"top_comment_anon_id":"anon_dfaac54c3eb80f80","top_equals_preferred":true,"thanks_reply_id":"d27c71m","thanks_reply_score":1,"thanks_reply_text":"Thanks for your answer and the links;)\n\nI kinda know what these things are, but just wasnt sure what suits best for my thesis. I'm right now tending towards both approaches. LIWC allows me to examine the semantic meaning of my datasets, saving me valuable time. With n-grams etc. i can build my weighted word matrix and perform different network analyses.","thanks_reply_timestamp":"2016-04-18T09:49:42+00:00"}} -{"user_id":"anon_cfffb8cca3f2659a","timestamp":"2016-04-14T09:49:15+00:00","subreddit":"LanguageTechnology","query":"LIWC or NLTK and n-grams?\n\nHey there, i have to say first that im a total newb to Natural Language Processing, so forgive me my some naive questions ;)\n\nSo for my master thesis id like to analyse some text and i found LIWC and NLTK as options. Does anybody has experiences with it and if so, what is your experience? \n\nCan i calculate n-grams with these programs? If not, do you know any programs/ codes on github (preferably python code) which can do that? \n\nI want to form a weighted word matrix with the text. Does anybody has expereinces witth that? \n\nAny advice or sharing of experiences is highly appreciated :)","preferred_answer":"LIWC is probably not what you're looking for. LIWC analyzes texts and produces percentage outputs for different categories (e.g., social words, cognitive words, etc.). It's used in a *lot* of places, but doesn't look like it fits the bill for what you're thinking of doing.\n\nAs others have mentioned, NLTK can make it possible to do what you're talking about doing, although it requires some extra coding on your side.\n\nYou might also look into the Meaning Extraction Helper (http://meh.ryanb.cc), which does a lot of n-gram stuff, lemmatization, etc. for you out of the box. It's kind of like a free n-gram / bag of words software for the masses, particularly non-coders.\n\nEdit: Grammar.","top_comment":"First thing first, do you know what those things are? If you know how to programme and you know what those things are, you can implement it in maybe less than a 1-200 lines of code.\n\nCalculate n-gram is as easy as (just wrote it down from memory)\n\n words = text.split(' ')\n number_of_words = len(words)\n list_of_bigrams = []\n\n for i in range(number_of_words-1):\n list_of_bigrams.append( ' '.join(words[i], words[i+1]) )\n\n from collections import Counter\n calculated_bigrams = Counter(list_of_bigrams)\n\nAnd you are done. Of course you can do more advanced things, like stem all words and splitting words at spaces is too simpel for some edge cases.\n\nBut basic NLP like what you mentioned is extremely simpel code wise.\n\nNLTK comes with a book (http://www.nltk.org/book/) which is the best starting point for anybody interested in NLP as it assumes little programmatic or linguistic knowledge and will let you know most of the kind of stuff and problems you can encounter. I wouldn't use NLTK in production and I only use it in my own thesis for some of the datasets.","metadata":{"post_id":"4eqf7j","post_score":7,"answer_comment_id":"d22j1bv","answer_score":2,"answerer_anon_id":"anon_85bb1b723dc4f49f","top_comment_id":"d22erel","top_comment_score":6,"top_comment_anon_id":"anon_dfaac54c3eb80f80","top_equals_preferred":false,"thanks_reply_id":"d27c8av","thanks_reply_score":1,"thanks_reply_text":"Hey thanks for your answer. \n\nI found that LIWC is suitable for my thesis, because i want to know the semantic structure of my dataset (social, cognitive etc...). With this information i can compare to different datasets. \n\nTHanks for the link!! I will try this out!","thanks_reply_timestamp":"2016-04-18T09:52:00+00:00"}} -{"user_id":"anon_66121000bd0540d7","timestamp":"2016-04-20T15:15:43+00:00","subreddit":"LanguageTechnology","query":"News filters?\n\nAnybody using any existing services to aggregate web content (RSS, web scraping), filter it (boolean expressions), and spit out the resulting stream(s)? Zapier / IFTTT not quite doing the trick for me...","preferred_answer":"I wrote a script that dynamically generates summaries of the news and a bot that posts said summaries on a /r/unitsd8u -- let me know if this is what you're looking for.","top_comment":"RIP Yahoo Pipes. :(","metadata":{"post_id":"4fntdf","post_score":8,"answer_comment_id":"d2bt2yt","answer_score":1,"answerer_anon_id":"anon_7d49e0355d132e3d","top_comment_id":"d2bmwnn","top_comment_score":2,"top_comment_anon_id":"anon_4610c4ad8f837c4b","top_equals_preferred":false,"thanks_reply_id":"d2c827a","thanks_reply_score":1,"thanks_reply_text":"Thanks cruyff8, but I had something more like Yahoo Pipes in mind, i.e., I'd like to be able to configure sources, filters, output formats, etc.","thanks_reply_timestamp":"2016-04-21T21:10:55+00:00"}} -{"user_id":"anon_65d0535d6e2f7384","timestamp":"2016-04-21T16:35:23+00:00","subreddit":"LanguageTechnology","query":"Can Natural Language Generation be used to write a patent? (simplest way?)\n\nHi, \n\nI'm working on a pet project and could use some help of the \"point me in the right direction\" and/or \" don't bother with that\" variety.\n\nThe goal is to receive input from someone via a web form, which would be the seed of the document to be generated, and to output a patent-formatted document fitting some reasonable parameters (subject matter restrictions primarily). I need the document to be generated without human intervention/supervision. It would be like a vending machine - input a brief description of your idea and receive a pretty decent looking document. The more you write, the better the result.\n\nThe goal (initially) is not to produce an extraordinary document that would compete with one that was hand-crafted by an expert. It would also not be tuned to reducing detailed academic papers into a different format. Instead, the goal would be taking a few paragraphs and fluffing them up with content obtained from the patent database and wikipedia. \n\nI also need a practical solution. I was an electrical engineering major in college, so while I'm not scared of programming, I am a crappy programmer at best, and too out-of-date, slow, and incompetent of a programmer at worst. That means that I could modify some code if it is already very close to what I am trying to achieve (e.g., changing the corpuses or various tuning parameters), but not from scratch.\n\nI've been reading up on the subject, and there is so much information, it has been hard to determine what is possible within the state of the art, what is possible for me with my skills, and which particular tools / methods I should be focusing on.\n\nMy hope is that because the desired output document will be very structured and has limited scope, it may be easier to achieve. I hope to leverage the stiltedness and technical vocabulary of patents to smooth over the limitations of the NLG system. \n\nMethod 1: Smarten-up something simple like a markov chain. I was reading about Pointwise Mutual Information, collocations, and the NLTK. I think that this is mostly used for writing joke gibberish academic papers and the like. I would need, however, for the document to not be gibberish. It would need to be on topic - like a copy and paste job from a plagiarist who waited until the last minute to write a paper. \n\nMethod 2: A simplified version of deep learning, AI, NLG. For training, I was looking at Digits, Tensor Flow, Torch etc. One concern was properly identifying the most important topics from the seed data to use to search the corpuses, which would be used for fluffing. Another concern was in how best to treat different structural features of the document (e.g., background versus detailed description).\n\nAn example: I want a patent document about my idea - a new eighth layer in the OSI model between the fourth and fifth layers. I write up a blurb about my new layer, what it does, and its advantages. The NLG system would pull information from wikipedia and the patent database relating to keywords I used (OSI, layers, etc.) It would take my problem statement and fluff it up to generate a background section. The beginning of the body of the document might include a discussion of the other seven layers to provide context for the new layer. And so on. It wouldn't get too off topic / down the rabbit hole and start producing documents filled with 100 page discussions of the history of tcpi/ip or anything. And if there are 5 good discussions of a particular term, it may mix/remix them together so that even if two people submit very similar text seed inputs, the output will be noticeably different.","preferred_answer":"I'm not sure how hard writing patten is. However, I found that on Internet:\n\"https://pdos.csail.mit.edu/archive/scigen/\"; they generate science paper then submit it. And some of them are accepted.","top_comment":"If you ever get one of these patents published, I think you need to cite the docs use you get off the internet for training directly in your patent. Otherwise, this feels very much like plagiarism. You should look into paraphrasing techniques and WordNet synsets. Rephrasing a document with technical language will most likely result in gibberish simply because the original 'technical' words are the best, most apt way of communicating the concepts covered in patent documentation. You additionally run the risk of mimicking the syntax to such a high degree that any lexical changes can't cover up the lack of human intervention. Another option (you mention this but I have a few tweaks)- use document summarization to create a 'previous works in related patents' section at the start of your paper to get in the extra length and generate something with much greater accuracy? This would include separating works by author and not 'remixing' them. This helps you to avoid accidentally getting two opposing views on a topic jumbled together in semantic nonsense. Antonyms are identical to synonyms in their distribution in texts. Can you tell us your intentions for your ultimate tool? How do you expect it to be used in real world situations? Why is it particularly necessary to completely automate the process?","metadata":{"post_id":"4ftsub","post_score":11,"answer_comment_id":"d2csf5e","answer_score":1,"answerer_anon_id":"anon_700ead605565e31f","top_comment_id":"d2nf3aw","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d2dd3ln","thanks_reply_score":2,"thanks_reply_text":"Thanks. I've seen this. It uses context-free grammar though. Which produces basically gibberish documents. Fun, but different. I'm hoping to find something at the other end of the spectrum. More plagiarism and less 'creativity'. ","thanks_reply_timestamp":"2016-04-22T18:22:40+00:00"}} -{"user_id":"anon_65d0535d6e2f7384","timestamp":"2016-04-21T16:35:23+00:00","subreddit":"LanguageTechnology","query":"Can Natural Language Generation be used to write a patent? (simplest way?)\n\nHi, \n\nI'm working on a pet project and could use some help of the \"point me in the right direction\" and/or \" don't bother with that\" variety.\n\nThe goal is to receive input from someone via a web form, which would be the seed of the document to be generated, and to output a patent-formatted document fitting some reasonable parameters (subject matter restrictions primarily). I need the document to be generated without human intervention/supervision. It would be like a vending machine - input a brief description of your idea and receive a pretty decent looking document. The more you write, the better the result.\n\nThe goal (initially) is not to produce an extraordinary document that would compete with one that was hand-crafted by an expert. It would also not be tuned to reducing detailed academic papers into a different format. Instead, the goal would be taking a few paragraphs and fluffing them up with content obtained from the patent database and wikipedia. \n\nI also need a practical solution. I was an electrical engineering major in college, so while I'm not scared of programming, I am a crappy programmer at best, and too out-of-date, slow, and incompetent of a programmer at worst. That means that I could modify some code if it is already very close to what I am trying to achieve (e.g., changing the corpuses or various tuning parameters), but not from scratch.\n\nI've been reading up on the subject, and there is so much information, it has been hard to determine what is possible within the state of the art, what is possible for me with my skills, and which particular tools / methods I should be focusing on.\n\nMy hope is that because the desired output document will be very structured and has limited scope, it may be easier to achieve. I hope to leverage the stiltedness and technical vocabulary of patents to smooth over the limitations of the NLG system. \n\nMethod 1: Smarten-up something simple like a markov chain. I was reading about Pointwise Mutual Information, collocations, and the NLTK. I think that this is mostly used for writing joke gibberish academic papers and the like. I would need, however, for the document to not be gibberish. It would need to be on topic - like a copy and paste job from a plagiarist who waited until the last minute to write a paper. \n\nMethod 2: A simplified version of deep learning, AI, NLG. For training, I was looking at Digits, Tensor Flow, Torch etc. One concern was properly identifying the most important topics from the seed data to use to search the corpuses, which would be used for fluffing. Another concern was in how best to treat different structural features of the document (e.g., background versus detailed description).\n\nAn example: I want a patent document about my idea - a new eighth layer in the OSI model between the fourth and fifth layers. I write up a blurb about my new layer, what it does, and its advantages. The NLG system would pull information from wikipedia and the patent database relating to keywords I used (OSI, layers, etc.) It would take my problem statement and fluff it up to generate a background section. The beginning of the body of the document might include a discussion of the other seven layers to provide context for the new layer. And so on. It wouldn't get too off topic / down the rabbit hole and start producing documents filled with 100 page discussions of the history of tcpi/ip or anything. And if there are 5 good discussions of a particular term, it may mix/remix them together so that even if two people submit very similar text seed inputs, the output will be noticeably different.","preferred_answer":"I think there is opportunity to use it to invalidate patents.","top_comment":"If you ever get one of these patents published, I think you need to cite the docs use you get off the internet for training directly in your patent. Otherwise, this feels very much like plagiarism. You should look into paraphrasing techniques and WordNet synsets. Rephrasing a document with technical language will most likely result in gibberish simply because the original 'technical' words are the best, most apt way of communicating the concepts covered in patent documentation. You additionally run the risk of mimicking the syntax to such a high degree that any lexical changes can't cover up the lack of human intervention. Another option (you mention this but I have a few tweaks)- use document summarization to create a 'previous works in related patents' section at the start of your paper to get in the extra length and generate something with much greater accuracy? This would include separating works by author and not 'remixing' them. This helps you to avoid accidentally getting two opposing views on a topic jumbled together in semantic nonsense. Antonyms are identical to synonyms in their distribution in texts. Can you tell us your intentions for your ultimate tool? How do you expect it to be used in real world situations? Why is it particularly necessary to completely automate the process?","metadata":{"post_id":"4ftsub","post_score":11,"answer_comment_id":"d2chstd","answer_score":1,"answerer_anon_id":"anon_8f2ce7b9011a3d8a","top_comment_id":"d2nf3aw","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d2ddfdu","thanks_reply_score":1,"thanks_reply_text":"Thanks. I'm sure there are lots of tools for analyzing and invalidating patents, which is a fine goal. Just not mine. I am hoping to automate what human would do when trying to stretch out the length of a paper (search for documents on the same topic, copy and remix sentences or paragraphs from those documents, and integrate them with the information provided to produce a readable document. ","thanks_reply_timestamp":"2016-04-22T18:30:04+00:00"}} -{"user_id":"anon_735e7708ce8118cc","timestamp":"2016-04-22T16:56:16+00:00","subreddit":"LanguageTechnology","query":"Pretrained Word2Vec along with Sentiwordnet for sentiment analysis of text?\n\nGoal: classifying email sentiment when I don't have a good training/testing data set.\n\nI'm hoping it's possible to use Gensim to load pretrained Word2Vec vectors provided by Google, and then use the Sentiwordnet lexicon to classify text (emails), but I don't know how to do this exactly. Any help?","preferred_answer":"Check out\n\nRetrofitting Word Vectors to Semantic Lexicons: Manaal Faruqui, Jesse Dodge, Sujay Kumar Jauhar, Chris Dyer, Eduard Hovy, Noah A. Smith. Carnegie Mellon University\n\nBut really you can probably just use the sentiment lexicon, and compute average sentiment of all words in the email/document. That's the standard baseline everyone uses.","top_comment":"I'm not sure what Word2Vec would be doing for you here. It's typically not used for sentiment analysis as far as I'm aware.\n\nYou could just look up everything that isn't a stop-word in sentiwordnet and get a score for each email. Then provide a threshhold of a minimum score to be positive or negative and everything else is neutral.\n\nAs a side note, I imagine you've got some amount of emails in your own email account(s). It probably wouldn't be a ton of work to hand-classify them. Then you'd have a training/testing data set.","metadata":{"post_id":"4fzcnd","post_score":7,"answer_comment_id":"d2dvhol","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"d2dmwc4","top_comment_score":3,"top_comment_anon_id":"anon_ee9f639443aa0b96","top_equals_preferred":false,"thanks_reply_id":"d2e087i","thanks_reply_score":1,"thanks_reply_text":"Neat read, thank you. I hadn't seen that before. \n\nYeah that's probably what I'll do, I was over complicating. Maybe I'll try to incorporate sentiment into a larger predictive model afterward if I have time. Thanks! ","thanks_reply_timestamp":"2016-04-23T05:19:13+00:00"}} -{"user_id":"anon_66121000bd0540d7","timestamp":"2016-04-20T15:15:43+00:00","subreddit":"LanguageTechnology","query":"News filters?\n\nAnybody using any existing services to aggregate web content (RSS, web scraping), filter it (boolean expressions), and spit out the resulting stream(s)? Zapier / IFTTT not quite doing the trick for me...","preferred_answer":"https://f3trt3soctj7fp3w.onion.to/ \n\nNote, this isn't a very robust server, so please don't hit it too hard!","top_comment":"RIP Yahoo Pipes. :(","metadata":{"post_id":"4fntdf","post_score":8,"answer_comment_id":"d2ec5pe","answer_score":2,"answerer_anon_id":"anon_7d49e0355d132e3d","top_comment_id":"d2bmwnn","top_comment_score":2,"top_comment_anon_id":"anon_4610c4ad8f837c4b","top_equals_preferred":false,"thanks_reply_id":"d2fn2x8","thanks_reply_score":1,"thanks_reply_text":"Thanks cruyff8","thanks_reply_timestamp":"2016-04-24T19:17:18+00:00"}} -{"user_id":"anon_6135d2db80041c9b","timestamp":"2016-05-10T01:11:16+00:00","subreddit":"LanguageTechnology","query":"Is this the right way to identify idiomatic expressions?\n\nHi, I'm making a study helper that analyzes the difficult vocabulary of a book or an article so that I can study/memorize them before reading it. I believe that is the best way to study because it does not interrupt the flow of reading and also reinforces the memorized vocabularies quickly. \n\nI have succeeded in extracting vocabularies but now I would like to extract idioms also. Since I'm new to natural language processing I did not find any useful tools for doing so and concepts such as collocations doesn't quite fit my need. So I have devised an algorithm that identifies the idiomatic expressions and I would like to know if there's any problems with this approach, because it will be a long and hard journey constructing regex for every idioms...\n\nStep 1: Convert the given sentence to their basic form via nltk.morphy\n\n'I think I bit off more than I could chew by taking the jobs'\n->\n'I think I bite off more than I can chew by take the job'\n\nStep 2. Make a regex out of each idioms\n\n'Bite off more than \\w+ can chew'\n\nStep 3. Match every regex made to the result of step 1. \n\n\nThanks for reading and here is the current version of my python program if it interests you. \n\nhttps://github.com/qria/Qria/blob/master/vocabulary.py\n\n`analyze_hard_vocabularies()` analyzes the text and returns difficult vocabs and their definitions.","preferred_answer":"Idioms tend to be collocations, strings of words that co-occur more often than expected by chance/grammar alone. There are automated methods for detecting these. For example:\n\nhttp://finzi.psych.upenn.edu/library/quanteda/html/collocations.html","top_comment":"Idioms tend to be collocations, strings of words that co-occur more often than expected by chance/grammar alone. There are automated methods for detecting these. For example:\n\nhttp://finzi.psych.upenn.edu/library/quanteda/html/collocations.html","metadata":{"post_id":"4imtes","post_score":5,"answer_comment_id":"d30u145","answer_score":4,"answerer_anon_id":"anon_61ea34fbfe494be4","top_comment_id":"d30u145","top_comment_score":4,"top_comment_anon_id":"anon_61ea34fbfe494be4","top_equals_preferred":true,"thanks_reply_id":"d30uaa5","thanks_reply_score":1,"thanks_reply_text":"Nice, thanks! Is this module for identifying new collocations or for already known collocations?","thanks_reply_timestamp":"2016-05-11T02:52:56+00:00"}} -{"user_id":"anon_f3ebcd458b23c8d5","timestamp":"2016-05-18T20:04:24+00:00","subreddit":"LanguageTechnology","query":"What is the most advanced open source natural language generation platform as of now?\n\nHello guys,\n\nI am researching natural generation platforms. \n\nI have come accross [Quill](https://www.narrativescience.com/quill) from Narrative Science. However, it is a closed platform.\n\nFurther, I found the following resources about open source implementations about [NLG Systems](http://aclweb.org/aclwiki/index.php?title=Downloadable_NLG_systems). However, it seems pretty outdated.\n\nAny suggestions, what are the most advanced **open source** natural language generation platform currently?\n\nThx in advance for your replies!","preferred_answer":"There isn't really any amount of open or closed platforms around (yet). Search for Automated Insights, Data Journalism or Structured Stories should give you some feel of the state of the field.\n\nGetting and structuring the data, and figuring out how it's linked to everything else is going to be the hard part. Actually creating 'text' is going to be the 'easier' part.\n\nA lot of Wikipedia entries were originally created from 'bots' filling templates ... $city is a town in $country. It has a population of $population ... Unknowingly, anybody using wiki to train parsers are actually using a good chunk of unnatural language :-/\n\nIf you just want cack, then a markov generator will spit out words.","top_comment":"I like [SimpleNLG](https://github.com/simplenlg/simplenlg) and have used it successfully.\n\nBut I don't, I admit, know quite what you mean by \"most advanced\".","metadata":{"post_id":"4jyn2l","post_score":8,"answer_comment_id":"d3cpmg5","answer_score":2,"answerer_anon_id":"anon_0d7344dd5a26c7be","top_comment_id":"d3b2rtl","top_comment_score":4,"top_comment_anon_id":"anon_ba4367c0fc882fa0","top_equals_preferred":false,"thanks_reply_id":"d3i5wct","thanks_reply_score":2,"thanks_reply_text":"Thx for your answer! Is there any good example for automated structured stories? How are these templates created? Is there an open source plattform for doing structured stories?\n\nAppreciate your reply!","thanks_reply_timestamp":"2016-05-24T20:21:46+00:00"}} -{"user_id":"anon_520cb8a195e5c9d5","timestamp":"2016-05-31T18:25:23+00:00","subreddit":"LanguageTechnology","query":"Looking for real-time sentiment analysis for text\n\nResearch, API, papers, blog posts, previous reddit thread - all would do. Looking for any information that incorporates pauses, backspacing, deletes, while doing a text analysis. So if someone pauses at a word, does that mean they're thinking hard about it? And how does that affect sentiment analysis? Can anyone help?","preferred_answer":"ok, so...\n\nFlowers and Hayes, 1981, made the cognitive model that is used today. They have modified it a bit (Hayes, 2004, and Hayes, 2012) to fit into other models in cognitive psychology (e.g. Badelys working memory). They have a three level model: one control-level (with goals and motivation for writing the text) one process level that consists of the Task Environment (what you've written so far, tools for writing, etc) and Writing processes (the more formal cogntive model of a proposer tht proposes languages, a transcriber that transcribes them and a reviewer that checks if everything is right)\nand the last resource level that contains cognitive resources that the other levels draws\nfrom such as attention, working memory, long-term memory and reading ability. So, lots of different things that affect writing!\n\nBecause (according to hayes) people have limited mental capacity we tend to write a bit and then pause while we think of the next phrase. These pauses tend to corralate with clause-boundries and a longer pause tend to correlate with a longer writing session afterwards (spelman miller, 2006). people who employed a long pause - long writing technique wrote better formulated texts.\n\nPeople have very unique writing styles that can be used for e.g. identification (karnan et al. 2011). especially punctuation is very personal.\n\nAlso, revising text and how we tend to do it is really interesting (Lindgren & Sullivan, 2006).\n\nIf I were trying to do what you propose i would look at pauses and writing bursts as an indicator of general arousal. short pause - long burst would be especially indicative that the writer is writing more than they are thinking. That alone would not tell you if what they wrote were angry or happy but it could tell you if the writer was calm or excited. \n\n.\n.\n.\n.\n\n\n\nFlower, L., & Hayes, J. R. (1981). A cognitive process theory of writing. College composition and\ncommunication, 365-387.\n\nHayes, J. R. (2004). (2004). What triggers revision? In L. Allal, L. Chanquoy, & P. Largy (Eds.),\nRevision of written language: Cognitive and instructional processes (pp. 9-20). Boston/Dordrecht,\nNetherlands/New York: Kluwer.\n\nHayes, J. R. (2012). Modeling and remodeling writing. Written Communication,29(3), 369-388\n\nSpelman Miller, K. (2006). The pausological study of written language production. In Sullivan, K. P.,\n& Lindgren, E. (Eds). Computer keystroke logging and writing: Methods and applications (pp. 11-30).\nAmsterdam, Netherlands: Elsevier.\n\nKarnan, M., Akila, M., & Krishnaraj, N. (2011). Biometric personal authentication using keystroke\ndynamics: A review. Applied Soft Computing, 11(2), 1565-1573.\n\nLindgren, E., & Sullivan, K.P.H (2006).Writing and analysis of revision:an overview. In Sullivan, K. P.H,\n& Lindgren, E. (Eds). Computer keystroke logging and writing: Methods and applications (pp. 31-44).\nAmsterdam, Netherlands: Elsevier","top_comment":"ok, so...\n\nFlowers and Hayes, 1981, made the cognitive model that is used today. They have modified it a bit (Hayes, 2004, and Hayes, 2012) to fit into other models in cognitive psychology (e.g. Badelys working memory). They have a three level model: one control-level (with goals and motivation for writing the text) one process level that consists of the Task Environment (what you've written so far, tools for writing, etc) and Writing processes (the more formal cogntive model of a proposer tht proposes languages, a transcriber that transcribes them and a reviewer that checks if everything is right)\nand the last resource level that contains cognitive resources that the other levels draws\nfrom such as attention, working memory, long-term memory and reading ability. So, lots of different things that affect writing!\n\nBecause (according to hayes) people have limited mental capacity we tend to write a bit and then pause while we think of the next phrase. These pauses tend to corralate with clause-boundries and a longer pause tend to correlate with a longer writing session afterwards (spelman miller, 2006). people who employed a long pause - long writing technique wrote better formulated texts.\n\nPeople have very unique writing styles that can be used for e.g. identification (karnan et al. 2011). especially punctuation is very personal.\n\nAlso, revising text and how we tend to do it is really interesting (Lindgren & Sullivan, 2006).\n\nIf I were trying to do what you propose i would look at pauses and writing bursts as an indicator of general arousal. short pause - long burst would be especially indicative that the writer is writing more than they are thinking. That alone would not tell you if what they wrote were angry or happy but it could tell you if the writer was calm or excited. \n\n.\n.\n.\n.\n\n\n\nFlower, L., & Hayes, J. R. (1981). A cognitive process theory of writing. College composition and\ncommunication, 365-387.\n\nHayes, J. R. (2004). (2004). What triggers revision? In L. Allal, L. Chanquoy, & P. Largy (Eds.),\nRevision of written language: Cognitive and instructional processes (pp. 9-20). Boston/Dordrecht,\nNetherlands/New York: Kluwer.\n\nHayes, J. R. (2012). Modeling and remodeling writing. Written Communication,29(3), 369-388\n\nSpelman Miller, K. (2006). The pausological study of written language production. In Sullivan, K. P.,\n& Lindgren, E. (Eds). Computer keystroke logging and writing: Methods and applications (pp. 11-30).\nAmsterdam, Netherlands: Elsevier.\n\nKarnan, M., Akila, M., & Krishnaraj, N. (2011). Biometric personal authentication using keystroke\ndynamics: A review. Applied Soft Computing, 11(2), 1565-1573.\n\nLindgren, E., & Sullivan, K.P.H (2006).Writing and analysis of revision:an overview. In Sullivan, K. P.H,\n& Lindgren, E. (Eds). Computer keystroke logging and writing: Methods and applications (pp. 31-44).\nAmsterdam, Netherlands: Elsevier","metadata":{"post_id":"4lwoy7","post_score":6,"answer_comment_id":"d3rhnqe","answer_score":4,"answerer_anon_id":"anon_a31bee13bf4fe75b","top_comment_id":"d3rhnqe","top_comment_score":4,"top_comment_anon_id":"anon_a31bee13bf4fe75b","top_equals_preferred":true,"thanks_reply_id":"d3usech","thanks_reply_score":1,"thanks_reply_text":"Hey, thanks for this!","thanks_reply_timestamp":"2016-06-03T18:27:35+00:00"}} -{"user_id":"anon_dfaac54c3eb80f80","timestamp":"2016-06-30T11:02:48+00:00","subreddit":"LanguageTechnology","query":"Question: How change a text to fit a different language model\n\nLet's say I have a bunch of tweets and some newspaper articles and for some reason I want the newspaper to to look more like tweets. \n\nI'm thinking of applying a generative language model, either as an RNN that is trained on twitter and then generates text with a boost to its confidence on the current correct word, or something along the lines of p(twitter_word | newspaper_word_up_til_current_point)\n\n* Do anybody have experience with doing this?\n* Any papers that apply such methods, perhaps for domain transfer?","preferred_answer":"This is something that I'd love to have a play with too. So there are several papers in image processing that do this kind of style transfer but little with text which is a real shame. What you need to do is get a model to learn a latent variable(s) that learn to represent the style of the text rather than the content. \n\nHere is an example of a paper which demostrates this with images. See Figure 7 a) http://arxiv.org/pdf/1511.05644.pdf\n\nDoing this with text seems to be harder due to the sequential nature of the data. I've tried variational auto-encoders with random Wikipedia sentences but not had much luck, but was foolishly trying with characters... here a paper which managed to do it with words using a few tricks. http://arxiv.org/pdf/1511.06349.pdf\n\nSo you could start there, then try to add in the adversarial stuff from the other paper and see if the model can learn a latent variable for twitter / not twitter when being trained to model both.\n\nThe closest thing I've found that has been done with text is this\nhttp://www.somatic.io/blog/how-neural-storyteller-works\nwhich uses \"style shifting\".\n\nIf you do have a crack at this then let me know I'd be very interested in the results. I could also offer some limited assistance.","top_comment":"This is something that I'd love to have a play with too. So there are several papers in image processing that do this kind of style transfer but little with text which is a real shame. What you need to do is get a model to learn a latent variable(s) that learn to represent the style of the text rather than the content. \n\nHere is an example of a paper which demostrates this with images. See Figure 7 a) http://arxiv.org/pdf/1511.05644.pdf\n\nDoing this with text seems to be harder due to the sequential nature of the data. I've tried variational auto-encoders with random Wikipedia sentences but not had much luck, but was foolishly trying with characters... here a paper which managed to do it with words using a few tricks. http://arxiv.org/pdf/1511.06349.pdf\n\nSo you could start there, then try to add in the adversarial stuff from the other paper and see if the model can learn a latent variable for twitter / not twitter when being trained to model both.\n\nThe closest thing I've found that has been done with text is this\nhttp://www.somatic.io/blog/how-neural-storyteller-works\nwhich uses \"style shifting\".\n\nIf you do have a crack at this then let me know I'd be very interested in the results. I could also offer some limited assistance.","metadata":{"post_id":"4ql2qo","post_score":1,"answer_comment_id":"d4w295n","answer_score":2,"answerer_anon_id":"anon_c371c9503652322d","top_comment_id":"d4w295n","top_comment_score":2,"top_comment_anon_id":"anon_c371c9503652322d","top_equals_preferred":true,"thanks_reply_id":"d4wdd4u","thanks_reply_score":2,"thanks_reply_text":"Thank you for the thorough reply and many links.\n\n> but was foolishly trying with characters...\n\nMy idea was to generate extra data for a supervised word segmentation classifier, so I was very much thinking along the lines of character levels, as I have no word segments for training from my target data (trying to do a full domain transfer)\n\n> Style shifting was inspired by \"A Neural Algorithm of Artistic Style\" but the technical details are completely different.\nThat's a bummer :) But very cool demo!\n","thanks_reply_timestamp":"2016-07-02T06:54:09+00:00"}} -{"user_id":"anon_3ca7ca29c6d87af8","timestamp":"2016-07-26T14:53:32+00:00","subreddit":"LanguageTechnology","query":"Why Google Scholar won't tell you the best comp.ling. journals and conferences","preferred_answer":"Insightful article! Vomitous is an interesting choice of adjective for a metric! Interesting to see commentary about our field on medium, and curious as to the kind of response you'll get. \n\nSide note, you've got a \"the the\" somewhere in the article, unless my brain is playing tricks on me.","top_comment":"Insightful article! Vomitous is an interesting choice of adjective for a metric! Interesting to see commentary about our field on medium, and curious as to the kind of response you'll get. \n\nSide note, you've got a \"the the\" somewhere in the article, unless my brain is playing tricks on me.","metadata":{"post_id":"4up0fa","post_score":5,"answer_comment_id":"d5rtvid","answer_score":1,"answerer_anon_id":"anon_d2783bbb3a9e24ff","top_comment_id":"d5rtvid","top_comment_score":1,"top_comment_anon_id":"anon_d2783bbb3a9e24ff","top_equals_preferred":true,"thanks_reply_id":"d5sp8rj","thanks_reply_score":1,"thanks_reply_text":"Thanks, found and nailed it! Generally positive so far - but let's see how it goes. Certainly csrankings.com is still popular today, but I imagine the conferences that make up these metrics are selected based on prestige.\n\nVomitous - it's a good word, used *sparingly*.\n\nHope all is well at R2R :)","thanks_reply_timestamp":"2016-07-27T07:43:33+00:00"}} -{"user_id":"anon_6db4d72f50925a9c","timestamp":"2016-08-08T15:01:38+00:00","subreddit":"LanguageTechnology","query":"Hey folks! I'm looking for a .txt of all of the words from Webster's dictionary. Any links?\n\nI've found at least one dictionary.txt on GitHub, but it contains a lot of interesting, foreign sounding words that aren't defined in Webster's. I intend on using this list for an oncology NLP project and thought you folks would be able to help out. Thanks in advance!","preferred_answer":"I would have gone the same route.","top_comment":"[Here it is in JSON, which may be better for your needs.](https://github.com/adambom/dictionary)\n\nKeep in mind that these are both outdated versions from about 100 years go.","metadata":{"post_id":"4wqk1j","post_score":11,"answer_comment_id":"d6agtbz","answer_score":2,"answerer_anon_id":"anon_2227d51ae3c40bdd","top_comment_id":"d697nyp","top_comment_score":3,"top_comment_anon_id":"anon_4610c4ad8f837c4b","top_equals_preferred":false,"thanks_reply_id":"d6avb0j","thanks_reply_score":1,"thanks_reply_text":"gotcha, thanks","thanks_reply_timestamp":"2016-08-09T20:26:02+00:00"}} -{"user_id":"anon_145d19078cf8e613","timestamp":"2016-08-08T08:48:20+00:00","subreddit":"LanguageTechnology","query":"List of 500+ intransitive verbs?\n\nI'm looking for an extensive list of intransitive verbs, to keep my program's language generation from asking \"What do you sleep?\" and the like. Alternatively an extensive list of transitive verbs would allow me to restrict these questions to transitive verbs only. All I've been able to find were very short lists.","preferred_answer":"VerbNet has over 3000 verbs: http://verbs.colorado.edu/~mpalmer/projects/verbnet.html\n\nNot all of them are transitive, but I believe it's marked.","top_comment":"VerbNet has over 3000 verbs: http://verbs.colorado.edu/~mpalmer/projects/verbnet.html\n\nNot all of them are transitive, but I believe it's marked.","metadata":{"post_id":"4wp6z4","post_score":3,"answer_comment_id":"d68w9st","answer_score":3,"answerer_anon_id":"anon_f42cd8daf63a04a2","top_comment_id":"d68w9st","top_comment_score":3,"top_comment_anon_id":"anon_f42cd8daf63a04a2","top_equals_preferred":true,"thanks_reply_id":"d6d1jqu","thanks_reply_score":1,"thanks_reply_text":"That'll take some filtering, but thanks. I didn't know about verbnet yet.","thanks_reply_timestamp":"2016-08-11T09:55:41+00:00"}} -{"user_id":"anon_49ce48b280e0e1f0","timestamp":"2016-07-20T23:20:24+00:00","subreddit":"LanguageTechnology","query":"Applying NLP methods to Native American Language Maintenance/Revitalization?\n\nHi folks. New kid on the block here. I work for a Native Californian tribe coordinating a language revitalization program.\nI'm super interested in figuring out various applications of NLP to Language Revitalization efforts. Anyone have any experience/ideas with this?\nMaybe I'm living a dream, but wouldn't it be cool if we had software that could read APA or IPA and spit out (even a rough) version of the input language?\nImagine something like Scannable that reads the handwriting on fieldnotes out loud?\nWhat's out there","preferred_answer":"It's hard to say exactly what is doable without looking at the data itself, but it sounds like you're in a good position for successful NLP tools. :)\n\nWhat sort of experience do you have with programming? If you're aiming for a PhD in NLP, you'll need a solid background in computer science, just because the coursework assumes you have it. There's debate about whether a PhD is really necessary, but there's no question that it opens doors and majorly increases your pay (and job security).\n\nThe three \"main\" career paths for an NLP expert / computational linguist are (1) academia, (2) tech industry, and (3) government. Universities like Stanford and CMU do lots of research on this area, as you know. Companies like Amazon, Google, Apple, Netflix, etc. use NLP and related statistical methods for all kinds of projects. The government (especially DoD, NSA, etc.) is using it for various paramilitary applications. \n\nYour plan sounds very realistic, as long as (to be blunt) you're good at NLP. All NLP is essentially the practical implementation of high-level statistical algorithms, so in order to make a career of it you have to be able to do that. That doesn't mean you need to be a natural at it, or understand everything right away, but you should generally like and understand the material. :) If you find yourself overwhelmed and hating it, take a step back and get someone to help you.\n\nUnfortunately, there isn't a /ton/ of work out there for endangered language NLP. Almost everyone I know who works on this has (a) a faculty position at a university or (b) does it as a side project. Basically, you'll have to consider whether you want job security and some constraints on your projects, or very little job security and the ability to work on endangered languages 100% of the time. Based on what you wrote here, I'd suggest following your plan to work in academia / tech and just do research specializing in endangered language work.\n\nIf you can get into a top-5 or top-10 university, it will open doors for you. (For postgrad, don't look at overall stats/rankings but its reputation in NLP specifically). It's also critically important to do internships and work with established NLP people. This is a small field, so everybody knows everybody, and personal recommendations are hugely helpful. Also, your connections will tell you about job openings or ask you to join their projects!\n\nDan Jurafsky's course sounds like a great place to start. :) I used his book for my first NLP classes and it was incredibly useful. It's super dense (lots of math / pseudocode) but if you take the time to work through the material, you'll have a solid understanding of basically all the NLP fundamentals. Try to find someone who can answer your questions -- it will save you a lot of frustration!\n\nFor starting projects, I would recommend brushing up on probability (especially Bayes' Theorem) and then learning about the Noisy Channel Model. It's a classic probabilistic technique that's been used for all kinds of NLP tasks. Otherwise I would wait until the Stanford NLP course, to be honest -- it's the clearest resource available and you'll get plenty of ideas from there.\n\nI hope this helps! I wish I had better answers for you, but we're all working with the same uncertainties here.\n\nIf you're interested in making language-learning software for your tribe, DM me. At the moment, that's my specialty, and we have all the tools to do it! And keep in touch about whatever you end up building -- I'd like to hear about it. :)","top_comment":"I'd be happy to rant more about this, posting to remind myself to comment more later.\n\nMostly though, there are ways to create software that can both recognize and generate word forms with morphological analysis, as well as provide various filters over this so IPA to orthography and vice versa is reasonable (with some caveats). How useful the latter is is another question, dependent on the resources you have.\n\nMostly though, the morphological stuff can be used for the basis of all sorts of things, including dictionaries, spellcheck and grammar check, learning games, maybe even speech synthesis down the line.\n\nI can give some examples if you want to DM me, and some more details. I don't know so much about handwriting recognition for IPA for field notes, as that may be quite tricky.","metadata":{"post_id":"4ttzx2","post_score":2,"answer_comment_id":"d5ushrj","answer_score":1,"answerer_anon_id":"anon_ca904a8136eb786a","top_comment_id":"d5ksg22","top_comment_score":2,"top_comment_anon_id":"anon_2a6f72e61f313ee5","top_equals_preferred":false,"thanks_reply_id":"d6ilp5i","thanks_reply_score":1,"thanks_reply_text":"Thanks for this. Took a bit of time to chew on it and see what can be done. I will probably be reaching out in a bit!","thanks_reply_timestamp":"2016-08-15T18:17:35+00:00"}} -{"user_id":"anon_4f7698cba224cddc","timestamp":"2016-09-05T17:01:50+00:00","subreddit":"LanguageTechnology","query":"Finding the best distributional analysis approach for word/documents embeddings\n\nAs a newcomer to ML applied to NLP, I can't tell clearly what kind of embeddings I should use. I've mostly heard of latent semantic analysis, latent dirichlet allocation, and word2vec-like embeddings. Word2vec-like embeddings have been especially hyped lately, because it's simple and scalable.\n\nWhat remains especially unclear to me is how scalable (or how not scalable) the other methods are, how efficient they are on data, and for what task. Is there a flowchart or some benchmarks on datasets of different sizes and different tasks for different embeddings (when it is tractable) ?","preferred_answer":"Marketing team wants you to say you used deep learning? Use w2v, or something completely different (LSTMs, etc)\n\nDo you need vectors for entire documents? Use LSA/LDA.\n\n- Do you have a huge amount of data and very long documents? LSA. Small or medium? LDA.\n- But it needs to be lightning fast? Vowpal Wabbit (industrial speed, some cost of interpretability) \n\nOnly need vectors for words? Word2Vec or similar\n\n- want words with similar function to be more similar? (e.g. doctor and surgeon?) Use small window (2)\n- Want words to measure topical similarity? (e.g. doctor and hospital) Use wide window (5-20, depending on extreme you want this)\n\n- Want really good pretrained vectors without fuss for web text? Use GloVe.\n- Want decent pretrained vectors without fuss for newswire text? Use google's w2v. They're getting dated though\nNeed vectors for some a special domain that isn't \"generic web text\"? Train your own using w2v.\n\nAll methods: use 300 dimensions if you don't want to tune anything. Otherwise try 100, 200, ..., 600.","top_comment":"Marketing team wants you to say you used deep learning? Use w2v, or something completely different (LSTMs, etc)\n\nDo you need vectors for entire documents? Use LSA/LDA.\n\n- Do you have a huge amount of data and very long documents? LSA. Small or medium? LDA.\n- But it needs to be lightning fast? Vowpal Wabbit (industrial speed, some cost of interpretability) \n\nOnly need vectors for words? Word2Vec or similar\n\n- want words with similar function to be more similar? (e.g. doctor and surgeon?) Use small window (2)\n- Want words to measure topical similarity? (e.g. doctor and hospital) Use wide window (5-20, depending on extreme you want this)\n\n- Want really good pretrained vectors without fuss for web text? Use GloVe.\n- Want decent pretrained vectors without fuss for newswire text? Use google's w2v. They're getting dated though\nNeed vectors for some a special domain that isn't \"generic web text\"? Train your own using w2v.\n\nAll methods: use 300 dimensions if you don't want to tune anything. Otherwise try 100, 200, ..., 600.","metadata":{"post_id":"51ad4z","post_score":11,"answer_comment_id":"d7ajauu","answer_score":7,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"d7ajauu","top_comment_score":7,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":true,"thanks_reply_id":"d7baoyh","thanks_reply_score":2,"thanks_reply_text":"Thank you for this insight. Where would you rank doc2vec here ?\n\nAlso, I sometimes have a hard time telling when I a dataset is \"huge\". I've seen datasets ranging from thousands to billions of words.\n\nFor instance, the gensim implementation of LDA reports not more than several hours for LDA on 2GB corpus (~3.5 M Documents) and low memory print. Do you consider this corpus \"medium\" then ?\n\nI guess how big a dataset is relative both to the variability of the data and the computing power needed to mine it. That's why I'm confused here.","thanks_reply_timestamp":"2016-09-06T09:16:29+00:00"}} -{"user_id":"anon_1238a10e0569a83f","timestamp":"2016-09-10T18:48:10+00:00","subreddit":"LanguageTechnology","query":"How to do a correct and fair evaluation of a model?\n\nI am an undergrad student here. Since I have no NLP / AI / ML professors in my school, I am trying to publish my paper (information retrieval) without any supervision / help. I was doing a literature review for the \"Related Work\" section and I found the following things:\n\n1. None of them tuned the parameters of the baseline / existing models. All of them chose some default values for the baselines. As a result, proposed models would eventually perform better.\n2. The data was not split into training-validation-testing sets properly. Many of them tuned parameters and hyperparameters on training set alone. Most of them did not give any parameter sensitivity analysis / bias-variance graphs.\n\nHow should I avoid these common bad practices (for which I am not aware of) in my paper? Is there some beginner's guide of do's and don'ts of assessing a model fairly? \n\nAny advice and suggestions would help. Thanks.","preferred_answer":"You bring up good points. These are methodological issues that are rampant in the community.\n\n1) It's not cheating to tune hyperparameters on the training set, it's just more likely to cause overfitting. Tuning them on the dev set usually leads to better test performance. Tuning hyperparams on the test set is *definitely* cheating.\n\n2) Parameter sensitivity is often avoided in the community because it's a ton of work, and it makes almost everything look terrible. While it's nice to see a method that's robust to hyperparameters, I don't really expect it. I'm usually happy as long as they say what are the most sensitive parameters in the paper, so future researchers know what is important to tune.\n\n3) Baselines should be tuned too. A whole bunch of Neural Network papers are especially guilty of this. This is far more common than is desired. After NN papers made up about 50-70% of ACL and 80% of NAACL this year, I expect next year people will be more critical of this in peer review.\n\n4) The right thing to do is to honestly try to get the baseline to perform as strongly as possible; but doing so makes it really difficult to publish.\n\n5) Sometimes you have to make methodological short cuts because you just need to publish/meet a deadline. No experimental setup is perfect. Try to avoid anything really bad, but also don't let every single potential tiny flaw hold you back. \n\n6) When writing things up, *be completely honest and exact*. Cheating isn't so bad; peer review can bring it up, or it just means readers will have healthy skepticism. That's okay. Cheating and not being honest about it? That's academic fraud.","top_comment":"You bring up good points. These are methodological issues that are rampant in the community.\n\n1) It's not cheating to tune hyperparameters on the training set, it's just more likely to cause overfitting. Tuning them on the dev set usually leads to better test performance. Tuning hyperparams on the test set is *definitely* cheating.\n\n2) Parameter sensitivity is often avoided in the community because it's a ton of work, and it makes almost everything look terrible. While it's nice to see a method that's robust to hyperparameters, I don't really expect it. I'm usually happy as long as they say what are the most sensitive parameters in the paper, so future researchers know what is important to tune.\n\n3) Baselines should be tuned too. A whole bunch of Neural Network papers are especially guilty of this. This is far more common than is desired. After NN papers made up about 50-70% of ACL and 80% of NAACL this year, I expect next year people will be more critical of this in peer review.\n\n4) The right thing to do is to honestly try to get the baseline to perform as strongly as possible; but doing so makes it really difficult to publish.\n\n5) Sometimes you have to make methodological short cuts because you just need to publish/meet a deadline. No experimental setup is perfect. Try to avoid anything really bad, but also don't let every single potential tiny flaw hold you back. \n\n6) When writing things up, *be completely honest and exact*. Cheating isn't so bad; peer review can bring it up, or it just means readers will have healthy skepticism. That's okay. Cheating and not being honest about it? That's academic fraud.","metadata":{"post_id":"524i92","post_score":7,"answer_comment_id":"d7hhnrn","answer_score":5,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"d7hhnrn","top_comment_score":5,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":true,"thanks_reply_id":"d7hixyh","thanks_reply_score":1,"thanks_reply_text":"Thank you for your comment. I am thinking of submitting my paper to EACL 2017 student session. Since most of the reviewers would be students, I feel that reviews would be more thorough and detailed (and harsh?). \n\nI am trying to avoid anything bad / embarrassing. That's why I am including sensitivity analysis and providing some statistical analysis (like noisiness of the training data) to support my result section. I am also making sure that all my baselines are perfectly tuned. I really hope that everything goes alright during reviewing.","thanks_reply_timestamp":"2016-09-10T23:23:08+00:00"}} -{"user_id":"anon_a951a29ffbd46966","timestamp":"2016-09-18T10:46:04+00:00","subreddit":"LanguageTechnology","query":"What is the comprehensive and modern NLP online course for a newbie?\n\nI am enjoying the \"Dan Jurafsky & Chris Manning: Natural Language Processing\" class through youtube (https://www.youtube.com/playlist?list=PL6397E4B26D00A269), but I feel that it doesn't cover recent advances with deep learning (or more specifically RNN) simply because the lectures were recorded in 2012. Which will be a more recent, comprehensive online courses that you guys suggest?","preferred_answer":"Last parts of Larochelle course are on language understanding.\n\n\nhttps://www.youtube.com/playlist?list=PL6Xpj9I5qXYEcOhn7TqghAJ6NAPrNmUBH\n\nYou might also enjoy Cho video at montreal summer school this year:\nhttp://videolectures.net/deeplearning2016_cho_language_understanding/","top_comment":"Last parts of Larochelle course are on language understanding.\n\n\nhttps://www.youtube.com/playlist?list=PL6Xpj9I5qXYEcOhn7TqghAJ6NAPrNmUBH\n\nYou might also enjoy Cho video at montreal summer school this year:\nhttp://videolectures.net/deeplearning2016_cho_language_understanding/","metadata":{"post_id":"53bork","post_score":15,"answer_comment_id":"d7rovn8","answer_score":2,"answerer_anon_id":"anon_51dee34bcd39ca1d","top_comment_id":"d7rovn8","top_comment_score":2,"top_comment_anon_id":"anon_51dee34bcd39ca1d","top_equals_preferred":true,"thanks_reply_id":"d7rp3ee","thanks_reply_score":2,"thanks_reply_text":"Thanks. I like your suggestions.","thanks_reply_timestamp":"2016-09-18T12:50:57+00:00"}} -{"user_id":"anon_05400e097682b991","timestamp":"2016-09-20T21:28:08+00:00","subreddit":"LanguageTechnology","query":"How to evaluate POS tagger results\n\nI've been working on a specialized, sparsely connected neural network for named entity recognition and decided to try using it on POS tagging. It seems to perform exceptionally well on both the training data and the testing data. I studied AI and a lot of linguistics back when I was in school but am not professionally involved in NLP or AI, though I work with them as a sort of hobby. With that in mind, I would appreciate some opinions on my results so I can get some perspective or fix possible errors in my evaluation criteria.\n\nThe POS tagger model was trained on the UD Treebank training set (en-ud-train.conllu) from http://universaldependencies.org/en/overview/introduction.html . The model was tested on the UD Treebank test set (en-ud-test.conllu), the portion of the Penn Treebank that's packaged with the Python Natural Language Tool Kit, and the NAIST-NTT Ted Talk Treebank (all of the dependency files in the en-dep directory) from http://ahclab.naist.jp/resource/tedtreebank/ .\n\nThe results are as follows:\n\nTraining Set name | per tag accuracy | sentence accuracy | avg sentence length | used as training set\n:--|:--:|:--:|:--:|--:\nen-ud-train.conllu | 99.9% | 98.9% | 16.3 words | True\nen-ud-test.conllu | 92.7% | 55.6% | 12 words | False\nted-talk | 92.4% | 35.3% | 19 words | False\npenn-nltl | 89.9% | 18.2% | 24.2 words | False\n\n\nAfter looking at the POS tagger benchmarks here https://aclweb.org/aclwiki/index.php?title=POS_Tagging_(State_of_the_art) and Matthew Honnibal's results here http://spacy.io/blog/part-of-speech-pos-tagger-in-python, my tagger seems to be on par with a state-of-the-art tagger. Is this a reasonable conclusion to draw? Is there any reason to think that training on the Wall Street Journal data in the full Penn Treebank would cause a significant decline in performance? Thanks for any thoughts and insights.","preferred_answer":"Google claims that the implementation of Syntaxnet in Andor et al., is the most accurate POS-tagger published, so have a look at that paper.\n\nMost of the training data from ConLL09 is available online, so you can fairly easily compare.\n\nI don't really see how your results are on par with state of the art, but they are also not displayed in any way that is easy to compare.\n\nhttps://github.com/tensorflow/models/tree/master/syntaxnet","top_comment":"Good job. Here's a paper by Manning on [how to test the POS tasks.](http://nlp.stanford.edu/pubs/CICLing2011-manning-tagging.pdf) Remember that accuracies drop markedly when\nthere are differences in topic, epoch, or writing style between the training and\noperational data. What's your sentence accuracy?","metadata":{"post_id":"53pqtb","post_score":10,"answer_comment_id":"d7vbhjn","answer_score":1,"answerer_anon_id":"anon_dfaac54c3eb80f80","top_comment_id":"d7v8s3i","top_comment_score":2,"top_comment_anon_id":"anon_1238a10e0569a83f","top_equals_preferred":false,"thanks_reply_id":"d7vch4n","thanks_reply_score":2,"thanks_reply_text":"Thanks for pointing out the paper. I've updated the display of the data to use tables if that helps.","thanks_reply_timestamp":"2016-09-21T00:03:59+00:00"}} -{"user_id":"anon_535c95096b503652","timestamp":"2016-09-22T17:08:30+00:00","subreddit":"LanguageTechnology","query":"Are there any good (free) plain text corpus documents for experimenting with NLP?\n\nI am looking for documents that don't require a lot of cleaning, that can be taken immediately from the source and processed. Wikipedia is a great source, and can be easily converted to text, but then requires that meta documents be cleaned, a step I would like to skip for now. Is there a corpus of short stories or news articles maybe, in plain text, that can be taken as is? Thanks for your help!","preferred_answer":"Project Gutenberg! They have tons of free books in text form, though you might have to remove the first ~50 or so lines which are usually just general information. http://www.gutenberg.org/\nEdit: Found a cleansed, bulk, Gutenberg dataset here: http://web.eecs.umich.edu/~lahiri/gutenberg_dataset.html","top_comment":"Project Gutenberg! They have tons of free books in text form, though you might have to remove the first ~50 or so lines which are usually just general information. http://www.gutenberg.org/\nEdit: Found a cleansed, bulk, Gutenberg dataset here: http://web.eecs.umich.edu/~lahiri/gutenberg_dataset.html","metadata":{"post_id":"54006z","post_score":11,"answer_comment_id":"d7yehxu","answer_score":5,"answerer_anon_id":"anon_be82399032d727c6","top_comment_id":"d7yehxu","top_comment_score":5,"top_comment_anon_id":"anon_be82399032d727c6","top_equals_preferred":true,"thanks_reply_id":"d7yq4pf","thanks_reply_score":1,"thanks_reply_text":"Awesome sweet thanks!","thanks_reply_timestamp":"2016-09-23T11:49:19+00:00"}} -{"user_id":"anon_7e8f1be453a38f6d","timestamp":"2016-10-02T23:35:50+00:00","subreddit":"LanguageTechnology","query":"How to implement a contextual spell checker?\n\nHi r/LanguageTechnology,\n\nFor a while now, I've been thinking about working on a side-project to sharpen up my NLP skills and I came across a contextual spell checking problem. For example, a phrase \"their is\" might be spelled correctly but it clearly should be corrected to \"there is\". Many other homonyms 'escape' common spell check tests but are clearly used wrong in a sentence.\n\nAre there any good references on how one would go about implementing a contextual spell checker for English? Or does anyone have some general advice? I plan on sharing me code once I'm done with it.\n\nThanks!","preferred_answer":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","top_comment":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","metadata":{"post_id":"55kxbz","post_score":3,"answer_comment_id":"d8bma6j","answer_score":2,"answerer_anon_id":"anon_0d04e7a637802850","top_comment_id":"d8bma6j","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":true,"thanks_reply_id":"d8cm6ok","thanks_reply_score":1,"thanks_reply_text":"Thanks! Yes, MCMC is one of the first things that popped into my mind as I was thinking about this problem. I'll first have to gather some data.","thanks_reply_timestamp":"2016-10-03T20:40:16+00:00"}} -{"user_id":"anon_7e8f1be453a38f6d","timestamp":"2016-10-02T23:35:50+00:00","subreddit":"LanguageTechnology","query":"How to implement a contextual spell checker?\n\nHi r/LanguageTechnology,\n\nFor a while now, I've been thinking about working on a side-project to sharpen up my NLP skills and I came across a contextual spell checking problem. For example, a phrase \"their is\" might be spelled correctly but it clearly should be corrected to \"there is\". Many other homonyms 'escape' common spell check tests but are clearly used wrong in a sentence.\n\nAre there any good references on how one would go about implementing a contextual spell checker for English? Or does anyone have some general advice? I plan on sharing me code once I'm done with it.\n\nThanks!","preferred_answer":"Take the sentence with errors, tokenize, build a trellis/lattice with alternatives for each word, use Viterbi alg to find the best path according to a language model. Though you need to come up with reasonable probabilities for the errors. Microsoft had a good challenge around this a few years back for Bing I think.\n\nFor starters though, it'll be easier to develop by introducing random errors and seeing how well you can reverse that, before moving on to real-word errors. \n\nAlso, here's a [useful guide](http://norvig.com/spell-correct.html) to start. It doesn't do real-word error correction but I think it links to some or provides more description.","top_comment":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","metadata":{"post_id":"55kxbz","post_score":3,"answer_comment_id":"d8br9un","answer_score":2,"answerer_anon_id":"anon_d25654f4502f77ee","top_comment_id":"d8bma6j","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d8cmb4a","thanks_reply_score":1,"thanks_reply_text":"Thank you so much! I've gone through Norvig's method few years ago and that has been a huge influence in my thinking. It's a really elegant solution. I'll see how I could expand it to contextual errors.\n\nI also don't have a corpus of spelling errors or contextual spelling errors so I'm not sure how to exactly fill that void...","thanks_reply_timestamp":"2016-10-03T20:42:55+00:00"}} -{"user_id":"anon_7e8f1be453a38f6d","timestamp":"2016-10-02T23:35:50+00:00","subreddit":"LanguageTechnology","query":"How to implement a contextual spell checker?\n\nHi r/LanguageTechnology,\n\nFor a while now, I've been thinking about working on a side-project to sharpen up my NLP skills and I came across a contextual spell checking problem. For example, a phrase \"their is\" might be spelled correctly but it clearly should be corrected to \"there is\". Many other homonyms 'escape' common spell check tests but are clearly used wrong in a sentence.\n\nAre there any good references on how one would go about implementing a contextual spell checker for English? Or does anyone have some general advice? I plan on sharing me code once I'm done with it.\n\nThanks!","preferred_answer":"If you really want to focus on homonyms, I'd suggest running Soundex on the top 5000 English words or so and forming your confusable groups that way. And maybe make up some arbitrary rule like 5% chance of a homonym error if both the correct word and confusable word are in top 1000, 2% in top 5000, or something like that. Then you can generate errors on new data with the truth values.\n\nOr if it's not going to be for commercial use I think there are some lists built into MS Word that you can browse through and edit. You'd still need to make educated guesses about the error rates but it'd be something to start with.\n\nIt's not exact but it should give you enough to get a good start while you search for good corpus data for actual typos.","top_comment":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","metadata":{"post_id":"55kxbz","post_score":3,"answer_comment_id":"d8cnirs","answer_score":2,"answerer_anon_id":"anon_d25654f4502f77ee","top_comment_id":"d8bma6j","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d8co963","thanks_reply_score":1,"thanks_reply_text":"Thank you so much for taking the time to answer my question!\n\nSince you know so much about this subject, I have a tangential question about spelling that's been bothering me as well.. \n\nWhen typing on a smartphone, how do some of those software keyboards automatically correct misspellings when your fingers hit adjacent letters on the keyboard? What kind of models do they use to automatically figure out what you meant to type? I've been wondering about this for a while but was unable to find some info on it...\n\nThank you!","thanks_reply_timestamp":"2016-10-03T21:24:24+00:00"}} -{"user_id":"anon_7e8f1be453a38f6d","timestamp":"2016-10-02T23:35:50+00:00","subreddit":"LanguageTechnology","query":"How to implement a contextual spell checker?\n\nHi r/LanguageTechnology,\n\nFor a while now, I've been thinking about working on a side-project to sharpen up my NLP skills and I came across a contextual spell checking problem. For example, a phrase \"their is\" might be spelled correctly but it clearly should be corrected to \"there is\". Many other homonyms 'escape' common spell check tests but are clearly used wrong in a sentence.\n\nAre there any good references on how one would go about implementing a contextual spell checker for English? Or does anyone have some general advice? I plan on sharing me code once I'm done with it.\n\nThanks!","preferred_answer":"Oh actually, I used to do language modeling for Swype for years. I did the backend work for a contextual spell corrector there called smart editor.\n\nEach system deals with things differently, often because version 1 was done before anyone with NLP/ML background got involved. Just making a caveat that real software is usually more complex for historical/political/deadline/etc reasons.\n\nThe simplest way to explain the entirety is to describe it as a noisy channel model problem, [good slides here](https://web.stanford.edu/class/cs124/lec/spelling.pdf)- you try to type one thing and it gets messed up by some noise. One way to recover the original is to try to reverse the process with probabilities. So what you want is\n\nargmax_{candidate} P(candidate | observed data)\n\nWhere candidate is a possible version of the original. Solving that directly is really hard so you use Bayes rule and then drop the denominator cause it's just P(observed) and that doesn't change for all the alternate candidates you try. So you do this:\n\nargmax_{candidate} P(candidate) * P(observed data | candidate)\n\nSay you're processing one sentence at a time (though you could process one word at a time to simplify but it sacrifices some accuracy). Then \"candidate\" is a full sentence and you can come up with a probability for that given a language model. The other part is *exactly* what you're asking about and you can start off by doing edit distance and making up probabilities of each kind of edit. Or if you get a corpus with uncorrected and corrected typos then you can actually measure good probabilities on this - I think [this paper](http://www-scf.usc.edu/~csci572/papers/Cucerzan.pdf) was an example of mining that from people revising their search queries if I remember right.\n\nBut as far as I know, nobody actually has good data for mobile keyboards. Instead they mostly do tricks based on keyboard layouts, like make up some tunable function based on distance from key centers or just a uniform distribution over all touching keys.\n\nYou can find some papers on the Apple style, which I think people call key target resizing. At least that was their approach years ago, probably now it's something better.\n\nBut one caveat is that this is only for mishits - hitting a nearby key. What I've seen for handling transpositions is usually about trying to build it into edit distance. And for phonetic errors usually I've seen people handle that with an alternate error model.\n\nAnd there's one more thing you should worry about: finding a list of candidates to iterate over. That's the hidden third part of any noisy channel implementation cause it has to be small enough to actually iterate over (imagine iterating over all possible English sentences lol).\n\nThe reason I've harped on noisy channel model so much is because it's exactly the same problem for speech recognition or machine translation. The language modeling is about the same but for each problem you need to find a clever way to make a small list of candidates (or a lattice) and some sort of channel model. Machine translation is beginning to diverge from noisy channel model a bit though.\n\nAnyway sorry I've typed way too much but feel free to ask any questions or I can try to find some more old links for you; been a couple years since I was working on this.","top_comment":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","metadata":{"post_id":"55kxbz","post_score":3,"answer_comment_id":"d8cq2o7","answer_score":2,"answerer_anon_id":"anon_d25654f4502f77ee","top_comment_id":"d8bma6j","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d8cqzwm","thanks_reply_score":1,"thanks_reply_text":"Absolutely amazing answer from an authoritative source! I can't thank you enough, trnka!!! Thanks again!","thanks_reply_timestamp":"2016-10-03T22:27:01+00:00"}} -{"user_id":"anon_6783b34b17da5450","timestamp":"2016-10-04T15:51:41+00:00","subreddit":"LanguageTechnology","query":"Labeling documents with short text labels after topic modeling?\n\nIf I generate a topic model (LDA, PLSA) for a group of documents, is there then a way that I could label each document with a one-to-two word label that describes the document content?\n\nFor example, if I was modeling local business listings/reviews on yelp, is there a reliable way to generate labels such as \"Coffee,\" \"Clothes,\" etc?\n\nI know this is a lot to ask, but it is a problem that I am interested in and I figured that I'm not the only one. It seems like I might be able to use the highest probability words for a given topic, but I know that it will probably be more complicated than that. Each word can be found in multiple topics, and each document will contain multiple topics.","preferred_answer":"No, it's as simple as that. The results won't be very good, though, as they depend highly on the input data. \n\nAnother way is to predefine labels, manually, possibly based on the previous method. Then you can assign topics to the labels using your model. From there it's easy to assign labels to topics.","top_comment":"Have a look at \"Machine Reading Tea Leaves\" by Lau et al, they introduce a method to do it semi-automatically using Wikipedia data. In any case, as already said, it will highly depend on your input data and on the parameters you run your LDA with.\n\nI've always done manually, using an existing or created-just-for-that controlled vocabulary. Some topics really are latent and are not present in the tokens output by LDA, it's their addition that makes the topic. Then again, it really depends on how specific the input data is...","metadata":{"post_id":"55u56g","post_score":2,"answer_comment_id":"d8ds7c3","answer_score":2,"answerer_anon_id":"anon_e1374457a590867a","top_comment_id":"d8e2lye","top_comment_score":3,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":false,"thanks_reply_id":"d8e622h","thanks_reply_score":1,"thanks_reply_text":"Gotcha. Thanks for the response!","thanks_reply_timestamp":"2016-10-04T22:11:28+00:00"}} -{"user_id":"anon_6783b34b17da5450","timestamp":"2016-10-04T15:51:41+00:00","subreddit":"LanguageTechnology","query":"Labeling documents with short text labels after topic modeling?\n\nIf I generate a topic model (LDA, PLSA) for a group of documents, is there then a way that I could label each document with a one-to-two word label that describes the document content?\n\nFor example, if I was modeling local business listings/reviews on yelp, is there a reliable way to generate labels such as \"Coffee,\" \"Clothes,\" etc?\n\nI know this is a lot to ask, but it is a problem that I am interested in and I figured that I'm not the only one. It seems like I might be able to use the highest probability words for a given topic, but I know that it will probably be more complicated than that. Each word can be found in multiple topics, and each document will contain multiple topics.","preferred_answer":"Have a look at \"Machine Reading Tea Leaves\" by Lau et al, they introduce a method to do it semi-automatically using Wikipedia data. In any case, as already said, it will highly depend on your input data and on the parameters you run your LDA with.\n\nI've always done manually, using an existing or created-just-for-that controlled vocabulary. Some topics really are latent and are not present in the tokens output by LDA, it's their addition that makes the topic. Then again, it really depends on how specific the input data is...","top_comment":"Have a look at \"Machine Reading Tea Leaves\" by Lau et al, they introduce a method to do it semi-automatically using Wikipedia data. In any case, as already said, it will highly depend on your input data and on the parameters you run your LDA with.\n\nI've always done manually, using an existing or created-just-for-that controlled vocabulary. Some topics really are latent and are not present in the tokens output by LDA, it's their addition that makes the topic. Then again, it really depends on how specific the input data is...","metadata":{"post_id":"55u56g","post_score":2,"answer_comment_id":"d8e2lye","answer_score":3,"answerer_anon_id":"anon_542b574d59e858c1","top_comment_id":"d8e2lye","top_comment_score":3,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":true,"thanks_reply_id":"d8e62x7","thanks_reply_score":1,"thanks_reply_text":"I have not, but I'll give it a read. Thanks!","thanks_reply_timestamp":"2016-10-04T22:12:02+00:00"}} -{"user_id":"anon_7e8f1be453a38f6d","timestamp":"2016-10-02T23:35:50+00:00","subreddit":"LanguageTechnology","query":"How to implement a contextual spell checker?\n\nHi r/LanguageTechnology,\n\nFor a while now, I've been thinking about working on a side-project to sharpen up my NLP skills and I came across a contextual spell checking problem. For example, a phrase \"their is\" might be spelled correctly but it clearly should be corrected to \"there is\". Many other homonyms 'escape' common spell check tests but are clearly used wrong in a sentence.\n\nAre there any good references on how one would go about implementing a contextual spell checker for English? Or does anyone have some general advice? I plan on sharing me code once I'm done with it.\n\nThanks!","preferred_answer":"If you are interested for contextual spell checking, a sequence to sequence deep learning model may be useful. RNNs can be a good/better alternative for Markov models if you want to store context for large chunk.","top_comment":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","metadata":{"post_id":"55kxbz","post_score":3,"answer_comment_id":"d8gczzp","answer_score":2,"answerer_anon_id":"anon_9449556516b75b0a","top_comment_id":"d8bma6j","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d8gmyvl","thanks_reply_score":1,"thanks_reply_text":"Thank you so much for replying! Do you have any references you could recommend to me to read/watch? I'm just getting into DL so I'm not sure how I could go about it. Thanks again!","thanks_reply_timestamp":"2016-10-06T16:44:58+00:00"}} -{"user_id":"anon_7e8f1be453a38f6d","timestamp":"2016-10-02T23:35:50+00:00","subreddit":"LanguageTechnology","query":"How to implement a contextual spell checker?\n\nHi r/LanguageTechnology,\n\nFor a while now, I've been thinking about working on a side-project to sharpen up my NLP skills and I came across a contextual spell checking problem. For example, a phrase \"their is\" might be spelled correctly but it clearly should be corrected to \"there is\". Many other homonyms 'escape' common spell check tests but are clearly used wrong in a sentence.\n\nAre there any good references on how one would go about implementing a contextual spell checker for English? Or does anyone have some general advice? I plan on sharing me code once I'm done with it.\n\nThanks!","preferred_answer":"Yeah sure, refer to [this blog](http://karpathy.github.io/2015/05/21/rnn-effectiveness/). Some very nice uses have been posted in comments there. There are many more contents available online.","top_comment":"It will rely on probabilistic models of word, POS tags given previous and next tokens that follow. The forward backward algorithm is a good place to start. Markov models and MLE.","metadata":{"post_id":"55kxbz","post_score":3,"answer_comment_id":"d8gnckj","answer_score":2,"answerer_anon_id":"anon_9449556516b75b0a","top_comment_id":"d8bma6j","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":false,"thanks_reply_id":"d8gny0i","thanks_reply_score":1,"thanks_reply_text":"Thank you!","thanks_reply_timestamp":"2016-10-06T17:04:43+00:00"}} -{"user_id":"anon_5c4eb6174275c6cc","timestamp":"2016-10-11T21:01:30+00:00","subreddit":"LanguageTechnology","query":"Any ideas on how to go about programmatically checking if a sentence makes sense ?\n\nThe goal is to be able to detect computer generated spun content. Here are some examples of spun text if you're not familiar:\n\n\"As a explicit art fashionable for an advertising organization, you will job to assist put up for auction customers' crop and/or armed forces to their aim marketplace by your original skill and technological ability.\"\n\n\"The actual apple iphone application shop is definitely an abundant cherish residence of useful apps.\"\n\nBasically, the computer has replaced words with various synonyms in an attempt to make content unique to bypass plagiarism detection. My goal is to make a system that can detect this gibberish text to a certain degree. If anyone has any ideas on where to start it would be much appreciated. Someone on another forum proposed POS tagging to begin with, but if the words are spun as synonyms I don't think that would work very well?","preferred_answer":"Basic LM task - n-gram model will tackle this alright, even for n=1. I did a blog post about precisely this a while back, might be interesting - http://seorant.blogspot.ru/2008/06/how-not-to-keyword-spin.html","top_comment":"Easiest way to get a decent accuracy benchmark would be to just have a distance function that compares the counts of all sets of unigrams, bigrams, trigrams, and more n-grams to a dataset of a huge collection of sentences that we know make sense.\n\nYes you can create odd ball sentences that might classify as logical, but you are going to filter out about 90% of the incoherent sentences this way.\n\nFor example the trigrams \"abundant cherish residence\" would easily flag the second sentence, and \"a explicit art fashionable\" is going to be a dead giveaway for the first one.","metadata":{"post_id":"570da2","post_score":11,"answer_comment_id":"d8omt2n","answer_score":3,"answerer_anon_id":"anon_3ca7ca29c6d87af8","top_comment_id":"d8o1rj4","top_comment_score":5,"top_comment_anon_id":"anon_ace6771ea9f94718","top_equals_preferred":false,"thanks_reply_id":"d8ppomy","thanks_reply_score":1,"thanks_reply_text":"Awesome thanks!","thanks_reply_timestamp":"2016-10-13T02:13:40+00:00"}} -{"user_id":"anon_488965cb984d612f","timestamp":"2016-10-22T21:04:31+00:00","subreddit":"LanguageTechnology","query":"Does anyone know an NER tagger for organisations with gazetteer?\n\nHi,\n\nDoes anyone know an NER tagger for organisations that features a gazetteer?\n\nThe problem I have is the following:\n\n* I would like to tag organisations in sentences (ORG)\n* The NER tagger I have tried (i.a. spacy.io, Stanford, ...) are supersensitive to capitalisation and don't really understand if a noun really is an organisation or not (Toyota = ORG; toyota = not ORG).\n* Also the NER taggers I have seen are completely ignorant of clues in the sentence (e.g. verbs like \"manufactures\", \"issues shares\" etc. that are more suggestive of a company)\n\nWhich solution would be the best ORG NER tagger?\nIs there any NER tagger out there that has been preloaded with a list / ontology of the most well-known companies at least?\n\nMany thanks for any hints.","preferred_answer":"Dbpedia spotlight scan be used to identify items from wikipedia. Based on dbpedia properties the matches can be subsetted to include only organizations. It is a publicly available as a webservice so it's pretty easy to get started with.\n\nIf you have a gazetteer, Stanbol's EntityLinkingEngine can identify entities using a custom vocabulary, but it can be difficult to configure.","top_comment":"As I do that kind of stuff for a living (commercial NLP), I can tell you that there is no truly viable, free solution out there. The recognition performance of tools like CoreNLP or SpaCy are already below what most clients would expect, and if you add grounding error to that, well... Plus, the type of info you are asking for (gazetteers about companies) are effectively compiled by organizations that make a living from selling that data - for quite a chunk of money. Web scraping hooray! :-)","metadata":{"post_id":"58v7r9","post_score":3,"answer_comment_id":"d93urf5","answer_score":2,"answerer_anon_id":"anon_947ed76fcbc0532a","top_comment_id":"d947sdj","top_comment_score":4,"top_comment_anon_id":"anon_74c3aa8f35112e84","top_equals_preferred":false,"thanks_reply_id":"d94ekgt","thanks_reply_score":1,"thanks_reply_text":"Thank you very much! That was useful.\nI will give it a try!","thanks_reply_timestamp":"2016-10-23T17:00:48+00:00"}} -{"user_id":"anon_2297705017fb29f3","timestamp":"2016-11-04T04:00:51+00:00","subreddit":"LanguageTechnology","query":"ELI5 neural network mt\n\nI am fairly familiar with ideas behind rule based and statistical mt, but know very little about neural networks or machine learning. \n\nDo neural network mt engines still need large bilingual corpora to work?\n\nHow exactly does it improve mt compared to older methods?","preferred_answer":"[NEURAL MACHINE TRANSLATION](https://arxiv.org/pdf/1409.0473.pdf)\n\nSummary: RNN's do not outperform phrase-based translation systems. Both require sentence alignments for the starting and target language. This paper takes a unique approach by using RNN as the sole means for MT, previously it had been used as an add-on in phrase based systems.","top_comment":"[NEURAL MACHINE TRANSLATION](https://arxiv.org/pdf/1409.0473.pdf)\n\nSummary: RNN's do not outperform phrase-based translation systems. Both require sentence alignments for the starting and target language. This paper takes a unique approach by using RNN as the sole means for MT, previously it had been used as an add-on in phrase based systems.","metadata":{"post_id":"5b1juu","post_score":7,"answer_comment_id":"d9l61i1","answer_score":2,"answerer_anon_id":"anon_0d04e7a637802850","top_comment_id":"d9l61i1","top_comment_score":2,"top_comment_anon_id":"anon_0d04e7a637802850","top_equals_preferred":true,"thanks_reply_id":"d9l6mj0","thanks_reply_score":2,"thanks_reply_text":"Thanks!","thanks_reply_timestamp":"2016-11-04T06:44:44+00:00"}} -{"user_id":"anon_ebe2b0e6a2ce3d1f","timestamp":"2016-11-13T00:19:16+00:00","subreddit":"LanguageTechnology","query":"Anyone know a way of using NLP to select road segments on a Google Map (or any map really).\n\nGiven a description like \"On Water St between 6th and 10th St\" or \"On Main St between Carrick Dr and Frecker Dr\" assuming these streets both cross the street mentioned.\nDoes this already exist?","preferred_answer":"Take a look at Mapzen Search. I'm not sure how complex a query it can take but it's probably the closest open source tool available.","top_comment":"Take a look at Mapzen Search. I'm not sure how complex a query it can take but it's probably the closest open source tool available.","metadata":{"post_id":"5cncz3","post_score":3,"answer_comment_id":"d9y2ex1","answer_score":2,"answerer_anon_id":"anon_c2db370b116fa3de","top_comment_id":"d9y2ex1","top_comment_score":2,"top_comment_anon_id":"anon_c2db370b116fa3de","top_equals_preferred":true,"thanks_reply_id":"d9ygzek","thanks_reply_score":1,"thanks_reply_text":"Thanks!","thanks_reply_timestamp":"2016-11-13T15:11:31+00:00"}} -{"user_id":"anon_92fa1b5fde75183d","timestamp":"2016-11-13T16:03:55+00:00","subreddit":"LanguageTechnology","query":"How to deal with probabilistic selection of topics in LDA (robustness)?\n\nI'm using gensim to model the hidden topics of a corpus. Most of the time the topics make good sense, but a few times they make obviously no sense (for example getting a topic with the word \"internet\" associated strongly to a document from mid XXth century). It seems to me this is bound to happen in a few cases due to the probabilistic nature of the LDA model. This is an issue because any inference made with a single pass of LDA is not very robust, as the \"important\" topics will likely change a bit next iteration. I'm curious to hear some strategies you might use to overcome this. Thanks.","preferred_answer":"You might want to read \"How many topics?\" by Greene et al. Basically, in LDA, you have to choose how many topics you want. The rule of thumb is that you run it several times with several different configurations (i.e. different amounts of topics) then you check what better suits your corpus. It really depends on the style, the register, the size, the language, the source, ... of the corpus so there's no real solution here.\n\n\nGreene, Derek, Derek O’Callaghan, and Pádraig Cunningham. \"How many topics? stability analysis for topic models.\" Joint European Conference on Machine Learning and Knowledge Discovery in Databases. Springer Berlin Heidelberg, 2014.","top_comment":"> This paper discusses stability in the context of the number of topics (not in the context of the actual composition of topics derived from a probabilistic process, for any given -maybe optimal- k)\n\nIndeed. But they're linked, in a way: too many topics will results in topics that have unrelated tokens in common, because there *has* to be that many topics.","metadata":{"post_id":"5cqjhm","post_score":9,"answer_comment_id":"d9ylh4m","answer_score":1,"answerer_anon_id":"anon_542b574d59e858c1","top_comment_id":"d9ynuvr","top_comment_score":2,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":false,"thanks_reply_id":"d9ymysh","thanks_reply_score":1,"thanks_reply_text":"Good read, thanks for the reference. This paper discusses stability in the context of the number of topics (not in the context of the actual composition of topics derived from a probabilistic process, for any given -maybe optimal- k), but a similar logic to test stability seems likely useful. Cheers.","thanks_reply_timestamp":"2016-11-13T17:52:05+00:00"}} -{"user_id":"anon_92fa1b5fde75183d","timestamp":"2016-11-13T16:03:55+00:00","subreddit":"LanguageTechnology","query":"How to deal with probabilistic selection of topics in LDA (robustness)?\n\nI'm using gensim to model the hidden topics of a corpus. Most of the time the topics make good sense, but a few times they make obviously no sense (for example getting a topic with the word \"internet\" associated strongly to a document from mid XXth century). It seems to me this is bound to happen in a few cases due to the probabilistic nature of the LDA model. This is an issue because any inference made with a single pass of LDA is not very robust, as the \"important\" topics will likely change a bit next iteration. I'm curious to hear some strategies you might use to overcome this. Thanks.","preferred_answer":"Topics that have 'unrelated' words have \"low coherence.\" There are several models that take this notion into account, and try to find coherent as well as explanatory and relevant topics. An example is http://www.ics.uci.edu/~newman/pubs/rtm_nips.pdf , another is https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjrgdK6mKnQAhUL74MKHU2OAQgQFggcMAA&url=https%3A%2F%2Fwww.cics.umass.edu%2F~wallach%2Fpublications%2Fmimno11optimizing.pdf&usg=AFQjCNHUkn8sSMk0GBBOUvWeWtcXl1uK3A&sig2=anJx_sF9rueNU7lX9tmA-g. These methods are non-trivial to implement, hopefully you can find implementations.","top_comment":"> This paper discusses stability in the context of the number of topics (not in the context of the actual composition of topics derived from a probabilistic process, for any given -maybe optimal- k)\n\nIndeed. But they're linked, in a way: too many topics will results in topics that have unrelated tokens in common, because there *has* to be that many topics.","metadata":{"post_id":"5cqjhm","post_score":9,"answer_comment_id":"da0ctq0","answer_score":2,"answerer_anon_id":"anon_1f3804539580f8f3","top_comment_id":"d9ynuvr","top_comment_score":2,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":false,"thanks_reply_id":"da1c3ih","thanks_reply_score":1,"thanks_reply_text":"Thanks I'll read these carefully. Seems like they don't make their code available -weird.","thanks_reply_timestamp":"2016-11-15T15:31:30+00:00"}} -{"user_id":"anon_748b8c0c9a1c0be3","timestamp":"2016-11-15T12:48:35+00:00","subreddit":"LanguageTechnology","query":"What is the state-of-the-art in: parsing research papers?\n\nHello! I'm new in the natural language processing world and I would like to know the state-of-the-art related to parse the methodology (procedure to acomplish the goal in research papers) in order to automatically obtain a recipe-like text. I need to indentify the actions (suspend, dilute, grow), ingredients (mating mixture, 10 mM MgSO4) and meta-actions to obtain the method used in a ordered and more simple way.\nI know this is a complicated task but any help/guide about where to start, how to do it, previous work in this subject, literature, etc. would be of great help for me.\nThank you =)","preferred_answer":"There is [more than one way to parse natural language](https://en.wikipedia.org/wiki/Parse_tree). Right now, dependency parsing is the trendy method of choice, partly because it is faster.\n\nPublished state-of-the-art (dependency) parser accuracy is currently held by [Kiperwasser and Goldberg (2016)] (https://transacl.org/ojs/index.php/tacl/article/view/885) , accepted to TACL and presented at ACL 2016\n\nWord is the Google parsing team have since beaten them but their paper hasn't been published yet.\n\nIf you want to read a book for background in dependency parsing, you could start with [Dependency Parsing by Kuebler, McDonald and Nivre] (https://books.google.se/books/about/Dependency_Parsing.html?id=k3iiup7HB9UC&redir_esc=y) . Another book in that series on NLP with Neural Networks, written by Goldberg, will be published soon.\n\nFor over a decade much research has been focused on transition-based parsing, as explained in Dependency Parsing. In the past few years, the best models use embeddings, recursive/recurrent neural networks, and multi-layered perceptrons (aka \"deep neural networks/deep learning\") to predict transitions, with numerous variations on this basic concept. Of note, the Google parsing team's globally normalized variant, which also adds beam search [(Andor et al 2016)] (https://www.aclweb.org/anthology/P/P16/P16-1231.pdf).\n\nIf what you want is to use the output of a parser, you don't need to know how it works. You can use a parsing service like Google's beta of [parsing-as-a-service] (https://cloud.google.com/natural-language/), which runs the whole NLP pipeline for you (tokenization, tagging&parsing, sentiment, NER etc), or just download a parser with a trained model like [Stanford's Neural Net Parser] (http://nlp.stanford.edu/software/nndep.shtml).\n\nGood luck :)","top_comment":"There is [more than one way to parse natural language](https://en.wikipedia.org/wiki/Parse_tree). Right now, dependency parsing is the trendy method of choice, partly because it is faster.\n\nPublished state-of-the-art (dependency) parser accuracy is currently held by [Kiperwasser and Goldberg (2016)] (https://transacl.org/ojs/index.php/tacl/article/view/885) , accepted to TACL and presented at ACL 2016\n\nWord is the Google parsing team have since beaten them but their paper hasn't been published yet.\n\nIf you want to read a book for background in dependency parsing, you could start with [Dependency Parsing by Kuebler, McDonald and Nivre] (https://books.google.se/books/about/Dependency_Parsing.html?id=k3iiup7HB9UC&redir_esc=y) . Another book in that series on NLP with Neural Networks, written by Goldberg, will be published soon.\n\nFor over a decade much research has been focused on transition-based parsing, as explained in Dependency Parsing. In the past few years, the best models use embeddings, recursive/recurrent neural networks, and multi-layered perceptrons (aka \"deep neural networks/deep learning\") to predict transitions, with numerous variations on this basic concept. Of note, the Google parsing team's globally normalized variant, which also adds beam search [(Andor et al 2016)] (https://www.aclweb.org/anthology/P/P16/P16-1231.pdf).\n\nIf what you want is to use the output of a parser, you don't need to know how it works. You can use a parsing service like Google's beta of [parsing-as-a-service] (https://cloud.google.com/natural-language/), which runs the whole NLP pipeline for you (tokenization, tagging&parsing, sentiment, NER etc), or just download a parser with a trained model like [Stanford's Neural Net Parser] (http://nlp.stanford.edu/software/nndep.shtml).\n\nGood luck :)","metadata":{"post_id":"5d2bfc","post_score":13,"answer_comment_id":"da1cnf6","answer_score":10,"answerer_anon_id":"anon_2f74fe42fcaf5ded","top_comment_id":"da1cnf6","top_comment_score":10,"top_comment_anon_id":"anon_2f74fe42fcaf5ded","top_equals_preferred":true,"thanks_reply_id":"da1dzh5","thanks_reply_score":1,"thanks_reply_text":"Thanks man, Its a good starter point. I need to parse research papers so I need to start from the beginning and learn as much as I can.","thanks_reply_timestamp":"2016-11-15T16:12:30+00:00"}} -{"user_id":"anon_488965cb984d612f","timestamp":"2016-10-22T21:04:31+00:00","subreddit":"LanguageTechnology","query":"Does anyone know an NER tagger for organisations with gazetteer?\n\nHi,\n\nDoes anyone know an NER tagger for organisations that features a gazetteer?\n\nThe problem I have is the following:\n\n* I would like to tag organisations in sentences (ORG)\n* The NER tagger I have tried (i.a. spacy.io, Stanford, ...) are supersensitive to capitalisation and don't really understand if a noun really is an organisation or not (Toyota = ORG; toyota = not ORG).\n* Also the NER taggers I have seen are completely ignorant of clues in the sentence (e.g. verbs like \"manufactures\", \"issues shares\" etc. that are more suggestive of a company)\n\nWhich solution would be the best ORG NER tagger?\nIs there any NER tagger out there that has been preloaded with a list / ontology of the most well-known companies at least?\n\nMany thanks for any hints.","preferred_answer":"You can try the Illinois Named Entity Tagger, but I don't think it comes pre-loaded with well-known company names.\n\nhttps://cogcomp.cs.illinois.edu/page/software_view/NETagger\n\nI'd say that Stanford's CoreNLP is better.","top_comment":"As I do that kind of stuff for a living (commercial NLP), I can tell you that there is no truly viable, free solution out there. The recognition performance of tools like CoreNLP or SpaCy are already below what most clients would expect, and if you add grounding error to that, well... Plus, the type of info you are asking for (gazetteers about companies) are effectively compiled by organizations that make a living from selling that data - for quite a chunk of money. Web scraping hooray! :-)","metadata":{"post_id":"58v7r9","post_score":3,"answer_comment_id":"da1cikx","answer_score":2,"answerer_anon_id":"anon_edfd6f61c1e3d6a2","top_comment_id":"d947sdj","top_comment_score":4,"top_comment_anon_id":"anon_74c3aa8f35112e84","top_equals_preferred":false,"thanks_reply_id":"da1gelz","thanks_reply_score":1,"thanks_reply_text":"Thank you! I will look into to, too.","thanks_reply_timestamp":"2016-11-15T17:01:45+00:00"}} -{"user_id":"anon_edfd6f61c1e3d6a2","timestamp":"2016-11-15T15:34:44+00:00","subreddit":"LanguageTechnology","query":"[NLP Research] What papers would you recommend I read to get a broad idea about the current state of NLP research?\n\nI've been looking some up myself but this seems to be the latest one I can find. (Published in 2014)\n\nCambria, E., & White, B. (2014). Jumping NLP curves: A review of natural language processing research. IEEE Computational Intelligence Magazine, 9(2), 48–57. https://doi.org/10.1109/MCI.2014.2307227\n\nIs there anything more up-to-date?\n\nThanks!","preferred_answer":"If you want to be up to date on the latest, look through conference proceedings.\n\nHere are some of the major conferences that we aim for at the institute I'm associated with.\n\n* http://naacl.org/naacl-hlt-2016/\n* http://acl2016.org/\n* http://www.conll.org/\n* http://coling2016.anlp.jp/\n\nFor a more general overview, Jurafsky & Martin is in the process of writing the 3rd edition of his book \"Speech and Language Processing\",\n\nhttps://web.stanford.edu/~jurafsky/slp3/","top_comment":"If you want to be up to date on the latest, look through conference proceedings.\n\nHere are some of the major conferences that we aim for at the institute I'm associated with.\n\n* http://naacl.org/naacl-hlt-2016/\n* http://acl2016.org/\n* http://www.conll.org/\n* http://coling2016.anlp.jp/\n\nFor a more general overview, Jurafsky & Martin is in the process of writing the 3rd edition of his book \"Speech and Language Processing\",\n\nhttps://web.stanford.edu/~jurafsky/slp3/","metadata":{"post_id":"5d33s1","post_score":21,"answer_comment_id":"da1qxtz","answer_score":7,"answerer_anon_id":"anon_dfaac54c3eb80f80","top_comment_id":"da1qxtz","top_comment_score":7,"top_comment_anon_id":"anon_dfaac54c3eb80f80","top_equals_preferred":true,"thanks_reply_id":"da24yyh","thanks_reply_score":1,"thanks_reply_text":"Thank you!\nI'll look through them.","thanks_reply_timestamp":"2016-11-16T01:36:53+00:00"}} -{"user_id":"anon_edfd6f61c1e3d6a2","timestamp":"2016-11-15T15:34:44+00:00","subreddit":"LanguageTechnology","query":"[NLP Research] What papers would you recommend I read to get a broad idea about the current state of NLP research?\n\nI've been looking some up myself but this seems to be the latest one I can find. (Published in 2014)\n\nCambria, E., & White, B. (2014). Jumping NLP curves: A review of natural language processing research. IEEE Computational Intelligence Magazine, 9(2), 48–57. https://doi.org/10.1109/MCI.2014.2307227\n\nIs there anything more up-to-date?\n\nThanks!","preferred_answer":"[A Primer on Neural Network Models for Natural Language Processing (2015)](http://u.cs.biu.ac.il/~yogo/nnlp.pdf)\nThis is a pretty good summary of the last few years of the application of neural nets to NLP research.","top_comment":"If you want to be up to date on the latest, look through conference proceedings.\n\nHere are some of the major conferences that we aim for at the institute I'm associated with.\n\n* http://naacl.org/naacl-hlt-2016/\n* http://acl2016.org/\n* http://www.conll.org/\n* http://coling2016.anlp.jp/\n\nFor a more general overview, Jurafsky & Martin is in the process of writing the 3rd edition of his book \"Speech and Language Processing\",\n\nhttps://web.stanford.edu/~jurafsky/slp3/","metadata":{"post_id":"5d33s1","post_score":21,"answer_comment_id":"da1vd1m","answer_score":4,"answerer_anon_id":"anon_44cf94c7fd511f17","top_comment_id":"da1qxtz","top_comment_score":7,"top_comment_anon_id":"anon_dfaac54c3eb80f80","top_equals_preferred":false,"thanks_reply_id":"da24z7x","thanks_reply_score":1,"thanks_reply_text":"Thanks!","thanks_reply_timestamp":"2016-11-16T01:37:03+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2016-11-25T15:45:40+00:00","subreddit":"LanguageTechnology","query":"What should I do when the corpus quality is not so high and the word2vec doesn't work as expected?\n\nI used this implementation in github https://github.com/deborausujono/word2vecpy to train a small wrod2vec model in my own dataset, which contains about 10, 000 sentences from the subreddit \"dota2\". And the model doesn't work as expected. For instance, here are the word most similar to \"dota\":\nagainst\nMMR\nnow.\n3.5k\nvolvo\nthough\nI have no experience with word2vec before. Could you please tell me what can I do to improve the performance of the model?","preferred_answer":"You need lots of text. If you use gensim, you can take the original Google News vectors shared by Mikolov to start, and train on the DotA Reddit text from that point on.","top_comment":"You need lots of text. If you use gensim, you can take the original Google News vectors shared by Mikolov to start, and train on the DotA Reddit text from that point on.","metadata":{"post_id":"5eu5ey","post_score":6,"answer_comment_id":"daf7st7","answer_score":3,"answerer_anon_id":"anon_eefe0617080c002d","top_comment_id":"daf7st7","top_comment_score":3,"top_comment_anon_id":"anon_eefe0617080c002d","top_equals_preferred":true,"thanks_reply_id":"dafarkh","thanks_reply_score":1,"thanks_reply_text":"Thanks for reply. But seems that it takes huge amount of ram. Can I used the pretrained model directly and how?","thanks_reply_timestamp":"2016-11-25T18:11:59+00:00"}} -{"user_id":"anon_05f49c5ee34f8a2b","timestamp":"2016-11-27T17:42:42+00:00","subreddit":"LanguageTechnology","query":"Extracting meaning from dependency graph\n\nWhat post processing is typically used to extract meaning from a sentence's dependency graph?","preferred_answer":"Try SemanticRoleLabeling (SRL). Senna from http://ronan.collobert.com/ is still pretty good all round parser. The SRL labels are derived from the Constituency parser so there are a good few accumulated errors.\n\n\"Romel Casab, an Oakland County businessman and real estate owner, was freed on $10,000 unsecured bond Thursday, hours after being indicted on federal drug conspiracy and firearm charges.\"\n\n> And the question I want answered: was Casab indicted?\n\nThe senna parse (too messy to paste it all) says Yes :-/ Your going to have to write a parser to extract the Arguments of each verb in the senna parser output (A1 tentatively refers to the object, A0 is the agent)\n\nA1 Romel Casab, an Oakland County businessman and real estate owner \nV indicted \nA2 on federal drug conspiracy and firearm charges \n\nA1 Romel Casab, an Oakland County businessman and real estate owner \nV freed \nA2 on $10,000 unsecured bond \nTMP Thursday\n\n\"OpenIE\" is the keyword you should have a search with, there are a few packages around that work in this area. (IE=information extraction)","top_comment":"Dependencies give you something closer to functors and objects than plain constituent syntax ... but there are still levels to go before you can hit semantics - you need to get the 'deep syntax' sorted e.g. in 'I want to go', you might want to have 'I' as both the subject of semantic 'want' and of semantic 'go'. You also have things like working out which pronouns refer to which entities and so on (I think the dependency graph will probably help with that).\n\nUnfortunately my computational semantics class stopped at that point (i.e. no automated analysis of dependency graphs).\n\nso I guess really the question is: what sort of meaning do you want to get out of the graph?","metadata":{"post_id":"5f6fwz","post_score":10,"answer_comment_id":"daiqf3f","answer_score":2,"answerer_anon_id":"anon_11a88c9e7b0b901b","top_comment_id":"dai4n1o","top_comment_score":5,"top_comment_anon_id":"anon_504fdaa93c0be7a8","top_equals_preferred":false,"thanks_reply_id":"daj04ix","thanks_reply_score":1,"thanks_reply_text":"Thank you. I have tried the OpenIE component of Stanford core NLP, but it was not giving me satisfactory results.","thanks_reply_timestamp":"2016-11-28T14:29:28+00:00"}} -{"user_id":"anon_272c30f28aeb7874","timestamp":"2016-12-02T10:49:22+00:00","subreddit":"LanguageTechnology","query":"Would you like to build a meeting extractor together?\n\nI have recently seen x.ai and I found meeting extraction an extremely interesting technical project for NLP. I would like to build a Python tool to extract meetings from texts and return the place and time of a meeting.\n\nI need help building a meeting classifier and the initial labeled data set to decide whether documents are meeting invitations or not. To parse the meetings seems a simpler problem but I think there's opportunities for some interesting models in this area as well.\n\nTo this end initially to build a meeting classification model I need some help extracting meeting proposals, I have decided to use the ENRON email data set and the leaked Hillary emails as an initial corpus to build my meeting classifier.\n\nAfter having the meeting invitations I would like to extract and validate the times and places involved.\n\nGet in touch if you are interested! I think building the meeting corpus is the most time consuming part of the project my current strategy is to think about a list of relevant regex and get a subset of the emails I have based on these and hand mark these to build a labeled data set.","preferred_answer":"I may be able to lend a hand. Never tackled this kind of background buy have a background in comp ling.","top_comment":"We invested in a solution for the very problem you seem to be outlining -- isolating locations and times from natural language character data. Let me know if you'd like my help by PM?","metadata":{"post_id":"5g2nzp","post_score":6,"answer_comment_id":"dar4hea","answer_score":2,"answerer_anon_id":"anon_0d04e7a637802850","top_comment_id":"daqdaid","top_comment_score":2,"top_comment_anon_id":"anon_7d49e0355d132e3d","top_equals_preferred":false,"thanks_reply_id":"daw3sej","thanks_reply_score":1,"thanks_reply_text":"Thanks I will get in touch this weekend with everyone interested to set out a high level plan to achieve this. Could you elaborate which parts of the project interest you? I will need a lot of help in sourcing the corpora to build the meeting classifier and afterwards the location and time extraction have a lot more potential imo.","thanks_reply_timestamp":"2016-12-07T08:44:16+00:00"}} -{"user_id":"anon_cd8549d11111dc09","timestamp":"2016-12-21T04:39:31+00:00","subreddit":"LanguageTechnology","query":"I am trying to understand how the Amazon Echo and the Google Home devices differ in their approach to question answering. Where can I find out more?\n\nI am looking for a less technical and NOT stat-s heavy article or paper. Thanks","preferred_answer":"Not exactly what you are looking for but there hasn't been a response yet.\n\nEmbedded had a podcast episode recently where they talked about Echo/Home. http://embedded.fm/episodes/178\n\nMaybe this leads you in the right direction.","top_comment":"Not exactly what you are looking for but there hasn't been a response yet.\n\nEmbedded had a podcast episode recently where they talked about Echo/Home. http://embedded.fm/episodes/178\n\nMaybe this leads you in the right direction.","metadata":{"post_id":"5jhz2s","post_score":3,"answer_comment_id":"dbiljim","answer_score":2,"answerer_anon_id":"anon_8fd26d413b67ea2f","top_comment_id":"dbiljim","top_comment_score":2,"top_comment_anon_id":"anon_8fd26d413b67ea2f","top_equals_preferred":true,"thanks_reply_id":"dbjatax","thanks_reply_score":2,"thanks_reply_text":"> http://embedded.fm/episodes/178\n\nThis is an awesome podcast! And so recent. Thank you very much. ","thanks_reply_timestamp":"2016-12-23T05:32:55+00:00"}} -{"user_id":"anon_1238a10e0569a83f","timestamp":"2016-09-10T18:48:10+00:00","subreddit":"LanguageTechnology","query":"How to do a correct and fair evaluation of a model?\n\nI am an undergrad student here. Since I have no NLP / AI / ML professors in my school, I am trying to publish my paper (information retrieval) without any supervision / help. I was doing a literature review for the \"Related Work\" section and I found the following things:\n\n1. None of them tuned the parameters of the baseline / existing models. All of them chose some default values for the baselines. As a result, proposed models would eventually perform better.\n2. The data was not split into training-validation-testing sets properly. Many of them tuned parameters and hyperparameters on training set alone. Most of them did not give any parameter sensitivity analysis / bias-variance graphs.\n\nHow should I avoid these common bad practices (for which I am not aware of) in my paper? Is there some beginner's guide of do's and don'ts of assessing a model fairly? \n\nAny advice and suggestions would help. Thanks.","preferred_answer":"Aw, keep your head up. Paper rejection is constant, and peer review can often be a total dice roll. Good luck!","top_comment":"You bring up good points. These are methodological issues that are rampant in the community.\n\n1) It's not cheating to tune hyperparameters on the training set, it's just more likely to cause overfitting. Tuning them on the dev set usually leads to better test performance. Tuning hyperparams on the test set is *definitely* cheating.\n\n2) Parameter sensitivity is often avoided in the community because it's a ton of work, and it makes almost everything look terrible. While it's nice to see a method that's robust to hyperparameters, I don't really expect it. I'm usually happy as long as they say what are the most sensitive parameters in the paper, so future researchers know what is important to tune.\n\n3) Baselines should be tuned too. A whole bunch of Neural Network papers are especially guilty of this. This is far more common than is desired. After NN papers made up about 50-70% of ACL and 80% of NAACL this year, I expect next year people will be more critical of this in peer review.\n\n4) The right thing to do is to honestly try to get the baseline to perform as strongly as possible; but doing so makes it really difficult to publish.\n\n5) Sometimes you have to make methodological short cuts because you just need to publish/meet a deadline. No experimental setup is perfect. Try to avoid anything really bad, but also don't let every single potential tiny flaw hold you back. \n\n6) When writing things up, *be completely honest and exact*. Cheating isn't so bad; peer review can bring it up, or it just means readers will have healthy skepticism. That's okay. Cheating and not being honest about it? That's academic fraud.","metadata":{"post_id":"524i92","post_score":7,"answer_comment_id":"dby0e8b","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"d7hhnrn","top_comment_score":5,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":false,"thanks_reply_id":"dbzhglo","thanks_reply_score":1,"thanks_reply_text":"Thanks. Good luck to you too (if you are submitting anything to this ACL).","thanks_reply_timestamp":"2017-01-04T13:11:09+00:00"}} -{"user_id":"anon_dfefadb288942dea","timestamp":"2017-01-06T01:38:17+00:00","subreddit":"LanguageTechnology","query":"The written word, synthesized from input data?\n\n**Speech synthesis:** Audio -> Text \n**Natural Language Processing:** Text -> Data \n**???:** Data -> Text \n\nI'm trying to see what research, code, discussion, or anything really, exists for the process of taking data and generating natural language.\n\nAny pointers to articles, papers, websites or appropriate terminology would be appreciated. The search phrases I've used so far have yielded nothing useful at all.","preferred_answer":"I would do some searches with the phrase \"natural language generation\" \n\nMight not be exactly what you want but a person whose research might be relevant is Anni Nenkova at UPenn","top_comment":"I would do some searches with the phrase \"natural language generation\" \n\nMight not be exactly what you want but a person whose research might be relevant is Anni Nenkova at UPenn","metadata":{"post_id":"5man8t","post_score":4,"answer_comment_id":"dc27xi9","answer_score":3,"answerer_anon_id":"anon_a2848f954d009712","top_comment_id":"dc27xi9","top_comment_score":3,"top_comment_anon_id":"anon_a2848f954d009712","top_equals_preferred":true,"thanks_reply_id":"dc2a5qm","thanks_reply_score":1,"thanks_reply_text":"Ahah... that was the term I needed, thanks!","thanks_reply_timestamp":"2017-01-06T04:03:55+00:00"}} -{"user_id":"anon_dfefadb288942dea","timestamp":"2017-01-06T01:38:17+00:00","subreddit":"LanguageTechnology","query":"The written word, synthesized from input data?\n\n**Speech synthesis:** Audio -> Text \n**Natural Language Processing:** Text -> Data \n**???:** Data -> Text \n\nI'm trying to see what research, code, discussion, or anything really, exists for the process of taking data and generating natural language.\n\nAny pointers to articles, papers, websites or appropriate terminology would be appreciated. The search phrases I've used so far have yielded nothing useful at all.","preferred_answer":"Let me know if I can be of any help in your pursuit. I'm not technical in a data science sense but I have a good stats background and am sufficient in Python and APIs.","top_comment":"I would do some searches with the phrase \"natural language generation\" \n\nMight not be exactly what you want but a person whose research might be relevant is Anni Nenkova at UPenn","metadata":{"post_id":"5man8t","post_score":4,"answer_comment_id":"dc3e2o9","answer_score":1,"answerer_anon_id":"anon_9f7e262baef4dba2","top_comment_id":"dc27xi9","top_comment_score":3,"top_comment_anon_id":"anon_a2848f954d009712","top_equals_preferred":false,"thanks_reply_id":"dc3m81n","thanks_reply_score":1,"thanks_reply_text":"Thanks, I will!","thanks_reply_timestamp":"2017-01-07T00:44:44+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2017-02-02T10:10:29+00:00","subreddit":"LanguageTechnology","query":"What are some public data set for text generation?\n\nI'd like to build up a model which can model and learn to generate text like lyrics, reading, etc. Do you know where can I find some large data set for these kinds of tasks? Thanks.","preferred_answer":"Opensubtitles 2016, Reddit comments. Both can be downloaded freely. There was a thread on generation from reddit comments last week on /r/MachineLearning, I'll link it when I'm back home. There was also a thread about generating lyrics yestersay. People in /r/languagetechnology should stay tuned there, because the most interesting posts occasionally arise and aren't x-posted here, unfortunayely.","top_comment":"Opensubtitles 2016, Reddit comments. Both can be downloaded freely. There was a thread on generation from reddit comments last week on /r/MachineLearning, I'll link it when I'm back home. There was also a thread about generating lyrics yestersay. People in /r/languagetechnology should stay tuned there, because the most interesting posts occasionally arise and aren't x-posted here, unfortunayely.","metadata":{"post_id":"5rlygi","post_score":3,"answer_comment_id":"dd8bp9i","answer_score":3,"answerer_anon_id":"anon_4f7698cba224cddc","top_comment_id":"dd8bp9i","top_comment_score":3,"top_comment_anon_id":"anon_4f7698cba224cddc","top_equals_preferred":true,"thanks_reply_id":"dd8l5lh","thanks_reply_score":1,"thanks_reply_text":"Thanks for your comment! Could you please tell me where is the post of generating lyrics? Seems I could not find it on this page.\n","thanks_reply_timestamp":"2017-02-02T15:38:52+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2017-02-02T10:10:29+00:00","subreddit":"LanguageTechnology","query":"What are some public data set for text generation?\n\nI'd like to build up a model which can model and learn to generate text like lyrics, reading, etc. Do you know where can I find some large data set for these kinds of tasks? Thanks.","preferred_answer":"rap songs: https://www.reddit.com/r/MachineLearning/comments/5rc42r/p_one_of_my_first_ml_projects_i_trained_a_neural/\n\nchatbot: https://www.reddit.com/r/MachineLearning/comments/5lx7px/p_pretrained_rnn_chatbot/","top_comment":"Opensubtitles 2016, Reddit comments. Both can be downloaded freely. There was a thread on generation from reddit comments last week on /r/MachineLearning, I'll link it when I'm back home. There was also a thread about generating lyrics yestersay. People in /r/languagetechnology should stay tuned there, because the most interesting posts occasionally arise and aren't x-posted here, unfortunayely.","metadata":{"post_id":"5rlygi","post_score":3,"answer_comment_id":"dd8li7n","answer_score":1,"answerer_anon_id":"anon_4f7698cba224cddc","top_comment_id":"dd8bp9i","top_comment_score":3,"top_comment_anon_id":"anon_4f7698cba224cddc","top_equals_preferred":false,"thanks_reply_id":"dd8mu7y","thanks_reply_score":1,"thanks_reply_text":"Thanks!\n","thanks_reply_timestamp":"2017-02-02T16:11:06+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2017-02-02T10:10:29+00:00","subreddit":"LanguageTechnology","query":"What are some public data set for text generation?\n\nI'd like to build up a model which can model and learn to generate text like lyrics, reading, etc. Do you know where can I find some large data set for these kinds of tasks? Thanks.","preferred_answer":"Also this update this morning: https://www.reddit.com/r/MachineLearning/comments/5sgkuo/p_a_few_days_ago_i_posted_my_rapsong_writing/","top_comment":"Opensubtitles 2016, Reddit comments. Both can be downloaded freely. There was a thread on generation from reddit comments last week on /r/MachineLearning, I'll link it when I'm back home. There was also a thread about generating lyrics yestersay. People in /r/languagetechnology should stay tuned there, because the most interesting posts occasionally arise and aren't x-posted here, unfortunayely.","metadata":{"post_id":"5rlygi","post_score":3,"answer_comment_id":"ddhby88","answer_score":2,"answerer_anon_id":"anon_4f7698cba224cddc","top_comment_id":"dd8bp9i","top_comment_score":3,"top_comment_anon_id":"anon_4f7698cba224cddc","top_equals_preferred":false,"thanks_reply_id":"ddkkmdw","thanks_reply_score":1,"thanks_reply_text":"thanks for your update!","thanks_reply_timestamp":"2017-02-10T12:37:59+00:00"}} -{"user_id":"anon_61722dd82432e47f","timestamp":"2017-02-13T23:46:39+00:00","subreddit":"LanguageTechnology","query":"Semantic vectors for comparing email to a template?\n\nI've been doing research on the best way to compare an email to the template on which it is based to determine the degree of personalization.\n\nMost of my research is turning up semantic vector analysis, but I'm not sure if it fits my use case or not. Does this type of analysis depend on a larger number of documents? Does there need to be a large amount of text in order to determine more accurately where a word lies in vector space?","preferred_answer":"Clustering may also be a helpful approach.","top_comment":"It's been a while since I studied NLP, so I'm sure the field has progressed quite a bit, but it does seem like vectors would be a useful approach. \n\nYou don't want to make a vector space of words though, you want to treat the documents themselves as vectors, using the bag of words approach. You'll end up with a term-document matrix like described by Jurafsky and Martin here: https://web.stanford.edu/~jurafsky/slp3/15.pdf\n\nYou shouldn't need too much data to compare emails, but obviously you'll need a few test cases. If you're trying to determine personalization of a template, than it seems like it should be pretty easy to identify documents that are within a certain range of distance from the representation of the template.","metadata":{"post_id":"5twjaj","post_score":3,"answer_comment_id":"ddq1ury","answer_score":3,"answerer_anon_id":"anon_0d04e7a637802850","top_comment_id":"ddplj8v","top_comment_score":3,"top_comment_anon_id":"anon_07099b17eb038a09","top_equals_preferred":false,"thanks_reply_id":"ddri4gn","thanks_reply_score":1,"thanks_reply_text":"Thanks for the response! Any suggested resources for me to follow this up on?","thanks_reply_timestamp":"2017-02-15T04:52:08+00:00"}} -{"user_id":"anon_6b3e9f3910627c5e","timestamp":"2017-02-17T00:49:00+00:00","subreddit":"LanguageTechnology","query":"How can I use Stanford CoreNLP to find similarity between/match sentences?\n\nHi. I'm new to NLP. I have to develop a little software that takes a question and give the best answer based on a set pre defined answers, but I dont know how to use the output of StanfordNLP to search for the best match. If someone can point me to a direction I would truly appreciate. Thank you.","preferred_answer":"http://alt.qcri.org/semeval2015/task2/. Check out some of the publications from that shared task.","top_comment":"We're in /r/languagetechnology and your response is to tell him to use Alexa?","metadata":{"post_id":"5uj6hm","post_score":8,"answer_comment_id":"ddvs146","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"ddvmiie","top_comment_score":3,"top_comment_anon_id":"anon_23cd7b773a8a3400","top_equals_preferred":false,"thanks_reply_id":"ddvys0n","thanks_reply_score":1,"thanks_reply_text":"I'll definitely read them! Thank you!","thanks_reply_timestamp":"2017-02-18T01:36:51+00:00"}} -{"user_id":"anon_9bac3de2513660a5","timestamp":"2017-03-05T16:37:20+00:00","subreddit":"LanguageTechnology","query":"Help: How can I do a automatic suumarize in multiple document by date un python?\n\nHi, can someone help me? I have atrouble for understan this?\n\nIf I have a multiple documents in .txt, and these documents have a label like this:\n\n931214\n\nand\n\n\n

\nFebruary 6, 1990, Tuesday, Home Edition \n

\n
\nHow can I extract the documents from this text and order them in chronological order?\n\nAny advice?","preferred_answer":"You should also this question in r/learnpython. For the multiple date formats you can try using dateutil. It's pretty good at converting date strings to datetime obejcts.","top_comment":"For XML-like documents, I strongly recommend [BeautifulSoup](https://pypi.python.org/pypi/beautifulsoup4/).\n\nIf you have multiple date formats, you might need a little finesse to get good results. It's hard to give a hard recommendation without knowing how many ways the date can be formatted, but I'd start with regex filters to try to sort the different formats.\n\nWhen you have the dates, ordering them chronologically is just a sort. Extracting the documents would be a separate BeautifulSoup operation, but probably pretty straightforward, depending on the format.","metadata":{"post_id":"5xnmih","post_score":0,"answer_comment_id":"dek0vm9","answer_score":2,"answerer_anon_id":"anon_b4bcf7a6b91481b6","top_comment_id":"dejgem5","top_comment_score":5,"top_comment_anon_id":"anon_fb545355db8109aa","top_equals_preferred":false,"thanks_reply_id":"dek2ef6","thanks_reply_score":1,"thanks_reply_text":"thanks for the advice :)","thanks_reply_timestamp":"2017-03-06T01:30:18+00:00"}} -{"user_id":"anon_9f7e262baef4dba2","timestamp":"2017-03-08T17:58:34+00:00","subreddit":"LanguageTechnology","query":"Quill and Wordsmith framework\n\nIs anyone aware of what Quill or Wordsmith are built with? Are they both custom or are they based on a framework like SimpleNLG?","preferred_answer":"I think it's safe to assume that they're both custom, in-house built technology.\n\nI'm more familiar with Yseop's technology, a self-service NLG software vendor, and they definitely use an in-house built engine, with their own development language and environment, the latter being a graphical user interface.\n\nWhy do you ask?","top_comment":"I think it's safe to assume that they're both custom, in-house built technology.\n\nI'm more familiar with Yseop's technology, a self-service NLG software vendor, and they definitely use an in-house built engine, with their own development language and environment, the latter being a graphical user interface.\n\nWhy do you ask?","metadata":{"post_id":"5y9fxk","post_score":5,"answer_comment_id":"depiocm","answer_score":2,"answerer_anon_id":"anon_69d84e8742c798e9","top_comment_id":"depiocm","top_comment_score":2,"top_comment_anon_id":"anon_69d84e8742c798e9","top_equals_preferred":true,"thanks_reply_id":"deplx5k","thanks_reply_score":1,"thanks_reply_text":"Thanks for the response. I'm interested in NLG. I've played around with SimpleNLG and I am just trying to understand if there are alternative frameworks to work with. Do you know how much Yseop costs?","thanks_reply_timestamp":"2017-03-09T15:47:26+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2017-03-15T17:16:10+00:00","subreddit":"LanguageTechnology","query":"Is there any comparison about the common ways for new words/phrases detection?\n\nI am working on a NLP project, mainly doing some text mining on the data collected from forums. I would like to detect the new words/phrases in the data. I have done some research on the available methods, such as Pointwise Mutual Information, Symmetrical Conditional Probability, Mutual Expectation, Enhanced Mutual Information, Multi-word Expression, etc. I wonder are there any evaluation that compare their advantages and disadvantages? And could you please tell me which one is more suitable for my task? Thanks in advance!","preferred_answer":"If you literally just want the unique words/n-grams in a corpus, you can do it in a couple lines of perl/bash/whatever. I'm guessing you mean something more subtle though. Could you elaborate on what you mean by a unique word/phrase? Or maybe describe how you're planning on using this data?","top_comment":"If you literally just want the unique words/n-grams in a corpus, you can do it in a couple lines of perl/bash/whatever. I'm guessing you mean something more subtle though. Could you elaborate on what you mean by a unique word/phrase? Or maybe describe how you're planning on using this data?","metadata":{"post_id":"5zkot2","post_score":9,"answer_comment_id":"deyuq4l","answer_score":1,"answerer_anon_id":"anon_976dd02984660c96","top_comment_id":"deyuq4l","top_comment_score":1,"top_comment_anon_id":"anon_976dd02984660c96","top_equals_preferred":true,"thanks_reply_id":"deywdhr","thanks_reply_score":1,"thanks_reply_text":"And I have already edited the post in case of more misunderstanding. Thanks.","thanks_reply_timestamp":"2017-03-15T18:09:30+00:00"}} -{"user_id":"anon_b9212bed99a39b4c","timestamp":"2017-03-18T13:46:09+00:00","subreddit":"LanguageTechnology","query":"[Request] Ways to resolve location name ambiguities?\n\nI'm working on geolocating small pieces of text(based on geonames), and while there are ways to resolve ambiguous location names using context, are there any standard approaches to this problem? I can work with both database level as well as \napplication level solutions. \n\nE.g. there are about 85 Springfields in Australia, and 70+ in the US(Not counting fictional places). What should be an approach that will reliably identify the correct place?\n\n\n\nAny help will be appreciated.","preferred_answer":"You're looking for word sense disambiguation, I think. The Jurafsky Martin text and slides are a good place to start:\n\nhttps://web.stanford.edu/~jurafsky/slp3/slides/Chapter18.wsd.pdf","top_comment":"Jason Balridge has worked extensively on that, I highly recommend you perusing his papers (I am not Jason Balridge)","metadata":{"post_id":"6045ab","post_score":2,"answer_comment_id":"df3ha2q","answer_score":2,"answerer_anon_id":"anon_227bc60c644eec5d","top_comment_id":"df3mdpx","top_comment_score":4,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":false,"thanks_reply_id":"df4clj2","thanks_reply_score":1,"thanks_reply_text":"Thank you. Not really what I was looking for in the question, but this is quite helpful for future projects :)","thanks_reply_timestamp":"2017-03-19T05:14:38+00:00"}} -{"user_id":"anon_b9212bed99a39b4c","timestamp":"2017-03-18T13:46:09+00:00","subreddit":"LanguageTechnology","query":"[Request] Ways to resolve location name ambiguities?\n\nI'm working on geolocating small pieces of text(based on geonames), and while there are ways to resolve ambiguous location names using context, are there any standard approaches to this problem? I can work with both database level as well as \napplication level solutions. \n\nE.g. there are about 85 Springfields in Australia, and 70+ in the US(Not counting fictional places). What should be an approach that will reliably identify the correct place?\n\n\n\nAny help will be appreciated.","preferred_answer":"Jason Balridge has worked extensively on that, I highly recommend you perusing his papers (I am not Jason Balridge)","top_comment":"Jason Balridge has worked extensively on that, I highly recommend you perusing his papers (I am not Jason Balridge)","metadata":{"post_id":"6045ab","post_score":2,"answer_comment_id":"df3mdpx","answer_score":4,"answerer_anon_id":"anon_542b574d59e858c1","top_comment_id":"df3mdpx","top_comment_score":4,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":true,"thanks_reply_id":"df4dchw","thanks_reply_score":2,"thanks_reply_text":"Thank you. This person has some amazing work! \n\nTextgrounder looks like it's useful. Also, his unpublished paper looks very promising to this problem statement. I'm curious: can I talk to you about NLP?","thanks_reply_timestamp":"2017-03-19T05:39:54+00:00"}} -{"user_id":"anon_bfa91b6a265f7dcf","timestamp":"2017-03-22T13:16:41+00:00","subreddit":"LanguageTechnology","query":"MultiLingiual Named Entity Linking?\n\nHello everyone, I am working on a clustering algorithm to cluster articles from different sources, and produce a news event per cluster. Everything is working well, except for one problem. \nI am clustering Arabic articles, and the algorithm is working very good, it is showing very good results on Politics and Sports articles, but when it comes to Games and Technology, the results are not good. The problem is I am having a very low recall (fewer clusters than needed). \nAfter investigating, I found that the problem is with named entities. In Games and Tech, authors seem to be mixing between using English names, or Arabic equivalent name, and this is affecting the title terms weighing the most, which affect the final results in general. \nNow, I am looking for a way to find equal named entities even if they are in different languages. I still don't know how exactly, and I appreciate any help.","preferred_answer":"I work with machine translation and we use fastText. In the past I worked on transliteration (3abizi etc) and Google News genre classification but not story clustering. I know people who used the pre-trained vecs for various recent projects, which is really common right now.\n\nLet us know how it goes, this problem is important for many applications for many languages.","top_comment":"This is one of the tough problems in NLP.\n\nI believe Big companies like IBM or Palantir have large proprietary databases of aliases they use for normalization.\n\nOne simple (but too naive) approach would be to use \"unidecode\" which actually transliterates quite well into ascii. But this wont help necessarily with non-identical resulting strings.\n\nAnother option is to use Yago redirects/aliases (or wikipedia redirects) (http://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga/yago/) as a starting point.\n\nI havent looked yet whether GDELT project (http://www.gdeltproject.org) also does any entity disambiguation.","metadata":{"post_id":"60uize","post_score":5,"answer_comment_id":"dfcgrdl","answer_score":2,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"df9dunf","top_comment_score":3,"top_comment_anon_id":"anon_4ed8fba7088ca581","top_equals_preferred":false,"thanks_reply_id":"dfcgt00","thanks_reply_score":2,"thanks_reply_text":"I really appreciate your help.","thanks_reply_timestamp":"2017-03-24T11:30:02+00:00"}} -{"user_id":"anon_5e3a84e4f2c012d1","timestamp":"2017-04-09T19:41:08+00:00","subreddit":"LanguageTechnology","query":"Ways to match similar sentences and phrases?\n\nI am working on a project trying to match one sentence and see if it is similar to another one. Right now, I have used word2vec, tfidf, and cosine, squared eqeuclidean, and jaccard index for random forest classification and multi layer perceptron classification. I am wondering what other methods may be useful for this topic?","preferred_answer":"In terms of specific resources, consider semantic textual similarity challenges:\n\n * https://www.cs.york.ac.uk/semeval-2012/task6/\n * https://www.aclweb.org/portal/content/sem-shared-task-2013\n\nMoreover, your problem is related to three active areas of NLP research:\n\n1. First, and most obvious, paraphrase identification. The ACL wiki has a good list of recent approaches and datasets:\n * https://www.aclweb.org/aclwiki/index.php?title=Paraphrase_Identification_(State_of_the_art)\n\n2. Second, would be phrase similarity. I'm only aware of noun phrase datasets (something like wordnet synsets or verb ocean may suffice for verb phrases). Again, ACL wiki has nice information:\n * https://www.aclweb.org/aclwiki/index.php?title=Noun-Modifier_Questions_(State_of_the_art)\n\n3. Finally, relational similarity focuses on the similarity between textual relations and has been the subject of several evaluations:\n * https://www.aclweb.org/aclwiki/index.php?title=SemEval-2012_Task_2_(State_of_the_art) \n * https://www.aclweb.org/aclwiki/index.php?title=Syntactic_Analogies_(State_of_the_art)\n * https://www.aclweb.org/aclwiki/index.php?title=SAT_Analogy_Questions_(State_of_the_art)","top_comment":"In terms of specific resources, consider semantic textual similarity challenges:\n\n * https://www.cs.york.ac.uk/semeval-2012/task6/\n * https://www.aclweb.org/portal/content/sem-shared-task-2013\n\nMoreover, your problem is related to three active areas of NLP research:\n\n1. First, and most obvious, paraphrase identification. The ACL wiki has a good list of recent approaches and datasets:\n * https://www.aclweb.org/aclwiki/index.php?title=Paraphrase_Identification_(State_of_the_art)\n\n2. Second, would be phrase similarity. I'm only aware of noun phrase datasets (something like wordnet synsets or verb ocean may suffice for verb phrases). Again, ACL wiki has nice information:\n * https://www.aclweb.org/aclwiki/index.php?title=Noun-Modifier_Questions_(State_of_the_art)\n\n3. Finally, relational similarity focuses on the similarity between textual relations and has been the subject of several evaluations:\n * https://www.aclweb.org/aclwiki/index.php?title=SemEval-2012_Task_2_(State_of_the_art) \n * https://www.aclweb.org/aclwiki/index.php?title=Syntactic_Analogies_(State_of_the_art)\n * https://www.aclweb.org/aclwiki/index.php?title=SAT_Analogy_Questions_(State_of_the_art)","metadata":{"post_id":"64exw0","post_score":9,"answer_comment_id":"dg27r5s","answer_score":4,"answerer_anon_id":"anon_c6a6009dd693347c","top_comment_id":"dg27r5s","top_comment_score":4,"top_comment_anon_id":"anon_c6a6009dd693347c","top_equals_preferred":true,"thanks_reply_id":"dg27v9d","thanks_reply_score":1,"thanks_reply_text":"Thank you so much for the reply!","thanks_reply_timestamp":"2017-04-10T04:40:27+00:00"}} -{"user_id":"anon_b31c6010d9e719b7","timestamp":"2017-04-19T10:20:57+00:00","subreddit":"LanguageTechnology","query":"about the paper \"named entity recognition in tweets an experimental\" by A Ritter et al\n\nI am a reading this paper [named entity recognition in tweets an experimental study](https://homes.cs.washington.edu/~mausam/papers/emnlp11.pdf) . I found this while searching a NER model that can help identify name & entities in tweets and facebook posts. In the paper the author provides the link to the repo that is an implementation of the models which is mentioned in the paper. I am curious to know whether the model proposed here is implemented in any of the popular NLP frameworks For Eg: NLTK or OpenNLP etc ?","preferred_answer":"The code actually tells you that :-)\n\nin the repo, in [python/TweetNLP.py](https://github.com/aritter/twitter_nlp/blob/master/python/TweetNLP.py), lines 13 and 14 say:\n\n\n import nltk\n from nltk.corpus import brown\n\nOther parts of the model use external tools, I've seen some mention of MALLET for LDA.","top_comment":"I don't really have the time to read the paper so I can't really reply. One solution would be to contact Alan Ritter: http://aritter.github.io/\n\nFor the POS, this file links to a model which I suppose is custom-made, as it's not in a known library and it's in another user's home directory: https://github.com/aritter/twitter_nlp/blob/master/python/pos_tagger.py\n\nBut again, I haven't read the paper nor even used the code so I'm grasping at straws here.","metadata":{"post_id":"669bon","post_score":2,"answer_comment_id":"dggox4d","answer_score":1,"answerer_anon_id":"anon_542b574d59e858c1","top_comment_id":"dggq873","top_comment_score":2,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":false,"thanks_reply_id":"dggpi9x","thanks_reply_score":1,"thanks_reply_text":"Thanks for the answer I should have read the code more carefully before asking but using nltk in the code makes me more confused. The paper says they are coming up with a new model for NER and POS and chunking but here in the code why they are using the nltk implementation of POS and NER instead of their own?","thanks_reply_timestamp":"2017-04-19T11:58:14+00:00"}} -{"user_id":"anon_8a97395afb95979f","timestamp":"2017-04-22T18:32:01+00:00","subreddit":"LanguageTechnology","query":"Question about a word:\n\nMy google-fu is failing me but I saw this word in a paper about multilingual SDS (Weng, Bratt, Neumeyer, & Stolcke, 1997) : genonic.\n\nHere's the context:\n\n\n> In addition to the two sets of PTM acoustic models\n> just described, two sets of **genonic** acoustic models were\n> trained [2]. Notice that in a genonic system, HMM\n> allophones of a given class share the same Gaussian\n> codebook, and the sets of HMM states that share the same\n> mixture components are determined automatically using\n> agglomerative clustering techniques.\n\n\n\nAnyone know what this might refer to?","preferred_answer":"The paper you're referring to, references this paper: [Genones: Generalized Mixture Tying in Continuous\nHidden Markov Model-Based Speech Recognizers](https://pdfs.semanticscholar.org/21ea/bd8d1f6fcf27bcfa9e08e40384600ca4507f.pdf), which says\n\n > We shall refer to the Gaussian codebooks as genones^1\nand to the HMMs with arbitrary tying\nof Gaussian mixtures as genonic HMMs. \n\nand \n\n>^1\nThis term should be partially attributed to IBM's fenones and CMU's senones. A genone is a set of\nGaussians shared by a set of states and should not be confused with the word genome.\n\nI hope that helps. I have no idea what any of these things mean.","top_comment":"The paper you're referring to, references this paper: [Genones: Generalized Mixture Tying in Continuous\nHidden Markov Model-Based Speech Recognizers](https://pdfs.semanticscholar.org/21ea/bd8d1f6fcf27bcfa9e08e40384600ca4507f.pdf), which says\n\n > We shall refer to the Gaussian codebooks as genones^1\nand to the HMMs with arbitrary tying\nof Gaussian mixtures as genonic HMMs. \n\nand \n\n>^1\nThis term should be partially attributed to IBM's fenones and CMU's senones. A genone is a set of\nGaussians shared by a set of states and should not be confused with the word genome.\n\nI hope that helps. I have no idea what any of these things mean.","metadata":{"post_id":"66xj7s","post_score":3,"answer_comment_id":"dgm1qux","answer_score":2,"answerer_anon_id":"anon_d93642251e70e735","top_comment_id":"dgm1qux","top_comment_score":2,"top_comment_anon_id":"anon_d93642251e70e735","top_equals_preferred":true,"thanks_reply_id":"dgm1y1a","thanks_reply_score":1,"thanks_reply_text":"lol now i'm more confused. Thanks though!","thanks_reply_timestamp":"2017-04-22T19:10:59+00:00"}} -{"user_id":"anon_03ef50f966d6fee6","timestamp":"2017-04-24T17:59:32+00:00","subreddit":"LanguageTechnology","query":"Online tool for ngram frequency?\n\nIs there a tool available online that will calculate the probabilities of a string of text?","preferred_answer":"[google ngram viewer](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html)","top_comment":"[google ngram viewer](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html)","metadata":{"post_id":"67aqus","post_score":2,"answer_comment_id":"dgoyp7p","answer_score":1,"answerer_anon_id":"anon_0974ef6c81544596","top_comment_id":"dgoyp7p","top_comment_score":1,"top_comment_anon_id":"anon_0974ef6c81544596","top_equals_preferred":true,"thanks_reply_id":"dgp2o3z","thanks_reply_score":1,"thanks_reply_text":"Thanks, I know about the ngram viewer, but this just tells me varying frequencies over time. If I have a strong of text, I want to view the transition probability of each ngram, as well as the overall probability.","thanks_reply_timestamp":"2017-04-24T19:23:35+00:00"}} -{"user_id":"anon_03ef50f966d6fee6","timestamp":"2017-04-24T17:59:32+00:00","subreddit":"LanguageTechnology","query":"Online tool for ngram frequency?\n\nIs there a tool available online that will calculate the probabilities of a string of text?","preferred_answer":"Ah, I see. Maybe [elasticsearch ngram tokenizer](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-ngram-tokenizer.html) would work in your case. It offers a hosted solution with the whole elastic ecosystem. You can use to import any corpus and check the frequencies you're looking for.","top_comment":"[google ngram viewer](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html)","metadata":{"post_id":"67aqus","post_score":2,"answer_comment_id":"dgp4ll7","answer_score":1,"answerer_anon_id":"anon_0974ef6c81544596","top_comment_id":"dgoyp7p","top_comment_score":1,"top_comment_anon_id":"anon_0974ef6c81544596","top_equals_preferred":false,"thanks_reply_id":"dgpo74p","thanks_reply_score":1,"thanks_reply_text":"Ok, thanks","thanks_reply_timestamp":"2017-04-25T02:47:01+00:00"}} -{"user_id":"anon_952a1c13a1acfd32","timestamp":"2017-04-25T17:44:13+00:00","subreddit":"LanguageTechnology","query":"Looking for NLP Expert For Help With A Project\n\nHey ya'll - I'm looking for an NLP wizard for a quick project. :) \nAnyone interested?\n\nHere are details:\n\nI'm looking to do a study on a dataset of 200,000+ customer service requests.\n\nI want to break down all the requests into different categories, subcategories and then determine which are tier 1 and could be automated by a robot. And which are tier 2 and need human touch.\nCategory examples are below.\n\nThe goal is to do a feasibility study to see if we could build an AI/ chat bot to handle their Tier 1 customer support requests.\n\nAt the end of the study, I want to have an estimated cost savings benefit for this company if they were to implement an automated customer support desk for Tier 1 stuff.\n\nI'm great with sales and marketing and I'm looking to find an amazing tech partner to help build the backend.\n\nIf you (or anyone you know) would be interested, feel free to DM me. :)\n\nWith love\nandy\n\nExample categories / subcategories:\nBilling \n- Refunds \n- Upgrades\n- Logins\n- Change credit card\n- Etc\nGeneral Questions\n- Feature requests\n- Positive Feedback\n- Negative feedbac\n- Etc","preferred_answer":"Are those 200k texts labeled to your example categories?\nIf not, you need to have a labelled dataset.\n\nIf you wish to do this unsupervised - to _produce_ these categories out of unstructured data, you can, by a neural net tasked with clustering. But that would also require some work, because you need to hand define what each clustering actually refers to. \n\nSo either label the data by mechanicalturks.com, or do an initial clustering for 15 categories and see if it works at all!","top_comment":"It sounds like [this](https://i.redd.it/i2c981v1dwpy.png) sort of situation","metadata":{"post_id":"67i5x3","post_score":4,"answer_comment_id":"dgtd0zw","answer_score":2,"answerer_anon_id":"anon_8a16d3ba79228c63","top_comment_id":"dgqs6dq","top_comment_score":6,"top_comment_anon_id":"anon_d3f6cbd810ef0a6e","top_equals_preferred":false,"thanks_reply_id":"dgtysia","thanks_reply_score":1,"thanks_reply_text":"Great feedback. thank YOU. \n\nIt's unlabeled. Im thinking about feeding through a machine and building a VR 3D model like this: https://vimeo.com/202666486\n\nThen from the clusters, assigning labels. \n\nThanks for the comments. This world is a very, very deep rabbit hole ;) ","thanks_reply_timestamp":"2017-04-27T18:20:08+00:00"}} -{"user_id":"anon_3972481bcef8fb1c","timestamp":"2017-05-04T02:07:57+00:00","subreddit":"LanguageTechnology","query":"Discourse Segmentation (by topic) Dataset\n\nDo you guys know of any free dataset for this task?","preferred_answer":"Can't say if this is a data 'set' in terms of the size that you are looking for, but more than one paper has used the 'Stargazers' article for evaluating text segmentation. Again, you may be looking for discourse segmentation and not purely text segmentation.\n\nSee \n\n- Hearst, Marti A. \"TextTiling: Segmenting text into multi-paragraph subtopic passages.\" Computational linguistics 23.1 (1997): 33-64.\n\n- Yaari, Yaakov. \"Segmentation of expository texts by hierarchical agglomerative clustering.\" arXiv preprint cmp-lg/9709015 (1997).","top_comment":"Can't say if this is a data 'set' in terms of the size that you are looking for, but more than one paper has used the 'Stargazers' article for evaluating text segmentation. Again, you may be looking for discourse segmentation and not purely text segmentation.\n\nSee \n\n- Hearst, Marti A. \"TextTiling: Segmenting text into multi-paragraph subtopic passages.\" Computational linguistics 23.1 (1997): 33-64.\n\n- Yaari, Yaakov. \"Segmentation of expository texts by hierarchical agglomerative clustering.\" arXiv preprint cmp-lg/9709015 (1997).","metadata":{"post_id":"694u26","post_score":3,"answer_comment_id":"dh40bj7","answer_score":3,"answerer_anon_id":"anon_272d9a34773f0bee","top_comment_id":"dh40bj7","top_comment_score":3,"top_comment_anon_id":"anon_272d9a34773f0bee","top_equals_preferred":true,"thanks_reply_id":"dh4zi17","thanks_reply_score":1,"thanks_reply_text":"Thanks! \nI know of TextTiling but couldn't find the dataset. \nI was thinking of compiling my own from an existing one. I was looking at [this kaggle dataset](https://www.kaggle.com/benhamner/nips-2015-papers) and was thinking of concatenating paper abstracts and manually marking discourse boundaries ... For lack of a better idea :)","thanks_reply_timestamp":"2017-05-04T20:49:27+00:00"}} -{"user_id":"anon_3972481bcef8fb1c","timestamp":"2017-05-04T02:07:57+00:00","subreddit":"LanguageTechnology","query":"Discourse Segmentation (by topic) Dataset\n\nDo you guys know of any free dataset for this task?","preferred_answer":"I could find a link to the article, but as a scan - https://cloud.github.com/downloads/cfournie/segmentation.corpora/stargazers_look_for_life.pdf\n\nYour suggestion of the kaggle dataset is also pretty interesting.\n\nThere have been three datasets used in a paper on Entity-Topic linking - shift of topic looks important for segmentation too.\n\n- Lauscher, Anne, et al. \"Entities as topic labels: combining entity linking and labeled LDA to improve topic interpretability and evaluability.\" IJCol-Italian journal of computational linguistics 2.2 (2016): 67-88.\n\n\nOther links found in some research articles related to topic segmentation are\n\n- http://www.itl.nist.gov/iad/mig/publications/proceedings/darpa99/html/tdt110/tdt110.htm\n- http://www1.icsi.berkeley.edu/Speech/mr/","top_comment":"Can't say if this is a data 'set' in terms of the size that you are looking for, but more than one paper has used the 'Stargazers' article for evaluating text segmentation. Again, you may be looking for discourse segmentation and not purely text segmentation.\n\nSee \n\n- Hearst, Marti A. \"TextTiling: Segmenting text into multi-paragraph subtopic passages.\" Computational linguistics 23.1 (1997): 33-64.\n\n- Yaari, Yaakov. \"Segmentation of expository texts by hierarchical agglomerative clustering.\" arXiv preprint cmp-lg/9709015 (1997).","metadata":{"post_id":"694u26","post_score":3,"answer_comment_id":"dh5ow9y","answer_score":2,"answerer_anon_id":"anon_272d9a34773f0bee","top_comment_id":"dh40bj7","top_comment_score":3,"top_comment_anon_id":"anon_272d9a34773f0bee","top_equals_preferred":false,"thanks_reply_id":"dh5pp3i","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot! These look promising :)","thanks_reply_timestamp":"2017-05-05T08:13:41+00:00"}} -{"user_id":"anon_5d84b69fdc07d926","timestamp":"2017-05-08T10:39:18+00:00","subreddit":"LanguageTechnology","query":"Question: SpaCy or NLTK?\n\nHi guys, I'm going to start working on some NLP project, and I have some previous NLP knowledge. (I used Stanford CoreNLP for tokenization, lemmatization, POS, dependency parsing and co-reference resolution) \nI want to work in Python and it looks like the obvious candidates for my NLP tools are SpaCy (https://spacy.io/) and NLTK (www.nltk.org). I've seen some discussions from 2015-2016 comparing the 2, but nothing more recent. Has anyone had experience with both? If so, which one would you recommend? \nImportant info: I'll be working with English-only datasets.","preferred_answer":"It's hard to answer this without knowing in more detail what you're doing. SpaCy is newer and IMO cleaner, but NLTK is much more complete and featureful, and also a lot more widely used (important as far as finding documentation and examples online and such).\n\nIMO if SpaCy does what you need to do, and you're confident in your ability to figure out how to do it with relatively meager documentation, then use that.","top_comment":"It's hard to answer this without knowing in more detail what you're doing. SpaCy is newer and IMO cleaner, but NLTK is much more complete and featureful, and also a lot more widely used (important as far as finding documentation and examples online and such).\n\nIMO if SpaCy does what you need to do, and you're confident in your ability to figure out how to do it with relatively meager documentation, then use that.","metadata":{"post_id":"69xbkc","post_score":14,"answer_comment_id":"dha7xrx","answer_score":5,"answerer_anon_id":"anon_f30328c027d0b6d1","top_comment_id":"dha7xrx","top_comment_score":5,"top_comment_anon_id":"anon_f30328c027d0b6d1","top_equals_preferred":true,"thanks_reply_id":"dha8xpd","thanks_reply_score":5,"thanks_reply_text":"Thanks. I'm thinking of choosing SpaCy and reading the NLTK book in parallel. \nI'm starting something from scratch and SpaCy looks like a better candidate for the moment.","thanks_reply_timestamp":"2017-05-08T14:17:22+00:00"}} -{"user_id":"anon_215583d3fea9b5dd","timestamp":"2017-05-09T03:45:25+00:00","subreddit":"LanguageTechnology","query":"An Overview of Word Embedding Models\n\nHi guys, I'm novice at NLP, and I'm making an overview and comparison of existing word embedding models as a part of a university project. Except naive bag-of-words model and classic Word2Vec/Glove models I've found papers about these ones:\n\n* word2vec-f\n* wang2vec\n* fasttext\n* adagram\n* swivel\n\nAre there any other models that I should take into account? Is there something cutting edge which I missed?","preferred_answer":"\"Software for training and using word embeddings includes Tomas Mikolov's Word2vec, Stanford University's GloVe, Gensim and Deeplearning4j. Principal Component Analysis (PCA) and T-Distributed Stochastic Neighbour Embedding (t-SNE) are both used to reduce the dimensionality of word vector spaces and visualize word embeddings and clusters.\"\n\n[Wiki: Word Embeddings](https://en.wikipedia.org/wiki/Word_embedding)","top_comment":"Can't really help you on that, but would you mind posting your project when you are done? I also need to get up to speed.","metadata":{"post_id":"6a33od","post_score":3,"answer_comment_id":"dhbneyb","answer_score":1,"answerer_anon_id":"anon_0d04e7a637802850","top_comment_id":"dhbkfru","top_comment_score":2,"top_comment_anon_id":"anon_44afb1f7b455ac34","top_equals_preferred":false,"thanks_reply_id":"dhbnv51","thanks_reply_score":4,"thanks_reply_text":"Thanks for reply, but this article is not quite correct (because it confuses implementations (gensim and deeplearning4j) and models (word2vec and glove)) and it doesn't contain information about models that I didn't mentioned. ","thanks_reply_timestamp":"2017-05-09T11:09:04+00:00"}} -{"user_id":"anon_215583d3fea9b5dd","timestamp":"2017-05-09T03:45:25+00:00","subreddit":"LanguageTechnology","query":"An Overview of Word Embedding Models\n\nHi guys, I'm novice at NLP, and I'm making an overview and comparison of existing word embedding models as a part of a university project. Except naive bag-of-words model and classic Word2Vec/Glove models I've found papers about these ones:\n\n* word2vec-f\n* wang2vec\n* fasttext\n* adagram\n* swivel\n\nAre there any other models that I should take into account? Is there something cutting edge which I missed?","preferred_answer":"It doesn't confuse implementations and models, it just includes both. I figured an overview of models would necessitate a bit of discussion of implementations, ESPECIALLY during a comparison of models. \nIf you are interested in other extensions of Word2Vec,\n\nhttp://nlp.yvespeirsman.be/blog/anything2vec/","top_comment":"Can't really help you on that, but would you mind posting your project when you are done? I also need to get up to speed.","metadata":{"post_id":"6a33od","post_score":3,"answer_comment_id":"dhbom7i","answer_score":1,"answerer_anon_id":"anon_0d04e7a637802850","top_comment_id":"dhbkfru","top_comment_score":2,"top_comment_anon_id":"anon_44afb1f7b455ac34","top_equals_preferred":false,"thanks_reply_id":"dhbyqg8","thanks_reply_score":1,"thanks_reply_text":"Thanks for the link, it's really useful. And, of course, I mention an implementation of a model in an overview, but I use a Tensorflow implementation of Word2Vec :)","thanks_reply_timestamp":"2017-05-09T15:35:29+00:00"}} -{"user_id":"anon_215583d3fea9b5dd","timestamp":"2017-05-09T03:45:25+00:00","subreddit":"LanguageTechnology","query":"An Overview of Word Embedding Models\n\nHi guys, I'm novice at NLP, and I'm making an overview and comparison of existing word embedding models as a part of a university project. Except naive bag-of-words model and classic Word2Vec/Glove models I've found papers about these ones:\n\n* word2vec-f\n* wang2vec\n* fasttext\n* adagram\n* swivel\n\nAre there any other models that I should take into account? Is there something cutting edge which I missed?","preferred_answer":"WordRank also comes to mind. I believe it's implemented in the gensim package.\n\nThere are several overview papers already available on this topic, sometimes focusing on some application. Check out this recent one, for example: https://arxiv.org/abs/1703.00993","top_comment":"Can't really help you on that, but would you mind posting your project when you are done? I also need to get up to speed.","metadata":{"post_id":"6a33od","post_score":3,"answer_comment_id":"dhbry69","answer_score":2,"answerer_anon_id":"anon_158a1a0ba9a223fd","top_comment_id":"dhbkfru","top_comment_score":2,"top_comment_anon_id":"anon_44afb1f7b455ac34","top_equals_preferred":false,"thanks_reply_id":"dhbyx1d","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot, danlou! ","thanks_reply_timestamp":"2017-05-09T15:38:53+00:00"}} -{"user_id":"anon_215583d3fea9b5dd","timestamp":"2017-05-09T03:45:25+00:00","subreddit":"LanguageTechnology","query":"An Overview of Word Embedding Models\n\nHi guys, I'm novice at NLP, and I'm making an overview and comparison of existing word embedding models as a part of a university project. Except naive bag-of-words model and classic Word2Vec/Glove models I've found papers about these ones:\n\n* word2vec-f\n* wang2vec\n* fasttext\n* adagram\n* swivel\n\nAre there any other models that I should take into account? Is there something cutting edge which I missed?","preferred_answer":"Don't get too carried away and think these are fantastic tools, the do have limitation. IE, don't use them for any level above a stream of text.\n\nBut saying that, try running NER software to reduce strings of text to a single entity that windowing might split in half and a thought of using a dependency parser might help...\n\n[The dog chased the cat] \nthe dog that ate [the bone chased the cat] \n\n... dependencies could avoid any chasing bones \n\nBut remember in language \"the dog\" and \"the dog\" could actually refer to different things, and \"the dog\" and \"fido\" can refer to the same thing. So you can't actually rely on words to have meaning.","top_comment":"Can't really help you on that, but would you mind posting your project when you are done? I also need to get up to speed.","metadata":{"post_id":"6a33od","post_score":3,"answer_comment_id":"dhbtesb","answer_score":2,"answerer_anon_id":"anon_11a88c9e7b0b901b","top_comment_id":"dhbkfru","top_comment_score":2,"top_comment_anon_id":"anon_44afb1f7b455ac34","top_equals_preferred":false,"thanks_reply_id":"dhbzan0","thanks_reply_score":1,"thanks_reply_text":"Thanks, this is a really interesting advice! Is the \"level above a stream of text\" the same as \"pragmatics\"?","thanks_reply_timestamp":"2017-05-09T15:45:48+00:00"}} -{"user_id":"anon_5d84b69fdc07d926","timestamp":"2017-05-08T10:39:18+00:00","subreddit":"LanguageTechnology","query":"Question: SpaCy or NLTK?\n\nHi guys, I'm going to start working on some NLP project, and I have some previous NLP knowledge. (I used Stanford CoreNLP for tokenization, lemmatization, POS, dependency parsing and co-reference resolution) \nI want to work in Python and it looks like the obvious candidates for my NLP tools are SpaCy (https://spacy.io/) and NLTK (www.nltk.org). I've seen some discussions from 2015-2016 comparing the 2, but nothing more recent. Has anyone had experience with both? If so, which one would you recommend? \nImportant info: I'll be working with English-only datasets.","preferred_answer":"Try Sioux? \nhttps://github.com/CogComp/sioux\nIt contains many annotations not supported by SpaCy and NLTK.","top_comment":"It's hard to answer this without knowing in more detail what you're doing. SpaCy is newer and IMO cleaner, but NLTK is much more complete and featureful, and also a lot more widely used (important as far as finding documentation and examples online and such).\n\nIMO if SpaCy does what you need to do, and you're confident in your ability to figure out how to do it with relatively meager documentation, then use that.","metadata":{"post_id":"69xbkc","post_score":14,"answer_comment_id":"dhes3kx","answer_score":1,"answerer_anon_id":"anon_e1b317958f79ef0b","top_comment_id":"dha7xrx","top_comment_score":5,"top_comment_anon_id":"anon_f30328c027d0b6d1","top_equals_preferred":false,"thanks_reply_id":"dheu346","thanks_reply_score":1,"thanks_reply_text":"Thanks, I'll keep that in mind as well.","thanks_reply_timestamp":"2017-05-11T07:14:34+00:00"}} -{"user_id":"anon_8f8a8dfec7af8420","timestamp":"2017-05-11T17:31:34+00:00","subreddit":"LanguageTechnology","query":"Can someone please suggest a good book to learn NLP in python 3.x?","preferred_answer":"The [NLTK book](http://www.nltk.org/) is currently being updated for python 3, but should still suit your needs. You should also check out the [gensim tutorials](https://radimrehurek.com/gensim/tutorial.html) for topic modeling and vector embedding language models (i.e. word2vec).","top_comment":"The [NLTK book](http://www.nltk.org/) is currently being updated for python 3, but should still suit your needs. You should also check out the [gensim tutorials](https://radimrehurek.com/gensim/tutorial.html) for topic modeling and vector embedding language models (i.e. word2vec).","metadata":{"post_id":"6almr9","post_score":7,"answer_comment_id":"dhfkhdc","answer_score":7,"answerer_anon_id":"anon_816c471f4248d954","top_comment_id":"dhfkhdc","top_comment_score":7,"top_comment_anon_id":"anon_816c471f4248d954","top_equals_preferred":true,"thanks_reply_id":"dhfkyn1","thanks_reply_score":2,"thanks_reply_text":"Yes, I just found the NLTK book few minutes ago. Gensim looks great too. Thanks a bunch!","thanks_reply_timestamp":"2017-05-11T18:49:19+00:00"}} -{"user_id":"anon_215583d3fea9b5dd","timestamp":"2017-05-22T18:04:56+00:00","subreddit":"LanguageTechnology","query":"Are there any papers about detection of relevance of comments on forums?\n\nAs a part of my study project I'm resolving the task about detection of relevance of comments on forums (such as Reddit): an algorithm that can detect comments that are non-relevant to the opening post of the thread (such as comments with non-related topic like politics or \"junk\" comments like flood and spam). And I need to make a review of related work in this field. I've found no papers about that task. Did I missed something? \n\nI know that there are a lot of nice papers in field of semantic similarity detection, but my task is to find papers exactly about the problem of forum messages.","preferred_answer":"Not sure if this is exactly what you're looking for but I saw this yesterday. https://research.google.com/pubs/pub46055.html","top_comment":"Not sure if this is exactly what you're looking for but I saw this yesterday. https://research.google.com/pubs/pub46055.html","metadata":{"post_id":"6cox10","post_score":6,"answer_comment_id":"dhwiy19","answer_score":2,"answerer_anon_id":"anon_f2030906f6e83b59","top_comment_id":"dhwiy19","top_comment_score":2,"top_comment_anon_id":"anon_f2030906f6e83b59","top_equals_preferred":true,"thanks_reply_id":"dhx3k7i","thanks_reply_score":1,"thanks_reply_text":"Thank you! This is a really helpful paper, it is very close to my subject.","thanks_reply_timestamp":"2017-05-23T05:00:36+00:00"}} -{"user_id":"anon_681e634e4934adb5","timestamp":"2017-05-24T17:48:18+00:00","subreddit":"LanguageTechnology","query":"attention mechanism acts like \"weighted skip connection\"?\n\nIn the article, \"Massive Exploration of Neural Machine Translation Architectures\" by Britz et al, there is a statement -\n\n> Furthermore, we found that the attention-based models exhibited significantly larger gradient updates to decoder states throughout training. This suggests that the attention mechanism acts more like a ”weighted skip connection” that optimizes gradient flow than like a ”memory” that allows the encoder to access source states, as\nis commonly stated in the literature. \n\nCould someone please explain this point? It appears to me that this argues, the decoder state contains all the information needed, but somehow the training without attention is not good enough to expose those information. Training with attention helps decoders to use the hidden information better. In other words, in the testing, if disabling attention mechanism at testing time, a trained system (trained with attention) might behave as good as with attention? \n\nAlso, this is probably novice question, how to watch gradient updates during training (esp in tensorflow) ? \n\nThanks","preferred_answer":"If you look at how the most common attention mechanism works, which is dynamic decoding. During this step, we take the previous time step of the decoder, and all inputs of the encoder. This means that when gradients flow back, each step of the encoder's gradients are also given a chance to flow back for each step of the decoder which means that you've got a lot more gradients going back now just as a result of this. This also means that the encoders gradients will also take into account the attenuated results and as such can shift in order to be more attenuated as well. \n\nNow how to view all of your gradients in tensorflow? Use this code:\n\n grads = tf.gradients(self.loss, tf.trainable_variables())\n grads = list(zip(grads, tf.trainable_variables()))\n for grad, var in grads:\n if grad is None:\n continue\n print(\"grad - {}\".format(grad))\n print(\"var - {}\".format(var))\n tf.summary.histogram(var.name + \"/gradients\", grad)","top_comment":"If you look at how the most common attention mechanism works, which is dynamic decoding. During this step, we take the previous time step of the decoder, and all inputs of the encoder. This means that when gradients flow back, each step of the encoder's gradients are also given a chance to flow back for each step of the decoder which means that you've got a lot more gradients going back now just as a result of this. This also means that the encoders gradients will also take into account the attenuated results and as such can shift in order to be more attenuated as well. \n\nNow how to view all of your gradients in tensorflow? Use this code:\n\n grads = tf.gradients(self.loss, tf.trainable_variables())\n grads = list(zip(grads, tf.trainable_variables()))\n for grad, var in grads:\n if grad is None:\n continue\n print(\"grad - {}\".format(grad))\n print(\"var - {}\".format(var))\n tf.summary.histogram(var.name + \"/gradients\", grad)","metadata":{"post_id":"6d3r9l","post_score":3,"answer_comment_id":"di05cfb","answer_score":2,"answerer_anon_id":"anon_8bac7a0ae9d950e0","top_comment_id":"di05cfb","top_comment_score":2,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":true,"thanks_reply_id":"di16rjs","thanks_reply_score":1,"thanks_reply_text":"Thank you. I got it now. \n\n","thanks_reply_timestamp":"2017-05-25T16:59:13+00:00"}} -{"user_id":"anon_e4517d8c7c363438","timestamp":"2017-05-28T07:57:04+00:00","subreddit":"LanguageTechnology","query":"Best NLP blogs to follow?\n\nWhat are some of the best NLP and Computational Linguistics blogs to follow on the internet? \n\nFor example: Chris Olah's github [blog](http://colah.github.io/) on neural networks.","preferred_answer":"[Vered Schwartz' blog](http://veredshwartz.blogspot.nl/search/label/natural%20language%20processing) does a fair job of making NLP concepts understandable.","top_comment":"* [Hal Daume III](https://nlpers.blogspot.ru/)\n* [LingPipe](https://lingpipe-blog.com/)\n* [Text Mining & Analytics](http://text-analytics101.rxnlp.com/)\n* [NLP News](http://nlp.hivefire.com/)\n* [Salmon Run](http://sujitpal.blogspot.ru/?m=0)","metadata":{"post_id":"6dspdp","post_score":21,"answer_comment_id":"di57htc","answer_score":8,"answerer_anon_id":"anon_145d19078cf8e613","top_comment_id":"di59762","top_comment_score":10,"top_comment_anon_id":"anon_215583d3fea9b5dd","top_equals_preferred":false,"thanks_reply_id":"di5gqae","thanks_reply_score":2,"thanks_reply_text":"Thanks. Will check it out!!","thanks_reply_timestamp":"2017-05-28T16:20:32+00:00"}} -{"user_id":"anon_e4517d8c7c363438","timestamp":"2017-05-28T07:57:04+00:00","subreddit":"LanguageTechnology","query":"Best NLP blogs to follow?\n\nWhat are some of the best NLP and Computational Linguistics blogs to follow on the internet? \n\nFor example: Chris Olah's github [blog](http://colah.github.io/) on neural networks.","preferred_answer":"* [Hal Daume III](https://nlpers.blogspot.ru/)\n* [LingPipe](https://lingpipe-blog.com/)\n* [Text Mining & Analytics](http://text-analytics101.rxnlp.com/)\n* [NLP News](http://nlp.hivefire.com/)\n* [Salmon Run](http://sujitpal.blogspot.ru/?m=0)","top_comment":"* [Hal Daume III](https://nlpers.blogspot.ru/)\n* [LingPipe](https://lingpipe-blog.com/)\n* [Text Mining & Analytics](http://text-analytics101.rxnlp.com/)\n* [NLP News](http://nlp.hivefire.com/)\n* [Salmon Run](http://sujitpal.blogspot.ru/?m=0)","metadata":{"post_id":"6dspdp","post_score":21,"answer_comment_id":"di59762","answer_score":10,"answerer_anon_id":"anon_215583d3fea9b5dd","top_comment_id":"di59762","top_comment_score":10,"top_comment_anon_id":"anon_215583d3fea9b5dd","top_equals_preferred":true,"thanks_reply_id":"di5om6o","thanks_reply_score":2,"thanks_reply_text":"Thanks !! \n\nThe blogger on Salmon Run also has a list of some of the ML and NLP blogs that he likes. ","thanks_reply_timestamp":"2017-05-28T19:13:19+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2017-05-31T15:06:09+00:00","subreddit":"LanguageTechnology","query":"Why the seq2seq model trained with small data set failed to generate any meaningful samples?\n\nI have trained a seq2seq model with attention for summarization task. The loss has reduced to 0.5 (average across time step and batch) successfully. But when I use the trained model to generate headline of news using the same data set, all of the outputs are filled with unknown symbols. From my understanding, the model should be capable to at least generate the headlines it has seen, even though may has the problem of overfitting. But why does it totally fail to generate any useful output? And is it related to the beam search decoder?\n\nAfter further training the model to a much less loss, I got the output with some words that were not UNK tokens. But most of them still were.","preferred_answer":"Neural nets need a lot of data that's just a fact. Now I'm going to guess that you generated the headline by taking the most probable word each time right? Unk is probably the work it's seen the most. What need to do is probably train it for longer and sample fairly from the probably.","top_comment":"Neural nets need a lot of data that's just a fact. Now I'm going to guess that you generated the headline by taking the most probable word each time right? Unk is probably the work it's seen the most. What need to do is probably train it for longer and sample fairly from the probably.","metadata":{"post_id":"6efjdc","post_score":3,"answer_comment_id":"di9ykhz","answer_score":2,"answerer_anon_id":"anon_c371c9503652322d","top_comment_id":"di9ykhz","top_comment_score":2,"top_comment_anon_id":"anon_c371c9503652322d","top_equals_preferred":true,"thanks_reply_id":"dia12j4","thanks_reply_score":1,"thanks_reply_text":"Thanks for your reply. But I used a beam search decoder instead of a greedy one. So it is supposed not to generate the word that has seen the most?","thanks_reply_timestamp":"2017-05-31T16:58:25+00:00"}} -{"user_id":"anon_4822aeda8297c46c","timestamp":"2017-05-31T15:06:09+00:00","subreddit":"LanguageTechnology","query":"Why the seq2seq model trained with small data set failed to generate any meaningful samples?\n\nI have trained a seq2seq model with attention for summarization task. The loss has reduced to 0.5 (average across time step and batch) successfully. But when I use the trained model to generate headline of news using the same data set, all of the outputs are filled with unknown symbols. From my understanding, the model should be capable to at least generate the headlines it has seen, even though may has the problem of overfitting. But why does it totally fail to generate any useful output? And is it related to the beam search decoder?\n\nAfter further training the model to a much less loss, I got the output with some words that were not UNK tokens. But most of them still were.","preferred_answer":"There's your problem. Maybe try finding a similar dataset that has much more data to pertain your network, then bump up the learning rate and continue training on your dataset?","top_comment":"Neural nets need a lot of data that's just a fact. Now I'm going to guess that you generated the headline by taking the most probable word each time right? Unk is probably the work it's seen the most. What need to do is probably train it for longer and sample fairly from the probably.","metadata":{"post_id":"6efjdc","post_score":3,"answer_comment_id":"dib2ilw","answer_score":2,"answerer_anon_id":"anon_2209765b93438129","top_comment_id":"di9ykhz","top_comment_score":2,"top_comment_anon_id":"anon_c371c9503652322d","top_equals_preferred":false,"thanks_reply_id":"dib2sxo","thanks_reply_score":1,"thanks_reply_text":"Thanks for your suggestion. But I am still confused that why can't it overfit the small data set.","thanks_reply_timestamp":"2017-06-01T06:33:53+00:00"}} -{"user_id":"anon_6bd1ee2caf9a6e70","timestamp":"2017-06-01T04:12:10+00:00","subreddit":"LanguageTechnology","query":"Help build the largest dataweb of all scientific knowledge\n\nHey guys, we’re building the largest dataweb of interconnected interdisciplinary scientific knowledge. For this, we need your help - specifically, experienced data scientists: experts in a combination of data mining, natural language processing, machine learning and deep learning; experts who, most importantly of all, possess the passion and drive to help make Science 2.0 a reality.\n\nInterested in volunteering for the cause? Send your CV to sciencecomputronium@gmail.com","preferred_answer":"Thanks for the explanation. If there's a public source hosted somewhere, I'd be happy to clone the repo and have a look if I could help in someway with NLP, semantic, or ontologies.","top_comment":"Can you provide any more links or information about it? How is it going to be built? Some new code? Reuse existing tool o library? Who will help to maintain it? Will it be free for all? Etc etc","metadata":{"post_id":"6ekdfu","post_score":5,"answer_comment_id":"dib7mlz","answer_score":2,"answerer_anon_id":"anon_a7155e9757d1f483","top_comment_id":"dib2owm","top_comment_score":3,"top_comment_anon_id":"anon_a7155e9757d1f483","top_equals_preferred":false,"thanks_reply_id":"dibbw2j","thanks_reply_score":2,"thanks_reply_text":"Thanks. Shoot your CV over to the above email (we've got some high standards) ","thanks_reply_timestamp":"2017-06-01T12:41:43+00:00"}} -{"user_id":"anon_69177ad75ab13dee","timestamp":"2017-06-07T07:16:59+00:00","subreddit":"LanguageTechnology","query":"Can you suggest me NLP projects ideas for my thesis?\n\nHello! I'm an incoming 4th year college CS student in Ph and required to take up my thesis with NLP as my topic, but I think that I'm really lost and don't have an idea where to start or what to do, and my project proposal is due on Saturday. Can you suggest me ideas for a thesis worthy project? I'm planning to use python as my programming language since a friend of mine said that there are many NLP related libraries in there. If it's not good of a language for NLP, can you suggest me others? :)\n\nThank you in advance guys!","preferred_answer":"How much time do you have for your thesis? Depending on that, the ideas you take up might differ.\n \nJust giving few areas of current research.\n\n\nThere has been some recent work in question similarity detection (after quora published their dataset, it became even more popular), paraphrase detection based on deep learning and NLP.\n\n\nThere is some work in detecting answers in paragraphs, answering questions using knowledge bases like wiki( like Google answers your search query in a QnA format).\n\n\nOther ideas could be in terms of entity and relations detection in given text. Or classification tasks like Twitter sentiment analysis.\n\n\nOh then there is neural conversation modeling but I don't think anyone has had great success in it.\n\nRecent NLP techniques have been based on deep learning, so if you can find some deep learning project which fits NLP category, maybe that can be it.\n\n\nPython sounds good, nltk is a good library.","top_comment":"How much time do you have for your thesis? Depending on that, the ideas you take up might differ.\n \nJust giving few areas of current research.\n\n\nThere has been some recent work in question similarity detection (after quora published their dataset, it became even more popular), paraphrase detection based on deep learning and NLP.\n\n\nThere is some work in detecting answers in paragraphs, answering questions using knowledge bases like wiki( like Google answers your search query in a QnA format).\n\n\nOther ideas could be in terms of entity and relations detection in given text. Or classification tasks like Twitter sentiment analysis.\n\n\nOh then there is neural conversation modeling but I don't think anyone has had great success in it.\n\nRecent NLP techniques have been based on deep learning, so if you can find some deep learning project which fits NLP category, maybe that can be it.\n\n\nPython sounds good, nltk is a good library.","metadata":{"post_id":"6frwbe","post_score":0,"answer_comment_id":"dikj3ac","answer_score":2,"answerer_anon_id":"anon_d9108f8c65c52bfa","top_comment_id":"dikj3ac","top_comment_score":2,"top_comment_anon_id":"anon_d9108f8c65c52bfa","top_equals_preferred":true,"thanks_reply_id":"dikjass","thanks_reply_score":1,"thanks_reply_text":"Thank you for your reply sir! Those are really nice suggestions. Well the time allotted is 4 months for research about algorithms and related works and 4 months for development, I think. What do you think is doable for that time scale?\n\nEdit: I already gained some ideas from your suggestions, thank you again! :)","thanks_reply_timestamp":"2017-06-07T08:11:03+00:00"}} -{"user_id":"anon_69177ad75ab13dee","timestamp":"2017-06-07T07:16:59+00:00","subreddit":"LanguageTechnology","query":"Can you suggest me NLP projects ideas for my thesis?\n\nHello! I'm an incoming 4th year college CS student in Ph and required to take up my thesis with NLP as my topic, but I think that I'm really lost and don't have an idea where to start or what to do, and my project proposal is due on Saturday. Can you suggest me ideas for a thesis worthy project? I'm planning to use python as my programming language since a friend of mine said that there are many NLP related libraries in there. If it's not good of a language for NLP, can you suggest me others? :)\n\nThank you in advance guys!","preferred_answer":"Check www.spacy.io , read the blog, tutorials and showcases","top_comment":"How much time do you have for your thesis? Depending on that, the ideas you take up might differ.\n \nJust giving few areas of current research.\n\n\nThere has been some recent work in question similarity detection (after quora published their dataset, it became even more popular), paraphrase detection based on deep learning and NLP.\n\n\nThere is some work in detecting answers in paragraphs, answering questions using knowledge bases like wiki( like Google answers your search query in a QnA format).\n\n\nOther ideas could be in terms of entity and relations detection in given text. Or classification tasks like Twitter sentiment analysis.\n\n\nOh then there is neural conversation modeling but I don't think anyone has had great success in it.\n\nRecent NLP techniques have been based on deep learning, so if you can find some deep learning project which fits NLP category, maybe that can be it.\n\n\nPython sounds good, nltk is a good library.","metadata":{"post_id":"6frwbe","post_score":0,"answer_comment_id":"dilhan0","answer_score":2,"answerer_anon_id":"anon_7c1d10c3a8bf98d4","top_comment_id":"dikj3ac","top_comment_score":2,"top_comment_anon_id":"anon_d9108f8c65c52bfa","top_equals_preferred":false,"thanks_reply_id":"diltzx3","thanks_reply_score":1,"thanks_reply_text":"Thanks! :)","thanks_reply_timestamp":"2017-06-08T01:18:22+00:00"}} -{"user_id":"anon_e4517d8c7c363438","timestamp":"2017-06-13T10:22:49+00:00","subreddit":"LanguageTechnology","query":"Classification of sentences into fact, opinion, inference etc.\n\nI am working on an NLP task. I was wondering if there is any prior research on classification of sentences into difference classes like opinion, fact, inference etc. I did find this [paper](http://acl-arc.comp.nus.edu.sg/archives/acl-arc-090501d4/data/pdf/anthology-PDF/W/W03/W03-1017.pdf) I could use but nothing concrete. \n\nCould anyone help?","preferred_answer":"I think you should check out the work by Janyce Wiebe and Theresa Wilson. They have been working on question-answering and on classifying subjective/objective sentences (see their \"opinionfinder 2.0) You might also be able to use some of their lexica.\nhttp://mpqa.cs.pitt.edu/","top_comment":"I think you should check out the work by Janyce Wiebe and Theresa Wilson. They have been working on question-answering and on classifying subjective/objective sentences (see their \"opinionfinder 2.0) You might also be able to use some of their lexica.\nhttp://mpqa.cs.pitt.edu/","metadata":{"post_id":"6gyzt7","post_score":5,"answer_comment_id":"diu7604","answer_score":3,"answerer_anon_id":"anon_892592a1019d8547","top_comment_id":"diu7604","top_comment_score":3,"top_comment_anon_id":"anon_892592a1019d8547","top_equals_preferred":true,"thanks_reply_id":"diur5fg","thanks_reply_score":1,"thanks_reply_text":"Thanks, will check it out.","thanks_reply_timestamp":"2017-06-13T18:01:43+00:00"}} -{"user_id":"anon_e24f24382d35bea6","timestamp":"2017-06-16T15:35:32+00:00","subreddit":"LanguageTechnology","query":"Looking for dataset for short answer grading from SemEval2013\n\nAnyone has idea how can i download the dataset of short answer grading from SemEval2013?","preferred_answer":"Dataset is here \n\nhttps://www.cs.york.ac.uk/semeval-2013/task7/index.php%3Fid=data.html","top_comment":"Dataset is here \n\nhttps://www.cs.york.ac.uk/semeval-2013/task7/index.php%3Fid=data.html","metadata":{"post_id":"6hn9kp","post_score":3,"answer_comment_id":"dj3u1gl","answer_score":1,"answerer_anon_id":"anon_e1073772428c0fd0","top_comment_id":"dj3u1gl","top_comment_score":1,"top_comment_anon_id":"anon_e1073772428c0fd0","top_equals_preferred":true,"thanks_reply_id":"dj3u2n2","thanks_reply_score":1,"thanks_reply_text":"Yes i found one :) thanks :)","thanks_reply_timestamp":"2017-06-19T14:14:07+00:00"}} -{"user_id":"anon_e24f24382d35bea6","timestamp":"2017-06-19T11:10:48+00:00","subreddit":"LanguageTechnology","query":"Classification of measures for text similarity\n\nI have doubt about classification of measures for text similarity. Some papers state that \"similarity measures are classified into three major types:\n 1. String Similarity\n 2. Knowledge-based Similarity\n 3. Corpus-based Similarity\n\nReference : \n\nA Survey of Text Similarity Approaches by Wael H.Gomaa \n\nSome papers state that \"Similarity measures are classified into four types:\n4. Word Vector Representation \n\nReference: Vector Based Techniques for Short Answer Grading\n\nDoes Word Vector Representation also come at the same level as other three categories are?","preferred_answer":"I agree with you and I disagree with the authors of Vector Based Techniques for Short Answer Grading. First off, WVR is a representation, not a similarity, so what they mean is cosine similarity (as per the paper) in an embedding space. But that vector space is induced from a corpus (they list Word2Vec and GloVe as examples of WVR), so it really is a subset of category 3.","top_comment":"I agree with you and I disagree with the authors of Vector Based Techniques for Short Answer Grading. First off, WVR is a representation, not a similarity, so what they mean is cosine similarity (as per the paper) in an embedding space. But that vector space is induced from a corpus (they list Word2Vec and GloVe as examples of WVR), so it really is a subset of category 3.","metadata":{"post_id":"6i5q5g","post_score":9,"answer_comment_id":"dj3riz5","answer_score":7,"answerer_anon_id":"anon_e09f0f9e0c418b93","top_comment_id":"dj3riz5","top_comment_score":7,"top_comment_anon_id":"anon_e09f0f9e0c418b93","top_equals_preferred":true,"thanks_reply_id":"dj40qx0","thanks_reply_score":1,"thanks_reply_text":"Ok thanks very much :)","thanks_reply_timestamp":"2017-06-19T16:24:05+00:00"}} -{"user_id":"anon_7854006369b393c7","timestamp":"2017-06-22T10:50:26+00:00","subreddit":"LanguageTechnology","query":"Deep Learning for Automated Speech Recognition\n\nI am doing a bit of literature review right now, and I am looking for current SOTA speech recognition papers (no older than 2016), or important advancements since. Does anyone have suggestions ?","preferred_answer":"[This](https://github.com/syhw/wer_are_we) is good place to start looking.","top_comment":"[This](https://github.com/syhw/wer_are_we) is good place to start looking.","metadata":{"post_id":"6ispw1","post_score":3,"answer_comment_id":"dj8ucpl","answer_score":2,"answerer_anon_id":"anon_96aed32009af2e49","top_comment_id":"dj8ucpl","top_comment_score":2,"top_comment_anon_id":"anon_96aed32009af2e49","top_equals_preferred":true,"thanks_reply_id":"dj8uig5","thanks_reply_score":1,"thanks_reply_text":"That, indeed, is a very nice resource. Thanks. \n\nEDIT: I am just surprised that [wav2letter](https://arxiv.org/abs/1609.03193) is not even on the list. Surely it's as good as Deep Speech 2 ? ","thanks_reply_timestamp":"2017-06-22T12:58:30+00:00"}} -{"user_id":"anon_9207c4d79f213e6e","timestamp":"2017-06-26T23:17:37+00:00","subreddit":"LanguageTechnology","query":"Need advice for matching a work experience description to job descriptions\n\nHello, I'm completely new to the area of NLP and machine learning so please forgive my ignorance.\n\nI'm looking to work on a project that allows users to input a description of work experience (ie. bullet points describing what the person did at that role) as well as a set of N job descriptions, and then retrieve the K most relevant job descriptions based on the work experience provided.\n\nFor instance using the following (made up) work experience description:\n\nSoftware Developer at Company XYZ:\n\n- Implemented a RESTful service to allow users to make payments using the mobile app using Java and the Play framework.\n- Developed feature on mobile app to allow users to create and customize profiles using ReactJS.\n- Used tensorflow to train a model to predict user's spending habits.\n\nThen maybe we would find job descriptions that mention similar technologies (Java, Play, REST, ReactJS, tensorflow) or any \njob descriptions with similar tasks/domains such as mobile development, training models, machine learning, or working with payments.\n\nI've searched the web for information about how to accomplish this and NLP and machine-learning pop up a lot so it leads me to think\nI need to learn about them and figure out how to apply it to my problem. However, the fields are so vast that I'm not sure where to begin.\n\nI think in another thread I've seen things like *tfidf, ngrams, and doc2vec* pop up. I've done a bit of reading on what these things are,\nbut am not sure how to apply them to my problem yet.\n\nFrom poking around, it seems like some approaches try to match the work experience description to job descriptions purely based on \nword frequency similarity (how often words in work experience appear in job descriptions.) and others look for similarity in the meaning/intent (semantic similarity?). I'm still sure which approach I should go for, or both.\nI'm not actually sure if I\"m using those words correctly, so again, apologies if it doesn't make sense.\n\nOne thing I'm concerned about is that training a good model in machine learning seems to require a lot of \"training data\" (1000s to millions) and I don't\nreally have access to that many work experience descriptions or job descriptions at the moment.\n\nAny guidance on how to get started would be much appreciated!","preferred_answer":"Check out the document similarity features in gensim: https://radimrehurek.com/gensim/tut3.html. Start with something like LSI before trying more advanced techniques such as doc2vec.","top_comment":"This is really a document similarity problem, I encourage you to checkout other semantic similarity models that aim to solve this very problem.","metadata":{"post_id":"6jorvl","post_score":6,"answer_comment_id":"djgc1u0","answer_score":2,"answerer_anon_id":"anon_ac90b363a014b6f9","top_comment_id":"djfxjy8","top_comment_score":2,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":false,"thanks_reply_id":"djhwtks","thanks_reply_score":1,"thanks_reply_text":"Hi, thanks for your reply. I'll definitely check out gensim.\n\nWill a technique like LSI require me to manually compute a bunch of results with training data and use that to train a model?\n\nAs I talked about in a reply to another user above, I'm worried about having to manually match a lot of work experience descriptions to job posting descriptions, as I am limited on time and resources for the project.","thanks_reply_timestamp":"2017-06-28T04:20:04+00:00"}} -{"user_id":"anon_9207c4d79f213e6e","timestamp":"2017-06-26T23:17:37+00:00","subreddit":"LanguageTechnology","query":"Need advice for matching a work experience description to job descriptions\n\nHello, I'm completely new to the area of NLP and machine learning so please forgive my ignorance.\n\nI'm looking to work on a project that allows users to input a description of work experience (ie. bullet points describing what the person did at that role) as well as a set of N job descriptions, and then retrieve the K most relevant job descriptions based on the work experience provided.\n\nFor instance using the following (made up) work experience description:\n\nSoftware Developer at Company XYZ:\n\n- Implemented a RESTful service to allow users to make payments using the mobile app using Java and the Play framework.\n- Developed feature on mobile app to allow users to create and customize profiles using ReactJS.\n- Used tensorflow to train a model to predict user's spending habits.\n\nThen maybe we would find job descriptions that mention similar technologies (Java, Play, REST, ReactJS, tensorflow) or any \njob descriptions with similar tasks/domains such as mobile development, training models, machine learning, or working with payments.\n\nI've searched the web for information about how to accomplish this and NLP and machine-learning pop up a lot so it leads me to think\nI need to learn about them and figure out how to apply it to my problem. However, the fields are so vast that I'm not sure where to begin.\n\nI think in another thread I've seen things like *tfidf, ngrams, and doc2vec* pop up. I've done a bit of reading on what these things are,\nbut am not sure how to apply them to my problem yet.\n\nFrom poking around, it seems like some approaches try to match the work experience description to job descriptions purely based on \nword frequency similarity (how often words in work experience appear in job descriptions.) and others look for similarity in the meaning/intent (semantic similarity?). I'm still sure which approach I should go for, or both.\nI'm not actually sure if I\"m using those words correctly, so again, apologies if it doesn't make sense.\n\nOne thing I'm concerned about is that training a good model in machine learning seems to require a lot of \"training data\" (1000s to millions) and I don't\nreally have access to that many work experience descriptions or job descriptions at the moment.\n\nAny guidance on how to get started would be much appreciated!","preferred_answer":"Hmmm... With the site I gave you, you will have some job descriptions that are in fact really close to work experience descriptions. So all you have to do is scrap some job website and find a job title that you have in onet. Onet will give you the work experiences and the scraped website will give you the job descriptions.\n\nI would think to do something like that you will need hundreds of thousand of examples.","top_comment":"This is really a document similarity problem, I encourage you to checkout other semantic similarity models that aim to solve this very problem.","metadata":{"post_id":"6jorvl","post_score":6,"answer_comment_id":"dji2uss","answer_score":2,"answerer_anon_id":"anon_367c68df7eccd895","top_comment_id":"djfxjy8","top_comment_score":2,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":false,"thanks_reply_id":"djj854e","thanks_reply_score":1,"thanks_reply_text":"Thanks again for taking the time to reply and explain things. This sounds like what I'd want to do, but for now, is there a way to implement document similarity without the need for training models? I'm just afraid that I won't have enough time to go through all that, just yet.","thanks_reply_timestamp":"2017-06-28T23:11:53+00:00"}} -{"user_id":"anon_ce3d1e2bd72c8900","timestamp":"2017-07-03T11:17:54+00:00","subreddit":"LanguageTechnology","query":"Looking for Text classification papers\n\nI am interested in implementing some algorithms using R. Are there any paper recommendations ? I am a good programmer with basic knowledge of ML algorithms.\n\nI can search any repositories lik arxiv ?","preferred_answer":"Look in the ACL library","top_comment":"Look in the ACL library","metadata":{"post_id":"6kzaty","post_score":1,"answer_comment_id":"djpwjyk","answer_score":2,"answerer_anon_id":"anon_3f1a18a2940f0f04","top_comment_id":"djpwjyk","top_comment_score":2,"top_comment_anon_id":"anon_3f1a18a2940f0f04","top_equals_preferred":true,"thanks_reply_id":"djpzkjc","thanks_reply_score":1,"thanks_reply_text":"Wonderful cache of papers. Thanks. Some with even code :-)","thanks_reply_timestamp":"2017-07-03T13:16:08+00:00"}} -{"user_id":"anon_e7abd9341aeed98d","timestamp":"2017-07-19T14:24:56+00:00","subreddit":"LanguageTechnology","query":"Are hard-coded grammar rules still in use / useful?\n\nI have been learning Japanese for a few years and also have a background in computer science.\n\nLike any diligent student, I study grammar rules. It seems somewhat necessary as an adult human to learn the rules or at least practice a bunch of example sentences pared down to some specific grammar usage without too much extraneous stuff.\n\n---\n\nMy question:\n\n*I wonder to what extent are individual natural languages' grammar rules* **hard-coded** *into parsers and translation engines these days?*\n\n---\n\nI'm interested to make my own translation app or extend something existing.\n\nI figured that as a starting point I'll code in dozens / hundreds of grammar rules....\n\n... with the side effect that I'll teach myself a bit more Japanese grammar just by being focused on these rules.\n\nBut I wonder how much the big boys like Google Translate and any small-fry translation/parsing engines (even open source...?) use these kinds of hand coded rules?\n\nCertainly I can imagine scenarios where the neural net is a black box and is given only example sentences and left to infer everything...\n\nOr scenarios where there is significant hand coding. In English we have grammar like \"the more... the more...\" Eg. The more I exercise, the more happy I am. Or (a variation) The more I exercise, the happier I am. Japanese likewise has a grammatical form for this kind of sentence. I have about a hundred grammar points I'm trying to learn as a human to get from an upper-beginner to an intermediate level of Japanese. So I'd be thinking about hard coding these 100 grammar rules.\n\nNow I know there could be a bit of a combination going on, and that in casual speech rules get bent, broken, rewritten for dramatic effect... and that machine learning might get some of this flexibility better than hand coding.\n\nBut still I wonder, is it reasonable to hand code hundreds of grammar rules these days?\n\nI get the feeling that the consensus is no, but my gut feeling is it's still useful, and in some cases Google translate etc is actually stupider and more intractable than it should be.\n\nWhat do you think?","preferred_answer":"For the most part, modern NLP systems hard-code grammar rules under three circumstances: (1) not enough data is available to train a machine learning approach, (2) the problem is sufficiently simple and the grammar rule so undeniably universal that collecting data isn't worth it, i.e., it's just easier to write a rule, and (3) a system that learns based on data has quirks--either in the model itself or the dataset--that are more easily corrected with rules than fixing the underlying learning approach.\n\nMy guess is that Google avoids rules as much as possible, but still (quietly) utilizes them when one of the above holds. The thing about Google is they have so much data, and often their solution is \"find more data\" instead of \"fix it the old-fashioned way\" since in theory \"more data\" can solve all three of those problems (if it's the _right_ data). Of course this approach has worked quite well for Google, so it's hard to blame them.","top_comment":"For the most part, modern NLP systems hard-code grammar rules under three circumstances: (1) not enough data is available to train a machine learning approach, (2) the problem is sufficiently simple and the grammar rule so undeniably universal that collecting data isn't worth it, i.e., it's just easier to write a rule, and (3) a system that learns based on data has quirks--either in the model itself or the dataset--that are more easily corrected with rules than fixing the underlying learning approach.\n\nMy guess is that Google avoids rules as much as possible, but still (quietly) utilizes them when one of the above holds. The thing about Google is they have so much data, and often their solution is \"find more data\" instead of \"fix it the old-fashioned way\" since in theory \"more data\" can solve all three of those problems (if it's the _right_ data). Of course this approach has worked quite well for Google, so it's hard to blame them.","metadata":{"post_id":"6o8sat","post_score":8,"answer_comment_id":"dkfkzvx","answer_score":12,"answerer_anon_id":"anon_e476ac2d76e44031","top_comment_id":"dkfkzvx","top_comment_score":12,"top_comment_anon_id":"anon_e476ac2d76e44031","top_equals_preferred":true,"thanks_reply_id":"dkfnr20","thanks_reply_score":1,"thanks_reply_text":"Thanks, well put!","thanks_reply_timestamp":"2017-07-19T16:51:37+00:00"}} -{"user_id":"anon_51ae87858879ed69","timestamp":"2017-07-23T12:49:06+00:00","subreddit":"LanguageTechnology","query":"Looking for an introductory book on Natural Language Processing\n\nHey guys, newbie here. I recently became interested in Natural Language Processing, and I was wondering if anyone could recommend a good book to get me started. I have a bachelors degree in English language and literature, and no actual knowledge about coding or programming.\nAny help is welcome, and thanks!","preferred_answer":"I really like \"Speech and Language Processing\" by Jurafksy & Martin.\nAdditionally a more practical book would be \"Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit\" by Bird, Klein & Loper.\nBoth should be a more than good start to get into NLP.","top_comment":"I really like \"Speech and Language Processing\" by Jurafksy & Martin.\nAdditionally a more practical book would be \"Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit\" by Bird, Klein & Loper.\nBoth should be a more than good start to get into NLP.","metadata":{"post_id":"6p14dq","post_score":10,"answer_comment_id":"dklty18","answer_score":11,"answerer_anon_id":"anon_c5928c3516685a8f","top_comment_id":"dklty18","top_comment_score":11,"top_comment_anon_id":"anon_c5928c3516685a8f","top_equals_preferred":true,"thanks_reply_id":"dkludem","thanks_reply_score":1,"thanks_reply_text":"Great, thanks for the help. :)","thanks_reply_timestamp":"2017-07-23T14:19:35+00:00"}} -{"user_id":"anon_d16ae649d6a71439","timestamp":"2017-08-16T01:42:57+00:00","subreddit":"LanguageTechnology","query":"[Question] NLP Platform choice for chatbots\n\nHi Forum,\n\nI am rather new to the world of NLP. I have a question on which technology to use. Here is my use-case. \n \nI have a chatbot manages help desk tickets. user logs into slack, user needs to create an incident ticket, user needs to update incident ticket and close incident ticket. \n \nCurrently the chatbot processes text base don Reg-ex and they have to be exactly what the bot expects. I want to leverage NLP so , \n \n\"get incident 123\", \"show me incident 123\", \"let me see incident 123\" for example map to the same intent. I know there are technologies such as API.AI where you can do all this, but google gets your data and if security is a concern it is a no-go. \n \nSo with something like Stanford NLP, can i do this? does it have a functionality where it lets me map intent? How is intent processing different than NLP ?","preferred_answer":"Stanford NLP can do dependency and parse entity recognition for you but for intent recognition you will most probably need a word vector implementation that you can train yourself. Stanford provides Glove https://nlp.stanford.edu/projects/glove/ and you can use that.\n\nTo get a brief idea about how intent recognition is done. See this blog post https://medium.com/rasa-blog/do-it-yourself-nlp-for-bot-developers-2e2da2817f3d","top_comment":"https://rasa.ai was made for exactly the same reason so that you don't have to hand over your data to Google or any other giants Wit/facebook etc.","metadata":{"post_id":"6tyuh3","post_score":4,"answer_comment_id":"dlpkcxj","answer_score":1,"answerer_anon_id":"anon_8c9b4c27f3ab5631","top_comment_id":"dloxhhu","top_comment_score":4,"top_comment_anon_id":"anon_8c9b4c27f3ab5631","top_equals_preferred":false,"thanks_reply_id":"dlpny1z","thanks_reply_score":1,"thanks_reply_text":"Thanks you! do you have some articles or videos where I can learn the whole process... like ....(idk how to say this). \n \nWhat does NLP do, what are the outputs (like you said NLP does parsing entity), then where do you go from there.. etc","thanks_reply_timestamp":"2017-08-16T17:50:50+00:00"}} -{"user_id":"anon_3596357060e588ca","timestamp":"2017-08-20T16:43:33+00:00","subreddit":"LanguageTechnology","query":"Is DSL (discriminating between similar languages and language varieties) important?\n\nBeing able to distinguish languages automatically is interesting for\n\n* Machine translation\n* sentiment analysis\n* document classification\n* search engines\n* OCR\n\nBut are close languages / language varieties (such as Brittish English vs American English or Brazilian Portuguese vs European Portuguese or Peninsular vs Argentine Spanish) important? I can only think of spell-checkers where it might come in handy ... and there one can also ask the user to say what he wants to use","preferred_answer":"Compare: \"pants\" in BrE and AmE. Translating this word into a different language is rather difficult without knowing where the text came from.","top_comment":"Compare: \"pants\" in BrE and AmE. Translating this word into a different language is rather difficult without knowing where the text came from.","metadata":{"post_id":"6uwqjf","post_score":1,"answer_comment_id":"dlwitxm","answer_score":2,"answerer_anon_id":"anon_845bff1c6e5eec08","top_comment_id":"dlwitxm","top_comment_score":2,"top_comment_anon_id":"anon_845bff1c6e5eec08","top_equals_preferred":true,"thanks_reply_id":"dlwvaa4","thanks_reply_score":1,"thanks_reply_text":"Nice example! Thank you! I didn't know that there are words with different meanings in BrE and AmE","thanks_reply_timestamp":"2017-08-21T05:06:47+00:00"}} -{"user_id":"anon_386ebe78dd81e0ca","timestamp":"2017-08-21T17:50:39+00:00","subreddit":"LanguageTechnology","query":"Looking for a Swedish lemmatizer\n\nI'm looking for a Swedish lemmatizer for a personal project but I haven't had any luck. I would really prefer a lemmatizer over a stemmer as I specifically want to use it for language learning purposes. Does anyone know of one that exists?\n\nAlternatively I'm also a software engineer so I'm open to the idea of getting my hands dirty with code, however I haven't done any machine learning since university. Open to any suggestions!","preferred_answer":"I'm on mobile right now so sorry for not digging up the links, but look up \"udpipe\". You should be able to find models for swedish that do lemmatization, in addition to sentence segmentation, tokenization, POS tagging and dependency parsing.","top_comment":"I'm on mobile right now so sorry for not digging up the links, but look up \"udpipe\". You should be able to find models for swedish that do lemmatization, in addition to sentence segmentation, tokenization, POS tagging and dependency parsing.","metadata":{"post_id":"6v4mwq","post_score":2,"answer_comment_id":"dlxn8e4","answer_score":2,"answerer_anon_id":"anon_2699af7478a17cae","top_comment_id":"dlxn8e4","top_comment_score":2,"top_comment_anon_id":"anon_2699af7478a17cae","top_equals_preferred":true,"thanks_reply_id":"dlzeuh2","thanks_reply_score":1,"thanks_reply_text":"Thanks I'm downloading it now and I'll take a look :)","thanks_reply_timestamp":"2017-08-22T20:02:04+00:00"}} -{"user_id":"anon_386ebe78dd81e0ca","timestamp":"2017-08-21T17:50:39+00:00","subreddit":"LanguageTechnology","query":"Looking for a Swedish lemmatizer\n\nI'm looking for a Swedish lemmatizer for a personal project but I haven't had any luck. I would really prefer a lemmatizer over a stemmer as I specifically want to use it for language learning purposes. Does anyone know of one that exists?\n\nAlternatively I'm also a software engineer so I'm open to the idea of getting my hands dirty with code, however I haven't done any machine learning since university. Open to any suggestions!","preferred_answer":"spaCy does lemmatisation and has alpha support for Swedish.\n\nhttps://spacy.io/docs/api/language-models#alpha-support \n\nhttps://github.com/explosion/spaCy/tree/master/spacy/sv\n\nIt's also the most competitive NLP library right now with good performance, active support and momentum on adding languages.","top_comment":"I'm on mobile right now so sorry for not digging up the links, but look up \"udpipe\". You should be able to find models for swedish that do lemmatization, in addition to sentence segmentation, tokenization, POS tagging and dependency parsing.","metadata":{"post_id":"6v4mwq","post_score":2,"answer_comment_id":"dlyl81c","answer_score":2,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"dlxn8e4","top_comment_score":2,"top_comment_anon_id":"anon_2699af7478a17cae","top_equals_preferred":false,"thanks_reply_id":"dlzex2p","thanks_reply_score":2,"thanks_reply_text":"Thanks for the link. Looks like there's still a lot of work to go with Swedish and there's no model available from their repo. I've been looking for a NLP project to contribute to though so I might see what I can do (although building a lemmatizer is probably not super easy if you're still learning the language).","thanks_reply_timestamp":"2017-08-22T20:03:22+00:00"}} -{"user_id":"anon_386ebe78dd81e0ca","timestamp":"2017-08-21T17:50:39+00:00","subreddit":"LanguageTechnology","query":"Looking for a Swedish lemmatizer\n\nI'm looking for a Swedish lemmatizer for a personal project but I haven't had any luck. I would really prefer a lemmatizer over a stemmer as I specifically want to use it for language learning purposes. Does anyone know of one that exists?\n\nAlternatively I'm also a software engineer so I'm open to the idea of getting my hands dirty with code, however I haven't done any machine learning since university. Open to any suggestions!","preferred_answer":"Apertium has Swedish in a few language pairs, perhaps you could use one half of a language pair to get what you're looking for. Apertium is linguistic MT, and a part of that is naturally lemmatization.\n\nAnother thing to look around for would be FST morphologies, which will also lemmatize, they just may not call the whole process lemmatization, preventing you from finding it.","top_comment":"I'm on mobile right now so sorry for not digging up the links, but look up \"udpipe\". You should be able to find models for swedish that do lemmatization, in addition to sentence segmentation, tokenization, POS tagging and dependency parsing.","metadata":{"post_id":"6v4mwq","post_score":2,"answer_comment_id":"dly1142","answer_score":2,"answerer_anon_id":"anon_2a6f72e61f313ee5","top_comment_id":"dlxn8e4","top_comment_score":2,"top_comment_anon_id":"anon_2699af7478a17cae","top_equals_preferred":false,"thanks_reply_id":"dlzf08o","thanks_reply_score":1,"thanks_reply_text":"Thanks I'll take a look!","thanks_reply_timestamp":"2017-08-22T20:04:55+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2017-09-06T17:38:07+00:00","subreddit":"LanguageTechnology","query":"When learning a vector space from unstructured text using multi-dimensional scaling, should you remove infrequent words?\n\nHey, I'm wondering if I should be removing infrequent words (e.g. words that haven't occurred in at least 50 documents) from the [20 newsgroups](http://qwone.com/~jason/20Newsgroups/) dataset before putting them into a [multi-dimensional scaling algorithm](http://scikit-learn.org/stable/modules/generated/sklearn.manifold.MDS.html) for dimensionality reduction. I haven't seen anyone mention removing infrequent terms in scientific papers as a preprocessing step, but in the scikit-learn package the [CountVectorizer] (http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html) (that converts text into term:frequency pairings) has these parameters on by default.\n\nShould I be removing infrequent words? If so, how many is reasonable for a dataset like the 20 newsgroups dataset?\n\nThanks for any help.","preferred_answer":"Default value for fastText `minCount` param is 5. And that is just occurrences anywhere, could be within the same document.\n\nIn the end you have to see if the vectors for words around the cutoff make sense (eg look at nearest neighbours) and whether your end application accuracy is better with or without them.","top_comment":"MDS will work rather poorly on the bag-of-words vectors in the first place","metadata":{"post_id":"6yh5t7","post_score":4,"answer_comment_id":"dmnf7m2","answer_score":1,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"dmnfa7p","top_comment_score":2,"top_comment_anon_id":"anon_f038f2ea7b8ea7c0","top_equals_preferred":false,"thanks_reply_id":"dmnfgak","thanks_reply_score":2,"thanks_reply_text":"Makes sense, thanks. I'll make it way lower and do some testing.","thanks_reply_timestamp":"2017-09-06T18:56:16+00:00"}} -{"user_id":"anon_4adeccec53f130b2","timestamp":"2017-09-06T16:57:26+00:00","subreddit":"LanguageTechnology","query":"Anyone here familiar with Document Frequency Thresholding?\n\nI think this might be the right sub, but if it's not I am sorry. It's still about NLP anyway. \n\nI'm still new to the topic and still trying to familiarize myself with a lot of things. Recently I got myself to learn about Tf-Idf, but apparently it's not enough for my research. I read about this feature selection technique called Df Thresholding. Basically, you use some kind of thresholds to decide whether certain features (terms) really contribute to the classification or not by looking at its document frequency (Df). I've tried to google it but every search result only points to Tf-Idf article and not the Df thresholding I am trying to learn. I wonder if you guys could link me to some articles or shed me some light on it. Thanks.","preferred_answer":"It's just a fancy name for a slight, intuitive modification of TF-IDF -- \"ignore words that don't show up very often in the corpus\". \n\nThe point of TF-IDF is to find stuff that's meaningful in a document by finding stuff that's frequent in the document but rare in the corpus. Therefore, word that appears in one document and nowhere else in the corpus will have a high TFIDF score. Imagine the reasons that this might happen: it might just be a name or a typo. You may get better results by ignoring that word and counting words that show up in the corpus at least a few times. \n\nThis isn't a highly-theoretical, scientific technique, but just a fancy name for the application of a practical heuristic to TF-IDF.","top_comment":"It's just a fancy name for a slight, intuitive modification of TF-IDF -- \"ignore words that don't show up very often in the corpus\". \n\nThe point of TF-IDF is to find stuff that's meaningful in a document by finding stuff that's frequent in the document but rare in the corpus. Therefore, word that appears in one document and nowhere else in the corpus will have a high TFIDF score. Imagine the reasons that this might happen: it might just be a name or a typo. You may get better results by ignoring that word and counting words that show up in the corpus at least a few times. \n\nThis isn't a highly-theoretical, scientific technique, but just a fancy name for the application of a practical heuristic to TF-IDF.","metadata":{"post_id":"6ygw5j","post_score":6,"answer_comment_id":"dmnva8q","answer_score":4,"answerer_anon_id":"anon_ba4367c0fc882fa0","top_comment_id":"dmnva8q","top_comment_score":4,"top_comment_anon_id":"anon_ba4367c0fc882fa0","top_equals_preferred":true,"thanks_reply_id":"dmo5ncw","thanks_reply_score":1,"thanks_reply_text":"Okay thanks for the explanation. But how do we decide the right threshold number for the experiment?","thanks_reply_timestamp":"2017-09-07T03:57:26+00:00"}} -{"user_id":"anon_458f418255e54274","timestamp":"2017-09-08T18:08:58+00:00","subreddit":"LanguageTechnology","query":"Word length prediction via ngram analysis\n\nHi!\n\nAssuming I have a long text without spacing, e.g. \"itwasaverylowfireindeednothingonsuchabitternight\". \n\nWithout using additional ressources (e.g., a large corpus), is it somehow possible to predict the word boundaries via n-gram analysis? For instance, to split this text into\"it\", \"was\", \"a\", \"very\", ...? \n\nedit: To clarify, I assume a language model for an unknown language, without any training data. Just given a large text, is it somehow possible to segment/split the text into mostly meaningful words (e.g., based on n-grams)?","preferred_answer":"This is a well-researched problem because some languages, like Thai - and early Latin and Greek - do not have spaces, and other languages, like German, write compound noun phrases without spaces.\n\nIt's called *word segmentation*, *segmenting*, *segmenters*.\n\nhttps://www.google.ch/search?q=thai+segmenters\n> Segmenters for Chinese, Thai and Japanese languages. Unlike in the Western languages, texts in the East Asian languages Chinese, Thai and Japanese may ...\n\nIn the context of German nouns, it's called *compound splitting*, *splitters*.\n\nhttps://www.google.ch/search?q=german+compound+splitter\n> CharSplit - An ngram-based compound splitter for German. Splits a German compound into its body and head, e.g.. Autobahnraststätte -> Autobahn - Raststätte.","top_comment":"This is a well-researched problem because some languages, like Thai - and early Latin and Greek - do not have spaces, and other languages, like German, write compound noun phrases without spaces.\n\nIt's called *word segmentation*, *segmenting*, *segmenters*.\n\nhttps://www.google.ch/search?q=thai+segmenters\n> Segmenters for Chinese, Thai and Japanese languages. Unlike in the Western languages, texts in the East Asian languages Chinese, Thai and Japanese may ...\n\nIn the context of German nouns, it's called *compound splitting*, *splitters*.\n\nhttps://www.google.ch/search?q=german+compound+splitter\n> CharSplit - An ngram-based compound splitter for German. Splits a German compound into its body and head, e.g.. Autobahnraststätte -> Autobahn - Raststätte.","metadata":{"post_id":"6ywhw9","post_score":4,"answer_comment_id":"dmt5fwo","answer_score":2,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"dmt5fwo","top_comment_score":2,"top_comment_anon_id":"anon_c07876815fcdf883","top_equals_preferred":true,"thanks_reply_id":"dmuo426","thanks_reply_score":1,"thanks_reply_text":"Thanks for the reply! We assume a language model for an unknown language without any learning data. Just given a large text base, can we somehow learn meaningful word boundaries within this text base?","thanks_reply_timestamp":"2017-09-11T11:35:19+00:00"}} -{"user_id":"anon_217cf523d4bb4b57","timestamp":"2017-09-17T14:27:06+00:00","subreddit":"LanguageTechnology","query":"What is 'featuresets'? Can someone ELI5 please?\n\nI am trying to learn NLP with python on my own and now I feel I have been stuck and frustrated. Wherever I go, I will read the code about featuresets, from blogs or youtube tutorials on NLP. But they never really explain what it is and why it's important. What is it really? I don't usually use it and there hasn't been any problem so far. Usually I do the preprocessing stuff with NLTK then put the data straight to TfIdfVectorizer, then put it in a classifier. It works fine and I get my accuracy just fine. But now I bump into a case where my accuracy is really low and I wonder if not using this 'featuresets' is what causes it. What is the difference between having 'featuresets' and not? \n\nI hope this is clear enough, but if it is not, please tell me and I will edit the question. Thanks!","preferred_answer":"You got it. Rant totally justified. The discrepancy gets even worse transitioning from datasets common in academia and datasets in industry. I haven't seen a tutorial online that prepares you for working with the dirty data you see in industry (perhaps I could get around to something like that...). \n\nWhat I can say though, is once you pay your dues and learn all the amazing thing pandas can do for you, it becomes really easy to use. I forget where I read it, but I remember someone saying how pandas is hard to learn/use properly because it's such a large library, but once you find your way around, it's somehow easy to remember most of it. There were some tutorials I found that helped here and there, but honestly the main thing to do is just google the task your approaching and then \"pandas\" and find the appropriate method/section of their documentation. I've also found books to be much more helpful than online stuff. For example [python for data analysis](https://pdfs.semanticscholar.org/d49e/74ec55a5611c784eebde5c9a4b006a366906.pdf) has some cool pandas stuff near the ending chapters.","top_comment":"Ah okay, to me it just looks like some NLTK naming convention for lists of (features, label) tuples. I can guarantee you that you're not missing anything important here. \n\nI understand the frustration of them not being explicit about it being a convention. My suggestion is that, since you can see exactly what they are assigning to their `featuresets` variables, you can essentially take that as the definition. Both examples you linked define that variable the same way, so you can assume that is _literally_ all it means.","metadata":{"post_id":"70nrl8","post_score":5,"answer_comment_id":"dn4rdg9","answer_score":3,"answerer_anon_id":"anon_2d0f0626f3870e2c","top_comment_id":"dn4onwz","top_comment_score":4,"top_comment_anon_id":"anon_2d0f0626f3870e2c","top_equals_preferred":false,"thanks_reply_id":"dn64yhh","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot!","thanks_reply_timestamp":"2017-09-18T14:51:34+00:00"}} -{"user_id":"anon_217cf523d4bb4b57","timestamp":"2017-09-18T15:04:20+00:00","subreddit":"LanguageTechnology","query":"What else can we do to improve classification accuracy?\n\nI come into a problem where there are certain features (words) that appear in all the classes and this seems to make my classifier confused on classifying the documents. As a result, when I use certain classifiers (Multinomial Naive Bayes, SVM, etc) the classifier fails to predict the right classes of the documents and instead it classifies all the documents to one certain class (which is very dominant in my case, it's quite imbalance dataset). Strangely, when I use something really simple like KNN, it can predict better (from the confusion matrix, I know all the data are no longer classified to one certain class anymore), albeit still low in accuracy (around 60%). I figure there must be some ways you can do to improve accuracy? \n\n- N-grams, I did bigrams and trigrams to my classifier, it doesn't improve the accuracy much.\n\n- Eliminating terms that only appear less than certain number in the documents. I limit it to min_df=5 and it reduces a great portion of features, from like 100k to only 2k, but with similar accuracy. I am quite impressed by this.\n\nWhat else can I do? I am actually thinking of something like feature selection (information gain, chi-square) but I haven't found any tutorial detailing about this on python. And I have no idea where to begin. Could anyone here suggest me some other methods? Thanks!","preferred_answer":"I know that there are some case studies on how to handle imbalanced classes. You might have some luck reading up on how other people have tackled that situation. Sorry I couldn't help more.","top_comment":"I've worked with NLP before on several projects for General Assembly. Try using count, hash, and tfidf vectorizers from sklearn.feature_extraction.text and then use all the classifiers you know: KNN, Logistic Regression, the RandomForestClassifier from sklearn.ensemble, or SVC from sklearn.svm.\n\nGood luck!","metadata":{"post_id":"70vkql","post_score":7,"answer_comment_id":"dn7udnu","answer_score":1,"answerer_anon_id":"anon_5fd53582eab495ef","top_comment_id":"dn6j13q","top_comment_score":3,"top_comment_anon_id":"anon_5fd53582eab495ef","top_equals_preferred":false,"thanks_reply_id":"dn7w5e7","thanks_reply_score":1,"thanks_reply_text":"OK thanks a lot anyway.","thanks_reply_timestamp":"2017-09-19T16:02:50+00:00"}} -{"user_id":"anon_217cf523d4bb4b57","timestamp":"2017-09-18T15:04:20+00:00","subreddit":"LanguageTechnology","query":"What else can we do to improve classification accuracy?\n\nI come into a problem where there are certain features (words) that appear in all the classes and this seems to make my classifier confused on classifying the documents. As a result, when I use certain classifiers (Multinomial Naive Bayes, SVM, etc) the classifier fails to predict the right classes of the documents and instead it classifies all the documents to one certain class (which is very dominant in my case, it's quite imbalance dataset). Strangely, when I use something really simple like KNN, it can predict better (from the confusion matrix, I know all the data are no longer classified to one certain class anymore), albeit still low in accuracy (around 60%). I figure there must be some ways you can do to improve accuracy? \n\n- N-grams, I did bigrams and trigrams to my classifier, it doesn't improve the accuracy much.\n\n- Eliminating terms that only appear less than certain number in the documents. I limit it to min_df=5 and it reduces a great portion of features, from like 100k to only 2k, but with similar accuracy. I am quite impressed by this.\n\nWhat else can I do? I am actually thinking of something like feature selection (information gain, chi-square) but I haven't found any tutorial detailing about this on python. And I have no idea where to begin. Could anyone here suggest me some other methods? Thanks!","preferred_answer":"That is what you're looking for. If the voting is set to hard it will take the mode of all classifiers. If set to soft it uses probability but in most cases without finely tuned models hard voting performs better.","top_comment":"I've worked with NLP before on several projects for General Assembly. Try using count, hash, and tfidf vectorizers from sklearn.feature_extraction.text and then use all the classifiers you know: KNN, Logistic Regression, the RandomForestClassifier from sklearn.ensemble, or SVC from sklearn.svm.\n\nGood luck!","metadata":{"post_id":"70vkql","post_score":7,"answer_comment_id":"dn9ec3j","answer_score":2,"answerer_anon_id":"anon_47bc5e0803abfa2f","top_comment_id":"dn6j13q","top_comment_score":3,"top_comment_anon_id":"anon_5fd53582eab495ef","top_equals_preferred":false,"thanks_reply_id":"dn9fe4f","thanks_reply_score":1,"thanks_reply_text":"Oh okay thanks for the explanation. I did a few experiments on ensemble with KNN, Multinomial NB, logistic regression, SVM, etc, it only increases the accuracy a little bit. I got around 65% now, wonder where I did wrong.","thanks_reply_timestamp":"2017-09-20T14:23:22+00:00"}} -{"user_id":"anon_cf2ea5249d351aa7","timestamp":"2017-09-21T16:02:57+00:00","subreddit":"LanguageTechnology","query":"With our current understanding of natural language processing, could we theoretically create a program that can read a wikipedia page and create a knowledge graph out of it (similar to wikidata)?","preferred_answer":"I think so, I'll try to track down the code/paper later tonight for you.","top_comment":"Absolutely - depending on what levels of performance you're willing to accept and how much efforts you're willing to spend.\n\nSo I actually did this as a project in graduate school and while I'm sure there are others out there who have done it better I can tell you about some of the tricks we used:\n\n* Structured data: data boxes for us were an invaluable starting point since they usually provided the most \"queryable\" information and tell you what sort of object a Wikipedia entry represents (person, place, event, etc)\n\n* Parsing unstructured text: there are a number of semantic parsers out there but we used SEMAFOR to generate semantic frames which we then used to populate our knowledge graph\n\n* Tweaks: in order to make the problem a little more tractable we limited ourselves to \"Simple Wikipedia\" which greatly reduced the vocabulary and syntactic complexity. Afterwards we hand crafted some rules to make sure picked up and processed predicates that we were interested in and SEMAFOR was missing.\n\nSo from an information extraction perspective it worked reasonably well with the structured data fields providing most of the value. The NLP portion also worked well enough to show that it was doable but since this was just a proof of concept we left it at that.","metadata":{"post_id":"71k4ae","post_score":21,"answer_comment_id":"dnbobhy","answer_score":1,"answerer_anon_id":"anon_dbcde3e6a9f80f6d","top_comment_id":"dnbdugu","top_comment_score":7,"top_comment_anon_id":"anon_dbcde3e6a9f80f6d","top_equals_preferred":false,"thanks_reply_id":"dnbof0r","thanks_reply_score":2,"thanks_reply_text":"thanks man! did you use a rdbms or a graph db? what language did you use?","thanks_reply_timestamp":"2017-09-21T20:09:18+00:00"}} -{"user_id":"anon_db5f0bf7ad530daa","timestamp":"2017-10-13T07:15:57+00:00","subreddit":"LanguageTechnology","query":"What question would you ask to a person who applied to your company as a NLP intern.","preferred_answer":"* What is Zipf's law?\n* What is the bag-of-words model? What to use it for? How does it work?\n* What is the n-gram model? What to use it for? How does it work?\n* What are Part-of-Speech Tags and how to get them?\n* Named Entity Recognition?\n* Sentiment Analysis?\n\nEdit: Semantic Analysis != Sentiment Analysis","top_comment":"* What is Zipf's law?\n* What is the bag-of-words model? What to use it for? How does it work?\n* What is the n-gram model? What to use it for? How does it work?\n* What are Part-of-Speech Tags and how to get them?\n* Named Entity Recognition?\n* Sentiment Analysis?\n\nEdit: Semantic Analysis != Sentiment Analysis","metadata":{"post_id":"7636fm","post_score":5,"answer_comment_id":"dob1cws","answer_score":9,"answerer_anon_id":"anon_6bdf5de26e0109d3","top_comment_id":"dob1cws","top_comment_score":9,"top_comment_anon_id":"anon_6bdf5de26e0109d3","top_equals_preferred":true,"thanks_reply_id":"docp52b","thanks_reply_score":2,"thanks_reply_text":"Thanks, really helpful.","thanks_reply_timestamp":"2017-10-14T10:54:01+00:00"}} -{"user_id":"anon_db5f0bf7ad530daa","timestamp":"2017-10-13T07:15:57+00:00","subreddit":"LanguageTechnology","query":"What question would you ask to a person who applied to your company as a NLP intern.","preferred_answer":"Screener questions here (mostly focused on language and speech) https://goo.gl/forms/UPyUHy1s8d9I6Ecj2.","top_comment":"* What is Zipf's law?\n* What is the bag-of-words model? What to use it for? How does it work?\n* What is the n-gram model? What to use it for? How does it work?\n* What are Part-of-Speech Tags and how to get them?\n* Named Entity Recognition?\n* Sentiment Analysis?\n\nEdit: Semantic Analysis != Sentiment Analysis","metadata":{"post_id":"7636fm","post_score":5,"answer_comment_id":"doch196","answer_score":2,"answerer_anon_id":"anon_c8bc701f605a1cab","top_comment_id":"dob1cws","top_comment_score":9,"top_comment_anon_id":"anon_6bdf5de26e0109d3","top_equals_preferred":false,"thanks_reply_id":"docp5pw","thanks_reply_score":1,"thanks_reply_text":"nice real world one, thanks ) \n","thanks_reply_timestamp":"2017-10-14T10:54:49+00:00"}} -{"user_id":"anon_03ef50f966d6fee6","timestamp":"2017-10-12T15:33:46+00:00","subreddit":"LanguageTechnology","query":"Best python wrapper for Stanford's CoreNLP?\n\nI know there are lots of python wrappers for Stanford's CoreNLP. Which one is your favorite to use?","preferred_answer":"No. You start a server running a java model and then, separately, use python to hit that server with a request.","top_comment":"I actually only worked with the nltk wrapper and it worked alright? Doesn't really scale well though, had to use a wrapper for CoreNLP server after a while.","metadata":{"post_id":"75xrhl","post_score":10,"answer_comment_id":"dojb0yk","answer_score":1,"answerer_anon_id":"anon_814e5d245e3e3083","top_comment_id":"do9xlc9","top_comment_score":2,"top_comment_anon_id":"anon_5f545de7ee4a7d93","top_equals_preferred":false,"thanks_reply_id":"dojegzx","thanks_reply_score":1,"thanks_reply_text":"Thanks. What would that look like?","thanks_reply_timestamp":"2017-10-18T14:00:26+00:00"}} -{"user_id":"anon_2282613e9581872c","timestamp":"2017-10-24T23:43:28+00:00","subreddit":"LanguageTechnology","query":"Where should I be looking for internships?\n\nI'm a Junior undergraduate at Penn studying computational linguistics, and besides the big 5 (Google, Amazon, Apple, FB, Microsoft) and Narrative Science and such, is there anywhere I should be looking for internships in the private sector? I've already done a fair bit of research, so I really want to see what applied NLP looks like in the corporate world","preferred_answer":"ccb is one of your professors","top_comment":"Slack, AI2, maybe Salesforce, IBM, Comcast. For startups, maybe first decide a location then start looking for startups, or you'll be overwhelmed.\n\nCCB should be able to make additional recommendations.","metadata":{"post_id":"78jubh","post_score":8,"answer_comment_id":"dov46fg","answer_score":2,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"dousjc2","top_comment_score":4,"top_comment_anon_id":"anon_5a1f683434d025b7","top_equals_preferred":false,"thanks_reply_id":"dovifa8","thanks_reply_score":1,"thanks_reply_text":"Yeah, taking Computational Linguistics with him next sem, I'll definitely ask. Thanks!","thanks_reply_timestamp":"2017-10-25T17:09:34+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2017-10-27T12:52:16+00:00","subreddit":"LanguageTechnology","query":"When would you use Non-negative Matrix Factorization over Latent Dirchlet Allocation?\n\nHey guys,\n\nI've been looking into Latent Dirchlet Allocation (LDA) https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation and NMF Non-negative Matrix Factorization (NMF) https://en.wikipedia.org/wiki/Non-negative_matrix_factorization but I'm not sure when you would choose one over the other.\n\nI figured they have kind of the same use, producing an interpretable text representation.\n\nAny ideas?","preferred_answer":"> What are the specific regularizations in NMF useful for?\n\n[This thesis has a few](https://perso.uclouvain.be/paul.vandooren/ThesisHo.pdf). Chapter 4.5-4.7, 5, 6, and 7.\n\n> most would default to using LDA\n\nYes, LDA is 10x+ more popular than NMF for topic modeling.","top_comment":"NMF can be simpler to implement and modify the objective to add different types of regularizations.","metadata":{"post_id":"793117","post_score":6,"answer_comment_id":"dp0p85e","answer_score":2,"answerer_anon_id":"anon_1f3804539580f8f3","top_comment_id":"dozyttr","top_comment_score":2,"top_comment_anon_id":"anon_1f3804539580f8f3","top_equals_preferred":false,"thanks_reply_id":"dp11hhp","thanks_reply_score":2,"thanks_reply_text":"Great, thanks very much.","thanks_reply_timestamp":"2017-10-28T23:35:30+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2017-10-27T12:52:16+00:00","subreddit":"LanguageTechnology","query":"When would you use Non-negative Matrix Factorization over Latent Dirchlet Allocation?\n\nHey guys,\n\nI've been looking into Latent Dirchlet Allocation (LDA) https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation and NMF Non-negative Matrix Factorization (NMF) https://en.wikipedia.org/wiki/Non-negative_matrix_factorization but I'm not sure when you would choose one over the other.\n\nI figured they have kind of the same use, producing an interpretable text representation.\n\nAny ideas?","preferred_answer":"For processing text it is, and is now the go to solution for many NLP tasks either by itself or to be used downstream of another classifier","top_comment":"NMF can be simpler to implement and modify the objective to add different types of regularizations.","metadata":{"post_id":"793117","post_score":6,"answer_comment_id":"dp0rzsa","answer_score":1,"answerer_anon_id":"anon_8bac7a0ae9d950e0","top_comment_id":"dozyttr","top_comment_score":2,"top_comment_anon_id":"anon_1f3804539580f8f3","top_equals_preferred":false,"thanks_reply_id":"dp11i0u","thanks_reply_score":2,"thanks_reply_text":"Thanks man!","thanks_reply_timestamp":"2017-10-28T23:35:50+00:00"}} -{"user_id":"anon_8a0085063bbbe082","timestamp":"2017-10-28T22:10:18+00:00","subreddit":"LanguageTechnology","query":"How to analyze sentiment for a corpus as a whole? [Help]\n\nHello, I've worked with sentiment analysis based on entities, but i was thinking about classify a corpus as a whole, to know if a movie review is positive for example. \n\nPlease, if anyone could point me to some article or study to help me start, would help a lot! Thank you","preferred_answer":"Stanford sentiment is trained on just single sentences. You might have to train the model on a paragraph to find out the final sentence\n\nAnother solution could be that you find out the relevance/weight of the sentence to the paragraph. Then combine the weight and sentiment value and sum over all the sentences. \n \n\nhttps://datascience.stackexchange.com/questions/2646/extract-most-informative-parts-of-text-from-documents\n\nhttps://appliedmachinelearning.wordpress.com/2017/02/12/sentiment-analysis-using-tf-idf-weighting-pythonscikit-learn/\n\n> Our objective : To do sentiment polarity analysis on movie reviews. In other words, to classify opinions expressed in a text review (document) in order to determine whether the reviewer’s sentiment towards the movie is positive or negative.","top_comment":"Train your model with similar movie reviews and then that's that. Your model will learn what a positive review is, what an horrific review is, by calculating the likelihood of these words appearing for such category.","metadata":{"post_id":"79cxt1","post_score":5,"answer_comment_id":"dp1okiy","answer_score":2,"answerer_anon_id":"anon_28e7b7e195a1c553","top_comment_id":"dp1kwbx","top_comment_score":2,"top_comment_anon_id":"anon_90c8fff2d76eb427","top_equals_preferred":false,"thanks_reply_id":"dp25sez","thanks_reply_score":2,"thanks_reply_text":"Thank you! this is what i needed. i'll try to come back here with my results.","thanks_reply_timestamp":"2017-10-29T19:12:12+00:00"}} -{"user_id":"anon_dda83554f993dda9","timestamp":"2017-11-09T09:41:22+00:00","subreddit":"LanguageTechnology","query":"Understanding Context Free Grammar sentence generation\n\nI am currently learning Context Free Grammar sentence generation, but I am still not clear how it exactly works.\n\nI understand the following rules generates the sentence \"The dog laughs\"\n\nS -> NP VP\nNP -> DT N\nVP -> VB\nDP -> \"the\"\nN -> \"dog\"\nVB -> \"laughs:\n\nBut I don't understand how we should generate rules based on a sentence. Is there like a basic step to follow when we generate a grammar rule? For example, what are the steps of generating the sentence \"They operate ships and banks.\" ?","preferred_answer":"[PSR's](https://en.wikipedia.org/wiki/Phrase_structure_rules) are not steps in an algorithm, but rewrite (rephrase) rules to generate a sentence. So when you want to generate the example sentence...\n\n*They operate ships and banks*\n\n...what you're really doing is just *rephrasing* each Phrase into its constituent members. Here you can rewrite two phrase types – NP and VP – until you reach their phrasal heads. See the constituency below:\n\nS [NP They] [VP operate [NP [ships] and [banks]]]]\n\nNow, these are just the phrases, but you need to label the heads:\n\nS [NP [**N** They]] [VP [**V** operate] [NP [**N** ships] and [**N** banks]]]]\n\n\nSo if you understand the constituency, you can simply rewrite each phrase as:\n\nS –> NP VP \n\nNP –> N Conj N\n\nVP –> V NP\n\nN –> They\n\nV –> operate\n\nN –> ships\n\nN –> banks\n\nConj –> and\n\n\nThese rules can be said to constitute a grammar, and that grammar generates sentences (a language).\n\nHere's a [syntax tree diagram](http://mshang.ca/syntree/?i=S%20%5BNP%20%5BN%20They%5D%5D%20%5BVP%20%5BV%20operate%20%5D%5BNP%20%5BN%20ships%5D%20and%20%5BN%20banks%5D%5D%5D%5D%0A)","top_comment":"A CFG is a formal grammar, made up of rules that you make up. So, how you define a complete sentence is up to you. However, if you are trying to define a CFG for *English*, you would have to get into the weeds of what constitutes an English sentence. This is subject to debate, but the nature of CFGs is that you essentially have to define it yourself.","metadata":{"post_id":"7bsc6m","post_score":3,"answer_comment_id":"dplzduv","answer_score":1,"answerer_anon_id":"anon_c59c53f5fa32449a","top_comment_id":"dpkqxni","top_comment_score":1,"top_comment_anon_id":"anon_b2331099f65adc58","top_equals_preferred":false,"thanks_reply_id":"dpm2q12","thanks_reply_score":2,"thanks_reply_text":"You are awesome! Thanks","thanks_reply_timestamp":"2017-11-10T08:05:42+00:00"}} -{"user_id":"anon_74b5f4ece892982c","timestamp":"2017-11-15T10:50:59+00:00","subreddit":"LanguageTechnology","query":"Chinese-English bilingual dictionary ?\n\nI'm looking for a Chinese-English dictionary word list, i.e.\n中 middle\n国 country\n...\n\nThe one that I found was from LDC (Chinese-English Translation Lexicon) and has the big problem that it only contains composed words of two or more characters or uncommon words with one character.\n\nI'm trying to learn cross-lingual word embeddings.","preferred_answer":"Have a look at [CC-CEDICT](https://www.mdbg.net/chinese/dictionary?page=cedict). Writing a filter for single character entries shouldn't be too complicated.","top_comment":"Have a look at [CC-CEDICT](https://www.mdbg.net/chinese/dictionary?page=cedict). Writing a filter for single character entries shouldn't be too complicated.","metadata":{"post_id":"7d3bvl","post_score":3,"answer_comment_id":"dpuxcll","answer_score":1,"answerer_anon_id":"anon_1ce912ee9d103cf0","top_comment_id":"dpuxcll","top_comment_score":1,"top_comment_anon_id":"anon_1ce912ee9d103cf0","top_equals_preferred":true,"thanks_reply_id":"dpvmvc7","thanks_reply_score":1,"thanks_reply_text":"Thanks a bunch!","thanks_reply_timestamp":"2017-11-15T21:59:53+00:00"}} -{"user_id":"anon_4d08ce622074971d","timestamp":"2017-11-20T14:03:56+00:00","subreddit":"LanguageTechnology","query":"Best embedding technique for paraphrases detection?\n\nHey guys, I'm working on the quora question pair dataset, I have a good net (I guess) but I feel like I lack in the embedding phase\n\nAt the moment I'm using spacy's sentence.vector to convert sentences in vectors.\n\nSince I could turn it into thesis work for university, I don't feel like copying directly from other's code, that's why I am asking:\nDo you have any reference, video, paper or else that I could use to improve my embedding?","preferred_answer":"If I read that correctly, spacy's sentence embedding is a simple average of word embeddings. That's terrible for paraphrase detection because it disregards word order. \"Jane loves Joe\" and \"Joe loves Jane\" have the same embedding, despite having very different meaning. You almost certainly would like to use an RNN to obtain an embedding, and you can move on from there the same way as with the embeddings from spacy.\n\nRegarding any references, you'll find plenty of papers on paraphrase detection online, just have a look. If you're going to write a thesis on the topic, you will have to read them anyway.\nYour thesis should also make some contribution to the field in some way. Do you have any idea yet what you'd like to do there?","top_comment":"Ok, I see!\n\nI think it's best to have a look at recent papers first, which will give you an idea how to approach the problem. You may reimplement a simple one of those and then incorporate other ideas later.\n[Here is a recent paper that claims state of the art results on Quora](https://arxiv.org/pdf/1704.04565.pdf). Go through the related work section and identify previous milestone papers, which you should look at as well. This should get you started pretty well!\n\nAs for your current model, to me it seems odd to apply a convolutional layer to the sentence embedding. Convolutions are good for identifying temporal or spatial patterns, but you don't have that in a sentence embedding. You could either apply the convolution at word-level or replace it with a fully-connected layer.","metadata":{"post_id":"7e91w1","post_score":1,"answer_comment_id":"dq6i89n","answer_score":2,"answerer_anon_id":"anon_af9e2ce3f61d7c71","top_comment_id":"dqcsoff","top_comment_score":3,"top_comment_anon_id":"anon_af9e2ce3f61d7c71","top_equals_preferred":false,"thanks_reply_id":"dq6ihjr","thanks_reply_score":1,"thanks_reply_text":"Thanks, actually it's a bachelor thesis and according to my supervisor just \"solving\" the quora problem is enough if I get good results and I'm able to explain well how I got there.\nWith my actual setup I got 80% so I'm hoping to get better with a good embedding\n\nAnother question, on using rnn as embedding, can I just attach an RNN at the beginning of my net or I need to do something more?\n\nThe first layer atm is a convolutional one","thanks_reply_timestamp":"2017-11-22T07:14:14+00:00"}} -{"user_id":"anon_4d08ce622074971d","timestamp":"2017-11-20T14:03:56+00:00","subreddit":"LanguageTechnology","query":"Best embedding technique for paraphrases detection?\n\nHey guys, I'm working on the quora question pair dataset, I have a good net (I guess) but I feel like I lack in the embedding phase\n\nAt the moment I'm using spacy's sentence.vector to convert sentences in vectors.\n\nSince I could turn it into thesis work for university, I don't feel like copying directly from other's code, that's why I am asking:\nDo you have any reference, video, paper or else that I could use to improve my embedding?","preferred_answer":"Ok, I see!\n\nI think it's best to have a look at recent papers first, which will give you an idea how to approach the problem. You may reimplement a simple one of those and then incorporate other ideas later.\n[Here is a recent paper that claims state of the art results on Quora](https://arxiv.org/pdf/1704.04565.pdf). Go through the related work section and identify previous milestone papers, which you should look at as well. This should get you started pretty well!\n\nAs for your current model, to me it seems odd to apply a convolutional layer to the sentence embedding. Convolutions are good for identifying temporal or spatial patterns, but you don't have that in a sentence embedding. You could either apply the convolution at word-level or replace it with a fully-connected layer.","top_comment":"Ok, I see!\n\nI think it's best to have a look at recent papers first, which will give you an idea how to approach the problem. You may reimplement a simple one of those and then incorporate other ideas later.\n[Here is a recent paper that claims state of the art results on Quora](https://arxiv.org/pdf/1704.04565.pdf). Go through the related work section and identify previous milestone papers, which you should look at as well. This should get you started pretty well!\n\nAs for your current model, to me it seems odd to apply a convolutional layer to the sentence embedding. Convolutions are good for identifying temporal or spatial patterns, but you don't have that in a sentence embedding. You could either apply the convolution at word-level or replace it with a fully-connected layer.","metadata":{"post_id":"7e91w1","post_score":1,"answer_comment_id":"dqcsoff","answer_score":3,"answerer_anon_id":"anon_af9e2ce3f61d7c71","top_comment_id":"dqcsoff","top_comment_score":3,"top_comment_anon_id":"anon_af9e2ce3f61d7c71","top_equals_preferred":true,"thanks_reply_id":"dqcumur","thanks_reply_score":1,"thanks_reply_text":"Ok thanks!","thanks_reply_timestamp":"2017-11-26T12:12:01+00:00"}} -{"user_id":"anon_dda83554f993dda9","timestamp":"2017-11-26T10:13:45+00:00","subreddit":"LanguageTechnology","query":"Need help with accessing a huge corpus and getting the frequency.\n\nMy ultimate goal is to imitate the system described in this paper: http://www.aclweb.org/anthology/S17-2011 (Idiom Savant for Pun Detection Task in SemEval2017), especially the method described in \"3 Heterographic Puns\" section.\n\nThe biggest problem that I am facing is using the Google n-gram corpus (http://storage.googleapis.com/books/ngrams/books/datasetsv2.html) and getting the frequency of the n-gram.\n\nEach of the files provided in this page is compressed tab-separated data and line has the following format:\n\nngram TAB year TAB match_count TAB volume_count NEWLINE.\n\nFile Format Image: https://i.stack.imgur.com/x5Ksb.png\n\nThe problem with using this corpus to get the frequency of an n-gram is that I have to look through the whole corpus regardless.\n\nSo, I was thinking of merging the rows ignoring the year and summing up the frequency, but I am not sure if this is a valid idea and would like to know if there is a better approach to this question.\n\nPlease help!!","preferred_answer":"Yep that's the normal way you'd do it. I think they tend to have more books from recent years so the counts will probably be mostly made up of counts from recent years; you could just pick a recent year with a lot of data to get started.\n\nYou could consider merging volume_count or the the number of years in which they're active if you don't need fine-grained frequencies; that'll tend to be less sensitive to outliers like say a book made up entirely of the word \"broccoli\" 500,000 times. (I don't think there's such a book... I hope)","top_comment":"Yep that's the normal way you'd do it. I think they tend to have more books from recent years so the counts will probably be mostly made up of counts from recent years; you could just pick a recent year with a lot of data to get started.\n\nYou could consider merging volume_count or the the number of years in which they're active if you don't need fine-grained frequencies; that'll tend to be less sensitive to outliers like say a book made up entirely of the word \"broccoli\" 500,000 times. (I don't think there's such a book... I hope)","metadata":{"post_id":"7fm3rk","post_score":3,"answer_comment_id":"dqdslki","answer_score":1,"answerer_anon_id":"anon_d25654f4502f77ee","top_comment_id":"dqdslki","top_comment_score":1,"top_comment_anon_id":"anon_d25654f4502f77ee","top_equals_preferred":true,"thanks_reply_id":"dqdwkoa","thanks_reply_score":1,"thanks_reply_text":"Thank you for the reply. So I did what you said and the data now disregards the year and combined all frequencies. Now the data looks like:\n\n- ngram frequency\n- ngram2 frequency\n- ...\n\nWith this, I just need to find ONE row that has the ngram that I am looking for.\n\nIs this what is supposed to look like?\n\nIf so, will I have to do this for all ngram corpus (it is divided alphabetically e.g. ngram that starts with 'a' and 'b' are stored in separate files) ? Or is there a more efficient way?","thanks_reply_timestamp":"2017-11-27T01:50:53+00:00"}} -{"user_id":"anon_469853959d305c3d","timestamp":"2017-11-26T13:43:08+00:00","subreddit":"LanguageTechnology","query":"Question about Max Margin Loss equation (from Stanford's deep learning NLP course)\n\nHere's the specific equation in question\n\nhttps://youtu.be/uc2_iwVqrRI?t=50m6s\n\nThis is where some of those terms are defined\n\nhttps://youtu.be/uc2_iwVqrRI?t=49m10s\n\nMy question, is how is there 2 s's in the loss equation? Do you only take one sample at a time, so that one of the s's is always 0? Or is it summed over several sentences?","preferred_answer":"In the loss equation, 'S' denotes the score of the positive training example i.e. A sentence with a named entity location in the middle, while 'S_c' denotes a corrupt example i.e. Any sentence where the location is not in the centre, or doesn't even mention the location.\nYou are right in that that equation represents the loss for one positive sentence only (which is fine cos SGD) , but for each positive score S you compute the loss several times using a different S_c each time by picking randomly from your negative examples, and then take the average loss. The idea is similar to the negative sampling used in word2vec training (see lecture 2?).","top_comment":"In the loss equation, 'S' denotes the score of the positive training example i.e. A sentence with a named entity location in the middle, while 'S_c' denotes a corrupt example i.e. Any sentence where the location is not in the centre, or doesn't even mention the location.\nYou are right in that that equation represents the loss for one positive sentence only (which is fine cos SGD) , but for each positive score S you compute the loss several times using a different S_c each time by picking randomly from your negative examples, and then take the average loss. The idea is similar to the negative sampling used in word2vec training (see lecture 2?).","metadata":{"post_id":"7fmycl","post_score":3,"answer_comment_id":"dqds6y9","answer_score":1,"answerer_anon_id":"anon_24e2afe1b1a6cafa","top_comment_id":"dqds6y9","top_comment_score":1,"top_comment_anon_id":"anon_24e2afe1b1a6cafa","top_equals_preferred":true,"thanks_reply_id":"dqe94oe","thanks_reply_score":1,"thanks_reply_text":"Thanks for the reply!!! That was very helpful!\n\n","thanks_reply_timestamp":"2017-11-27T06:48:04+00:00"}} -{"user_id":"anon_dda83554f993dda9","timestamp":"2017-11-28T20:13:27+00:00","subreddit":"LanguageTechnology","query":"What are 'head words' and 'lexical head' in parse trees?\n\nIn the JurafskyMartin NLP textbook, a head tag in parse trees are mentioned that in lexicalized grammar, non-terminal in the tree is annotated with its lexical head.\n\nI don't actually get what lexical heads are. \n\nIn the image attached (https://imgur.com/a/ks4cz), the word inside the parenthesis is the head word. What exactly are these and how do we determine them?","preferred_answer":"A head word for a token in a dependency parse tree is the word the current token is dependent of. There is generally a label describing this relationship (between the current word, and its head word) — e.g. nsubj, pobj, etc.\n\nKnowing what the most common head words are in an article may help you with summarization or key phrase detection.","top_comment":"> Could you please explain what head means in lexicalized grammars?\n\nSure, I can try. Headedness is a way to encode the \"non-arbitrariness\" of phrase structure (compared to plain context-free grammars). Concretely, headedness means that noun phrases must have a head which is a noun, verb phrases must have a verb head, and so on. Noun phrases may *not* have an adjective head, and so on. In other words, lexical heads are what determine the category of a phrase. To figure out the head of a phrase in a sort of informal way, you can ask \"which word makes this phrase a VP?\" In the example above, the word \"bin\" is what makes the phrase \"a bin\" a noun phrase.\n\n> And it would also be great if you can give the exact meaning of \"lexicalized\" grammar.\n\nI'm not sure how precise I can be, but as I understand it, \"lexicalized\" describes grammars that have made the design decision to have a lot of the \"complexity\" of phrase structure into the lexicon, rather than in the phrase structure rules themselves. Some examples of lexicalized grammar formalisms are [HPSG](https://en.wikipedia.org/wiki/Head-driven_phrase_structure_grammar) and [CCG](https://en.wikipedia.org/wiki/Combinatory_categorial_grammar). In contrast, [GB](https://en.wikipedia.org/wiki/Government_and_binding_theory) is an example that is not lexicalized.\n\nDoes that help?","metadata":{"post_id":"7g723z","post_score":5,"answer_comment_id":"dqh0eso","answer_score":2,"answerer_anon_id":"anon_90c8fff2d76eb427","top_comment_id":"dqh4e4y","top_comment_score":5,"top_comment_anon_id":"anon_320024931d876fa7","top_equals_preferred":false,"thanks_reply_id":"dqh1ml5","thanks_reply_score":1,"thanks_reply_text":"Thanks. But I don't fully understand what the head word for S in the image is dumped. How are we supposed to determine the word the current toke in dependent of?","thanks_reply_timestamp":"2017-11-28T21:02:26+00:00"}} -{"user_id":"anon_dda83554f993dda9","timestamp":"2017-11-28T20:13:27+00:00","subreddit":"LanguageTechnology","query":"What are 'head words' and 'lexical head' in parse trees?\n\nIn the JurafskyMartin NLP textbook, a head tag in parse trees are mentioned that in lexicalized grammar, non-terminal in the tree is annotated with its lexical head.\n\nI don't actually get what lexical heads are. \n\nIn the image attached (https://imgur.com/a/ks4cz), the word inside the parenthesis is the head word. What exactly are these and how do we determine them?","preferred_answer":"> Could you please explain what head means in lexicalized grammars?\n\nSure, I can try. Headedness is a way to encode the \"non-arbitrariness\" of phrase structure (compared to plain context-free grammars). Concretely, headedness means that noun phrases must have a head which is a noun, verb phrases must have a verb head, and so on. Noun phrases may *not* have an adjective head, and so on. In other words, lexical heads are what determine the category of a phrase. To figure out the head of a phrase in a sort of informal way, you can ask \"which word makes this phrase a VP?\" In the example above, the word \"bin\" is what makes the phrase \"a bin\" a noun phrase.\n\n> And it would also be great if you can give the exact meaning of \"lexicalized\" grammar.\n\nI'm not sure how precise I can be, but as I understand it, \"lexicalized\" describes grammars that have made the design decision to have a lot of the \"complexity\" of phrase structure into the lexicon, rather than in the phrase structure rules themselves. Some examples of lexicalized grammar formalisms are [HPSG](https://en.wikipedia.org/wiki/Head-driven_phrase_structure_grammar) and [CCG](https://en.wikipedia.org/wiki/Combinatory_categorial_grammar). In contrast, [GB](https://en.wikipedia.org/wiki/Government_and_binding_theory) is an example that is not lexicalized.\n\nDoes that help?","top_comment":"> Could you please explain what head means in lexicalized grammars?\n\nSure, I can try. Headedness is a way to encode the \"non-arbitrariness\" of phrase structure (compared to plain context-free grammars). Concretely, headedness means that noun phrases must have a head which is a noun, verb phrases must have a verb head, and so on. Noun phrases may *not* have an adjective head, and so on. In other words, lexical heads are what determine the category of a phrase. To figure out the head of a phrase in a sort of informal way, you can ask \"which word makes this phrase a VP?\" In the example above, the word \"bin\" is what makes the phrase \"a bin\" a noun phrase.\n\n> And it would also be great if you can give the exact meaning of \"lexicalized\" grammar.\n\nI'm not sure how precise I can be, but as I understand it, \"lexicalized\" describes grammars that have made the design decision to have a lot of the \"complexity\" of phrase structure into the lexicon, rather than in the phrase structure rules themselves. Some examples of lexicalized grammar formalisms are [HPSG](https://en.wikipedia.org/wiki/Head-driven_phrase_structure_grammar) and [CCG](https://en.wikipedia.org/wiki/Combinatory_categorial_grammar). In contrast, [GB](https://en.wikipedia.org/wiki/Government_and_binding_theory) is an example that is not lexicalized.\n\nDoes that help?","metadata":{"post_id":"7g723z","post_score":5,"answer_comment_id":"dqh4e4y","answer_score":5,"answerer_anon_id":"anon_320024931d876fa7","top_comment_id":"dqh4e4y","top_comment_score":5,"top_comment_anon_id":"anon_320024931d876fa7","top_equals_preferred":true,"thanks_reply_id":"dqh61yc","thanks_reply_score":1,"thanks_reply_text":"THanks for your explanation! One question is, why is the head word of S dump?","thanks_reply_timestamp":"2017-11-28T22:12:28+00:00"}} -{"user_id":"anon_dda83554f993dda9","timestamp":"2017-11-28T20:13:27+00:00","subreddit":"LanguageTechnology","query":"What are 'head words' and 'lexical head' in parse trees?\n\nIn the JurafskyMartin NLP textbook, a head tag in parse trees are mentioned that in lexicalized grammar, non-terminal in the tree is annotated with its lexical head.\n\nI don't actually get what lexical heads are. \n\nIn the image attached (https://imgur.com/a/ks4cz), the word inside the parenthesis is the head word. What exactly are these and how do we determine them?","preferred_answer":"That's a really great question, and I'm not sure that I can give a great answer for it. Plus, the motivations for this may be different from one particular grammar formalism to another. In general, though, I believe that verbs are often taken to be the heads of sentences for reasons that are at least partially semantic. Sentences can be described as being composed of a subject and a predicate (the verb phrase is the predicate). Sort of informally, the predicate is \"what's happening,\" which is kind of the \"main\" part of what the sentence means.\n\nSo I'm sorry if that isn't a great answer, but I do hope it helps somewhat!","top_comment":"> Could you please explain what head means in lexicalized grammars?\n\nSure, I can try. Headedness is a way to encode the \"non-arbitrariness\" of phrase structure (compared to plain context-free grammars). Concretely, headedness means that noun phrases must have a head which is a noun, verb phrases must have a verb head, and so on. Noun phrases may *not* have an adjective head, and so on. In other words, lexical heads are what determine the category of a phrase. To figure out the head of a phrase in a sort of informal way, you can ask \"which word makes this phrase a VP?\" In the example above, the word \"bin\" is what makes the phrase \"a bin\" a noun phrase.\n\n> And it would also be great if you can give the exact meaning of \"lexicalized\" grammar.\n\nI'm not sure how precise I can be, but as I understand it, \"lexicalized\" describes grammars that have made the design decision to have a lot of the \"complexity\" of phrase structure into the lexicon, rather than in the phrase structure rules themselves. Some examples of lexicalized grammar formalisms are [HPSG](https://en.wikipedia.org/wiki/Head-driven_phrase_structure_grammar) and [CCG](https://en.wikipedia.org/wiki/Combinatory_categorial_grammar). In contrast, [GB](https://en.wikipedia.org/wiki/Government_and_binding_theory) is an example that is not lexicalized.\n\nDoes that help?","metadata":{"post_id":"7g723z","post_score":5,"answer_comment_id":"dqh80d6","answer_score":2,"answerer_anon_id":"anon_320024931d876fa7","top_comment_id":"dqh4e4y","top_comment_score":5,"top_comment_anon_id":"anon_320024931d876fa7","top_equals_preferred":false,"thanks_reply_id":"dqh8hxs","thanks_reply_score":1,"thanks_reply_text":"It actually makes sense to me! Thanks a lot!!","thanks_reply_timestamp":"2017-11-28T22:54:35+00:00"}} -{"user_id":"anon_f9d86c419e45e43c","timestamp":"2017-12-06T21:52:34+00:00","subreddit":"LanguageTechnology","query":"Where to get started?\n\nAs a software developer and linguistics fan, how can I start learning more about doing meaningful work with language technology? I've worked on some very small personal projects like a simple n-gram analysis in matlab and simple text to phoneme conversion in python. However as an amateur, I'm not really sure where to start learning how to do more proper NLP, particularly in a way that would be useful for computational or research-based work","preferred_answer":"A textbook would probably be a good place to start. \n\n- Jurafsky & Martin *Speech and Language Processing* (many 3rd edition draft chapters are up [here](https://web.stanford.edu/~jurafsky/slp3/))\n- Manning & Schütze *Foundations of Statistical Natural Language Processing*","top_comment":"A textbook would probably be a good place to start. \n\n- Jurafsky & Martin *Speech and Language Processing* (many 3rd edition draft chapters are up [here](https://web.stanford.edu/~jurafsky/slp3/))\n- Manning & Schütze *Foundations of Statistical Natural Language Processing*","metadata":{"post_id":"7i1h94","post_score":2,"answer_comment_id":"dqvu3zm","answer_score":3,"answerer_anon_id":"anon_320024931d876fa7","top_comment_id":"dqvu3zm","top_comment_score":3,"top_comment_anon_id":"anon_320024931d876fa7","top_equals_preferred":true,"thanks_reply_id":"dqwfw9l","thanks_reply_score":1,"thanks_reply_text":"Thanks!","thanks_reply_timestamp":"2017-12-07T14:17:04+00:00"}} -{"user_id":"anon_85b6845e06ace784","timestamp":"2017-12-09T12:51:59+00:00","subreddit":"LanguageTechnology","query":"Which chat services allow external reading of messages via API?\n\nHi, I'm trying to make language models of users based on their regular conversations with their friends as a kind of proof of concept. I want to be able to listen to their chats via an API, keep track of the grammar and spelling mistakes that the user makes in their day-to-day use of a non-native language and then display the stats on a website. \n\nSome kind of callback function such as \n\nonNewMessage(chat_id) { \n\nreturn messages.mostRecent(100);\n\n}\n\n\nwould be nice or else a way of getting the most recent messages from a chat directly. \n\nI want a user to be able to, for example, click a \"Sign In with Facebook/Google/X\" button on my website and then give permissions for my app to read their chat messages (or possibly emails) via the API for Facebook/Google/X. I don't want any restrictions such as \"you must be friends with this user\" or \"you can only read messages from chats which you are a part of\". The ideal situation is totally external observation of a user's writing. \n\nCan anyone help me compile a list of which services allow this kind of functionality in their API, or the next best thing? I don't really care which service it is, it doesn't have to be a particularly popular service but of course more users is better. I'm not necessarily intending for anyone to use this. \n\nThanks :)","preferred_answer":"Probably a better way to do this is with a chrome extension for browsers or through the accessibility API of Android/iOS. This is how [Dango](https://getdango.com/emoji-and-deep-learning/) does it.","top_comment":"Probably a better way to do this is with a chrome extension for browsers or through the accessibility API of Android/iOS. This is how [Dango](https://getdango.com/emoji-and-deep-learning/) does it.","metadata":{"post_id":"7imkiu","post_score":3,"answer_comment_id":"dr0ge71","answer_score":3,"answerer_anon_id":"anon_0f8f6d4e14ebce97","top_comment_id":"dr0ge71","top_comment_score":3,"top_comment_anon_id":"anon_0f8f6d4e14ebce97","top_equals_preferred":true,"thanks_reply_id":"dr0uu02","thanks_reply_score":1,"thanks_reply_text":"Very clever, I can't believe I never thought of doing it that way! Thank you! \n\nAlso some of those Dango examples are hilarious, Kermit the Frog with a cup of tea is absolutely brilliant. ","thanks_reply_timestamp":"2017-12-10T03:14:48+00:00"}} -{"user_id":"anon_a244cf61508d0bc4","timestamp":"2017-12-13T15:07:39+00:00","subreddit":"LanguageTechnology","query":"Difference between Statistical NLP and Deep-Learning based NLP\n\nI want to work with Language processing, but I've heard nowadays that people are shifting from Statistical to Deep Learning algorithms. So, which should i do, and which would be more productive? Also, is the mathematics and general concepts applied very different? Will the generally recommended beginner's resources - for ex: Jurafsky & Martin's book - still be enough/correct for studying?","preferred_answer":"Statistical NLP will give you the general foundation for starting deep learning NLP.\nI believe you should study both together since one complements the other and there is no clear distinction between these approaches.\n\nGood resources to start:\n\nJurafsky&Martin's book updated chapters available online - https://web.stanford.edu/~jurafsky/slp3/\n\nCS224n videos - https://www.youtube.com/playlist?list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6\n\nOxford DeepNLP - https://www.youtube.com/playlist?list=PL613dYIGMXoZBtZhbyiBqb0QtgK6oJbpm\n https://github.com/oxford-cs-deepnlp-2017/lectures","top_comment":"Statistical NLP will give you the general foundation for starting deep learning NLP.\nI believe you should study both together since one complements the other and there is no clear distinction between these approaches.\n\nGood resources to start:\n\nJurafsky&Martin's book updated chapters available online - https://web.stanford.edu/~jurafsky/slp3/\n\nCS224n videos - https://www.youtube.com/playlist?list=PL3FW7Lu3i5Jsnh1rnUwq_TcylNr7EkRe6\n\nOxford DeepNLP - https://www.youtube.com/playlist?list=PL613dYIGMXoZBtZhbyiBqb0QtgK6oJbpm\n https://github.com/oxford-cs-deepnlp-2017/lectures","metadata":{"post_id":"7jjtoy","post_score":9,"answer_comment_id":"dr6w4dl","answer_score":10,"answerer_anon_id":"anon_b20260951e7e6fae","top_comment_id":"dr6w4dl","top_comment_score":10,"top_comment_anon_id":"anon_b20260951e7e6fae","top_equals_preferred":true,"thanks_reply_id":"dr6zs4i","thanks_reply_score":1,"thanks_reply_text":"Great, thanks! specially for the link to updated chapters.\n","thanks_reply_timestamp":"2017-12-13T16:36:29+00:00"}} -{"user_id":"anon_45387c19f50688be","timestamp":"2017-12-20T18:31:44+00:00","subreddit":"LanguageTechnology","query":"Topic Extraction/Modeling with Small Text Samples\n\nIf I have a goal of extracting a latent topic from conversational language, say from a scene in a movie, should I use something like TextRank or use a seq2seq RNN or something else entirely?","preferred_answer":"No, I didn't split them up because they were already segmented into individual replies. I basically just combined all speeches by a particular person made at a particular time. But in your case, you seem to only want to the topic distribution over time rather than per actor, so I guess you can merge the dialogues of all actors together.\n\nIt's probably also worth using n-grams (I used trigrams) and stemming all the words.","top_comment":"I think it honestly depends on how long your text is for each scene. You could definitely try LDA modelling, but you will likely have to combine a few pieces of dialogue together to get a stable model. I'm working on parliament speeches and it does a decent job with several sentences but a single sentence is not enough. (though I suppose this also depends on the number of topics you want to extract).","metadata":{"post_id":"7l3bj4","post_score":5,"answer_comment_id":"drk7lb4","answer_score":2,"answerer_anon_id":"anon_0f8f6d4e14ebce97","top_comment_id":"drjf80c","top_comment_score":3,"top_comment_anon_id":"anon_0f8f6d4e14ebce97","top_equals_preferred":false,"thanks_reply_id":"drkrb60","thanks_reply_score":1,"thanks_reply_text":"Great, thanks for the input, I appreciate it. ","thanks_reply_timestamp":"2017-12-21T16:47:29+00:00"}} -{"user_id":"anon_4bf1a19420a02746","timestamp":"2017-12-28T18:10:41+00:00","subreddit":"LanguageTechnology","query":"NLTK Extracting information from text\n\nI wanna to make presentation about the chapter \"Extracting information from text\" from NLTK --> http://www.nltk.org/book/ch07.html\n\nThere is an example where the author extract information about companies and locations. I wanna to present this example as well as the steps to reach this result (Relations between company and location, e.g. Apple --> Silicon Valley). \n\nDo you know any other example for this topic or some project where this kind of information extraction technique is used?","preferred_answer":"Have you tried looking at [Wikipedia](https://en.wikipedia.org/wiki/Named-entity_recognition#Current_challenges_and_research)?","top_comment":"There are a few types of problems here, and there is some terminology in the field:\n\n1. Named Entity Recognition (NER): extracting named entities from free text\n2. Named Entity Disambiguation (NED): resolving/linking extracted entity mentions to a database/knowledge base\n3. Relationship Extraction: identifying relationships between extracted entities\n\nThis kind of stuff is used all the time in automated knowledge base population (KBP), data mining, legal discovery, etc.","metadata":{"post_id":"7mo975","post_score":1,"answer_comment_id":"drvkc53","answer_score":2,"answerer_anon_id":"anon_20127d9448fe3506","top_comment_id":"drvj04w","top_comment_score":2,"top_comment_anon_id":"anon_20127d9448fe3506","top_equals_preferred":false,"thanks_reply_id":"drvlid9","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot :) ","thanks_reply_timestamp":"2017-12-28T20:33:47+00:00"}} -{"user_id":"anon_07331a86114cf346","timestamp":"2018-01-03T17:54:04+00:00","subreddit":"LanguageTechnology","query":"Where to start in NLP?\n\nI am a computer science student with some fundamentals of programming now I am very much interested in Natural Language Processing but I am quite unsure where to begin with. I have understood Machine learning at the heart of it yet confused where to begin with, kindly help.","preferred_answer":"If you need litterature on the different aspects of NLP I highly recommend you check out Dan Jurafskys book \"Speech and Language Processing\" on the topic. It covers a lot of ground and it's easy to pick up and follow along with.\n\nhttps://web.stanford.edu/~jurafsky/slp3/\n\nGood luck & Have Fun","top_comment":"0 - Find a relatively small collection of documents, about 100 - 1,000. /r/datasets might be a good place to start. You don't need anything massive your first go. Once you have your corpus, find the 10 most frequently used words. \n\n1 - stem and lemmatize your corpus. Is there a change in the 10 most frequently used words?\n\n2 - Create a tf-idf model of your now pre-processed corpus. Calculate the average tf-idf scores for each word and display the 10 most 'important' words. (according to your tf-idf model)\n\n3 - Using your tf-idf model and a randomly chosen document in your corpus, find the 10 most similar documents.\n\nUse python. only use nltk for it's stop-words collection. For everything else use Spacy and/or Gensim.","metadata":{"post_id":"7nwbb6","post_score":14,"answer_comment_id":"ds518id","answer_score":11,"answerer_anon_id":"anon_892592a1019d8547","top_comment_id":"ds5abge","top_comment_score":14,"top_comment_anon_id":"anon_2823fe94ee5d100b","top_equals_preferred":false,"thanks_reply_id":"ds550b8","thanks_reply_score":2,"thanks_reply_text":"Thank You So Much!","thanks_reply_timestamp":"2018-01-03T19:55:39+00:00"}} -{"user_id":"anon_51ae87858879ed69","timestamp":"2017-07-23T12:49:06+00:00","subreddit":"LanguageTechnology","query":"Looking for an introductory book on Natural Language Processing\n\nHey guys, newbie here. I recently became interested in Natural Language Processing, and I was wondering if anyone could recommend a good book to get me started. I have a bachelors degree in English language and literature, and no actual knowledge about coding or programming.\nAny help is welcome, and thanks!","preferred_answer":"Prof. Emily Bender answers a similar question in a [medium post](https://medium.com/@emilymenonbender/is-it-worth-it-to-go-to-grad-school-in-computational-linguistics-7234f0bd4981) she wrote:\n\n>*What books or resources would recommend to someone new to computational linguistics?*\n\n>The classics are [Jurafsky & Martin’s text book](https://searchworks.stanford.edu/view/7840787), the [NLTK book](http://www.nltk.org/book/) by Bird et al, and [Manning & Schutze’s text book](https://nlp.stanford.edu/fsnlp/). Also check out the #NLProc tag on twitter. For someone coming from CS only, I also recommend my book:\n\n>Bender, Emily M. 2013. Linguistic Fundamentals for Natural Language Processing: 100 Essentials from Morphology and Syntax. Synthesis Lectures on Human Language Technologies #20. Morgan & Claypool Publishers.","top_comment":"I really like \"Speech and Language Processing\" by Jurafksy & Martin.\nAdditionally a more practical book would be \"Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit\" by Bird, Klein & Loper.\nBoth should be a more than good start to get into NLP.","metadata":{"post_id":"6p14dq","post_score":10,"answer_comment_id":"dkmu24w","answer_score":2,"answerer_anon_id":"anon_9bace18b7099c0d9","top_comment_id":"dklty18","top_comment_score":11,"top_comment_anon_id":"anon_c5928c3516685a8f","top_equals_preferred":false,"thanks_reply_id":"dsgtxs5","thanks_reply_score":2,"thanks_reply_text":"Wonderful! You've really helped me, thanks!","thanks_reply_timestamp":"2018-01-10T13:55:08+00:00"}} -{"user_id":"anon_547ad8d611c6ed16","timestamp":"2018-01-17T05:01:14+00:00","subreddit":"LanguageTechnology","query":"Can this problem be solved?\n\nI've recently joined a company as a Junior Developer and have been assigned the task of extracting structured information from job descriptions. \n\nI want to know if it's possible to accomplish this task and if so I'd also like to know which technique to be used (I'm open to reading books, papers, learning more math etc). Even direction greatly helps.\n\nI have a few hundred job descriptions (unstructured data). We want some questions to be answered. Say a particular sentence might be expressed in different ways in a job description. \n\n\n> We need developers with 5 years of Java Experience\n\n> Java, Unix : 5 years\n\n> Has worked on Machine Learning and relevant fields for at least one year.\n\nI want to be able to query it questions like 'How many years of Java experience are required?' and hope to get the right answer most of the times.\n\nEven suitable area of study / direction can help me a lot. Say you are aware of a particular kind of chat bots that do this reasonably well or a sub field in Information Extraction or a paper discussing similar problems. Please do let me know.","preferred_answer":"A part of your problem can solved by looking into NLIDB systems.","top_comment":"A part of your problem can solved by looking into NLIDB systems.","metadata":{"post_id":"7qyohh","post_score":1,"answer_comment_id":"dssxm7k","answer_score":2,"answerer_anon_id":"anon_ddd5ba0239f0116c","top_comment_id":"dssxm7k","top_comment_score":2,"top_comment_anon_id":"anon_ddd5ba0239f0116c","top_equals_preferred":true,"thanks_reply_id":"dssxvu4","thanks_reply_score":1,"thanks_reply_text":"Thanks. Will have a look :)","thanks_reply_timestamp":"2018-01-17T05:33:19+00:00"}} -{"user_id":"anon_d5f05ecc9f569201","timestamp":"2018-01-18T11:38:12+00:00","subreddit":"LanguageTechnology","query":"Advice needed - extracting names of known musicians and songs from text\n\nI'm an experienced programmer but [currently] have only basic understanding of NLP/ML and I'm looking to solve the following problem:\n\nGiven a short piece of text (a title, sentence or short paragraph) that may (or not) contain the name of [known] musician (singer, band) and the name of a musical composition, I'd like to extract the artist/song names or an indication that the text doesn't contain any.\n\nObviously, there are no set patterns for the location of this information in the text, the names may be slightly misspelled, contain inconsistent symbols (double/single quotes, numeric symbols vs number names, etc).\n\nI downloaded and normalized an extensive database of artists and track names (from the [discogs data dump](https://data.discogs.com/?prefix=data/2018/) ) and can manipulate it to any structure needed but I'm not sure how to proceed from here. The naive approach I first thought of is to break the text into all possible permutations of adjacent words and then searching them against the artists/tracks lists and coming up with some logic to determine the best option from the results. But this seems very costly and will probably yield many false positives.\n\nIs this achievable with reasonable accuracy? What would be a good approach to tackle this? What algorithms, libraries, tools, additional data sets I should be looking into?\n\nThanks","preferred_answer":"Check out [Named Entity Recognition](http://polyglot.readthedocs.io/en/latest/NamedEntityRecognition.html).","top_comment":"Check out [Named Entity Recognition](http://polyglot.readthedocs.io/en/latest/NamedEntityRecognition.html).","metadata":{"post_id":"7r94ux","post_score":2,"answer_comment_id":"dsv4ktm","answer_score":3,"answerer_anon_id":"anon_edd7f7ad8de8675b","top_comment_id":"dsv4ktm","top_comment_score":3,"top_comment_anon_id":"anon_edd7f7ad8de8675b","top_equals_preferred":true,"thanks_reply_id":"dsv55sg","thanks_reply_score":1,"thanks_reply_text":"Thanks, I will check it out.","thanks_reply_timestamp":"2018-01-18T12:42:22+00:00"}} -{"user_id":"anon_0ea4553e65ed76b7","timestamp":"2018-01-20T00:11:20+00:00","subreddit":"LanguageTechnology","query":"Is there any algorithm or approach to get the most representative sentence from a group of sentences?\n\nHi everyone,\nI hope this is the right place to ask.\n\nI want to accompany my visualization with an actual sentence (from the set of sentences in my data), but not any random sentence or a made up sentence, rather a sentence which is most representative.\n\nFor example If a question is asked via reddit or twitter: How do you feel about Donald Trump calling African countries \"shit-hole\" countries?\n\nThe response should probably be negative, since that's the general sentiment I get when I read though the comments. \n\nI was thinking maybe word2vec then get the mean vector, but is their a president for this type of task? A better way to handle this?","preferred_answer":"Doesn't LDA kinda do this? If you're using topic modeling you could have the \"most representative\" sentence be the one that is most consistent with the determined topic of a paragraph. I've definitely computed most representative words for a paragraph before — I imagine the same principle would apply for sentences.","top_comment":"Checkout Facebook's Infer sent or automatic summarization.","metadata":{"post_id":"7rmr9v","post_score":7,"answer_comment_id":"dszlueu","answer_score":3,"answerer_anon_id":"anon_3f95361931047c64","top_comment_id":"dsy90kg","top_comment_score":4,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":false,"thanks_reply_id":"dszorcs","thanks_reply_score":1,"thanks_reply_text":"This sounds like what I need. I’ve heard of LDA but haven’t used it. Thanks for the lead.","thanks_reply_timestamp":"2018-01-21T01:09:29+00:00"}} -{"user_id":"anon_bacb7df38fde88eb","timestamp":"2018-01-25T10:41:31+00:00","subreddit":"LanguageTechnology","query":"How to identify details from a cover page of a book using NLP\n\nIn my final year group project we are building a Book Digitization platform. In that I'm doing OCR correction and something like meaning extraction (I'm not sure what you call that). The meaning extraction part is to categorize the text (which will be identifying in previous parts using Image Processing) and separate the **Title of the book**, **Author**, **Publisher**, **Published date** etc from the cover page. How can I do that ? Do I need to create a data-set by tagging authors, titles, publishers and etc separately and train them? Or is there any way to do that ? (Please remember I'm doing this for a non english language-Sinhala)\n\nAs I'm a bit newbee to NLP and ML. I don't understand what's training a model means.\n\nI need to do something like [this](https://image.ibb.co/hHEf1w/imageedit_10_6006572894.jpg)","preferred_answer":"It's pretty similar to text segmentation and visual based content understanding.","top_comment":"To recognize if the word is a name, location or anything. Use dependency parsing and named entity recognition from CoreNLP package. Once you have that you can plug that into API restful calls to get more details for each entity.\n\nFor OCR part: You can use OpenCV and train some CV algo to recognize specific objects (rectangles around author, title) in your image but I guess data to train a model like that would have be hard to find.","metadata":{"post_id":"7sv9th","post_score":3,"answer_comment_id":"dt7rwyv","answer_score":2,"answerer_anon_id":"anon_9a67493c7cdd7a2e","top_comment_id":"dt8kqva","top_comment_score":4,"top_comment_anon_id":"anon_7654f7b2f5826601","top_equals_preferred":false,"thanks_reply_id":"dt7s4pf","thanks_reply_score":1,"thanks_reply_text":"Thanks, But the thing is I'm getting only the text which is converted to text using OCR in a previous stage. So, does it mean that there's something to be done at the Image Processing stage too? (Even I thought the same, but our supervisor said that it's impossible to do at Image procssing stage and it can be done using NLP only), What I thought is we can categorize the title, author and etc by the size of the text in image processing stage(OCR). Is it correct?","thanks_reply_timestamp":"2018-01-25T12:45:26+00:00"}} -{"user_id":"anon_adba5f01dd8d6af1","timestamp":"2018-01-24T18:06:41+00:00","subreddit":"LanguageTechnology","query":"What are some accessible final year project ideas I could do on the topic of Natural Language Generation?\n\nI chose Natural Language Generation as my topic for my final year project and I recently got my idea tore apart and I am not back to square one. I initially thought I understood Natural Language Generation as: analyze text, generate text based on it however my idea didn't hold up. I was wondering whether I could get some of your ideas or previous projects to get an idea of what's expected from me. (Ideally not Maths heavy although Discrete Maths I can do).","preferred_answer":"Take some sort of numerical data as an input -- stock markets, sports summary statistics (e.g. box scores), weather data, political polling data, whatever you want -- and generate paragraph-length news-style text containing _only the interesting bits_ of the input. The library SimpleNLG will be your friend here. \n\nFor extra credit, create your own training data to train a model to figure out which bits of input data are interesting or to figure out which writing styles readers like most.\n\nGenerating stylistically-varied text that looks kinda like it was written by a human author -- even when someone has several examples in front of them, so it's not just fill-in-the-blanks -- is fairly difficult. There are companies that are hiring people who can make progress on this...","top_comment":"A fun one is to train language models on the imdb reviews dataset but condition on the sentiment. Then you should be able to tell it to gennerate positive or negative reviews. https://arxiv.org/abs/1707.02633 this paper conditions on even more","metadata":{"post_id":"7sp076","post_score":6,"answer_comment_id":"dt78lli","answer_score":2,"answerer_anon_id":"anon_2472afc70e8d94f7","top_comment_id":"dt741j7","top_comment_score":2,"top_comment_anon_id":"anon_47d1abe2c89a9ae9","top_equals_preferred":false,"thanks_reply_id":"dt8thtv","thanks_reply_score":1,"thanks_reply_text":"Thanks for this. I'm probably going to do something along these lines. Apart from the SimpleNLG lead, do you have perhaps any papers/articles/books that delve into this field of, I guess it's called, \"robo-journalism\". ","thanks_reply_timestamp":"2018-01-25T23:10:50+00:00"}} -{"user_id":"anon_bacb7df38fde88eb","timestamp":"2018-01-25T10:41:31+00:00","subreddit":"LanguageTechnology","query":"How to identify details from a cover page of a book using NLP\n\nIn my final year group project we are building a Book Digitization platform. In that I'm doing OCR correction and something like meaning extraction (I'm not sure what you call that). The meaning extraction part is to categorize the text (which will be identifying in previous parts using Image Processing) and separate the **Title of the book**, **Author**, **Publisher**, **Published date** etc from the cover page. How can I do that ? Do I need to create a data-set by tagging authors, titles, publishers and etc separately and train them? Or is there any way to do that ? (Please remember I'm doing this for a non english language-Sinhala)\n\nAs I'm a bit newbee to NLP and ML. I don't understand what's training a model means.\n\nI need to do something like [this](https://image.ibb.co/hHEf1w/imageedit_10_6006572894.jpg)","preferred_answer":"To recognize if the word is a name, location or anything. Use dependency parsing and named entity recognition from CoreNLP package. Once you have that you can plug that into API restful calls to get more details for each entity.\n\nFor OCR part: You can use OpenCV and train some CV algo to recognize specific objects (rectangles around author, title) in your image but I guess data to train a model like that would have be hard to find.","top_comment":"To recognize if the word is a name, location or anything. Use dependency parsing and named entity recognition from CoreNLP package. Once you have that you can plug that into API restful calls to get more details for each entity.\n\nFor OCR part: You can use OpenCV and train some CV algo to recognize specific objects (rectangles around author, title) in your image but I guess data to train a model like that would have be hard to find.","metadata":{"post_id":"7sv9th","post_score":3,"answer_comment_id":"dt8kqva","answer_score":4,"answerer_anon_id":"anon_7654f7b2f5826601","top_comment_id":"dt8kqva","top_comment_score":4,"top_comment_anon_id":"anon_7654f7b2f5826601","top_equals_preferred":true,"thanks_reply_id":"dt91v92","thanks_reply_score":2,"thanks_reply_text":"Thanks , the thing is I'm doing this for Sinhala language. So I don't think CoreNLP package would be much of a help when it come to the name entity recognition.\n\nTrue, But we have access to our National Library. So I'm thinking about getting the header page for about at least 100 books and train them","thanks_reply_timestamp":"2018-01-26T01:45:09+00:00"}} -{"user_id":"anon_fc07276a1049e6dc","timestamp":"2017-10-24T23:45:51+00:00","subreddit":"LanguageTechnology","query":"Please Help!: How do I convert raw LIWC scores to Big Five personality scores (OCEAN)?\n\nI'm new to NLP and I bought a license for LIWC, but I can't figure out how to convert my scores to something that makes sense. I've read so many articles that talk about using it to get Big Five (OCEAN) scores, but none of them mention how you mix them together to calculate the scores. Does anyone know? Thanks","preferred_answer":"been working on it for a few days, but here's [a tutorial](https://www.youtube.com/watch?v=FLZvOKSCkxY) I found very helpful so far. I'll let you know when I do crack it though :)","top_comment":"been working on it for a few days, but here's [a tutorial](https://www.youtube.com/watch?v=FLZvOKSCkxY) I found very helpful so far. I'll let you know when I do crack it though :)","metadata":{"post_id":"78jutk","post_score":5,"answer_comment_id":"dtfcdzv","answer_score":3,"answerer_anon_id":"anon_8c790bd1b7a0d72f","top_comment_id":"dtfcdzv","top_comment_score":3,"top_comment_anon_id":"anon_8c790bd1b7a0d72f","top_equals_preferred":true,"thanks_reply_id":"dtff2tr","thanks_reply_score":2,"thanks_reply_text":"Would really appreciate it!","thanks_reply_timestamp":"2018-01-29T20:12:40+00:00"}} -{"user_id":"anon_c79fc4a89961aade","timestamp":"2018-01-26T21:14:45+00:00","subreddit":"LanguageTechnology","query":"Are there any PoS taggers that don't use Penn Treebank?\n\nI'm working on a hobby app that right now is using the Stanford PoS tagger. Unfortunately, because the Penn Treebank tagset does some condensing (e.g. IN being shared by prepositions and subordinate conjunctions), it's not quite perfect for my purposes.\n\nDo any of you know of a similar tagger that uses a different tagset? It might turn out that Penn is my best bet after all, but it would be nice to poke around at different options.\n\nIdeally the tagger would have an open source license/would be something I could stick right in the middle of my own pet project, but since I'm just poking around that doesn't necessarily have to be the case.","preferred_answer":"Here's a tutorial on how you can train your own POS tagger on any tag set you want: https://nlpforhackers.io/training-pos-tagger/ \n\nHope that helps!","top_comment":"I don't know about the specifics of the tagsets but you could try Apache Open NLP or NLTK which is a Python library. Also, if an API is suitable TextRazor and Google NLP both have PoS tagging.","metadata":{"post_id":"7t7qga","post_score":6,"answer_comment_id":"dtj6yhu","answer_score":2,"answerer_anon_id":"anon_cf09c6c5ce2eaf3e","top_comment_id":"dtat19z","top_comment_score":3,"top_comment_anon_id":"anon_43c60b842ddb98ff","top_equals_preferred":false,"thanks_reply_id":"dtlpihu","thanks_reply_score":1,"thanks_reply_text":"This is perfect, thank you!","thanks_reply_timestamp":"2018-02-02T01:10:07+00:00"}} -{"user_id":"anon_923dfdf8217b87cd","timestamp":"2018-02-07T22:11:38+00:00","subreddit":"LanguageTechnology","query":"Is anyone aware of any out-of-the-box distributed NLP libraries or example programs?\n\nI want to get my feet wet with distributed NLP on a pseudo cluster I'm going to make. It'd be easier to just get a working example running than to stumble through every error myself. \n\nI also may have an opportunity to play around on my schools HPC cluster with 10 nodes each with (2) p100 gpus (WUT!?). Getting time on the cluster isn't easy so I'd like to be able to hit the ground running and make the best use of the hardware. \n\nIn an ideal world, I'd love to get a link to a distributed version of [googles textsum](https://github.com/tensorflow/models/tree/master/research/textsum) which apparently requires so much time to train that few people can even train the model.\n\nI'm also aware of gensims distributed LDA which I'd like to experiment with but since this doesn't use gpu's, it wouldn't be a great candidate for the HPC cluster","preferred_answer":"Jon Snow Labs recently released a spark framework NLP system. MLlib also has distributed LDA.\n\n\nhttps://databricks.com/blog/2017/10/19/introducing-natural-language-processing-library-apache-spark.html","top_comment":"Jon Snow Labs recently released a spark framework NLP system. MLlib also has distributed LDA.\n\n\nhttps://databricks.com/blog/2017/10/19/introducing-natural-language-processing-library-apache-spark.html","metadata":{"post_id":"7vzwqd","post_score":1,"answer_comment_id":"dtwrcsd","answer_score":2,"answerer_anon_id":"anon_3c9195b2f024f70a","top_comment_id":"dtwrcsd","top_comment_score":2,"top_comment_anon_id":"anon_3c9195b2f024f70a","top_equals_preferred":true,"thanks_reply_id":"dtwrq1v","thanks_reply_score":1,"thanks_reply_text":"reddit is unbelievable, thanks!!","thanks_reply_timestamp":"2018-02-08T02:00:56+00:00"}} -{"user_id":"anon_5131bfd8814616c5","timestamp":"2018-02-09T02:27:04+00:00","subreddit":"LanguageTechnology","query":"Dealing with (near) duplicate documents... what is best way to identify which are templates?\n\nHey guys,\n\nI'm analyzing a bunch of (1-2 page) comments/letters in Python, and for the project I'm working on, there are a ton of duplicates where a letter might be copied from a template, then signed with a different name.\n\nWhile I'm tempted to go guns loaded and try to use gensim for doc similarity scores using WMD, there has to be a better simple solution. Was thinking about fuzzywuzzy, but corpus is too large to do that effectively. \n\nSo my question is... what is the elegant solution? \n\nDealing with ~2000 different letters/comments.","preferred_answer":"I’ve had good luck with simply whether the Jaccard index of the documents’ n-grams for some small n is above a high threshold (e.g. 0.95). \n\nWith only 2000 you can compare them all pairwise.","top_comment":"I’ve had good luck with simply whether the Jaccard index of the documents’ n-grams for some small n is above a high threshold (e.g. 0.95). \n\nWith only 2000 you can compare them all pairwise.","metadata":{"post_id":"7waaid","post_score":8,"answer_comment_id":"dtys5ds","answer_score":6,"answerer_anon_id":"anon_4bec59d9a3eec0c1","top_comment_id":"dtys5ds","top_comment_score":6,"top_comment_anon_id":"anon_4bec59d9a3eec0c1","top_equals_preferred":true,"thanks_reply_id":"dtzngso","thanks_reply_score":1,"thanks_reply_text":"Thanks, that should definitely work as a metric. I'm having a little trouble conceptualizing this all the way through though.\n\nSay I do pairwise comparisons for all of them comparing doc to doc -- if there are multiple different duplicates, then there will be multiple high jaccard indices (unless I'm misunderstanding what pairwise means).\n\nWould I be able to get around this by comparing query doc to set of n-grams from total documents? Or is there a better way to cluster?","thanks_reply_timestamp":"2018-02-09T16:11:06+00:00"}} -{"user_id":"anon_1b16ba5a07862398","timestamp":"2018-02-09T08:18:12+00:00","subreddit":"LanguageTechnology","query":"Does anyone know a good Python library/ code snippet to query a Wikidata dump?\n\nI have downloaded the [Wikidata JSON dump](https://dumps.wikimedia.org/wikidatawiki/entities/), which is a 20GB+ .bz2 file. \n\nIs there a Python library that would help me query this dump?\nFor example, if I search for \"Douglas Adams\", it would give me the json entry for the id [Q42](https://www.wikidata.org/wiki/Q42). If I search for [Q5](https://www.wikidata.org/wiki/Q5), it'd return the json entry for it.","preferred_answer":"This script will produce a stream of JSON records from a bzipped dumpfile:\n\n $ ./wikidata.py -h\n usage: wikidata.py [-h] dumpfile\n\n Get Wikidata dump records as a JSON stream (one JSON object per line)\n\n positional arguments:\n dumpfile a Wikidata dumpfile from:\n https://dumps.wikimedia.org/wikidatawiki/entities/latest-\n all.json.bz2\n\n optional arguments:\n -h, --help show this help message and exit\n $ cat wikidata.py\n #!/usr/bin/env python3\n\n \"\"\"Get Wikidata dump records as a JSON stream (one JSON object per line)\"\"\"\n\n import bz2\n import json\n\n def wikidata(filename):\n with bz2.open(filename, mode='rt') as f:\n f.read(2) # skip first two bytes: \"{\\n\"\n for line in f:\n try:\n yield json.loads(line.rstrip(',\\n'))\n except json.decoder.JSONDecodeError:\n continue\n\n if __name__ == '__main__':\n import argparse\n parser = argparse.ArgumentParser(\n formatter_class=argparse.ArgumentDefaultsHelpFormatter,\n description=__doc__\n )\n parser.add_argument(\n 'dumpfile',\n help=(\n 'a Wikidata dumpfile from: '\n 'https://dumps.wikimedia.org/wikidatawiki/entities/'\n 'latest-all.json.bz2'\n )\n )\n args = parser.parse_args()\n for record in wikidata(args.dumpfile):\n print(json.dumps(record, ensure_ascii=False))\n\nYou can then query it with a tool like [`jq`](https://stedolan.github.io/jq/). However, since Wikidata dumps are so large, this is going to take a very long time.\n\n $ ./wikidata.py ~/wiki/wikidata/latest-all.json.bz2 | jq 'select(.id == \"Q22\")' # this gets a hit quickly because it was the first record\n\nYou should really probably index the data in a database or search engine as has been suggested.","top_comment":"Maybe http://linkeddatafragments.org/data/ would help?","metadata":{"post_id":"7wc2oi","post_score":2,"answer_comment_id":"dtzsh2j","answer_score":1,"answerer_anon_id":"anon_20127d9448fe3506","top_comment_id":"du05h2d","top_comment_score":2,"top_comment_anon_id":"anon_56b526c3b676fd02","top_equals_preferred":false,"thanks_reply_id":"du06a9k","thanks_reply_score":1,"thanks_reply_text":"Thanks for the code snippet. I came up with a similar solution ( without JS) to parse through the dataset. ","thanks_reply_timestamp":"2018-02-09T21:08:40+00:00"}} -{"user_id":"anon_1b16ba5a07862398","timestamp":"2018-02-09T08:18:12+00:00","subreddit":"LanguageTechnology","query":"Does anyone know a good Python library/ code snippet to query a Wikidata dump?\n\nI have downloaded the [Wikidata JSON dump](https://dumps.wikimedia.org/wikidatawiki/entities/), which is a 20GB+ .bz2 file. \n\nIs there a Python library that would help me query this dump?\nFor example, if I search for \"Douglas Adams\", it would give me the json entry for the id [Q42](https://www.wikidata.org/wiki/Q42). If I search for [Q5](https://www.wikidata.org/wiki/Q5), it'd return the json entry for it.","preferred_answer":"As i'm aware of, you will have to do most of it by yourself. \nYou can use some indexing tools like https://pypi.python.org/pypi/Whoosh/ \nor a search engine like https://www.elastic.co/fr/products/elasticsearch or directly postgresSQL wich have a full-text search feature and do your query in SQL.","top_comment":"Maybe http://linkeddatafragments.org/data/ would help?","metadata":{"post_id":"7wc2oi","post_score":2,"answer_comment_id":"dtzmdv2","answer_score":1,"answerer_anon_id":"anon_882860c9daf297e8","top_comment_id":"du05h2d","top_comment_score":2,"top_comment_anon_id":"anon_56b526c3b676fd02","top_equals_preferred":false,"thanks_reply_id":"du06ijy","thanks_reply_score":2,"thanks_reply_text":"Thanks for tip. Didn’t know Whoosh existed. Elasticsearch looks promising. :)","thanks_reply_timestamp":"2018-02-09T21:12:31+00:00"}} -{"user_id":"anon_bf076bda3b00388c","timestamp":"2018-02-13T18:07:11+00:00","subreddit":"LanguageTechnology","query":"Is this possible: Extract a rating out of 10 from a text based on a keyword?\n\nLets say I have a keyword: \"Decor\". Is it possible to somehow go through a review of a restaurant an extract a rating on what the author of the review thinks about the \"Decor\" of the restaurant?\n\nI.e. the review of a certain McDonald's: \"The food was kinda spicy but I didn't mind. Blah blah. The place was musty and the tables were very dirty. I liked the lighting but didn't care for the color scheme.\"\n\n\"Decor\": 6/10\n\"Taste\": 8/10","preferred_answer":"You'll want to look into aspect-based sentiment analysis.","top_comment":"You'll want to look into aspect-based sentiment analysis.","metadata":{"post_id":"7xbauv","post_score":7,"answer_comment_id":"du6zc2y","answer_score":5,"answerer_anon_id":"anon_66e8e2118345dc5f","top_comment_id":"du6zc2y","top_comment_score":5,"top_comment_anon_id":"anon_66e8e2118345dc5f","top_equals_preferred":true,"thanks_reply_id":"du70rhv","thanks_reply_score":1,"thanks_reply_text":"You are the best","thanks_reply_timestamp":"2018-02-13T19:23:21+00:00"}} -{"user_id":"anon_bf076bda3b00388c","timestamp":"2018-02-13T18:07:11+00:00","subreddit":"LanguageTechnology","query":"Is this possible: Extract a rating out of 10 from a text based on a keyword?\n\nLets say I have a keyword: \"Decor\". Is it possible to somehow go through a review of a restaurant an extract a rating on what the author of the review thinks about the \"Decor\" of the restaurant?\n\nI.e. the review of a certain McDonald's: \"The food was kinda spicy but I didn't mind. Blah blah. The place was musty and the tables were very dirty. I liked the lighting but didn't care for the color scheme.\"\n\n\"Decor\": 6/10\n\"Taste\": 8/10","preferred_answer":"I wouldn’t be able to do it as a human. Maybe find an easier task than predicting ratings on 10 (e.g. percent of positive/neutral/negative reviews about different aspects).","top_comment":"You'll want to look into aspect-based sentiment analysis.","metadata":{"post_id":"7xbauv","post_score":7,"answer_comment_id":"du73gpu","answer_score":2,"answerer_anon_id":"anon_e518594c00434d32","top_comment_id":"du6zc2y","top_comment_score":5,"top_comment_anon_id":"anon_66e8e2118345dc5f","top_equals_preferred":false,"thanks_reply_id":"du75dm4","thanks_reply_score":1,"thanks_reply_text":"Thanks, as a student its a good reminder to think about different ways to solve a problem. ","thanks_reply_timestamp":"2018-02-13T20:32:09+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-02-15T15:46:03+00:00","subreddit":"LanguageTechnology","query":"Getting better accuracy results when removing infrequent terms, is this normal?\n\nI've removed all terms apart from the most frequent (top 5000 most frequent to be exact) from the [Large Movie Review Dataset] (http://ai.stanford.edu/~amaas/data/sentiment/) to classify sentiment with an LSTM, and it's given me better results than if I used the top 25,000 most frequent terms or the top 10,000. Is this normal? I haven't seen this kind of drastic preprocessing spoken about in other papers.\n\nUsing this code: https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.py\n\nI simply changed num_words to 5,000 rather than 20,000.","preferred_answer":"> I simply changed num_words to 5,000 rather than 20,000.\n\nOften this is done the other way, eg with [fastText](https://github.com/facebookresearch/fastText) there is a parameter `minCount`. Then the total word count will change accordingly.\n\nTypical values would be in the range of 1 to 5, yours is presumably going much much higher, which is lossy, and it is not ideal that you do not what it is.\n\nOf course they can be equivalent but minimum occurrences seems less arbitrary than cutting a large distribution at a random point, it will be easier to iterate.","top_comment":"This is a very common phenomenon and is commonly done, though it's dataset dependent and results may vary across various tasks.","metadata":{"post_id":"7xr6qf","post_score":5,"answer_comment_id":"duc05fr","answer_score":2,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"duayekw","top_comment_score":5,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":false,"thanks_reply_id":"duc3241","thanks_reply_score":2,"thanks_reply_text":"Thank you for your response. I was most concerned about how drastic the frequency reduction was. This would be a min_count of what, 400? Something crazy.","thanks_reply_timestamp":"2018-02-16T12:10:36+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-02-15T15:46:03+00:00","subreddit":"LanguageTechnology","query":"Getting better accuracy results when removing infrequent terms, is this normal?\n\nI've removed all terms apart from the most frequent (top 5000 most frequent to be exact) from the [Large Movie Review Dataset] (http://ai.stanford.edu/~amaas/data/sentiment/) to classify sentiment with an LSTM, and it's given me better results than if I used the top 25,000 most frequent terms or the top 10,000. Is this normal? I haven't seen this kind of drastic preprocessing spoken about in other papers.\n\nUsing this code: https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.py\n\nI simply changed num_words to 5,000 rather than 20,000.","preferred_answer":"Yes, and also removing a hundred or so of the most frequent terms helps. You'll need to experiment with how much of the head and the tail of the distribution to chop off - it's context sensitive.\n\nEdit: yet another trick is (instead of completely removing them) to replace the most and least frequent terms with substitute tokens like and (or whatever).","top_comment":"This is a very common phenomenon and is commonly done, though it's dataset dependent and results may vary across various tasks.","metadata":{"post_id":"7xr6qf","post_score":5,"answer_comment_id":"dub40ky","answer_score":3,"answerer_anon_id":"anon_fd08e2997254e2f8","top_comment_id":"duayekw","top_comment_score":5,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":false,"thanks_reply_id":"duc32ra","thanks_reply_score":1,"thanks_reply_text":"Thanks for your response. Do you think that this degree of reduction is OK? (Only the top 5,000 most frequent terms out of 90,000) I mean, it's more accurate, but it seems like quite a large reduction to me.","thanks_reply_timestamp":"2018-02-16T12:11:12+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-02-15T15:46:03+00:00","subreddit":"LanguageTechnology","query":"Getting better accuracy results when removing infrequent terms, is this normal?\n\nI've removed all terms apart from the most frequent (top 5000 most frequent to be exact) from the [Large Movie Review Dataset] (http://ai.stanford.edu/~amaas/data/sentiment/) to classify sentiment with an LSTM, and it's given me better results than if I used the top 25,000 most frequent terms or the top 10,000. Is this normal? I haven't seen this kind of drastic preprocessing spoken about in other papers.\n\nUsing this code: https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.py\n\nI simply changed num_words to 5,000 rather than 20,000.","preferred_answer":"This is a very common phenomenon and is commonly done, though it's dataset dependent and results may vary across various tasks.","top_comment":"This is a very common phenomenon and is commonly done, though it's dataset dependent and results may vary across various tasks.","metadata":{"post_id":"7xr6qf","post_score":5,"answer_comment_id":"duayekw","answer_score":5,"answerer_anon_id":"anon_8bac7a0ae9d950e0","top_comment_id":"duayekw","top_comment_score":5,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":true,"thanks_reply_id":"duc33vp","thanks_reply_score":1,"thanks_reply_text":"Thank you. Have you heard of similar tasks that might require a similar kind of drastic reduction in terms (85,000 terms removed apart from the most frequent)? Not sure if my dataset is an edge case.","thanks_reply_timestamp":"2018-02-16T12:12:14+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-02-15T15:46:03+00:00","subreddit":"LanguageTechnology","query":"Getting better accuracy results when removing infrequent terms, is this normal?\n\nI've removed all terms apart from the most frequent (top 5000 most frequent to be exact) from the [Large Movie Review Dataset] (http://ai.stanford.edu/~amaas/data/sentiment/) to classify sentiment with an LSTM, and it's given me better results than if I used the top 25,000 most frequent terms or the top 10,000. Is this normal? I haven't seen this kind of drastic preprocessing spoken about in other papers.\n\nUsing this code: https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.py\n\nI simply changed num_words to 5,000 rather than 20,000.","preferred_answer":"The other thing is that when you use a larger dataset, or a dataset for a language with higher morphology, which have flatter distributions, the effective cutoff will rise even more.","top_comment":"This is a very common phenomenon and is commonly done, though it's dataset dependent and results may vary across various tasks.","metadata":{"post_id":"7xr6qf","post_score":5,"answer_comment_id":"duc3vfc","answer_score":2,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"duayekw","top_comment_score":5,"top_comment_anon_id":"anon_8bac7a0ae9d950e0","top_equals_preferred":false,"thanks_reply_id":"ducka4c","thanks_reply_score":1,"thanks_reply_text":"Right. Thanks.","thanks_reply_timestamp":"2018-02-16T17:33:47+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-02-10T07:16:17+00:00","subreddit":"LanguageTechnology","query":"What is the current state-of-the-art for text document representation for sentiment analysis in nlp?\n\nI know about \"Distributed Representations of Sentences and Documents\" http://proceedings.mlr.press/v32/le14.pdf, but I was wondering if there are any more modern approaches to document representation?","preferred_answer":"If you aren't limited to a strictly vector/standard ML approach, you might look into Seq2Seq. It has been successfully employed to summarize documents and paragraphs, which could be fed into a higher level model.","top_comment":"Right, but it depends on what you need. If you want to be able to understand the space, then you could train a decoder as well.","metadata":{"post_id":"7wk1uz","post_score":2,"answer_comment_id":"dueglbp","answer_score":1,"answerer_anon_id":"anon_bade6e0ebe970b29","top_comment_id":"dugeyxu","top_comment_score":2,"top_comment_anon_id":"anon_bade6e0ebe970b29","top_equals_preferred":false,"thanks_reply_id":"duesy0y","thanks_reply_score":1,"thanks_reply_text":"Thank you for your response. Have you had a good result with Seq2Seq? ","thanks_reply_timestamp":"2018-02-17T23:46:24+00:00"}} -{"user_id":"anon_3b6df4074f3a9fb9","timestamp":"2018-02-22T17:28:20+00:00","subreddit":"LanguageTechnology","query":"Where can I find CoNLL-2003 Dataset for NER task ?\n\nI am trying to download this dataset [NER:CoNLL 2003](http://www.cnts.ua.ac.be/conll2003/ner/) to benchmark an algorithm on NER. I tried to look into it, but the link doesnt work anymore. \nhttp://www.cnts.ua.ac.be/conll2003/ner/","preferred_answer":"If it's German data you need, you might be interested in looking at the GermEval 2014 NER dataset: https://sites.google.com/site/germeval2014ner/data","top_comment":"https://github.com/Franck-Dernoncourt/NeuroNER/tree/master/data/conll2003/en","metadata":{"post_id":"7zglza","post_score":3,"answer_comment_id":"dunzozj","answer_score":1,"answerer_anon_id":"anon_8a37dea3c60e116f","top_comment_id":"dunx0nc","top_comment_score":2,"top_comment_anon_id":"anon_0987aa97c8679927","top_equals_preferred":false,"thanks_reply_id":"duoa8dp","thanks_reply_score":1,"thanks_reply_text":"Thanks! Do you recommend any other NER dataset to look into it ?","thanks_reply_timestamp":"2018-02-22T21:54:35+00:00"}} -{"user_id":"anon_3b6df4074f3a9fb9","timestamp":"2018-02-22T17:28:20+00:00","subreddit":"LanguageTechnology","query":"Where can I find CoNLL-2003 Dataset for NER task ?\n\nI am trying to download this dataset [NER:CoNLL 2003](http://www.cnts.ua.ac.be/conll2003/ner/) to benchmark an algorithm on NER. I tried to look into it, but the link doesnt work anymore. \nhttp://www.cnts.ua.ac.be/conll2003/ner/","preferred_answer":"In this url (https://www.clips.uantwerpen.be/conll2003/ner/) you may find the dataset NER tags. You are going to need the Reuters corpus to generate the final dataset with tokens and tags.\n\nI known you also maybe find the complete dataset in some Github repositories looking for conll2003.","top_comment":"https://github.com/Franck-Dernoncourt/NeuroNER/tree/master/data/conll2003/en","metadata":{"post_id":"7zglza","post_score":3,"answer_comment_id":"duntlhn","answer_score":1,"answerer_anon_id":"anon_b20260951e7e6fae","top_comment_id":"dunx0nc","top_comment_score":2,"top_comment_anon_id":"anon_0987aa97c8679927","top_equals_preferred":false,"thanks_reply_id":"duoa8jo","thanks_reply_score":1,"thanks_reply_text":"Thanks! Do you recommend any other NER dataset to look into it ?","thanks_reply_timestamp":"2018-02-22T21:54:39+00:00"}} -{"user_id":"anon_1af612879f17679a","timestamp":"2018-03-04T14:49:33+00:00","subreddit":"LanguageTechnology","query":"Availability of English-based Document/Year Corpora?\n\nHi,\n \nI'm conducting research for a University project and I'm hoping to determine the statistical probability that an input amount of textual data corresponds to a specific decade (or potentially even a specific year). \n\nSo far, I've extracted the year data and document contents from all of the British National Corpus (BNC) records that had sufficient year data available, leaving me with 2262 records/documents suitable for training my ML algorithm on. Of these 2262 records:\n\n* 37 / 2262 originate between 1969 - 1979\n\n* 782 / 2262 originate between 1980 - 1989\n\n* 1443 / 2262 originate between 1990 - 1994\n\n\nAs such, I'm hoping to obtain any more open-source, English-based data (preferably British-English) that contains Year data, if it exists!","preferred_answer":"> I'm conducting research for a University project and I'm hoping to determine the statistical probability that an input amount of textual data corresponds to a specific decade (or potentially even a specific year).\n\nThat's one of the SemEval tasks of 2015: http://alt.qcri.org/semeval2015/task7/\n\nGreat news for you: the training data, as well as the testing data and the evaluation script, are publicly available. You can even benchmark your system against the models that took part in the task!","top_comment":"> I'm conducting research for a University project and I'm hoping to determine the statistical probability that an input amount of textual data corresponds to a specific decade (or potentially even a specific year).\n\nThat's one of the SemEval tasks of 2015: http://alt.qcri.org/semeval2015/task7/\n\nGreat news for you: the training data, as well as the testing data and the evaluation script, are publicly available. You can even benchmark your system against the models that took part in the task!","metadata":{"post_id":"81y1un","post_score":2,"answer_comment_id":"dv62tm4","answer_score":2,"answerer_anon_id":"anon_542b574d59e858c1","top_comment_id":"dv62tm4","top_comment_score":2,"top_comment_anon_id":"anon_542b574d59e858c1","top_equals_preferred":true,"thanks_reply_id":"dv6aiit","thanks_reply_score":1,"thanks_reply_text":"Thanks for this, it sounds really interesting and really applicable - but I'm not totally sure what I'm reading. It doesn't seem possible that a couple of megabytes of data can fulfill the needs of training data for a ML algorithm.\n\nWould you mind explaining how this can be re-implemented? I've already implemented a bag-of-words model that utilises tf-idf, KBest and Linear SVC to analyse a large (~700mb), three-column CSV file.","thanks_reply_timestamp":"2018-03-04T18:17:07+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-03-04T15:49:50+00:00","subreddit":"LanguageTechnology","query":"In what tasks have LSTM's significantly improved over the previous state-of-the-art?\n\nI've been experimenting with the Large Movie Review sentiment dataset, and it seems that an LSTM does not improve over a much faster/simpler method, namely an SVM on fastText word vectors. I'm curious if anyone knows tasks LSTMs perform better than a more simple approach?","preferred_answer":"Natural language inference tasks\n\nhttps://nlp.stanford.edu/projects/snli/","top_comment":"Natural language inference tasks\n\nhttps://nlp.stanford.edu/projects/snli/","metadata":{"post_id":"81yemu","post_score":8,"answer_comment_id":"dv6dczz","answer_score":2,"answerer_anon_id":"anon_a1349560208546e1","top_comment_id":"dv6dczz","top_comment_score":2,"top_comment_anon_id":"anon_a1349560208546e1","top_equals_preferred":true,"thanks_reply_id":"dv6hbo1","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot! This should be really useful.","thanks_reply_timestamp":"2018-03-04T20:26:40+00:00"}} -{"user_id":"anon_057a2293edec8851","timestamp":"2018-03-05T21:52:59+00:00","subreddit":"LanguageTechnology","query":"Training Word2Vec and Glove word embedding\n\nSo I just learnt what word2vec and GLoVe is and understand how it works. \nIf I have a data-set and apply word2vec on it. Does it create word embedding based on my data set or word2vec is already trained for most words and apply's previous knowledge on my data set?","preferred_answer":"You will be training word2vec from scratch on your data (unless you do something weird).\n\nBecause it's not applying older knowledge to your data, word2vec should work about as well on data from many languages other than English.\n\nYou probably could add your own data to pretrained vectors and \"apply the previous knowledge\" contained in those pretrained vectors to your own training data, but that'd be more complicated; you should probably start with training it from scratch.\n\n(There's a certain sense in which word2vec is \"applying previous knowledge\" in the sense that it assumes that the input can be tokenized -- i.e. split up into individual words -- in a meaningful way. This is a fair assumption for a lot of languages (say, French), but not all of them. Word2vec might not work quite as well with languages like Georgian where many morphemes are packed together into a single word -- so if you tokenized by splitting on whitespace, you'd have sparser counts of each individual token. But, like, word2vec is not adding your data onto a pre-trained set of English vectors, which I think is what you were asking.)","top_comment":"You can download pre-trained word embeddings or train them yourself on your dataset.","metadata":{"post_id":"829po0","post_score":2,"answer_comment_id":"dv8qi0a","answer_score":2,"answerer_anon_id":"anon_2472afc70e8d94f7","top_comment_id":"dv8h74q","top_comment_score":4,"top_comment_anon_id":"anon_978e380d38f4749b","top_equals_preferred":false,"thanks_reply_id":"dv8riya","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot :)","thanks_reply_timestamp":"2018-03-06T01:14:37+00:00"}} -{"user_id":"anon_057a2293edec8851","timestamp":"2018-03-05T21:52:59+00:00","subreddit":"LanguageTechnology","query":"Training Word2Vec and Glove word embedding\n\nSo I just learnt what word2vec and GLoVe is and understand how it works. \nIf I have a data-set and apply word2vec on it. Does it create word embedding based on my data set or word2vec is already trained for most words and apply's previous knowledge on my data set?","preferred_answer":"You can download pre-trained word embeddings or train them yourself on your dataset.","top_comment":"You can download pre-trained word embeddings or train them yourself on your dataset.","metadata":{"post_id":"829po0","post_score":2,"answer_comment_id":"dv8h74q","answer_score":4,"answerer_anon_id":"anon_978e380d38f4749b","top_comment_id":"dv8h74q","top_comment_score":4,"top_comment_anon_id":"anon_978e380d38f4749b","top_equals_preferred":true,"thanks_reply_id":"dv8rj4m","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot :)","thanks_reply_timestamp":"2018-03-06T01:14:43+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-03-04T15:49:50+00:00","subreddit":"LanguageTechnology","query":"In what tasks have LSTM's significantly improved over the previous state-of-the-art?\n\nI've been experimenting with the Large Movie Review sentiment dataset, and it seems that an LSTM does not improve over a much faster/simpler method, namely an SVM on fastText word vectors. I'm curious if anyone knows tasks LSTMs perform better than a more simple approach?","preferred_answer":"LSTMs perform anomaly detection tasks well","top_comment":"Natural language inference tasks\n\nhttps://nlp.stanford.edu/projects/snli/","metadata":{"post_id":"81yemu","post_score":8,"answer_comment_id":"dv9yoxo","answer_score":1,"answerer_anon_id":"anon_01f4497310979c89","top_comment_id":"dv6dczz","top_comment_score":2,"top_comment_anon_id":"anon_a1349560208546e1","top_equals_preferred":false,"thanks_reply_id":"dv9zcq0","thanks_reply_score":1,"thanks_reply_text":"That's interesting - thank you. Do you happen to know the state-of-the-art for this task, or perhaps a related resource?","thanks_reply_timestamp":"2018-03-06T18:03:12+00:00"}} -{"user_id":"anon_8cc023713d54ba65","timestamp":"2018-03-07T13:23:30+00:00","subreddit":"LanguageTechnology","query":"Does anyone have experience with classifying an event based on a number of texts?\n\nI am working on a data project in the medical domain, where I try to predict an event happening during an admission based on the texts that are written in the week before admission (e.g. medical history, nurse notes, etc). The texts have no metadata (e.g. which one is the medical history/intake/memos/etc), so relevant information for prediction could be in any of the texts. I am not quite sure how to combine information from multiple texts and I am unable to find a reference, though I can't really imagine being the first person to come across this problem. \n\nMy initial idea was to train a doc2vec model on the texts, then extract the docvecs of the texts at the start of admission, and use these as input for a classifier. There are however usually 5-15 of those texts, and I am not sure how to combine the docvecs. One option would be to concatenate the texts and convert this to a docvec, however this makes the disbritution of data used for training and data used for classifier input different, and I don't have enough of those concatenated texts to train a doc2vec model (thousands of texts at the start of admission vs millions of texts in total). \n\nI'm open to any technique that is applicable here, look forward to hearing your input - thanks in advance.","preferred_answer":"Your problem sounds similar to Clinical Intervention Prediction. Take a look at this for inspiration: https://www.csail.mit.edu/research/clinical-intervention-prediction-neural-networks","top_comment":"Your problem sounds similar to Clinical Intervention Prediction. Take a look at this for inspiration: https://www.csail.mit.edu/research/clinical-intervention-prediction-neural-networks","metadata":{"post_id":"82o7p9","post_score":2,"answer_comment_id":"dvbo560","answer_score":2,"answerer_anon_id":"anon_ab3c96042dc79b0a","top_comment_id":"dvbo560","top_comment_score":2,"top_comment_anon_id":"anon_ab3c96042dc79b0a","top_equals_preferred":true,"thanks_reply_id":"dvcburn","thanks_reply_score":1,"thanks_reply_text":"Thanks a lot, this is very relevant. I'll look into the techniques they mention in the paper. ","thanks_reply_timestamp":"2018-03-07T21:24:02+00:00"}} -{"user_id":"anon_598f2ea51d58d69a","timestamp":"2018-03-09T17:05:22+00:00","subreddit":"LanguageTechnology","query":"Looking for an API or software for sorting out transitive verbs\n\nI have a list of several thousand English verbs, but I only want the transitive verbs. Is there an API out there which given a verb will let me know if it's transitive or not?","preferred_answer":"I do not see how you could the use the major parsing libs or APIs for this, because one verb can be both transitive and intransitive, and most of the APIs and libs are concerned with parsing and lemmatisation *in context*.\n\nYou probably just need static data. Probably you can just use Wiktionary data, there are APIs for it too.","top_comment":"use the lexicon in SimpleNLG: https://github.com/simplenlg/simplenlg/blob/master/src/main/resources/default-lexicon.xml","metadata":{"post_id":"8388sc","post_score":1,"answer_comment_id":"dvfzsan","answer_score":1,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"dvg6uz2","top_comment_score":2,"top_comment_anon_id":"anon_ab3c96042dc79b0a","top_equals_preferred":false,"thanks_reply_id":"dvg3oli","thanks_reply_score":2,"thanks_reply_text":"Thanks for the reply. I should clarify my initial request: I want those verbs that *can* be used transitively. If a verb can **also** be used intransitively then fine, but I don't want those can **only** be used intransitively.","thanks_reply_timestamp":"2018-03-09T19:43:50+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-03-10T23:17:35+00:00","subreddit":"LanguageTechnology","query":"Help with standard practice on Stanford Sentiment Treebank dataset\n\nI'm trying to properly prepare the binary subset of the [Stanford Sentiment Treebank](https://nlp.stanford.edu/sentiment/) (SST) dataset. I've looked at some recent papers, and they stated the following:\n\n>In the binary case, we use the given splits of 6920 training, 872 development and 1821 test sentences. Likewise, in the fine-grained case, we use the standard 8544/1101/2210 splits. **Labelled phrases that occur as subparts of the training sentences are treated as independent training instances.**\n\nThis is an example sentence, with what I think is a phrase inside of it:\n\n>Despite its shortcomings, Girls Can't Swim represents an engaging and intimate first feature by a talented director to watch, and it's a worthy entry in the French *coming-of-age* genre.\n\nIs \"coming-of-age\" what is meant by a phrase? Should this phrase be removed and added as another training instance, what is the advantage of that?","preferred_answer":"you can check here https://github.com/harvardnlp/sent-conv-torch/tree/master/data how the dataset with the labeled phrases extracted looks like.\nThe advantage in general is that with the labeled phrases you enhance the size of the dataset greatly. Roughly without phrases, for the fine-grained version, you achieve scores in the region of maybe 47% whereas with the phrases added you can probably surpass or achieve scores close to ~50%","top_comment":"you can check here https://github.com/harvardnlp/sent-conv-torch/tree/master/data how the dataset with the labeled phrases extracted looks like.\nThe advantage in general is that with the labeled phrases you enhance the size of the dataset greatly. Roughly without phrases, for the fine-grained version, you achieve scores in the region of maybe 47% whereas with the phrases added you can probably surpass or achieve scores close to ~50%","metadata":{"post_id":"83iu0u","post_score":2,"answer_comment_id":"dvid1l3","answer_score":3,"answerer_anon_id":"anon_0cdc7bfafa3c5172","top_comment_id":"dvid1l3","top_comment_score":3,"top_comment_anon_id":"anon_0cdc7bfafa3c5172","top_equals_preferred":true,"thanks_reply_id":"dvifi98","thanks_reply_score":1,"thanks_reply_text":"Thanks, this helps a lot. It's surprisingly difficult to find this data on github preprocessed.","thanks_reply_timestamp":"2018-03-11T03:18:34+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-03-12T22:23:43+00:00","subreddit":"LanguageTechnology","query":"What do you use for text-processing tasks, e.g. removing punctuation?\n\nI've been using Python and gensim, but recently I've started wanting slightly more complexity outside of the default and now I'm using regex.","preferred_answer":"Have you tried NLTK or spaCy?","top_comment":"Have you tried NLTK or spaCy?","metadata":{"post_id":"83z5aw","post_score":4,"answer_comment_id":"dvlsbbs","answer_score":6,"answerer_anon_id":"anon_e579377061d9ba9c","top_comment_id":"dvlsbbs","top_comment_score":6,"top_comment_anon_id":"anon_e579377061d9ba9c","top_equals_preferred":true,"thanks_reply_id":"dvluqjp","thanks_reply_score":2,"thanks_reply_text":"I've tried neither, and appreciate the recommendations.","thanks_reply_timestamp":"2018-03-13T01:18:25+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-03-12T22:23:43+00:00","subreddit":"LanguageTechnology","query":"What do you use for text-processing tasks, e.g. removing punctuation?\n\nI've been using Python and gensim, but recently I've started wanting slightly more complexity outside of the default and now I'm using regex.","preferred_answer":"Really depends on the specifics of the task, but yes regex is ideal if it's removing specific characters, and Python is ideal if it's more complex and you need that parsing power.\n\nYou *can* probably do everything in a regex, but at some point readability of code and debugging ability come into play.","top_comment":"Have you tried NLTK or spaCy?","metadata":{"post_id":"83z5aw","post_score":4,"answer_comment_id":"dvlt27x","answer_score":1,"answerer_anon_id":"anon_da88f20c4e21a1f1","top_comment_id":"dvlsbbs","top_comment_score":6,"top_comment_anon_id":"anon_e579377061d9ba9c","top_equals_preferred":false,"thanks_reply_id":"dvlvrz7","thanks_reply_score":1,"thanks_reply_text":"That makes a lot of sense, thanks. Do you have any specific Python packages in mind?","thanks_reply_timestamp":"2018-03-13T01:37:14+00:00"}} -{"user_id":"anon_978e380d38f4749b","timestamp":"2018-03-12T22:23:43+00:00","subreddit":"LanguageTechnology","query":"What do you use for text-processing tasks, e.g. removing punctuation?\n\nI've been using Python and gensim, but recently I've started wanting slightly more complexity outside of the default and now I'm using regex.","preferred_answer":"Definitely try spacy. NLTK is a pedagogical Library, so it’s very slow, but very good at seeing how stuff works.","top_comment":"Have you tried NLTK or spaCy?","metadata":{"post_id":"83z5aw","post_score":4,"answer_comment_id":"dvlzqrb","answer_score":3,"answerer_anon_id":"anon_5a1f683434d025b7","top_comment_id":"dvlsbbs","top_comment_score":6,"top_comment_anon_id":"anon_e579377061d9ba9c","top_equals_preferred":false,"thanks_reply_id":"dvp0kq0","thanks_reply_score":3,"thanks_reply_text":"I looked into it, and spacy is extremely useful. Thanks a lot!","thanks_reply_timestamp":"2018-03-14T17:21:45+00:00"}} -{"user_id":"anon_88dea7e7ac5300d0","timestamp":"2018-03-16T06:27:14+00:00","subreddit":"LanguageTechnology","query":"What are the main problems in NLP as of 2018?\n\nA dual list would be nice.\n\n- What are the major problems?\n - Problem 1\n - Why this is a problem\n - Problem 2\n - Why this is a problem\n- What problems have we overcome?\n - Problem 3\n - SOTA?\n - Human performance?","preferred_answer":"http://mitp.nautil.us/article/170/last-words-computational-linguistics-and-deep-learning\n\nhttps://www.eff.org/ai/metrics\n\nhttps://aiindex.org/\n\nupdate: Just to be clear, the traditional benchmarks are mentally pleasing as they give a concrete numbers for cleanly abstracted problems, but the real problems for NLU are messy things like Winograd schema challenges and co-reference resolution, as Manning hints. Word vectors still have only one representation for \"bat\" N1, \"bat\" N2 and \"bat\" V. Sentence representations are even more primitive. And also everything for languages other than English, including mixed-language content.","top_comment":"http://mitp.nautil.us/article/170/last-words-computational-linguistics-and-deep-learning\n\nhttps://www.eff.org/ai/metrics\n\nhttps://aiindex.org/\n\nupdate: Just to be clear, the traditional benchmarks are mentally pleasing as they give a concrete numbers for cleanly abstracted problems, but the real problems for NLU are messy things like Winograd schema challenges and co-reference resolution, as Manning hints. Word vectors still have only one representation for \"bat\" N1, \"bat\" N2 and \"bat\" V. Sentence representations are even more primitive. And also everything for languages other than English, including mixed-language content.","metadata":{"post_id":"84tffe","post_score":17,"answer_comment_id":"dvs9dic","answer_score":11,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"dvs9dic","top_comment_score":11,"top_comment_anon_id":"anon_c07876815fcdf883","top_equals_preferred":true,"thanks_reply_id":"dvsbku4","thanks_reply_score":2,"thanks_reply_text":"eff is particularly good. Thank you! I did not know about it.","thanks_reply_timestamp":"2018-03-16T07:52:26+00:00"}} -{"user_id":"anon_33dcb2d75fa5a3a5","timestamp":"2018-03-17T10:08:53+00:00","subreddit":"LanguageTechnology","query":"What is the SOTA approach to sentiment analysis right now?","preferred_answer":"I believe it’s this: https://arxiv.org/abs/1801.06146","top_comment":"I believe it’s this: https://arxiv.org/abs/1801.06146","metadata":{"post_id":"852vo3","post_score":9,"answer_comment_id":"dvucbmj","answer_score":2,"answerer_anon_id":"anon_b3e3ceea1be7b031","top_comment_id":"dvucbmj","top_comment_score":2,"top_comment_anon_id":"anon_b3e3ceea1be7b031","top_equals_preferred":true,"thanks_reply_id":"dvur2og","thanks_reply_score":1,"thanks_reply_text":"Thanks. Did they open source the code yet? I see they write \"The code will be made available at a future time\" in their paper.","thanks_reply_timestamp":"2018-03-17T17:14:39+00:00"}} -{"user_id":"anon_a5a06cfb03458d43","timestamp":"2018-03-06T08:35:00+00:00","subreddit":"LanguageTechnology","query":"Can you usefully expand NatLang datasets by modifying sentences in a way that maintains semantics?\n\nSay you have a sentence: \n\n> I like the colours blue, green, red, and black.\n\nWe could rearrange the listed words to form the semantically very similar\n\n> I like the colours red, green, blue, and black. \n\nConceivably we could write some rule that could do this for any sentence for which it is appropriate. We could also probably write many other transforming rules to act on other types of sentences to create semantically identical 'siblings'.\n\nIs this actually conceivable/feasible? If so, would it be useful to identify these kinds of rules and use them to take natural language datasets and 'bulk them up' by generating new data with a known semantic meaning and with a known ground truth label?","preferred_answer":"I am interested in this too, and am mentoring a student who is working on it. Initially with rules, but ideally from data. (There are datasets of spelling corrections, Quora duplicate questions, nearest neighbours in word embedding models and so on.)\n\nAn analogy from image recognition would be so-called data generation they do by shifting, rotating, cropping and de-colourising images, which is successful and so standard that it is included in the libraries. Rules-based of course.\n\nHowever, for language there are obviously many many caveats. Sentences are a bit more fickle than images. Changing one pixel in an image will never change much, but I can change one word or even one character in a sentence to create the opposite meaning (if it's the negation particle), there are double-entendres, even casing matters. The noise should be realistic in every case (\"It's raining dogs and cats\" is a bit odd, if grammatical). There are invalid sentences, but there are not really invalid images. Moreover in aggregate should not skew the dataset in terms of n-gram counts and so on.\n\nI think what we want is something with parameters, where we decide what to vary and what to preserve (spelling? locale? grammaticality? fluidity? meaning? sentiment?), according to the task. Or, in the long run, it is done dynamically as part of learning and the system learns which values are optimal for the task.\n\nMy intuition says that for many tasks the cheap safe transformations (40->forty, 40->fourty, cannot->can't, USA->U.S.A, there->their) will yield just as much as the fancier riskier ones.","top_comment":"I am interested in this too, and am mentoring a student who is working on it. Initially with rules, but ideally from data. (There are datasets of spelling corrections, Quora duplicate questions, nearest neighbours in word embedding models and so on.)\n\nAn analogy from image recognition would be so-called data generation they do by shifting, rotating, cropping and de-colourising images, which is successful and so standard that it is included in the libraries. Rules-based of course.\n\nHowever, for language there are obviously many many caveats. Sentences are a bit more fickle than images. Changing one pixel in an image will never change much, but I can change one word or even one character in a sentence to create the opposite meaning (if it's the negation particle), there are double-entendres, even casing matters. The noise should be realistic in every case (\"It's raining dogs and cats\" is a bit odd, if grammatical). There are invalid sentences, but there are not really invalid images. Moreover in aggregate should not skew the dataset in terms of n-gram counts and so on.\n\nI think what we want is something with parameters, where we decide what to vary and what to preserve (spelling? locale? grammaticality? fluidity? meaning? sentiment?), according to the task. Or, in the long run, it is done dynamically as part of learning and the system learns which values are optimal for the task.\n\nMy intuition says that for many tasks the cheap safe transformations (40->forty, 40->fourty, cannot->can't, USA->U.S.A, there->their) will yield just as much as the fancier riskier ones.","metadata":{"post_id":"82dkni","post_score":3,"answer_comment_id":"dv9d58o","answer_score":2,"answerer_anon_id":"anon_c07876815fcdf883","top_comment_id":"dv9d58o","top_comment_score":2,"top_comment_anon_id":"anon_c07876815fcdf883","top_equals_preferred":true,"thanks_reply_id":"dvvayk2","thanks_reply_score":2,"thanks_reply_text":"Thanks for your reply. It's good to hear that I'm not completely off base with this.","thanks_reply_timestamp":"2018-03-17T23:43:36+00:00"}} -{"user_id":"anon_a5a06cfb03458d43","timestamp":"2018-03-06T08:35:00+00:00","subreddit":"LanguageTechnology","query":"Can you usefully expand NatLang datasets by modifying sentences in a way that maintains semantics?\n\nSay you have a sentence: \n\n> I like the colours blue, green, red, and black.\n\nWe could rearrange the listed words to form the semantically very similar\n\n> I like the colours red, green, blue, and black. \n\nConceivably we could write some rule that could do this for any sentence for which it is appropriate. We could also probably write many other transforming rules to act on other types of sentences to create semantically identical 'siblings'.\n\nIs this actually conceivable/feasible? If so, would it be useful to identify these kinds of rules and use them to take natural language datasets and 'bulk them up' by generating new data with a known semantic meaning and with a known ground truth label?","preferred_answer":"Our lab has done some work in that area, we describe one approach here:\nhttp://aclweb.org/anthology/W/W16/W16-2914.pdf\n\nOur task was temporal relation extraction from clinical text. We used the knowledge resources of the NLM's Unified Medical Language System to swap out large spans representing medical concepts with all the sub-spans that were also medical concepts. For example, \"right ascending colon cancer\" could be replaced with \"colon cancer\" or \"cancer,\" and then additional examples can be created with those versions. We compared to using syntax for a similar approach and the semantics worked better but syntax still works. So it may help even if you don't have the equivalent of the UMLS in your domain.","top_comment":"I am interested in this too, and am mentoring a student who is working on it. Initially with rules, but ideally from data. (There are datasets of spelling corrections, Quora duplicate questions, nearest neighbours in word embedding models and so on.)\n\nAn analogy from image recognition would be so-called data generation they do by shifting, rotating, cropping and de-colourising images, which is successful and so standard that it is included in the libraries. Rules-based of course.\n\nHowever, for language there are obviously many many caveats. Sentences are a bit more fickle than images. Changing one pixel in an image will never change much, but I can change one word or even one character in a sentence to create the opposite meaning (if it's the negation particle), there are double-entendres, even casing matters. The noise should be realistic in every case (\"It's raining dogs and cats\" is a bit odd, if grammatical). There are invalid sentences, but there are not really invalid images. Moreover in aggregate should not skew the dataset in terms of n-gram counts and so on.\n\nI think what we want is something with parameters, where we decide what to vary and what to preserve (spelling? locale? grammaticality? fluidity? meaning? sentiment?), according to the task. Or, in the long run, it is done dynamically as part of learning and the system learns which values are optimal for the task.\n\nMy intuition says that for many tasks the cheap safe transformations (40->forty, 40->fourty, cannot->can't, USA->U.S.A, there->their) will yield just as much as the fancier riskier ones.","metadata":{"post_id":"82dkni","post_score":3,"answer_comment_id":"dvbdv5z","answer_score":2,"answerer_anon_id":"anon_1a0ea740b3b35a06","top_comment_id":"dv9d58o","top_comment_score":2,"top_comment_anon_id":"anon_c07876815fcdf883","top_equals_preferred":false,"thanks_reply_id":"dvvaypy","thanks_reply_score":1,"thanks_reply_text":"Thanks for your reply. It's good to hear that I'm not completely off base with this.","thanks_reply_timestamp":"2018-03-17T23:43:42+00:00"}} -{"user_id":"anon_3182490766712125","timestamp":"2018-03-17T19:39:23+00:00","subreddit":"LanguageTechnology","query":"[D] Advice needed for Product Title Compression?\n\nThe task i want to do is given any fashion related product title from an ecommerce site, i want to compress the title in a smaller set of words. I have thought of building a custom NER model which will able to detect the brand, attributes, type, product from a product title.\nFor example : Say the product name --> \"Gant Solid Men's Polo Neck Dark Blue T-Shirt\", it should extract the entities like {Brand: Gant, Product: T-Shirt, Type: Polo}\n\nWhat is the right way for approaching this problem? Please help, I am newbie to nlp and eager to learn more...","preferred_answer":"If you want to research this, the problem you're describing is often called 'information extraction for nominal attributes' (or compound nominals). \"Gant Solid Men's Polo Neck Dark Blue T-Shirt\" =