{"user_id":"anon_2a6f72e61f313ee5","answerer_user_id":"anon_5a615468c2f89411","subreddit":"LanguageTechnology","timestamp":"2013-01-05T07:51:04+00:00","post_id":"15zzot","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_2a6f72e61f313ee5","comment_id":"15zzot","kind":"post","text":"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!","timestamp":"2013-01-05T07:51:04+00:00","score":2},{"role":"answerer","user_id":"anon_5a615468c2f89411","comment_id":"c7rex4n","kind":"comment","text":"[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.","timestamp":"2013-01-05T09:19:38+00:00","score":2},{"role":"OP","user_id":"anon_2a6f72e61f313ee5","comment_id":"c7rizvk","kind":"comment","text":"Oh my, this sounds like more than I was expecting. Thank you! :D","timestamp":"2013-01-05T17:12:37+00:00","score":2},{"role":"answerer","user_id":"anon_5a615468c2f89411","comment_id":"c7ro9zp","kind":"comment","text":"Glad it's useful to you! If you need it in SQLite form, I can send you my database file. \n\nWhat're you using it for? :)","timestamp":"2013-01-05T22:31:49+00:00","score":1},{"role":"OP","user_id":"anon_2a6f72e61f313ee5","comment_id":"c7ruhl2","kind":"comment","text":"Oh, nifty! Is it just the main data file in SQLite form, or the main data file with other things? That might save messing around with the clunky perl scripts.\n\nAnd not sure yet, mostly my own interests in dialect learning, but maybe I'll use it to do something or make something. I'm going to take another peek at the perl and see how much of it is just easily rewriteable into a more easily manageable format. ... The fun things one does on a Saturday night.","timestamp":"2013-01-06T04:40:35+00:00","score":2},{"role":"answerer","user_id":"anon_5a615468c2f89411","comment_id":"c7rx4hw","kind":"comment","text":"I just realized--my database is in the General America Accent, so it's probably not super useful to you :( But it's just the main data file in SQLite form. I use the program \"SQLite Database Browser 2.0 b1\" to mess around with it :) \n\nI had to massage the data a bit before it got in the format I wanted it in, but it wasn't a huge hurdle. Once I found the documentation Pdf for the UNISYN scripts, it was pretty easy to figure out the right parameters to get the accent I wanted out of it. That being said, it's been a while since I've done so.\n\nYup, Saturday night linguistics. Nothing like it :P","timestamp":"2013-01-06T07:38:09+00:00","score":1},{"role":"OP","user_id":"anon_2a6f72e61f313ee5","comment_id":"c7tl88i","kind":"comment","text":"No worries! I think I've gotten some things figured out here. One of the scripts I was using for some reason didn't want to recognize one of the dialects I wanted out of it, but I used several others and got the same thing out of it anyway. Such an amazing resource!","timestamp":"2013-01-09T02:52:37+00:00","score":2},{"role":"answerer","user_id":"anon_5a615468c2f89411","comment_id":"c7tptp4","kind":"comment","text":"Fantastic! Feel free to pm me if you have any questions","timestamp":"2013-01-09T07:41:40+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_2a6f72e61f313ee5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5a615468c2f89411","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"c7rex4n","thanks_reply_id":"c7rizvk","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_bb32036b52e88836","answerer_user_id":"anon_5a1f683434d025b7","subreddit":"LanguageTechnology","timestamp":"2013-12-29T06:21:17+00:00","post_id":"1txen4","question":"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. :)","full_conversation":[{"role":"OP","user_id":"anon_bb32036b52e88836","comment_id":"1txen4","kind":"post","text":"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!","timestamp":"2013-12-29T06:21:17+00:00","score":13},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"cecjx79","kind":"comment","text":"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. :)","timestamp":"2013-12-29T14:55:14+00:00","score":19},{"role":"OP","user_id":"anon_bb32036b52e88836","comment_id":"cecmqau","kind":"comment","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?","timestamp":"2013-12-29T17:34:28+00:00","score":0},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"cecnxff","kind":"comment","text":"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.","timestamp":"2013-12-29T18:25:33+00:00","score":2},{"role":"OP","user_id":"anon_bb32036b52e88836","comment_id":"ced5bmp","kind":"comment","text":"Cool, that's all I need to know. Thanks again for the thorough answer.","timestamp":"2013-12-30T05:39:36+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_bb32036b52e88836","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5a1f683434d025b7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cecjx79","thanks_reply_id":"cecmqau","post_score":13,"answer_score":19,"preferred_answer_is_top_level":true}} {"user_id":"anon_7a85070644937fc1","answerer_user_id":"anon_cdabff0e3d65ab50","subreddit":"LanguageTechnology","timestamp":"2014-06-24T22:12:28+00:00","post_id":"29075q","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_7a85070644937fc1","comment_id":"29075q","kind":"post","text":"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.","timestamp":"2014-06-24T22:12:28+00:00","score":3},{"role":"answerer","user_id":"anon_cdabff0e3d65ab50","comment_id":"cig9ao2","kind":"comment","text":"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.","timestamp":"2014-06-25T00:17:43+00:00","score":3},{"role":"OP","user_id":"anon_7a85070644937fc1","comment_id":"ciga08r","kind":"comment","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.","timestamp":"2014-06-25T00:45:05+00:00","score":1},{"role":"answerer","user_id":"anon_cdabff0e3d65ab50","comment_id":"ciga5aq","kind":"comment","text":"For sure. I just thought about categories of words being used. I suspect that ingroup - outgroup mentality might be enhanced during times of war: Addressing the \"nation\" and the \"people\" needing to stick \"together\". For the USA, religious motives may come out more, too. So I guess it is important to have a decent amount of speech before and after the time of crisis to analyze. Nice topic, I wish him luck and perseverance.","timestamp":"2014-06-25T00:50:37+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7a85070644937fc1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cdabff0e3d65ab50","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cig9ao2","thanks_reply_id":"ciga08r","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_845bff1c6e5eec08","answerer_user_id":"anon_cdabff0e3d65ab50","subreddit":"LanguageTechnology","timestamp":"2014-11-24T18:33:26+00:00","post_id":"2naapx","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_845bff1c6e5eec08","comment_id":"2naapx","kind":"post","text":"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?","timestamp":"2014-11-24T18:33:26+00:00","score":9},{"role":"answerer","user_id":"anon_cdabff0e3d65ab50","comment_id":"cmc7o5l","kind":"comment","text":"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.","timestamp":"2014-11-25T02:34:24+00:00","score":6},{"role":"OP","user_id":"anon_845bff1c6e5eec08","comment_id":"cmciqwt","kind":"comment","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 :-(","timestamp":"2014-11-25T12:21:15+00:00","score":1},{"role":"answerer","user_id":"anon_cdabff0e3d65ab50","comment_id":"cmcj3hp","kind":"comment","text":"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.","timestamp":"2014-11-25T12:46:31+00:00","score":2},{"role":"OP","user_id":"anon_845bff1c6e5eec08","comment_id":"cmem3qm","kind":"comment","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!","timestamp":"2014-11-27T18:02:18+00:00","score":1},{"role":"answerer","user_id":"anon_cdabff0e3d65ab50","comment_id":"cmenoof","kind":"comment","text":"That's what I call luck, exactly what you needed. I'll take a look at them, too, so thanks for bringing it to my attention.","timestamp":"2014-11-27T18:59:32+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_845bff1c6e5eec08","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cdabff0e3d65ab50","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cmc7o5l","thanks_reply_id":"cmciqwt","post_score":9,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_fd5519744b55af55","answerer_user_id":"anon_82777c1febdcad85","subreddit":"LanguageTechnology","timestamp":"2014-12-02T00:11:05+00:00","post_id":"2nzri6","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_fd5519744b55af55","comment_id":"2nzri6","kind":"post","text":"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","timestamp":"2014-12-02T00:11:05+00:00","score":4},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"cmihn1m","kind":"comment","text":"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.","timestamp":"2014-12-02T02:30:51+00:00","score":3},{"role":"OP","user_id":"anon_fd5519744b55af55","comment_id":"cmisomp","kind":"comment","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?","timestamp":"2014-12-02T12:23:25+00:00","score":1},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"cmk3lkg","kind":"comment","text":"The three different states would be: beginning of phone, middle of phone, end of phone. These would be linked into an HMM, and then in turn you could link these HMMs into a bigger one. For example: two /tu/ would have\nt -> u, and within t, there would be beginning of t, middle of t, end of t (similarly for u). You could then link the word recognizers together to produce something to recognize a sequence of digits.","timestamp":"2014-12-03T18:17:12+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fd5519744b55af55","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_82777c1febdcad85","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cmihn1m","thanks_reply_id":"cmisomp","post_score":4,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_ad2f72ab89b980b4","answerer_user_id":"anon_145d19078cf8e613","subreddit":"LanguageTechnology","timestamp":"2015-01-07T08:43:34+00:00","post_id":"2rm1ve","question":"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).","full_conversation":[{"role":"OP","user_id":"anon_ad2f72ab89b980b4","comment_id":"2rm1ve","kind":"post","text":"Is Segmentation a Solved Problem?","timestamp":"2015-01-07T08:43:34+00:00","score":12},{"role":"answerer","user_id":"anon_145d19078cf8e613","comment_id":"cnkjbov","kind":"comment","text":"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).","timestamp":"2015-01-10T15:39:31+00:00","score":2},{"role":"OP","user_id":"anon_ad2f72ab89b980b4","comment_id":"cnkxoti","kind":"comment","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.","timestamp":"2015-01-10T23:35:12+00:00","score":1},{"role":"answerer","user_id":"anon_145d19078cf8e613","comment_id":"cnlbj5g","kind":"comment","text":"You're welcome. Your list has given me grounds to dent out a few bugs in my own programming.\nI've been meaning to say though, your \"golden rules\" are not rules in the conventional sense, but more like cases. When I read \"golden rules\", I expected to read the solutions for these cases.","timestamp":"2015-01-11T08:08:03+00:00","score":1},{"role":"OP","user_id":"anon_ad2f72ab89b980b4","comment_id":"cnlev4f","kind":"comment","text":"The code is open source so you can check out the solutions: https://github.com/diasks2/pragmatic_segmenter\n\nI tried to make it as readable as possible.","timestamp":"2015-01-11T12:41:24+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_ad2f72ab89b980b4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_145d19078cf8e613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cnkjbov","thanks_reply_id":"cnkxoti","post_score":12,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_19b138774248c446","answerer_user_id":"anon_03ef50f966d6fee6","subreddit":"LanguageTechnology","timestamp":"2015-03-19T18:38:50+00:00","post_id":"2zm25i","question":"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","full_conversation":[{"role":"OP","user_id":"anon_19b138774248c446","comment_id":"2zm25i","kind":"post","text":"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!","timestamp":"2015-03-19T18:38:50+00:00","score":7},{"role":"answerer","user_id":"anon_03ef50f966d6fee6","comment_id":"cpkwtn3","kind":"comment","text":"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","timestamp":"2015-03-20T12:15:05+00:00","score":1},{"role":"OP","user_id":"anon_19b138774248c446","comment_id":"cple7g1","kind":"comment","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?","timestamp":"2015-03-20T20:47:54+00:00","score":1},{"role":"answerer","user_id":"anon_03ef50f966d6fee6","comment_id":"cpleua0","kind":"comment","text":"Without knowing your research objective, there is no way to determine a \"best\". The type of language you are researching will drive which corpus or corpora is most appropriate.\n\nI'd encourage you to talk about this with your advisor or a professor. I think it's much more nuanced than can be expressed in a reddit post.","timestamp":"2015-03-20T21:06:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_19b138774248c446","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_03ef50f966d6fee6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cpkwtn3","thanks_reply_id":"cple7g1","post_score":7,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_549292b95a87116e","answerer_user_id":"anon_2d07d862e9158e59","subreddit":"LanguageTechnology","timestamp":"2015-05-19T17:28:31+00:00","post_id":"36ike7","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_549292b95a87116e","comment_id":"36ike7","kind":"post","text":"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!","timestamp":"2015-05-19T17:28:31+00:00","score":3},{"role":"answerer","user_id":"anon_2d07d862e9158e59","comment_id":"cred8mb","kind":"comment","text":"Natural Language Processing with Python\nIs a classic to start with. After that there are NLP libraries in most programming languages.","timestamp":"2015-05-19T19:19:56+00:00","score":1},{"role":"OP","user_id":"anon_549292b95a87116e","comment_id":"crefpm0","kind":"comment","text":"Thanks. Which , in your opinion, is the most powerful NLP library? I've heard good things about the Stanford NLP toolkit.","timestamp":"2015-05-19T20:21:33+00:00","score":1},{"role":"answerer","user_id":"anon_2d07d862e9158e59","comment_id":"crnhf12","kind":"comment","text":"Stanford NLP is quite good and can be integrated in java apps.\nNLTK actually hasbindings to it enabling you to use it from python.\nIf you need performance tough you should try to access it directly in java.\n\nWhat do you mean by powerful? Fastest? Most complete? Best quality?\nNLTK is clearly the most complete library for NLP but in my experience it is not the fastest.\n\nWhat kind of features are you looking for. In general python NLP libraries like plyglot, nltk or gensim have a lot of features while C++ and Java ones will do one thing really well.\nin java I recomment standord NLP, or Gate\nin scala, Epic or Processors\nin C++ I personnaly like unitex as they have a GUI but it's not really a NLP library, more a information extraction framework","timestamp":"2015-05-28T09:49:10+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_549292b95a87116e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2d07d862e9158e59","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cred8mb","thanks_reply_id":"crefpm0","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_eb91461c5705fab9","answerer_user_id":"anon_61dd78c473c8628e","subreddit":"LanguageTechnology","timestamp":"2015-05-20T02:37:09+00:00","post_id":"36kqx3","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_eb91461c5705fab9","comment_id":"36kqx3","kind":"post","text":"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?","timestamp":"2015-05-20T02:37:09+00:00","score":6},{"role":"answerer","user_id":"anon_61dd78c473c8628e","comment_id":"crfc2nk","kind":"comment","text":"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.","timestamp":"2015-05-20T16:21:15+00:00","score":2},{"role":"OP","user_id":"anon_eb91461c5705fab9","comment_id":"crfyp39","kind":"comment","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?","timestamp":"2015-05-21T02:40:55+00:00","score":1},{"role":"answerer","user_id":"anon_61dd78c473c8628e","comment_id":"crhg2xh","kind":"comment","text":"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.","timestamp":"2015-05-22T14:19:56+00:00","score":2},{"role":"OP","user_id":"anon_eb91461c5705fab9","comment_id":"criiagk","kind":"comment","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?","timestamp":"2015-05-23T16:08:33+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_eb91461c5705fab9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_61dd78c473c8628e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"crfc2nk","thanks_reply_id":"crfyp39","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_16e78fee3f79e205","answerer_user_id":"anon_ee9f639443aa0b96","subreddit":"LanguageTechnology","timestamp":"2015-06-02T09:28:14+00:00","post_id":"3874jj","question":"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","full_conversation":[{"role":"OP","user_id":"anon_16e78fee3f79e205","comment_id":"3874jj","kind":"post","text":"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...","timestamp":"2015-06-02T09:28:14+00:00","score":5},{"role":"answerer","user_id":"anon_ee9f639443aa0b96","comment_id":"crt8spf","kind":"comment","text":"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","timestamp":"2015-06-02T18:19:08+00:00","score":1},{"role":"OP","user_id":"anon_16e78fee3f79e205","comment_id":"crv51pj","kind":"comment","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)...","timestamp":"2015-06-04T09:11:04+00:00","score":1},{"role":"answerer","user_id":"anon_ee9f639443aa0b96","comment_id":"crviriw","kind":"comment","text":"I don't think Spinbot is using that method, no. It looks like it's just replacing words and phrases with others that mean something similar. That's certainly an easier approach. My suggestion would allow you to re-order the phrases in the sentence or even leave ones out if you wanted to shorten it (FrameNet includes information on which frame entities are not required).","timestamp":"2015-06-04T17:40:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_16e78fee3f79e205","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ee9f639443aa0b96","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"crt8spf","thanks_reply_id":"crv51pj","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_6cd70c437ebb81da","answerer_user_id":"anon_3cfa436c248c31d2","subreddit":"LanguageTechnology","timestamp":"2015-07-20T12:30:41+00:00","post_id":"3dxt8j","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_6cd70c437ebb81da","comment_id":"3dxt8j","kind":"post","text":"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","timestamp":"2015-07-20T12:30:41+00:00","score":3},{"role":"answerer","user_id":"anon_3cfa436c248c31d2","comment_id":"ct9x9le","kind":"comment","text":"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.","timestamp":"2015-07-20T17:55:00+00:00","score":3},{"role":"OP","user_id":"anon_6cd70c437ebb81da","comment_id":"ct9xjrm","kind":"comment","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?","timestamp":"2015-07-20T18:01:49+00:00","score":1},{"role":"answerer","user_id":"anon_3cfa436c248c31d2","comment_id":"cta0o6a","kind":"comment","text":"Ah alright so I did misunderstand. I would evaluate correctness not on entire sentences but on sentence endings, since that is what the system is supposed to recognize anyway. If you consider both sentence start and end for evaluation you count each error twice. For more or less state of the art sentence boundary recognition you could look at e.g. [Kiss/Strunk (2003): Unsupervised Multilingual Sentence Boundary Detection](http://www.linguistics.ruhr-uni-bochum.de/~strunk/ks2005FINAL.pdf).","timestamp":"2015-07-20T19:18:56+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6cd70c437ebb81da","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3cfa436c248c31d2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ct9x9le","thanks_reply_id":"ct9xjrm","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_a7bc342e4f6651da","answerer_user_id":"anon_82777c1febdcad85","subreddit":"LanguageTechnology","timestamp":"2015-08-17T21:42:09+00:00","post_id":"3hd7at","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_a7bc342e4f6651da","comment_id":"3hd7at","kind":"post","text":"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.","timestamp":"2015-08-17T21:42:09+00:00","score":2},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"cu6jzo4","kind":"comment","text":"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.","timestamp":"2015-08-18T01:17:50+00:00","score":2},{"role":"OP","user_id":"anon_a7bc342e4f6651da","comment_id":"cu6kwri","kind":"comment","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.","timestamp":"2015-08-18T01:45:18+00:00","score":1},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"cu6lj4c","kind":"comment","text":"Is your task to identify whether documents are about breakfast or not? If so, topic modeling is overkill. A simple classifier using binary features for words/n-grams should be a pretty strong baseline for this task. You could also use a measure like pointwise mutual information to identify really breakfast-y words or phrases. \n\n> take the top 100 terms for each topic and then have each topic be described by the most unique terms like a TFIDF.\n\nNot sure what you mean here, but if the task is to find documents about breakfast, this doesn't sound promising.","timestamp":"2015-08-18T02:03:50+00:00","score":2},{"role":"OP","user_id":"anon_a7bc342e4f6651da","comment_id":"cu6oljw","kind":"comment","text":"Thanks for the response. My task is to find topics within those already classified as breakfast. I've already completed that classification.\n\nAs for the second part, since you are saying that each topic is just a distribution of the vocabulary there will be a lot of overlap of terms in the topics top 10 words since they are already all about breakfast. I was thinking about how to make the topic terms more unique. \n\nMaybe you have two topics with the top 3 words being:\n\n(breakfast, cereal, yogurt) (breakfast, oatmeal, kids)\n\nYou might remove breakfast since its in both and look at the forth word. Repeat until you have a more unique descriptor. TFIDF wouldn't work. I was just thinking about how you might try to weight them.","timestamp":"2015-08-18T03:36:46+00:00","score":1},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"cu6zhhl","kind":"comment","text":"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.","timestamp":"2015-08-18T13:10:01+00:00","score":2},{"role":"OP","user_id":"anon_a7bc342e4f6651da","comment_id":"cu70sw0","kind":"comment","text":"Thanks man!","timestamp":"2015-08-18T13:55:42+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_a7bc342e4f6651da","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_82777c1febdcad85","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cu6jzo4","thanks_reply_id":"cu6kwri","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_c56960166275f2cf","answerer_user_id":"anon_82fab1de64f6073b","subreddit":"LanguageTechnology","timestamp":"2015-09-22T12:03:03+00:00","post_id":"3lxdc6","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_c56960166275f2cf","comment_id":"3lxdc6","kind":"post","text":"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?","timestamp":"2015-09-22T12:03:03+00:00","score":3},{"role":"answerer","user_id":"anon_82fab1de64f6073b","comment_id":"cvab029","kind":"comment","text":"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.","timestamp":"2015-09-22T16:17:13+00:00","score":2},{"role":"OP","user_id":"anon_c56960166275f2cf","comment_id":"cvadhm9","kind":"comment","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?","timestamp":"2015-09-22T17:19:04+00:00","score":1},{"role":"answerer","user_id":"anon_82fab1de64f6073b","comment_id":"cvadywv","kind":"comment","text":"There's a great Python machine learning library called scikit-learn. They have a walkthrough with code on how to do document classification [here](http://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html). It's not super in depth, but covers the big steps necessary to do the problem.\n\nFor more a more academic and more detailed read, [this paper](http://www.infoautoclassification.org/public/articles/Ikonomakis-et.-al._Text-Classification-Using-Machine-Learning-Techniques.pdf) seems to a short, but comprehensive read, and mentions some of the big machine learning algorithms used in text classification.","timestamp":"2015-09-22T17:30:53+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c56960166275f2cf","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_82fab1de64f6073b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cvab029","thanks_reply_id":"cvadhm9","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_1b25b9bae871da9a","answerer_user_id":"anon_3c9f147d935d1b49","subreddit":"LanguageTechnology","timestamp":"2015-10-04T06:57:16+00:00","post_id":"3nfhg4","question":"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","full_conversation":[{"role":"OP","user_id":"anon_1b25b9bae871da9a","comment_id":"3nfhg4","kind":"post","text":"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?","timestamp":"2015-10-04T06:57:16+00:00","score":3},{"role":"answerer","user_id":"anon_3c9f147d935d1b49","comment_id":"cvqkeuv","kind":"comment","text":"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","timestamp":"2015-10-06T21:27:55+00:00","score":1},{"role":"OP","user_id":"anon_1b25b9bae871da9a","comment_id":"cvqwrjd","kind":"comment","text":"This is fantastic, thank you for this!","timestamp":"2015-10-07T03:23:37+00:00","score":1},{"role":"answerer","user_id":"anon_3c9f147d935d1b49","comment_id":"cvrfjkw","kind":"comment","text":"You're welcome... here is another cutting edge paper on translation.\n\nhttp://papers.nips.cc/paper/5346-sequence-to-sequence-learning-with-neural-networks.pdf","timestamp":"2015-10-07T16:42:52+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1b25b9bae871da9a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3c9f147d935d1b49","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cvqkeuv","thanks_reply_id":"cvqwrjd","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_5970203db536fcf4","answerer_user_id":"anon_d44356a75eb6d544","subreddit":"LanguageTechnology","timestamp":"2015-10-15T16:05:02+00:00","post_id":"3ove4e","question":"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)","full_conversation":[{"role":"OP","user_id":"anon_5970203db536fcf4","comment_id":"3ove4e","kind":"post","text":"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.","timestamp":"2015-10-15T16:05:02+00:00","score":5},{"role":"answerer","user_id":"anon_d44356a75eb6d544","comment_id":"cw0u1ez","kind":"comment","text":"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)","timestamp":"2015-10-15T17:17:29+00:00","score":1},{"role":"OP","user_id":"anon_5970203db536fcf4","comment_id":"cw0u8bu","kind":"comment","text":"This is very interesting, I'll give your references a once over. Thanks for the suggestion!","timestamp":"2015-10-15T17:21:54+00:00","score":3},{"role":"answerer","user_id":"anon_d44356a75eb6d544","comment_id":"cw0vj6i","kind":"comment","text":"You're welcome!\n\n Jfyi: I use Mendeley Desktop for keeping track of bibliography references. It's free and you don't need to use their cloud service at all. Maybe also useful to you.\n\nEDIT: Don't make the error I did and stop researching, but start writing right after finishing your TOC. \nExample: *find studies confirming the theory that* and *add table of accuracies per mental disorder here*. That way you can finish your thesis's main idea 'in a day' and roughly add templates below headers. Your research should only help with writing and confirming your observations/claims.","timestamp":"2015-10-15T17:53:01+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_5970203db536fcf4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d44356a75eb6d544","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"cw0u1ez","thanks_reply_id":"cw0u8bu","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc20fd243869b676","answerer_user_id":"anon_eefe0617080c002d","subreddit":"LanguageTechnology","timestamp":"2016-02-21T12:54:26+00:00","post_id":"46v5aw","question":"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/","full_conversation":[{"role":"OP","user_id":"anon_bc20fd243869b676","comment_id":"46v5aw","kind":"post","text":"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.","timestamp":"2016-02-21T12:54:26+00:00","score":8},{"role":"answerer","user_id":"anon_eefe0617080c002d","comment_id":"d0884lz","kind":"comment","text":"This is a good place to start for more recent research threads: http://nlp.stanford.edu/sentiment/","timestamp":"2016-02-21T16:52:23+00:00","score":1},{"role":"OP","user_id":"anon_bc20fd243869b676","comment_id":"d08dk7p","kind":"comment","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.","timestamp":"2016-02-21T19:22:14+00:00","score":1},{"role":"answerer","user_id":"anon_eefe0617080c002d","comment_id":"d08jvjw","kind":"comment","text":"They label parse trees. Individual nodes (at finer granularity) are also labeled. See: http://nlp.stanford.edu:8080/sentiment/labeling.html","timestamp":"2016-02-21T22:09:09+00:00","score":2},{"role":"OP","user_id":"anon_bc20fd243869b676","comment_id":"d08m4fa","kind":"comment","text":"Cool. I'll check it out.","timestamp":"2016-02-21T23:09:47+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_bc20fd243869b676","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_eefe0617080c002d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d0884lz","thanks_reply_id":"d08dk7p","post_score":8,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_2062648a745135fb","answerer_user_id":"anon_bc20fd243869b676","subreddit":"LanguageTechnology","timestamp":"2016-02-22T13:20:17+00:00","post_id":"470s97","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_2062648a745135fb","comment_id":"470s97","kind":"post","text":"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.","timestamp":"2016-02-22T13:20:17+00:00","score":4},{"role":"answerer","user_id":"anon_bc20fd243869b676","comment_id":"d09at24","kind":"comment","text":"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.","timestamp":"2016-02-22T14:54:06+00:00","score":4},{"role":"OP","user_id":"anon_2062648a745135fb","comment_id":"d09bvwo","kind":"comment","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?","timestamp":"2016-02-22T15:25:19+00:00","score":1},{"role":"answerer","user_id":"anon_bc20fd243869b676","comment_id":"d09ht3o","kind":"comment","text":"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.","timestamp":"2016-02-22T17:50:20+00:00","score":1},{"role":"OP","user_id":"anon_2062648a745135fb","comment_id":"d09iwkl","kind":"comment","text":"Thanks for your advice :)\n\nOn it!","timestamp":"2016-02-22T18:15:53+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_2062648a745135fb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bc20fd243869b676","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d09at24","thanks_reply_id":"d09bvwo","post_score":4,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_50e54b59052f94f9","answerer_user_id":"anon_1c2a5e5639bd941f","subreddit":"LanguageTechnology","timestamp":"2016-03-05T19:09:59+00:00","post_id":"493pgv","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_50e54b59052f94f9","comment_id":"493pgv","kind":"post","text":"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?","timestamp":"2016-03-05T19:09:59+00:00","score":2},{"role":"answerer","user_id":"anon_1c2a5e5639bd941f","comment_id":"d0qkyc9","kind":"comment","text":"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.","timestamp":"2016-03-07T09:03:04+00:00","score":1},{"role":"OP","user_id":"anon_50e54b59052f94f9","comment_id":"d0xrjmn","kind":"comment","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!)","timestamp":"2016-03-13T01:50:14+00:00","score":1},{"role":"answerer","user_id":"anon_1c2a5e5639bd941f","comment_id":"d0y1t40","kind":"comment","text":"The (contents of the) folder that the plugin created should be uploaded somewhere. If you're a student, your university might provide free hosting. Then you just need to have the web address to your html file. Or, if you call the html file 'index.html', the address to the folder. (Browsers know that the index file is the one that they should render, so then it happens automatically.) Otherwise, you need to host the folder somewhere else.\n\nThere used to also be free hosting services (as a way to advertise paid services). I don't know where you could get free hosting online anymore. There might still be some services around, but Googling them I don't know which ones are for real and which ones are shady.\n\nEDIT: Make a GitHub page! See https://pages.github.com/ for instructions.","timestamp":"2016-03-13T08:11:52+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_50e54b59052f94f9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1c2a5e5639bd941f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d0qkyc9","thanks_reply_id":"d0xrjmn","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_7dc5c8f169b509bc","answerer_user_id":"anon_8d89946357e8f59c","subreddit":"LanguageTechnology","timestamp":"2016-04-07T18:44:01+00:00","post_id":"4dshoj","question":"[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).","full_conversation":[{"role":"OP","user_id":"anon_7dc5c8f169b509bc","comment_id":"4dshoj","kind":"post","text":"[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?","timestamp":"2016-04-07T18:44:01+00:00","score":2},{"role":"answerer","user_id":"anon_8d89946357e8f59c","comment_id":"d1tyadr","kind":"comment","text":"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).","timestamp":"2016-04-07T19:32:54+00:00","score":1},{"role":"OP","user_id":"anon_7dc5c8f169b509bc","comment_id":"d1u3k1x","kind":"comment","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.","timestamp":"2016-04-07T21:24:55+00:00","score":1},{"role":"answerer","user_id":"anon_8d89946357e8f59c","comment_id":"d1uqad9","kind":"comment","text":"If you are specifically looking at weights, you could play around with Word2Vec (or Doc2 or Paragraph2 or continuous learning2, it's all very popular).\n\nIf you get really fancy, you can do a weighted bag of words concept expansion on your keywords (so Fracking becomes fracking, frking, oil drilling - each with a weighted distance from the original term). Can be handy in getting a better view of conceptual distance instead of pure keyword.\n\nAs with all such things, actual value towards the result you're after will vary and test your assumptions about what the results actually mean against well understood data!","timestamp":"2016-04-08T09:55:30+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7dc5c8f169b509bc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8d89946357e8f59c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d1tyadr","thanks_reply_id":"d1u3k1x","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_66121000bd0540d7","answerer_user_id":"anon_7d49e0355d132e3d","subreddit":"LanguageTechnology","timestamp":"2016-04-20T15:15:43+00:00","post_id":"4fntdf","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_66121000bd0540d7","comment_id":"4fntdf","kind":"post","text":"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...","timestamp":"2016-04-20T15:15:43+00:00","score":8},{"role":"answerer","user_id":"anon_7d49e0355d132e3d","comment_id":"d2bt2yt","kind":"comment","text":"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.","timestamp":"2016-04-21T15:50:42+00:00","score":1},{"role":"OP","user_id":"anon_66121000bd0540d7","comment_id":"d2c827a","kind":"comment","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.","timestamp":"2016-04-21T21:10:55+00:00","score":1},{"role":"answerer","user_id":"anon_7d49e0355d132e3d","comment_id":"d2c8lzw","kind":"comment","text":"Looks like [huggin](https://github.com/cantino/huginn/), which you can deploy on Heroku, is the way to go now.","timestamp":"2016-04-21T21:23:46+00:00","score":2},{"role":"OP","user_id":"anon_66121000bd0540d7","comment_id":"d2cwdb1","kind":"comment","text":"Huggin's on my radar! Possibly a bit overkill, but will have a play.","timestamp":"2016-04-22T10:46:54+00:00","score":1},{"role":"answerer","user_id":"anon_7d49e0355d132e3d","comment_id":"d2dfjy7","kind":"comment","text":"I'll set up an instance this afternoon and leave the hostname here when I'm done.","timestamp":"2016-04-22T19:18:54+00:00","score":2},{"role":"OP","user_id":"anon_66121000bd0540d7","comment_id":"d2e3bme","kind":"comment","text":"That would be great!","timestamp":"2016-04-23T08:09:46+00:00","score":1},{"role":"answerer","user_id":"anon_7d49e0355d132e3d","comment_id":"d2ec5pe","kind":"comment","text":"https://f3trt3soctj7fp3w.onion.to/ \n\nNote, this isn't a very robust server, so please don't hit it too hard!","timestamp":"2016-04-23T15:35:16+00:00","score":2},{"role":"OP","user_id":"anon_66121000bd0540d7","comment_id":"d2fn2x8","kind":"comment","text":"Thanks cruyff8","timestamp":"2016-04-24T19:17:18+00:00","score":1}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_66121000bd0540d7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7d49e0355d132e3d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d2bt2yt","thanks_reply_id":"d2c827a","post_score":8,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_6135d2db80041c9b","answerer_user_id":"anon_61ea34fbfe494be4","subreddit":"LanguageTechnology","timestamp":"2016-05-10T01:11:16+00:00","post_id":"4imtes","question":"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","full_conversation":[{"role":"OP","user_id":"anon_6135d2db80041c9b","comment_id":"4imtes","kind":"post","text":"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.","timestamp":"2016-05-10T01:11:16+00:00","score":5},{"role":"answerer","user_id":"anon_61ea34fbfe494be4","comment_id":"d30u145","kind":"comment","text":"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","timestamp":"2016-05-11T02:46:23+00:00","score":4},{"role":"OP","user_id":"anon_6135d2db80041c9b","comment_id":"d30uaa5","kind":"comment","text":"Nice, thanks! Is this module for identifying new collocations or for already known collocations?","timestamp":"2016-05-11T02:52:56+00:00","score":1},{"role":"answerer","user_id":"anon_61ea34fbfe494be4","comment_id":"d30vlef","kind":"comment","text":"Looks like it can detect new collocations. Give it a shot.","timestamp":"2016-05-11T03:27:00+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6135d2db80041c9b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_61ea34fbfe494be4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d30u145","thanks_reply_id":"d30uaa5","post_score":5,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_dfaac54c3eb80f80","answerer_user_id":"anon_c371c9503652322d","subreddit":"LanguageTechnology","timestamp":"2016-06-30T11:02:48+00:00","post_id":"4ql2qo","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_dfaac54c3eb80f80","comment_id":"4ql2qo","kind":"post","text":"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?","timestamp":"2016-06-30T11:02:48+00:00","score":1},{"role":"answerer","user_id":"anon_c371c9503652322d","comment_id":"d4w295n","kind":"comment","text":"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.","timestamp":"2016-07-02T00:19:09+00:00","score":2},{"role":"OP","user_id":"anon_dfaac54c3eb80f80","comment_id":"d4wdd4u","kind":"comment","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!","timestamp":"2016-07-02T06:54:09+00:00","score":2},{"role":"answerer","user_id":"anon_c371c9503652322d","comment_id":"d4wp78d","kind":"comment","text":"I found that it was too hard for the RNNs to fit all of the characters in to the auto encoders's hidden state. \n\nWhat do you mean by word segmentation? Finding the word boundaries? Or finding the morphemes of the words?\n\nIf what your really after is domain transfer then another approach you might want to look at:\nDomain-Adversarial Training (http://arxiv.org/abs/1505.07818). Don't let the maths intimidate, the idea is very simple. You train your classifier on the data you have labels for while simultaneously training another classifier on top of your classifier which tries to tell if the data is the original or new (tweets?), BUT you reverse the gradient in to the first classifier, so that it CAN'T classify which is which. So it's not learning features that could tell the difference. Which hopefully means it should work on tweets even though you have no data.","timestamp":"2016-07-02T16:21:37+00:00","score":2},{"role":"OP","user_id":"anon_dfaac54c3eb80f80","comment_id":"d4xuwnl","kind":"comment","text":"languages such as Chinese, Japanese colloquial Korean etc. don't use spaces or similar word delimiters in their written form, so it is non-trivial to find word boundaries. In Japanese you actually segment into morphemes, but the task is usually referred to as word segmentation in the litterature.\n\nI haven't seen that paper, it looks very interesting, thank you.","timestamp":"2016-07-03T17:49:00+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_dfaac54c3eb80f80","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c371c9503652322d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d4w295n","thanks_reply_id":"d4wdd4u","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4f7698cba224cddc","answerer_user_id":"anon_5a1f683434d025b7","subreddit":"LanguageTechnology","timestamp":"2016-09-05T17:01:50+00:00","post_id":"51ad4z","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_4f7698cba224cddc","comment_id":"51ad4z","kind":"post","text":"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) ?","timestamp":"2016-09-05T17:01:50+00:00","score":11},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"d7ajauu","kind":"comment","text":"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.","timestamp":"2016-09-05T18:44:10+00:00","score":7},{"role":"OP","user_id":"anon_4f7698cba224cddc","comment_id":"d7baoyh","kind":"comment","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.","timestamp":"2016-09-06T09:16:29+00:00","score":2},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"d7bhlmm","kind":"comment","text":"Yeah scale is kind of best described logarithmic and relatively. LDA has more principled usage and definition, especially at test time, but empirically I've found LSA to be *so* much faster and more useful in downstream tasks (the orthogonality is really useful as input to another ML algorithm). My corpora is usually in the 5-10B word range (30-60gb uncompressed). This is \"large\" for my department (where we have a few researchers working with in robot dialogue, tiny corpora!), but tiny for google, ya? And I see a whole bunch of NIPS papers basically running on PTB (about 5M words, tiny!)","timestamp":"2016-09-06T14:11:55+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4f7698cba224cddc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5a1f683434d025b7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d7ajauu","thanks_reply_id":"d7baoyh","post_score":11,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_1238a10e0569a83f","answerer_user_id":"anon_5a1f683434d025b7","subreddit":"LanguageTechnology","timestamp":"2016-09-10T18:48:10+00:00","post_id":"524i92","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_1238a10e0569a83f","comment_id":"524i92","kind":"post","text":"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.","timestamp":"2016-09-10T18:48:10+00:00","score":7},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"d7hhnrn","kind":"comment","text":"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.","timestamp":"2016-09-10T22:48:10+00:00","score":5},{"role":"OP","user_id":"anon_1238a10e0569a83f","comment_id":"d7hixyh","kind":"comment","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.","timestamp":"2016-09-10T23:23:08+00:00","score":1},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"d7ia3nf","kind":"comment","text":"Oh nice, good luck!","timestamp":"2016-09-11T16:01:40+00:00","score":1},{"role":"OP","user_id":"anon_1238a10e0569a83f","comment_id":"dbxx43u","kind":"comment","text":"Sigh, my paper was rejected. Although I received great scores on many rubrics, the main criticism given by the reviewers was regarding my test harness. Now I am going to try my best for ACL. Also, I have started applying to NLP grad schools in Europe.","timestamp":"2017-01-03T12:51:46+00:00","score":1},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"dby0e8b","kind":"comment","text":"Aw, keep your head up. Paper rejection is constant, and peer review can often be a total dice roll. Good luck!","timestamp":"2017-01-03T14:42:20+00:00","score":2},{"role":"OP","user_id":"anon_1238a10e0569a83f","comment_id":"dbzhglo","kind":"comment","text":"Thanks. Good luck to you too (if you are submitting anything to this ACL).","timestamp":"2017-01-04T13:11:09+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_1238a10e0569a83f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5a1f683434d025b7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d7hhnrn","thanks_reply_id":"d7hixyh","post_score":7,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_7e8f1be453a38f6d","answerer_user_id":"anon_0d04e7a637802850","subreddit":"LanguageTechnology","timestamp":"2016-10-02T23:35:50+00:00","post_id":"55kxbz","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_7e8f1be453a38f6d","comment_id":"55kxbz","kind":"post","text":"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!","timestamp":"2016-10-02T23:35:50+00:00","score":3},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"d8bma6j","kind":"comment","text":"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.","timestamp":"2016-10-03T02:18:06+00:00","score":2},{"role":"OP","user_id":"anon_7e8f1be453a38f6d","comment_id":"d8cm6ok","kind":"comment","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.","timestamp":"2016-10-03T20:40:16+00:00","score":1},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"d8d6njx","kind":"comment","text":"Fyi I noticed someone suggested the Veterbi algorithm and that is the same as the forward backward algorithm. I don't think you need error examples for training. In fact, that would only create noise in your n-gram weights","timestamp":"2016-10-04T05:12:51+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7e8f1be453a38f6d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0d04e7a637802850","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d8bma6j","thanks_reply_id":"d8cm6ok","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_92fa1b5fde75183d","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2016-11-13T16:03:55+00:00","post_id":"5cqjhm","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_92fa1b5fde75183d","comment_id":"5cqjhm","kind":"post","text":"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.","timestamp":"2016-11-13T16:03:55+00:00","score":9},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"d9ylh4m","kind":"comment","text":"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.","timestamp":"2016-11-13T17:15:58+00:00","score":1},{"role":"OP","user_id":"anon_92fa1b5fde75183d","comment_id":"d9ymysh","kind":"comment","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.","timestamp":"2016-11-13T17:52:05+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"d9ynuvr","kind":"comment","text":"> 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.","timestamp":"2016-11-13T18:12:38+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_92fa1b5fde75183d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"d9ylh4m","thanks_reply_id":"d9ymysh","post_score":9,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_4822aeda8297c46c","answerer_user_id":"anon_4f7698cba224cddc","subreddit":"LanguageTechnology","timestamp":"2017-02-02T10:10:29+00:00","post_id":"5rlygi","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"5rlygi","kind":"post","text":"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.","timestamp":"2017-02-02T10:10:29+00:00","score":3},{"role":"answerer","user_id":"anon_4f7698cba224cddc","comment_id":"dd8bp9i","kind":"comment","text":"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.","timestamp":"2017-02-02T11:03:55+00:00","score":3},{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"dd8l5lh","kind":"comment","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.","timestamp":"2017-02-02T15:38:52+00:00","score":1},{"role":"answerer","user_id":"anon_4f7698cba224cddc","comment_id":"dd8li7n","kind":"comment","text":"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/","timestamp":"2017-02-02T15:45:43+00:00","score":1},{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"dd8mu7y","kind":"comment","text":"Thanks!","timestamp":"2017-02-02T16:11:06+00:00","score":1},{"role":"answerer","user_id":"anon_4f7698cba224cddc","comment_id":"ddhby88","kind":"comment","text":"Also this update this morning: https://www.reddit.com/r/MachineLearning/comments/5sgkuo/p_a_few_days_ago_i_posted_my_rapsong_writing/","timestamp":"2017-02-08T09:34:40+00:00","score":2},{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"ddkkmdw","kind":"comment","text":"thanks for your update!","timestamp":"2017-02-10T12:37:59+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_4822aeda8297c46c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4f7698cba224cddc","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dd8bp9i","thanks_reply_id":"dd8l5lh","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_9f7e262baef4dba2","answerer_user_id":"anon_69d84e8742c798e9","subreddit":"LanguageTechnology","timestamp":"2017-03-08T17:58:34+00:00","post_id":"5y9fxk","question":"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?","full_conversation":[{"role":"OP","user_id":"anon_9f7e262baef4dba2","comment_id":"5y9fxk","kind":"post","text":"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?","timestamp":"2017-03-08T17:58:34+00:00","score":5},{"role":"answerer","user_id":"anon_69d84e8742c798e9","comment_id":"depiocm","kind":"comment","text":"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?","timestamp":"2017-03-09T14:41:45+00:00","score":2},{"role":"OP","user_id":"anon_9f7e262baef4dba2","comment_id":"deplx5k","kind":"comment","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?","timestamp":"2017-03-09T15:47:26+00:00","score":1},{"role":"answerer","user_id":"anon_69d84e8742c798e9","comment_id":"depmrg6","kind":"comment","text":"I don't know about the price, but considering that this is enterprise-level technology, I suspect it's a lot higher than what an individual can afford.","timestamp":"2017-03-09T16:03:27+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9f7e262baef4dba2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_69d84e8742c798e9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"depiocm","thanks_reply_id":"deplx5k","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_b9212bed99a39b4c","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2017-03-18T13:46:09+00:00","post_id":"6045ab","question":"[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)","full_conversation":[{"role":"OP","user_id":"anon_b9212bed99a39b4c","comment_id":"6045ab","kind":"post","text":"[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.","timestamp":"2017-03-18T13:46:09+00:00","score":2},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"df3mdpx","kind":"comment","text":"Jason Balridge has worked extensively on that, I highly recommend you perusing his papers (I am not Jason Balridge)","timestamp":"2017-03-18T18:35:18+00:00","score":4},{"role":"OP","user_id":"anon_b9212bed99a39b4c","comment_id":"df4dchw","kind":"comment","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?","timestamp":"2017-03-19T05:39:54+00:00","score":2},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"df500kf","kind":"comment","text":"Yes please do :-) Disclaimer: am no expert!","timestamp":"2017-03-19T18:41:28+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b9212bed99a39b4c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"df3mdpx","thanks_reply_id":"df4dchw","post_score":2,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_bfa91b6a265f7dcf","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2017-03-22T13:16:41+00:00","post_id":"60uize","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_bfa91b6a265f7dcf","comment_id":"60uize","kind":"post","text":"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.","timestamp":"2017-03-22T13:16:41+00:00","score":5},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dfcgrdl","kind":"comment","text":"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.","timestamp":"2017-03-24T11:28:12+00:00","score":2},{"role":"OP","user_id":"anon_bfa91b6a265f7dcf","comment_id":"dfcgt00","kind":"comment","text":"I really appreciate your help.","timestamp":"2017-03-24T11:30:02+00:00","score":2},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dfcii3v","kind":"comment","text":"It's nothing, just curiosity, thanks for posting this!","timestamp":"2017-03-24T12:29:01+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bfa91b6a265f7dcf","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dfcgrdl","thanks_reply_id":"dfcgt00","post_score":5,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_b31c6010d9e719b7","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2017-04-19T10:20:57+00:00","post_id":"669bon","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_b31c6010d9e719b7","comment_id":"669bon","kind":"post","text":"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 ?","timestamp":"2017-04-19T10:20:57+00:00","score":2},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"dggox4d","kind":"comment","text":"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.","timestamp":"2017-04-19T11:38:54+00:00","score":1},{"role":"OP","user_id":"anon_b31c6010d9e719b7","comment_id":"dggpi9x","kind":"comment","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?","timestamp":"2017-04-19T11:58:14+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"dggq873","kind":"comment","text":"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.","timestamp":"2017-04-19T12:19:51+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b31c6010d9e719b7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dggox4d","thanks_reply_id":"dggpi9x","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_03ef50f966d6fee6","answerer_user_id":"anon_0974ef6c81544596","subreddit":"LanguageTechnology","timestamp":"2017-04-24T17:59:32+00:00","post_id":"67aqus","question":"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)","full_conversation":[{"role":"OP","user_id":"anon_03ef50f966d6fee6","comment_id":"67aqus","kind":"post","text":"Online tool for ngram frequency?\n\nIs there a tool available online that will calculate the probabilities of a string of text?","timestamp":"2017-04-24T17:59:32+00:00","score":2},{"role":"answerer","user_id":"anon_0974ef6c81544596","comment_id":"dgoyp7p","kind":"comment","text":"[google ngram viewer](http://storage.googleapis.com/books/ngrams/books/datasetsv2.html)","timestamp":"2017-04-24T18:11:39+00:00","score":1},{"role":"OP","user_id":"anon_03ef50f966d6fee6","comment_id":"dgp2o3z","kind":"comment","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.","timestamp":"2017-04-24T19:23:35+00:00","score":1},{"role":"answerer","user_id":"anon_0974ef6c81544596","comment_id":"dgp4ll7","kind":"comment","text":"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.","timestamp":"2017-04-24T19:58:14+00:00","score":1},{"role":"OP","user_id":"anon_03ef50f966d6fee6","comment_id":"dgpo74p","kind":"comment","text":"Ok, thanks","timestamp":"2017-04-25T02:47:01+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_03ef50f966d6fee6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0974ef6c81544596","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dgoyp7p","thanks_reply_id":"dgp2o3z","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_952a1c13a1acfd32","answerer_user_id":"anon_8a16d3ba79228c63","subreddit":"LanguageTechnology","timestamp":"2017-04-25T17:44:13+00:00","post_id":"67i5x3","question":"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!","full_conversation":[{"role":"OP","user_id":"anon_952a1c13a1acfd32","comment_id":"67i5x3","kind":"post","text":"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","timestamp":"2017-04-25T17:44:13+00:00","score":4},{"role":"answerer","user_id":"anon_8a16d3ba79228c63","comment_id":"dgtd0zw","kind":"comment","text":"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!","timestamp":"2017-04-27T10:16:43+00:00","score":2},{"role":"OP","user_id":"anon_952a1c13a1acfd32","comment_id":"dgtysia","kind":"comment","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 ;)","timestamp":"2017-04-27T18:20:08+00:00","score":1},{"role":"answerer","user_id":"anon_8a16d3ba79228c63","comment_id":"dgv28wo","kind":"comment","text":"Oh this is a perfect visualization. Remember - N dimensions are mapped to 3d space. It can be good, but also not work at all. \n\nIt depends on what exactly is your output now: a few numbers? Or just 1 number, the number of category?","timestamp":"2017-04-28T12:11:51+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_952a1c13a1acfd32","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a16d3ba79228c63","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dgtd0zw","thanks_reply_id":"dgtysia","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_3972481bcef8fb1c","answerer_user_id":"anon_272d9a34773f0bee","subreddit":"LanguageTechnology","timestamp":"2017-05-04T02:07:57+00:00","post_id":"694u26","question":"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).","full_conversation":[{"role":"OP","user_id":"anon_3972481bcef8fb1c","comment_id":"694u26","kind":"post","text":"Discourse Segmentation (by topic) Dataset\n\nDo you guys know of any free dataset for this task?","timestamp":"2017-05-04T02:07:57+00:00","score":3},{"role":"answerer","user_id":"anon_272d9a34773f0bee","comment_id":"dh40bj7","kind":"comment","text":"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).","timestamp":"2017-05-04T05:49:53+00:00","score":3},{"role":"OP","user_id":"anon_3972481bcef8fb1c","comment_id":"dh4zi17","kind":"comment","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 :)","timestamp":"2017-05-04T20:49:27+00:00","score":1},{"role":"answerer","user_id":"anon_272d9a34773f0bee","comment_id":"dh5ow9y","kind":"comment","text":"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/","timestamp":"2017-05-05T07:36:25+00:00","score":2},{"role":"OP","user_id":"anon_3972481bcef8fb1c","comment_id":"dh5pp3i","kind":"comment","text":"Thanks a lot! These look promising :)","timestamp":"2017-05-05T08:13:41+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_3972481bcef8fb1c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_272d9a34773f0bee","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dh40bj7","thanks_reply_id":"dh4zi17","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_215583d3fea9b5dd","answerer_user_id":"anon_0d04e7a637802850","subreddit":"LanguageTechnology","timestamp":"2017-05-09T03:45:25+00:00","post_id":"6a33od","question":"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)","full_conversation":[{"role":"OP","user_id":"anon_215583d3fea9b5dd","comment_id":"6a33od","kind":"post","text":"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?","timestamp":"2017-05-09T03:45:25+00:00","score":3},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"dhbneyb","kind":"comment","text":"\"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)","timestamp":"2017-05-09T10:50:32+00:00","score":1},{"role":"OP","user_id":"anon_215583d3fea9b5dd","comment_id":"dhbnv51","kind":"comment","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.","timestamp":"2017-05-09T11:09:04+00:00","score":4},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"dhbom7i","kind":"comment","text":"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/","timestamp":"2017-05-09T11:37:51+00:00","score":1},{"role":"OP","user_id":"anon_215583d3fea9b5dd","comment_id":"dhbyqg8","kind":"comment","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 :)","timestamp":"2017-05-09T15:35:29+00:00","score":1},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"dhbz9ag","kind":"comment","text":"Tensorflow is an excellent implementation to bring up! I always forget about it myself.","timestamp":"2017-05-09T15:45:06+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_215583d3fea9b5dd","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0d04e7a637802850","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dhbneyb","thanks_reply_id":"dhbnv51","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_215583d3fea9b5dd","answerer_user_id":"anon_f2030906f6e83b59","subreddit":"LanguageTechnology","timestamp":"2017-05-22T18:04:56+00:00","post_id":"6cox10","question":"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","full_conversation":[{"role":"OP","user_id":"anon_215583d3fea9b5dd","comment_id":"6cox10","kind":"post","text":"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.","timestamp":"2017-05-22T18:04:56+00:00","score":6},{"role":"answerer","user_id":"anon_f2030906f6e83b59","comment_id":"dhwiy19","kind":"comment","text":"Not sure if this is exactly what you're looking for but I saw this yesterday. https://research.google.com/pubs/pub46055.html","timestamp":"2017-05-22T21:22:32+00:00","score":2},{"role":"OP","user_id":"anon_215583d3fea9b5dd","comment_id":"dhx3k7i","kind":"comment","text":"Thank you! This is a really helpful paper, it is very close to my subject.","timestamp":"2017-05-23T05:00:36+00:00","score":1},{"role":"answerer","user_id":"anon_f2030906f6e83b59","comment_id":"dhx4p5k","kind":"comment","text":"that's great! i'm glad i could help. you should also read the papers they cite and you should be good","timestamp":"2017-05-23T05:38:57+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_215583d3fea9b5dd","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f2030906f6e83b59","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dhwiy19","thanks_reply_id":"dhx3k7i","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4822aeda8297c46c","answerer_user_id":"anon_c371c9503652322d","subreddit":"LanguageTechnology","timestamp":"2017-05-31T15:06:09+00:00","post_id":"6efjdc","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"6efjdc","kind":"post","text":"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.","timestamp":"2017-05-31T15:06:09+00:00","score":3},{"role":"answerer","user_id":"anon_c371c9503652322d","comment_id":"di9ykhz","kind":"comment","text":"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.","timestamp":"2017-05-31T16:13:13+00:00","score":2},{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"dia12j4","kind":"comment","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?","timestamp":"2017-05-31T16:58:25+00:00","score":1},{"role":"answerer","user_id":"anon_c371c9503652322d","comment_id":"dia1i01","kind":"comment","text":"Outputting the word it's seen the most it's what it'll do at the start of training. If you are using beam search then you must at least be getting some words which are not unk?","timestamp":"2017-05-31T17:06:16+00:00","score":1},{"role":"OP","user_id":"anon_4822aeda8297c46c","comment_id":"diaw33m","kind":"comment","text":"Now I got some tokens rather than UNK. But it takes me really long time. If I use more data, would it takes less time to get a better result?","timestamp":"2017-06-01T03:11:29+00:00","score":1},{"role":"answerer","user_id":"anon_c371c9503652322d","comment_id":"dib1bw0","kind":"comment","text":"Sounds like you just need to train more. 100 is *nowhere* near enough samples but you should at least be able to overfit these. Try playing with the learning late.","timestamp":"2017-06-01T05:39:57+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_4822aeda8297c46c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c371c9503652322d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"di9ykhz","thanks_reply_id":"dia12j4","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_7854006369b393c7","answerer_user_id":"anon_96aed32009af2e49","subreddit":"LanguageTechnology","timestamp":"2017-06-22T10:50:26+00:00","post_id":"6ispw1","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_7854006369b393c7","comment_id":"6ispw1","kind":"post","text":"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 ?","timestamp":"2017-06-22T10:50:26+00:00","score":3},{"role":"answerer","user_id":"anon_96aed32009af2e49","comment_id":"dj8ucpl","kind":"comment","text":"[This](https://github.com/syhw/wer_are_we) is good place to start looking.","timestamp":"2017-06-22T12:54:24+00:00","score":2},{"role":"OP","user_id":"anon_7854006369b393c7","comment_id":"dj8uig5","kind":"comment","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 ?","timestamp":"2017-06-22T12:58:30+00:00","score":1},{"role":"answerer","user_id":"anon_96aed32009af2e49","comment_id":"dj8v9pk","kind":"comment","text":"They report 7.2 WER on test-clean (Librispeech) vs. 5.3 for DS2. That would put it on the high end of the Librispeech table.","timestamp":"2017-06-22T13:16:32+00:00","score":1},{"role":"OP","user_id":"anon_7854006369b393c7","comment_id":"dj8w6qi","kind":"comment","text":"So it should be on the git page.","timestamp":"2017-06-22T13:37:16+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_7854006369b393c7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_96aed32009af2e49","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dj8ucpl","thanks_reply_id":"dj8uig5","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_9207c4d79f213e6e","answerer_user_id":"anon_ac90b363a014b6f9","subreddit":"LanguageTechnology","timestamp":"2017-06-26T23:17:37+00:00","post_id":"6jorvl","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_9207c4d79f213e6e","comment_id":"6jorvl","kind":"post","text":"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!","timestamp":"2017-06-26T23:17:37+00:00","score":6},{"role":"answerer","user_id":"anon_ac90b363a014b6f9","comment_id":"djgc1u0","kind":"comment","text":"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.","timestamp":"2017-06-27T06:27:26+00:00","score":2},{"role":"OP","user_id":"anon_9207c4d79f213e6e","comment_id":"djhwtks","kind":"comment","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.","timestamp":"2017-06-28T04:20:04+00:00","score":1},{"role":"answerer","user_id":"anon_ac90b363a014b6f9","comment_id":"djiw5jl","kind":"comment","text":"By \"manually compute a bunch of results\" you mean annotating a dataset manually? No, you don't need to do that. However you will probably have to spend a lot of time collecting and cleaning the data. You can try to see what kind of results you get with the data you have now; that could give an estimate of how much work you have ahead of you.","timestamp":"2017-06-28T19:28:08+00:00","score":2},{"role":"OP","user_id":"anon_9207c4d79f213e6e","comment_id":"djj898b","kind":"comment","text":"By manually compute a bunch of results, I mean having to tell the model what's the \"right answer\" for a given work experience description and a bunch of job postings. \n\nAre there any methods I can use to implement document similarity at the moment that don't require training a model and collecting/cleaning lot's of data? \n\nI probably will want to do that eventually, but I don't think I have enough time to dedicate towards all that data collection/cleaning at the moment.","timestamp":"2017-06-28T23:14:19+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_9207c4d79f213e6e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ac90b363a014b6f9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"djgc1u0","thanks_reply_id":"djhwtks","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_386ebe78dd81e0ca","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2017-08-21T17:50:39+00:00","post_id":"6v4mwq","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_386ebe78dd81e0ca","comment_id":"6v4mwq","kind":"post","text":"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!","timestamp":"2017-08-21T17:50:39+00:00","score":2},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dlyl81c","kind":"comment","text":"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.","timestamp":"2017-08-22T08:40:59+00:00","score":2},{"role":"OP","user_id":"anon_386ebe78dd81e0ca","comment_id":"dlzex2p","kind":"comment","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).","timestamp":"2017-08-22T20:03:22+00:00","score":2},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dm0nyme","kind":"comment","text":"If you use 2.0 which is not yet released but available as an alpha, lemmatisation for Swedish is there.\n\nhttps://github.com/explosion/spacy/issues/1105\n\n> Lookup-based lemmatization for English, German, French, Spanish, Italian, Hungarian, Portuguese and Swedish.","timestamp":"2017-08-23T15:07:58+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_386ebe78dd81e0ca","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dlyl81c","thanks_reply_id":"dlzex2p","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4adeccec53f130b2","answerer_user_id":"anon_ba4367c0fc882fa0","subreddit":"LanguageTechnology","timestamp":"2017-09-06T16:57:26+00:00","post_id":"6ygw5j","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_4adeccec53f130b2","comment_id":"6ygw5j","kind":"post","text":"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.","timestamp":"2017-09-06T16:57:26+00:00","score":6},{"role":"answerer","user_id":"anon_ba4367c0fc882fa0","comment_id":"dmnva8q","kind":"comment","text":"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.","timestamp":"2017-09-07T00:00:54+00:00","score":4},{"role":"OP","user_id":"anon_4adeccec53f130b2","comment_id":"dmo5ncw","kind":"comment","text":"Okay thanks for the explanation. But how do we decide the right threshold number for the experiment?","timestamp":"2017-09-07T03:57:26+00:00","score":1},{"role":"answerer","user_id":"anon_ba4367c0fc882fa0","comment_id":"dmomfdq","kind":"comment","text":"Figuring out the right threshold (or any of the various mysterious numbers used in machine-learning) is called \"hyperparameter optimization.\" That's another fancy name for \"trying a bunch of values until you get results you like\".\n\nIn other words, there's no \"right\" answer. I just implemented this the other day and used 2 as the threshold. (tokens in 3+ documents get retained; only 1 or 2 get discarded).","timestamp":"2017-09-07T13:47:16+00:00","score":2},{"role":"OP","user_id":"anon_4adeccec53f130b2","comment_id":"dmoud2l","kind":"comment","text":"Okay I think I get it. But what step do you do after that? Do you still implement TF IDF after this? Or it's already enough?","timestamp":"2017-09-07T16:21:09+00:00","score":1},{"role":"answerer","user_id":"anon_ba4367c0fc882fa0","comment_id":"dmouq7l","kind":"comment","text":"You're calculating a TFIDF value for each term, probably just by looping over a big list of terms. In whatever way you're calculating the TFIDF, you should just add an if statement, substituting a value of 0 when the document frequency is less than your chosen threshold. (Then look at the results and see if they look good or not.)","timestamp":"2017-09-07T16:27:53+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_4adeccec53f130b2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ba4367c0fc882fa0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dmnva8q","thanks_reply_id":"dmo5ncw","post_score":6,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_458f418255e54274","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2017-09-08T18:08:58+00:00","post_id":"6ywhw9","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_458f418255e54274","comment_id":"6ywhw9","kind":"post","text":"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)?","timestamp":"2017-09-08T18:08:58+00:00","score":4},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dmt5fwo","kind":"comment","text":"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.","timestamp":"2017-09-10T11:51:01+00:00","score":2},{"role":"OP","user_id":"anon_458f418255e54274","comment_id":"dmuo426","kind":"comment","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?","timestamp":"2017-09-11T11:35:19+00:00","score":1},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dmv65pz","kind":"comment","text":"It depends on the corpus size and distribution.\n\nBut how will you verify them anyway?","timestamp":"2017-09-11T18:05:35+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_458f418255e54274","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dmt5fwo","thanks_reply_id":"dmuo426","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_217cf523d4bb4b57","answerer_user_id":"anon_47bc5e0803abfa2f","subreddit":"LanguageTechnology","timestamp":"2017-09-18T15:04:20+00:00","post_id":"70vkql","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_217cf523d4bb4b57","comment_id":"70vkql","kind":"post","text":"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!","timestamp":"2017-09-18T15:04:20+00:00","score":7},{"role":"answerer","user_id":"anon_47bc5e0803abfa2f","comment_id":"dn9ec3j","kind":"comment","text":"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.","timestamp":"2017-09-20T14:02:20+00:00","score":2},{"role":"OP","user_id":"anon_217cf523d4bb4b57","comment_id":"dn9fe4f","kind":"comment","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.","timestamp":"2017-09-20T14:23:22+00:00","score":1},{"role":"answerer","user_id":"anon_47bc5e0803abfa2f","comment_id":"dn9klib","kind":"comment","text":"How much data do you have? \n\nYou could also try using word embeddings if you haven't looked into that. SpaCy has GloVe embeddings built in or you could look into other ones like Facebooks recent FastText. You can take the average of all word vectors to get a \"doc\" vector. Or take the sentence vectors and compile them all, reshape them (either pad them or cut them off) to a uniform shape and then feed that into a model/voting classified/NN.","timestamp":"2017-09-20T15:58:39+00:00","score":2},{"role":"OP","user_id":"anon_217cf523d4bb4b57","comment_id":"dn9n3wh","kind":"comment","text":"I am still using the small dataset sampled from my real data for the experiment, which consists of like 1000 documents that will produce around 100k features. But eventually I will use like 30k documents, that probably will produce hundred thousands of features. That'll be quite heavy computation for my laptop lol. \n\nI just looked a little bit on word embedding. Seems interesting to me. I'll look more into it. So do you think it's a good idea to use word embedding for my case? Or is it quite overkill?","timestamp":"2017-09-20T16:43:03+00:00","score":1},{"role":"answerer","user_id":"anon_47bc5e0803abfa2f","comment_id":"dn9r83b","kind":"comment","text":"Text classification is a tough subject, and it's possible you exhaust all means and end up with 65% accuracy. So it depends on how committed you are to the project. Word embedding is the newest breakthough in NLP so it would certainly be worth learning about if you're interested. \n\nAlso with 30,000 documents that's enough for a deep learning model to be viable. Look into LSTMs and using Keras if you want to go that route","timestamp":"2017-09-20T17:55:27+00:00","score":2},{"role":"OP","user_id":"anon_217cf523d4bb4b57","comment_id":"dn9siyy","kind":"comment","text":"Yeah, it's like i just recently realized that text classification is a tough subject lol. There are still a lot of things I don't know about and need to learn. I'll definitely look into those things you mention. Thanks for the suggestion!","timestamp":"2017-09-20T18:18:17+00:00","score":1},{"role":"answerer","user_id":"anon_47bc5e0803abfa2f","comment_id":"dna7epj","kind":"comment","text":"No problem I can definitely relate. It's an interesting field that's constantly changing fast.","timestamp":"2017-09-20T22:44:57+00:00","score":2}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_217cf523d4bb4b57","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_47bc5e0803abfa2f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dn9ec3j","thanks_reply_id":"dn9fe4f","post_score":7,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_03ef50f966d6fee6","answerer_user_id":"anon_814e5d245e3e3083","subreddit":"LanguageTechnology","timestamp":"2017-10-12T15:33:46+00:00","post_id":"75xrhl","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_03ef50f966d6fee6","comment_id":"75xrhl","kind":"post","text":"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?","timestamp":"2017-10-12T15:33:46+00:00","score":10},{"role":"answerer","user_id":"anon_814e5d245e3e3083","comment_id":"dojb0yk","kind":"comment","text":"No. You start a server running a java model and then, separately, use python to hit that server with a request.","timestamp":"2017-10-18T12:42:46+00:00","score":1},{"role":"OP","user_id":"anon_03ef50f966d6fee6","comment_id":"dojegzx","kind":"comment","text":"Thanks. What would that look like?","timestamp":"2017-10-18T14:00:26+00:00","score":1},{"role":"answerer","user_id":"anon_814e5d245e3e3083","comment_id":"doknga6","kind":"comment","text":"Read my comment above. I already described it.","timestamp":"2017-10-19T03:44:26+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_03ef50f966d6fee6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_814e5d245e3e3083","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dojb0yk","thanks_reply_id":"dojegzx","post_score":10,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_fc07276a1049e6dc","answerer_user_id":"anon_8c790bd1b7a0d72f","subreddit":"LanguageTechnology","timestamp":"2017-10-24T23:45:51+00:00","post_id":"78jutk","question":"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 :)","full_conversation":[{"role":"OP","user_id":"anon_fc07276a1049e6dc","comment_id":"78jutk","kind":"post","text":"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","timestamp":"2017-10-24T23:45:51+00:00","score":5},{"role":"answerer","user_id":"anon_8c790bd1b7a0d72f","comment_id":"dtfcdzv","kind":"comment","text":"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 :)","timestamp":"2018-01-29T19:30:27+00:00","score":3},{"role":"OP","user_id":"anon_fc07276a1049e6dc","comment_id":"dtff2tr","kind":"comment","text":"Would really appreciate it!","timestamp":"2018-01-29T20:12:40+00:00","score":2},{"role":"answerer","user_id":"anon_8c790bd1b7a0d72f","comment_id":"dux5a5c","kind":"comment","text":"Hey, update, the suggestion/idea I'm currently running on is using [multiple linear regression](https://machinelearningmastery.com/linear-regression-for-machine-learning/) to predict the OCEAN scores since they're all discrete values.","timestamp":"2018-02-27T19:23:06+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fc07276a1049e6dc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8c790bd1b7a0d72f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dtfcdzv","thanks_reply_id":"dtff2tr","post_score":5,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_4d08ce622074971d","answerer_user_id":"anon_af9e2ce3f61d7c71","subreddit":"LanguageTechnology","timestamp":"2017-11-20T14:03:56+00:00","post_id":"7e91w1","question":"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?","full_conversation":[{"role":"OP","user_id":"anon_4d08ce622074971d","comment_id":"7e91w1","kind":"post","text":"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?","timestamp":"2017-11-20T14:03:56+00:00","score":1},{"role":"answerer","user_id":"anon_af9e2ce3f61d7c71","comment_id":"dq6i89n","kind":"comment","text":"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?","timestamp":"2017-11-22T07:05:02+00:00","score":2},{"role":"OP","user_id":"anon_4d08ce622074971d","comment_id":"dq6ihjr","kind":"comment","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","timestamp":"2017-11-22T07:14:14+00:00","score":1},{"role":"answerer","user_id":"anon_af9e2ce3f61d7c71","comment_id":"dqcsoff","kind":"comment","text":"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.","timestamp":"2017-11-26T10:32:06+00:00","score":3},{"role":"OP","user_id":"anon_4d08ce622074971d","comment_id":"dqcumur","kind":"comment","text":"Ok thanks!","timestamp":"2017-11-26T12:12:01+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4d08ce622074971d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_af9e2ce3f61d7c71","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dq6i89n","thanks_reply_id":"dq6ihjr","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_dda83554f993dda9","answerer_user_id":"anon_d25654f4502f77ee","subreddit":"LanguageTechnology","timestamp":"2017-11-26T10:13:45+00:00","post_id":"7fm3rk","question":"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)","full_conversation":[{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"7fm3rk","kind":"post","text":"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!!","timestamp":"2017-11-26T10:13:45+00:00","score":3},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"dqdslki","kind":"comment","text":"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)","timestamp":"2017-11-27T00:27:24+00:00","score":1},{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"dqdwkoa","kind":"comment","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?","timestamp":"2017-11-27T01:50:53+00:00","score":1},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"dqey5c1","kind":"comment","text":"I'm pretty sure Google has them in alphabetical order yeah.\n\nI haven't checked but you might be able to just fit it all in memory in a hashtable for fast access. Depending on your needs you could just do the hashing trick to make it smaller.","timestamp":"2017-11-27T18:13:14+00:00","score":1},{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"dqfycfq","kind":"comment","text":"Could you explain it further? Are you saying put each ngram has the key in a HashTable and its frequency as the value when I preprocess the file? If this is what you are saying, wouldnt it take a long time when I try to put it in the HashTable?","timestamp":"2017-11-28T05:17:27+00:00","score":1},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"dqfz3l1","kind":"comment","text":"Yep that's right. Slow to load but you can process the input sequentially so it'll be as far as possible at least. Then all the accesses afterwards will be very fast if it fits in memory","timestamp":"2017-11-28T05:37:32+00:00","score":1},{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"dqfzjj5","kind":"comment","text":"So the point of this approach is to access the needed n-gram anytime after a long-time preprocessing? Is this right? The google ngram corpus are separate files. Do I have to preprocess each of these files and then put all of them into one single HashTable?","timestamp":"2017-11-28T05:49:44+00:00","score":1},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"dqfzvuu","kind":"comment","text":"yeah I don't know off hand how big they are, but if they're not too big then loading into a single hashtable makes it easy to access quickly","timestamp":"2017-11-28T05:59:04+00:00","score":1},{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"dqg0998","kind":"comment","text":"So the files are like eng-aa, eng-ab, eng-ac....eng-zz. Do I just put them into one single directory -> preprocess and put them into one single HashTable -> ngram becomes accessible. Does it work like this?","timestamp":"2017-11-28T06:09:26+00:00","score":1},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"dqgr0d8","kind":"comment","text":"Yep if the data is small enough that's always my first step cause it makes everything else easy and fast. If the data is too big, usually I start off by looking at whether I can prune the data somehow, like not load it all.\n\nOr actually the Google ngrams are common enough that someone might already have a library that does this in your language of choice.\n\nIf none of that works I'd probably implement something to do on-disk lookup via prefix plus binary search and wrap it with something like a 2gb cache of most commonly accessed ngrams.","timestamp":"2017-11-28T18:14:31+00:00","score":1}],"n_turns":10,"n_turns_after_thanks":7,"op_metadata":{"user_id":"anon_dda83554f993dda9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d25654f4502f77ee","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dqdslki","thanks_reply_id":"dqdwkoa","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_dda83554f993dda9","answerer_user_id":"anon_90c8fff2d76eb427","subreddit":"LanguageTechnology","timestamp":"2017-11-28T20:13:27+00:00","post_id":"7g723z","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"7g723z","kind":"post","text":"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?","timestamp":"2017-11-28T20:13:27+00:00","score":5},{"role":"answerer","user_id":"anon_90c8fff2d76eb427","comment_id":"dqh0eso","kind":"comment","text":"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.","timestamp":"2017-11-28T20:43:43+00:00","score":2},{"role":"OP","user_id":"anon_dda83554f993dda9","comment_id":"dqh1ml5","kind":"comment","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?","timestamp":"2017-11-28T21:02:26+00:00","score":1},{"role":"answerer","user_id":"anon_90c8fff2d76eb427","comment_id":"dqh1z2x","kind":"comment","text":"What you call is a sub-Sentence and its head word is its root. Determining head words is a tough task in the real of linguistics. Stanford NLP tools can help you, I personally use NLP for work, not academic papers, therefore prefer Google NLP API.\n\nDeciding on the head word of a given token depends on a lot of factors (part of speech, other words' pos, sentence structure, lemma, position, etc.)","timestamp":"2017-11-28T21:07:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_dda83554f993dda9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_90c8fff2d76eb427","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dqh0eso","thanks_reply_id":"dqh1ml5","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_adba5f01dd8d6af1","answerer_user_id":"anon_2472afc70e8d94f7","subreddit":"LanguageTechnology","timestamp":"2018-01-24T18:06:41+00:00","post_id":"7sp076","question":"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...","full_conversation":[{"role":"OP","user_id":"anon_adba5f01dd8d6af1","comment_id":"7sp076","kind":"post","text":"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).","timestamp":"2018-01-24T18:06:41+00:00","score":6},{"role":"answerer","user_id":"anon_2472afc70e8d94f7","comment_id":"dt78lli","kind":"comment","text":"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...","timestamp":"2018-01-25T02:56:25+00:00","score":2},{"role":"OP","user_id":"anon_adba5f01dd8d6af1","comment_id":"dt8thtv","kind":"comment","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\".","timestamp":"2018-01-25T23:10:50+00:00","score":1},{"role":"answerer","user_id":"anon_2472afc70e8d94f7","comment_id":"dt8yxzm","kind":"comment","text":"Hmm... I don't know of much, but if you find do find any interesting ones, I'd love to hear about it.\n\nHere's what I do know: Narrative Science and Automated Insights are two U.S. companies that do this; they may have some blogposts explaining their tech. (Though I've heard rumors that software like SimpleNLG is more advanced than a lot of their tech...) Bloomberg also does this, but I think they're more secretive about it.\n\nFrom what I hear, Jurafsky and Martin's textbook is good for all-purpose NLP stuff and that book may be helpful for foundational text-processing tasks that you'll need to be familiar with to do a good job. (But you may know that stuff already.)","timestamp":"2018-01-26T00:50:12+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_adba5f01dd8d6af1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2472afc70e8d94f7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dt78lli","thanks_reply_id":"dt8thtv","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_bacb7df38fde88eb","answerer_user_id":"anon_7654f7b2f5826601","subreddit":"LanguageTechnology","timestamp":"2018-01-25T10:41:31+00:00","post_id":"7sv9th","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_bacb7df38fde88eb","comment_id":"7sv9th","kind":"post","text":"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)","timestamp":"2018-01-25T10:41:31+00:00","score":3},{"role":"answerer","user_id":"anon_7654f7b2f5826601","comment_id":"dt8kqva","kind":"comment","text":"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.","timestamp":"2018-01-25T20:50:44+00:00","score":4},{"role":"OP","user_id":"anon_bacb7df38fde88eb","comment_id":"dt91v92","kind":"comment","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","timestamp":"2018-01-26T01:45:09+00:00","score":2},{"role":"answerer","user_id":"anon_7654f7b2f5826601","comment_id":"dt924vt","kind":"comment","text":"Neat trick would be to download pretrained model (CoreNLP, and CV both) for english and then retraining it for a couple of epochs for your datasets otherwise just 100 images wouldn’t be helpful especially for NN approach.\nYou can go through the research papers that will enlighten you how to train state of art on your dataset as they did for english so yeah Transfer Learning may be of use here.","timestamp":"2018-01-26T01:50:09+00:00","score":1},{"role":"OP","user_id":"anon_bacb7df38fde88eb","comment_id":"dt9g4dm","kind":"comment","text":"At least how many images I'll need to train the model ? And, we are doing building this system for books printed in specific time period. That's why I said about 100 images.","timestamp":"2018-01-26T07:08:32+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_bacb7df38fde88eb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7654f7b2f5826601","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dt8kqva","thanks_reply_id":"dt91v92","post_score":3,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_5131bfd8814616c5","answerer_user_id":"anon_4bec59d9a3eec0c1","subreddit":"LanguageTechnology","timestamp":"2018-02-09T02:27:04+00:00","post_id":"7waaid","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_5131bfd8814616c5","comment_id":"7waaid","kind":"post","text":"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.","timestamp":"2018-02-09T02:27:04+00:00","score":8},{"role":"answerer","user_id":"anon_4bec59d9a3eec0c1","comment_id":"dtys5ds","kind":"comment","text":"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.","timestamp":"2018-02-09T02:33:55+00:00","score":6},{"role":"OP","user_id":"anon_5131bfd8814616c5","comment_id":"dtzngso","kind":"comment","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?","timestamp":"2018-02-09T16:11:06+00:00","score":1},{"role":"answerer","user_id":"anon_4bec59d9a3eec0c1","comment_id":"dtzo09j","kind":"comment","text":"If you formulate a graph in which the vertices are documents and there are edges between those with a similarity above the threshold, each connected component in the graph is a set of documents that are all duplicates of one another (in your case, all from the same template).\n\nThere are \"chaining\" pathologies where this can fail, but if your threshold is high enough it ought to be fine.","timestamp":"2018-02-09T16:19:35+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_5131bfd8814616c5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4bec59d9a3eec0c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dtys5ds","thanks_reply_id":"dtzngso","post_score":8,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_978e380d38f4749b","answerer_user_id":"anon_bade6e0ebe970b29","subreddit":"LanguageTechnology","timestamp":"2018-02-10T07:16:17+00:00","post_id":"7wk1uz","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_978e380d38f4749b","comment_id":"7wk1uz","kind":"post","text":"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?","timestamp":"2018-02-10T07:16:17+00:00","score":2},{"role":"answerer","user_id":"anon_bade6e0ebe970b29","comment_id":"dueglbp","kind":"comment","text":"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.","timestamp":"2018-02-17T19:38:44+00:00","score":1},{"role":"OP","user_id":"anon_978e380d38f4749b","comment_id":"duesy0y","kind":"comment","text":"Thank you for your response. Have you had a good result with Seq2Seq?","timestamp":"2018-02-17T23:46:24+00:00","score":1},{"role":"answerer","user_id":"anon_bade6e0ebe970b29","comment_id":"duewndw","kind":"comment","text":"Seq2seq works well for me, but it takes longer to setup than your typical LDA. It depends on how much power you need.","timestamp":"2018-02-18T00:58:31+00:00","score":1},{"role":"OP","user_id":"anon_978e380d38f4749b","comment_id":"dugdrvk","kind":"comment","text":"So just to be clear, your suggestion is to take an LSTM layer, for example, and the hidden state of that layer as the input?","timestamp":"2018-02-18T19:22:17+00:00","score":1},{"role":"answerer","user_id":"anon_bade6e0ebe970b29","comment_id":"dugeyxu","kind":"comment","text":"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.","timestamp":"2018-02-18T19:44:23+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_978e380d38f4749b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bade6e0ebe970b29","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dueglbp","thanks_reply_id":"duesy0y","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_bf076bda3b00388c","answerer_user_id":"anon_e518594c00434d32","subreddit":"LanguageTechnology","timestamp":"2018-02-13T18:07:11+00:00","post_id":"7xbauv","question":"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).","full_conversation":[{"role":"OP","user_id":"anon_bf076bda3b00388c","comment_id":"7xbauv","kind":"post","text":"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","timestamp":"2018-02-13T18:07:11+00:00","score":7},{"role":"answerer","user_id":"anon_e518594c00434d32","comment_id":"du73gpu","kind":"comment","text":"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).","timestamp":"2018-02-13T20:03:54+00:00","score":2},{"role":"OP","user_id":"anon_bf076bda3b00388c","comment_id":"du75dm4","kind":"comment","text":"Thanks, as a student its a good reminder to think about different ways to solve a problem.","timestamp":"2018-02-13T20:32:09+00:00","score":1},{"role":"answerer","user_id":"anon_e518594c00434d32","comment_id":"du7afso","kind":"comment","text":"No problems. As a good rule of thumbs, you should alway annotate yourself a couple dozens of instances representing the problem you want to solve.\n\nThere are a surprising number of devils in the details of many ML tasks.","timestamp":"2018-02-13T21:48:57+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bf076bda3b00388c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e518594c00434d32","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"du73gpu","thanks_reply_id":"du75dm4","post_score":7,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_978e380d38f4749b","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2018-02-15T15:46:03+00:00","post_id":"7xr6qf","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_978e380d38f4749b","comment_id":"7xr6qf","kind":"post","text":"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.","timestamp":"2018-02-15T15:46:03+00:00","score":5},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"duc05fr","kind":"comment","text":"> 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.","timestamp":"2018-02-16T10:18:07+00:00","score":2},{"role":"OP","user_id":"anon_978e380d38f4749b","comment_id":"duc3241","kind":"comment","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.","timestamp":"2018-02-16T12:10:36+00:00","score":2},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"duc3vfc","kind":"comment","text":"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.","timestamp":"2018-02-16T12:35:50+00:00","score":2},{"role":"OP","user_id":"anon_978e380d38f4749b","comment_id":"ducka4c","kind":"comment","text":"Right. Thanks.","timestamp":"2018-02-16T17:33:47+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_978e380d38f4749b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"duc05fr","thanks_reply_id":"duc3241","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_3b6df4074f3a9fb9","answerer_user_id":"anon_8a37dea3c60e116f","subreddit":"LanguageTechnology","timestamp":"2018-02-22T17:28:20+00:00","post_id":"7zglza","question":"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","full_conversation":[{"role":"OP","user_id":"anon_3b6df4074f3a9fb9","comment_id":"7zglza","kind":"post","text":"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/","timestamp":"2018-02-22T17:28:20+00:00","score":3},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"dunzozj","kind":"comment","text":"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","timestamp":"2018-02-22T19:16:20+00:00","score":1},{"role":"OP","user_id":"anon_3b6df4074f3a9fb9","comment_id":"duoa8dp","kind":"comment","text":"Thanks! Do you recommend any other NER dataset to look into it ?","timestamp":"2018-02-22T21:54:35+00:00","score":1},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"dup50mw","kind":"comment","text":"Depends on your needs - which language, domain, etc.; where you are OK with paying for it; and whether the license (free vs. noncommercial) matters. Feel free to pick my brain!","timestamp":"2018-02-23T08:21:38+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3b6df4074f3a9fb9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a37dea3c60e116f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dunzozj","thanks_reply_id":"duoa8dp","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_1af612879f17679a","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2018-03-04T14:49:33+00:00","post_id":"81y1un","question":"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!","full_conversation":[{"role":"OP","user_id":"anon_1af612879f17679a","comment_id":"81y1un","kind":"post","text":"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!","timestamp":"2018-03-04T14:49:33+00:00","score":2},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"dv62tm4","kind":"comment","text":"> 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!","timestamp":"2018-03-04T15:47:55+00:00","score":2},{"role":"OP","user_id":"anon_1af612879f17679a","comment_id":"dv6aiit","kind":"comment","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.","timestamp":"2018-03-04T18:17:07+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"dv6bh02","kind":"comment","text":"Yeah, sorry. That's the thing: they managed to build systems that work OK and that don't need a whole lot of training data ;-)\n\nMy point was that if you find more data elsewhere, you could create your model and then see if it performs better than the other systems on a standardised benchmark.\n\nIf you are a member of a university, you might have access to the NYT corpus: https://catalog.ldc.upenn.edu/ldc2008t19 . Otherwise there's COCA (https://en.wikipedia.org/wiki/Corpus_of_Contemporary_American_English), but then it's AmE and not BrE.","timestamp":"2018-03-04T18:35:01+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1af612879f17679a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dv62tm4","thanks_reply_id":"dv6aiit","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_a5a06cfb03458d43","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2018-03-06T08:35:00+00:00","post_id":"82dkni","question":"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.","full_conversation":[{"role":"OP","user_id":"anon_a5a06cfb03458d43","comment_id":"82dkni","kind":"post","text":"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?","timestamp":"2018-03-06T08:35:00+00:00","score":3},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dv9d58o","kind":"comment","text":"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.","timestamp":"2018-03-06T10:18:03+00:00","score":2},{"role":"OP","user_id":"anon_a5a06cfb03458d43","comment_id":"dvvayk2","kind":"comment","text":"Thanks for your reply. It's good to hear that I'm not completely off base with this.","timestamp":"2018-03-17T23:43:36+00:00","score":2},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"dvxp3qk","kind":"comment","text":"We just ran a test on [the Amazon reviews dataset](https://www.kaggle.com/bittlingmayer/amazonreviews/) where we generated new rows with simple perturbations with some randomness. The perturbations were things like adding, removing, repeating and lowercasing chars.\n\nUsing fastText supervised with default params:\n\n10K (originals): 81.4%\n\n40K (originals + generated): 84.8%\n\n30K (generated): 84.5%\n\nThe test set had 600K. It is binary classification, both training and test are balanced 50/50.\n\nI would not read too much into this, because just lowercasing everything also helps on small datasets. Training on lowercased AND the originals helps a bit more, although it is not a common approach. It does seem logical that the perturbation approach can be fruitful when training dataset size is the bottleneck.\n\nWill see how it works for larger sets though. The practical drawback is that increasing a large dataset 10x or 100x also leads to longer training time. Maybe the accuracy boosts will allow other parameters to be optimised more for performance.","timestamp":"2018-03-19T11:53:19+00:00","score":2},{"role":"OP","user_id":"anon_a5a06cfb03458d43","comment_id":"dw2z7yr","kind":"comment","text":"Interesting.","timestamp":"2018-03-22T01:22:03+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a5a06cfb03458d43","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dv9d58o","thanks_reply_id":"dvvayk2","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_33dcb2d75fa5a3a5","answerer_user_id":"anon_b3e3ceea1be7b031","subreddit":"LanguageTechnology","timestamp":"2018-03-17T10:08:53+00:00","post_id":"852vo3","question":"What is the SOTA approach to sentiment analysis right now?","preferred_answer":"I believe it’s this: https://arxiv.org/abs/1801.06146","full_conversation":[{"role":"OP","user_id":"anon_33dcb2d75fa5a3a5","comment_id":"852vo3","kind":"post","text":"What is the SOTA approach to sentiment analysis right now?","timestamp":"2018-03-17T10:08:53+00:00","score":9},{"role":"answerer","user_id":"anon_b3e3ceea1be7b031","comment_id":"dvucbmj","kind":"comment","text":"I believe it’s this: https://arxiv.org/abs/1801.06146","timestamp":"2018-03-17T11:21:42+00:00","score":2},{"role":"OP","user_id":"anon_33dcb2d75fa5a3a5","comment_id":"dvur2og","kind":"comment","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.","timestamp":"2018-03-17T17:14:39+00:00","score":1},{"role":"answerer","user_id":"anon_b3e3ceea1be7b031","comment_id":"dvur5hd","kind":"comment","text":"I don't think so, not yet. I believe I've read somewhere that they're working on an update to the paper where they'll do an ablation study to see which things actually made a difference, so they might release the code then (fingers crossed).","timestamp":"2018-03-17T17:16:12+00:00","score":1},{"role":"OP","user_id":"anon_33dcb2d75fa5a3a5","comment_id":"dvv52kd","kind":"comment","text":"Anything near the SOTA that has code on github you know of?","timestamp":"2018-03-17T21:45:31+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_33dcb2d75fa5a3a5","author_flair_text":"","author_flair_css_class":"","author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b3e3ceea1be7b031","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dvucbmj","thanks_reply_id":"dvur2og","post_score":9,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_165d76f0c349cdb3","answerer_user_id":"anon_110210fcd490d0e6","subreddit":"LanguageTechnology","timestamp":"2018-03-24T21:32:45+00:00","post_id":"86w65p","question":"Abbreviation expansion for clinical terms\n\nI'm currently working on medical health records data and trying to clean it up. I've tried looking online for libraries on medical data and could only find one on GitHub and have heard about one on pubmed but couldn't find it. Are there any recommended libraries for expansion of medical/clinical abbreviations?","preferred_answer":"There is https://cwiki.apache.org/confluence/display/CTAKES/YTEX+Installation (the YTex module from CTakes) based on https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3756260/ but it's so-so. There's a bunch of academic literature out there, but nothing off the shelf. Still looking myself and several attempts of making it work (using word vectors and similarity) weren't really satisfactory either yet. If you manage to figure it out let me know :-)","full_conversation":[{"role":"OP","user_id":"anon_165d76f0c349cdb3","comment_id":"86w65p","kind":"post","text":"Abbreviation expansion for clinical terms\n\nI'm currently working on medical health records data and trying to clean it up. I've tried looking online for libraries on medical data and could only find one on GitHub and have heard about one on pubmed but couldn't find it. Are there any recommended libraries for expansion of medical/clinical abbreviations?","timestamp":"2018-03-24T21:32:45+00:00","score":3},{"role":"answerer","user_id":"anon_110210fcd490d0e6","comment_id":"dwauwgo","kind":"comment","text":"There is https://cwiki.apache.org/confluence/display/CTAKES/YTEX+Installation (the YTex module from CTakes) based on https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3756260/ but it's so-so. There's a bunch of academic literature out there, but nothing off the shelf. Still looking myself and several attempts of making it work (using word vectors and similarity) weren't really satisfactory either yet. If you manage to figure it out let me know :-)","timestamp":"2018-03-26T10:16:02+00:00","score":2},{"role":"OP","user_id":"anon_165d76f0c349cdb3","comment_id":"dwct708","kind":"comment","text":"Thanks! Sure - I'll be looking at this and [Clamp](http://clamp.uth.edu/) for now.","timestamp":"2018-03-27T10:02:40+00:00","score":1},{"role":"answerer","user_id":"anon_110210fcd490d0e6","comment_id":"dwctabf","kind":"comment","text":"Cool! Full disclosure: I'm building a comprehensive clinical data extraction tool for use with systematic and rapid reviews (been at it for about 2,5 years with team). If that falls in your line of interest and you ever need a job, just shout! Can always use more (intrinsically) motivated people to work on this hard problem!","timestamp":"2018-03-27T10:06:22+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_165d76f0c349cdb3","author_flair_text":"","author_flair_css_class":"","author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_110210fcd490d0e6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dwauwgo","thanks_reply_id":"dwct708","post_score":3,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_726f1e00b8aa8250","answerer_user_id":"anon_0f8f6d4e14ebce97","subreddit":"LanguageTechnology","timestamp":"2018-03-27T14:08:41+00:00","post_id":"87ioqc","question":"What's the best tool to find duplicate bank names?\n\nI'm developing a website with collection of data about banks (SWIFT, BIN, IFSC and other codes).\n\nThe main problem is that every data source gives slightly different names to the same banks. \n\nI'm using conventional regex and blacklists to clean up the names and remove unwanted words at the moment.\n\nBut it's getting more difficult with every new data source, because there're too many edge cases to cover.\n\n---\n\nBasically, I need to extract unique bank identifiers from the names and group the banks by them.\n\ne.g.\n\n CITIBANK N.A., \n CITIBANK A.G. Honk Kong Branch, \n Citibank International\n should all go under `CITIBANK`.\n\nor\n\n J.P. Morgan Securities Canada Inc. \n Jpmorgan Chase Bank (China) Company Limited Bejing Branch\n J.p. Morgan Services Gmbh \n \nshould all go under `J.P. Morgan`\n\n----\n\nUnfortunately, I have almost no experience with NLP, and only basic understanding of ML. \n\nTherefore, I'm a bit lost about what to use in my case.\n\nI've tried NER with Stanford NER, and it produced some positive results, but I'm not sure how to improve them further or if it's the right technique.","preferred_answer":"You can use [fuzzywuzy](https://marcobonzanini.com/2015/02/25/fuzzy-string-matching-in-python/) string matching. It exists in a few different languages.","full_conversation":[{"role":"OP","user_id":"anon_726f1e00b8aa8250","comment_id":"87ioqc","kind":"post","text":"What's the best tool to find duplicate bank names?\n\nI'm developing a website with collection of data about banks (SWIFT, BIN, IFSC and other codes).\n\nThe main problem is that every data source gives slightly different names to the same banks. \n\nI'm using conventional regex and blacklists to clean up the names and remove unwanted words at the moment.\n\nBut it's getting more difficult with every new data source, because there're too many edge cases to cover.\n\n---\n\nBasically, I need to extract unique bank identifiers from the names and group the banks by them.\n\ne.g.\n\n CITIBANK N.A., \n CITIBANK A.G. Honk Kong Branch, \n Citibank International\n should all go under `CITIBANK`.\n\nor\n\n J.P. Morgan Securities Canada Inc. \n Jpmorgan Chase Bank (China) Company Limited Bejing Branch\n J.p. Morgan Services Gmbh \n \nshould all go under `J.P. Morgan`\n\n----\n\nUnfortunately, I have almost no experience with NLP, and only basic understanding of ML. \n\nTherefore, I'm a bit lost about what to use in my case.\n\nI've tried NER with Stanford NER, and it produced some positive results, but I'm not sure how to improve them further or if it's the right technique.","timestamp":"2018-03-27T14:08:41+00:00","score":3},{"role":"answerer","user_id":"anon_0f8f6d4e14ebce97","comment_id":"dwd5bm2","kind":"comment","text":"You can use [fuzzywuzy](https://marcobonzanini.com/2015/02/25/fuzzy-string-matching-in-python/) string matching. It exists in a few different languages.","timestamp":"2018-03-27T14:48:16+00:00","score":2},{"role":"OP","user_id":"anon_726f1e00b8aa8250","comment_id":"dwd6gve","kind":"comment","text":"Thank you for the suggestion!\n\nI've tried something similar using Levenshtein distance, but it fails when one of the names have a lot of extra words, and produces false positives (e.g. Bank of Scotland vs Bank of Ireland)","timestamp":"2018-03-27T15:06:30+00:00","score":1},{"role":"answerer","user_id":"anon_0f8f6d4e14ebce97","comment_id":"dwd7zld","kind":"comment","text":"Fuzzy string matching is probably the most frustrating thing I've come across to be honest. But fuzzywuzzy does have a number of different options to try. For example, token_sort_ratio gives a much lower score for that match than the simple ratio function. I'd recommend keeping the scores of all the different algorithms and then looking at your results closely to see which ones give you the best results. Sometimes, you might have to actually combine several scores.","timestamp":"2018-03-27T15:30:10+00:00","score":2},{"role":"OP","user_id":"anon_726f1e00b8aa8250","comment_id":"dwd95vl","kind":"comment","text":"Yeah, I reckon that there's probably no silver bullet technique for this case and it'll take multiple algorithms to set the adequate score.\n\nThe most frustration aspect of fuzzy string matching and other similar \"dumb\" methods is that they don't have any context or meaning about targeted text. Making it difficult to separate useful parts of the names from the rest.\n\nThat's why I think that some kind of Named Entity Recognition or Classifier is needed anyway. Then the issue is how to train it properly.","timestamp":"2018-03-27T15:47:59+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_726f1e00b8aa8250","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":null,"author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0f8f6d4e14ebce97","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dwd5bm2","thanks_reply_id":"dwd6gve","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_02213df1bd4d3024","answerer_user_id":"anon_47dabbf436361b9a","subreddit":"LanguageTechnology","timestamp":"2018-04-03T19:56:38+00:00","post_id":"89humj","question":"Online news classification\n\nI am performing an online news classification. The idea is to recognize group of news of the same topic.\nMy algorithm has these steps:\n\n1) I go through a group of feeds from news sites and I recognize news links.\n\n2) For each new link, I extract the content using [dragnet](https://github.com/seomoz/dragnet), and then I tokenize it.\n\n3) I find the vector representation of all the *old news* and the *last one* using [TfidfVectorizer](http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html) from sklearn.\n\n4) I find the nearest neighbor in my dataset computing euclidean distance from the *last news* vector representation and all the vector representations of the *old news*.\n\nThis algorithm is not so efficient, because I have to vectorize all the news each time a new one is coming (because it can contain another words: another dimensions in the vector representation) and this is expensive.\n\nAlso, I have a problem using TfidfVectorizer because it weights more the special words that only appear in a few news, like **Apple**, and news that talk about **Aple** are grouped together even when they deal with different topics.\n\nSo, Is there a common approach more efficient than the one I am using?","preferred_answer":"Consider using cosine distance instead of Euclidean distance.","full_conversation":[{"role":"OP","user_id":"anon_02213df1bd4d3024","comment_id":"89humj","kind":"post","text":"Online news classification\n\nI am performing an online news classification. The idea is to recognize group of news of the same topic.\nMy algorithm has these steps:\n\n1) I go through a group of feeds from news sites and I recognize news links.\n\n2) For each new link, I extract the content using [dragnet](https://github.com/seomoz/dragnet), and then I tokenize it.\n\n3) I find the vector representation of all the *old news* and the *last one* using [TfidfVectorizer](http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html) from sklearn.\n\n4) I find the nearest neighbor in my dataset computing euclidean distance from the *last news* vector representation and all the vector representations of the *old news*.\n\nThis algorithm is not so efficient, because I have to vectorize all the news each time a new one is coming (because it can contain another words: another dimensions in the vector representation) and this is expensive.\n\nAlso, I have a problem using TfidfVectorizer because it weights more the special words that only appear in a few news, like **Apple**, and news that talk about **Aple** are grouped together even when they deal with different topics.\n\nSo, Is there a common approach more efficient than the one I am using?","timestamp":"2018-04-03T19:56:38+00:00","score":2},{"role":"answerer","user_id":"anon_47dabbf436361b9a","comment_id":"dwsd16t","kind":"comment","text":"Consider using cosine distance instead of Euclidean distance.","timestamp":"2018-04-04T11:44:24+00:00","score":2},{"role":"OP","user_id":"anon_02213df1bd4d3024","comment_id":"dwt2ioq","kind":"comment","text":"Thanks for the recommendation, can you explain me what is the advantage? I read that it's better because vector could have different magnitudes, but this is why I'm working only with normalized vectors.","timestamp":"2018-04-04T18:21:25+00:00","score":1},{"role":"answerer","user_id":"anon_47dabbf436361b9a","comment_id":"dwumay8","kind":"comment","text":"If you're using normalized vectors, I'm not sure cosine distance vs. Euclidean distance matters. \n\nRegarding your issue with all **Apple** articles being grouped together even when their topics are different, you might try adjusting the maximum document frequency in your tfidf vectorizer so that words that appear **too** frequently across the set of documents are not included in the vector. The [tfidf vectorizer in sklearn](http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html) has a parameter for this.","timestamp":"2018-04-05T13:08:40+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_02213df1bd4d3024","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_47dabbf436361b9a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dwsd16t","thanks_reply_id":"dwt2ioq","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_165d76f0c349cdb3","answerer_user_id":"anon_8bac7a0ae9d950e0","subreddit":"LanguageTechnology","timestamp":"2018-04-15T07:02:07+00:00","post_id":"8cdmdh","question":"pretrained Doc2vec on clinical text\n\nHi,\n\nAre there any pretrained doc2vecs on clinical datasets such as Pubmed or Merc along with some extra dataset merged in? Perhaps a doc2vec on top bio.nlplab of http://bio.nlplab.org/ ?","preferred_answer":"Doc2vec isn't commonly used, it doesn't produce great results and vectorizing entire documents is still an open problem for NLP.","full_conversation":[{"role":"OP","user_id":"anon_165d76f0c349cdb3","comment_id":"8cdmdh","kind":"post","text":"pretrained Doc2vec on clinical text\n\nHi,\n\nAre there any pretrained doc2vecs on clinical datasets such as Pubmed or Merc along with some extra dataset merged in? Perhaps a doc2vec on top bio.nlplab of http://bio.nlplab.org/ ?","timestamp":"2018-04-15T07:02:07+00:00","score":8},{"role":"answerer","user_id":"anon_8bac7a0ae9d950e0","comment_id":"dxe7upl","kind":"comment","text":"Doc2vec isn't commonly used, it doesn't produce great results and vectorizing entire documents is still an open problem for NLP.","timestamp":"2018-04-15T09:09:44+00:00","score":6},{"role":"OP","user_id":"anon_165d76f0c349cdb3","comment_id":"dxet8xa","kind":"comment","text":"Thanks - How about sentence2vec or paragraph2vec? I believe theoretically they're same as Doc2vec so bad results with them as well?","timestamp":"2018-04-15T18:00:31+00:00","score":1},{"role":"answerer","user_id":"anon_8bac7a0ae9d950e0","comment_id":"dxf891f","kind":"comment","text":"The question is, is unsupervised what you want? Classification can help you teach machines to reason about a given domain, it's an approach I used for legal documents and it worked quiet well.","timestamp":"2018-04-15T22:13:21+00:00","score":1},{"role":"OP","user_id":"anon_165d76f0c349cdb3","comment_id":"dxrg6n3","kind":"comment","text":"Thanks for your replies - I'm not sure what you meant when you said that we can use text classification to discover the embeddings from the encoder. The reason that I'm using doc2vec is because the corpus is pretty large and I'm using doc2vec to represent paragraphs and then we're doing sequence labelling on top of these vectors by using biLSTM and CRF.","timestamp":"2018-04-22T02:54:49+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_165d76f0c349cdb3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8bac7a0ae9d950e0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dxe7upl","thanks_reply_id":"dxet8xa","post_score":8,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_c93fda58fb657577","answerer_user_id":"anon_6326c59e2413b4ab","subreddit":"LanguageTechnology","timestamp":"2018-05-23T18:10:40+00:00","post_id":"8lljzu","question":"Approaches to NLP for my uni poject and choosing the best environment\n\nI currently setting out ideas for a University project.\n \nMy goal is to investigate and improve a Chatbot’s use of fixed expressions, such as “(he/she) has kicked the bucket” or “Practice makes perfect”. As we know, these figures of speech are a fascinating facet in their own right! \n\nFixed expressions are part and parcel with everyday natural speech, however, when taken literally don’t make much sense which presents a problem for natural language processing.\n\nI have an approach I would like to test whereby each expression is accompanied by a textual description, I would like to use machine learning to analyse this description in order to discern it's use and/or sentiment behind the expression. This information will then be integrated and tested into a bot’s chat abilities.\n\nI’m reaching out for some direction with regards to the best tools for the job.\n\nI am predominantly a .Net developer and would ideally prefer to stay in that environment, however, I appreciate that the majority of useful APIs in NLP use Python/ MATLAB (which I would have to learn if that were the case).\n\nI have found the below API for .Net which looks extremely promising but still very new and unfinished: \nhttps://github.com/dotnet/machinelearning\n\nI've compiled a reading list from some of the discussions on this subreddit, so thank you!\n\nEssentially, I'm just looking for reassurance that I absolutely should go the Python route (If that's the case, I'm planning to start with the acclaimed \"Natural Language Processing with Python\" - hopefully a good choice for a beginner with dev experience). Otherwise, is it practical staying in my familiar .Net, microsofty environment for this project?","preferred_answer":"I would definitely just learn python, especially if you already have development experience. Depending on the machine learning approach there are a bunch of great libraries. Tensorflow (or a wrapper to TF such as Keras) and PyTorch are the go to for nerual nets. Gensim has a lot of other models like LDA, LSI, Word2Vec etc. NLTK (Natural Language Toolkit) is another good one (although not as optimized) but provides a lot of basic tools such as stemmers/lemmatizers/pos tagging/stopword dictionaries etc. Then there are big general ML packages like scikit-learn which have a ton of stuff to play around with. Sounds like a cool project!","full_conversation":[{"role":"OP","user_id":"anon_c93fda58fb657577","comment_id":"8lljzu","kind":"post","text":"Approaches to NLP for my uni poject and choosing the best environment\n\nI currently setting out ideas for a University project.\n \nMy goal is to investigate and improve a Chatbot’s use of fixed expressions, such as “(he/she) has kicked the bucket” or “Practice makes perfect”. As we know, these figures of speech are a fascinating facet in their own right! \n\nFixed expressions are part and parcel with everyday natural speech, however, when taken literally don’t make much sense which presents a problem for natural language processing.\n\nI have an approach I would like to test whereby each expression is accompanied by a textual description, I would like to use machine learning to analyse this description in order to discern it's use and/or sentiment behind the expression. This information will then be integrated and tested into a bot’s chat abilities.\n\nI’m reaching out for some direction with regards to the best tools for the job.\n\nI am predominantly a .Net developer and would ideally prefer to stay in that environment, however, I appreciate that the majority of useful APIs in NLP use Python/ MATLAB (which I would have to learn if that were the case).\n\nI have found the below API for .Net which looks extremely promising but still very new and unfinished: \nhttps://github.com/dotnet/machinelearning\n\nI've compiled a reading list from some of the discussions on this subreddit, so thank you!\n\nEssentially, I'm just looking for reassurance that I absolutely should go the Python route (If that's the case, I'm planning to start with the acclaimed \"Natural Language Processing with Python\" - hopefully a good choice for a beginner with dev experience). Otherwise, is it practical staying in my familiar .Net, microsofty environment for this project?","timestamp":"2018-05-23T18:10:40+00:00","score":2},{"role":"answerer","user_id":"anon_6326c59e2413b4ab","comment_id":"dzgjg2a","kind":"comment","text":"I would definitely just learn python, especially if you already have development experience. Depending on the machine learning approach there are a bunch of great libraries. Tensorflow (or a wrapper to TF such as Keras) and PyTorch are the go to for nerual nets. Gensim has a lot of other models like LDA, LSI, Word2Vec etc. NLTK (Natural Language Toolkit) is another good one (although not as optimized) but provides a lot of basic tools such as stemmers/lemmatizers/pos tagging/stopword dictionaries etc. Then there are big general ML packages like scikit-learn which have a ton of stuff to play around with. Sounds like a cool project!","timestamp":"2018-05-23T18:53:32+00:00","score":1},{"role":"OP","user_id":"anon_c93fda58fb657577","comment_id":"e026i8l","kind":"comment","text":"Hey Chemikill, very helpful list there so thank you!\n\nBefore I dive in, dare I ask whether a particular library comes to mind for my purposes? Drawing associations between a key\\-term \\(idiom\\) and a detailed definition?","timestamp":"2018-06-03T21:47:16+00:00","score":1},{"role":"answerer","user_id":"anon_6326c59e2413b4ab","comment_id":"e02b1vq","kind":"comment","text":"So, this is highly dependent on how your chatbot works, but one approach (similar to /u/natedogg83 said) would be to create a separate model that takes the expected chatbot output and determines how close it is (using something like BLEU score) to your idiom natural language counterparts, and if it is a good score substitute the idiom in for the response. Another approach might utilize a custom translation model that learns to either translate into the sentence itself (no transformation) or into an idiom, but this will require a decent amount of data. And another approach would be to do something like scrape Reddit for posts that have idioms as replies and create a large dataset from that, then just add that data to your training set. This could include the problem of people using the idiom sarcastically/ironically, but that might actually be fun to see. As far as what libraries to use, it depends on what type of language/response model you want to make. You can make some decent ones by just using pythons built-in dictionaries (and the [collections](https://docs.python.org/2/library/collections.html) library) and creating n-gram probabilities without too much effort. If you want to go the neural route I would recommend finding a Keras tutorial on making a chatbot. If you don't have a lot of NLP experience I might start with an n-gram based chatbot to learn the basics. It is definitely a cool project and has some interesting difficulties to overcome. I hope this has been somewhat helpful. If you have any other questions feel free to PM me!","timestamp":"2018-06-03T23:11:12+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c93fda58fb657577","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6326c59e2413b4ab","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"dzgjg2a","thanks_reply_id":"e026i8l","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_343de0dba0fad894","answerer_user_id":"anon_d2edadff4d9e127c","subreddit":"LanguageTechnology","timestamp":"2018-06-15T17:12:27+00:00","post_id":"8rcmeh","question":"Help understanding BiDAF model: word embeddings layer\n\nHi guys,\n\nI am fairly new to NLP and I am trying to reimplement BiDAF model in pytorch. My question is - if a word in my context sentence is an entity (basically a word out of vocabulary), how do I encode it for passing it to the highway network? \n\nThanks!","preferred_answer":"Typically, you map all words that aren't in your vocabulary to a single token. It's common to call this token . For instance, if we assume BiDAF is the only out of vocabulary word in your title. You'd map it to a CBOW representation equivalent to \"help understanding model: word embeddings layer\".","full_conversation":[{"role":"OP","user_id":"anon_343de0dba0fad894","comment_id":"8rcmeh","kind":"post","text":"Help understanding BiDAF model: word embeddings layer\n\nHi guys,\n\nI am fairly new to NLP and I am trying to reimplement BiDAF model in pytorch. My question is - if a word in my context sentence is an entity (basically a word out of vocabulary), how do I encode it for passing it to the highway network? \n\nThanks!","timestamp":"2018-06-15T17:12:27+00:00","score":3},{"role":"answerer","user_id":"anon_d2edadff4d9e127c","comment_id":"e0qbgpl","kind":"comment","text":"Typically, you map all words that aren't in your vocabulary to a single token. It's common to call this token . For instance, if we assume BiDAF is the only out of vocabulary word in your title. You'd map it to a CBOW representation equivalent to \"help understanding model: word embeddings layer\".","timestamp":"2018-06-15T18:21:49+00:00","score":1},{"role":"OP","user_id":"anon_343de0dba0fad894","comment_id":"e0qc72m","kind":"comment","text":"But what if that entity is actually an answer to my question during testing?\nthanks","timestamp":"2018-06-15T18:31:27+00:00","score":1},{"role":"answerer","user_id":"anon_d2edadff4d9e127c","comment_id":"e0qd0u6","kind":"comment","text":"Well in your case you should be predicting answer spans, not the actual answers. So, it's not an issue. In other domains where it does matter, such as translating into low-resource languages, there are approaches that can be taken to addressing the issue.","timestamp":"2018-06-15T18:43:12+00:00","score":1},{"role":"OP","user_id":"anon_343de0dba0fad894","comment_id":"e0qluce","kind":"comment","text":"Could you please guide me to those resources?","timestamp":"2018-06-15T20:50:26+00:00","score":1},{"role":"answerer","user_id":"anon_d2edadff4d9e127c","comment_id":"e0r8i4m","kind":"comment","text":"http://ruder.io/word-embeddings-2017/index.html#oovhandling\n\nHere's a short section on it with a few papers that should be able to lead you down the right path. I haven't looked at oov stuff in depth, so I don't have specific papers that I can personally point you to.","timestamp":"2018-06-16T04:01:41+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_343de0dba0fad894","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d2edadff4d9e127c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e0qbgpl","thanks_reply_id":"e0qc72m","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_2fdf3bd0940e6410","answerer_user_id":"anon_030d037a443277d4","subreddit":"LanguageTechnology","timestamp":"2018-06-16T11:10:04+00:00","post_id":"8ripir","question":"How do I code a dictionary for combinations of words within a sentence in LIWC2015?\n\nHey\n\nI'm working on a research project where I am trying to count how many times combinations of two groups of words occur within a sentence. I have very little experience in coding except econometrics in Stata, so a little help would be very appreciated. I also haven't found any information on whether I can use Boolean operators in LIWC2015.\n\nLet's say I have two groups of words:\n\nGroup A \n\nboard \n\nmanagement \n\nceo \n\nGroup B\n\nline\n\nemployee\n\nstaff\n\nI want to count the number of times any combination of words in group A and B occur within the same sentence. I'm working with simple .dic files in Notepad. If it is not possible to search within sentences, is there a way to specify required proximity between the words?","preferred_answer":"The `nltk` library in Python has a nice built in function to pull out n-grams, which you could then count.","full_conversation":[{"role":"OP","user_id":"anon_2fdf3bd0940e6410","comment_id":"8ripir","kind":"post","text":"How do I code a dictionary for combinations of words within a sentence in LIWC2015?\n\nHey\n\nI'm working on a research project where I am trying to count how many times combinations of two groups of words occur within a sentence. I have very little experience in coding except econometrics in Stata, so a little help would be very appreciated. I also haven't found any information on whether I can use Boolean operators in LIWC2015.\n\nLet's say I have two groups of words:\n\nGroup A \n\nboard \n\nmanagement \n\nceo \n\nGroup B\n\nline\n\nemployee\n\nstaff\n\nI want to count the number of times any combination of words in group A and B occur within the same sentence. I'm working with simple .dic files in Notepad. If it is not possible to search within sentences, is there a way to specify required proximity between the words?","timestamp":"2018-06-16T11:10:04+00:00","score":2},{"role":"answerer","user_id":"anon_030d037a443277d4","comment_id":"e0sx454","kind":"comment","text":"The `nltk` library in Python has a nice built in function to pull out n-grams, which you could then count.","timestamp":"2018-06-17T03:13:08+00:00","score":2},{"role":"OP","user_id":"anon_2fdf3bd0940e6410","comment_id":"e0vojaq","kind":"comment","text":"Thanks for the feedback, I've looked into python and the nltk package and it looks perfect for my project.\n\nIs there an easy way to analyse pdf files in python? Do I need other extensions for python to be able read them?","timestamp":"2018-06-18T17:06:16+00:00","score":1},{"role":"answerer","user_id":"anon_030d037a443277d4","comment_id":"e0vyhl7","kind":"comment","text":"If it's a PDF file that can be read/edited, you can use PyPDF2.\n\nIf it's an image PDF (text isn't selectable) you'd have to use OCR to pull the info out (using something like Tesseract).\n\nPyPDF2 is pretty straightforward to use; Tesseract can get kinda ugly to work with if you don't have any background in OCR.","timestamp":"2018-06-18T19:28:51+00:00","score":1},{"role":"OP","user_id":"anon_2fdf3bd0940e6410","comment_id":"e1fj79s","kind":"comment","text":"Thanks, I'll check it out!","timestamp":"2018-06-28T10:21:12+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_2fdf3bd0940e6410","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_030d037a443277d4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e0sx454","thanks_reply_id":"e0vojaq","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_23b7841c53b5cd8a","answerer_user_id":"anon_1a0ea740b3b35a06","subreddit":"LanguageTechnology","timestamp":"2018-06-27T11:57:04+00:00","post_id":"8u8zzt","question":"[Deep learning] Looking for papers on multilingual named entity recognition\n\nLooking for current advancements in multilingual named entity recognition, any relevant research paper will be of great use.\n\nFew things that are creating problems for me:\n\n1) Lack of secondary language data sets (for English we have say Gigawords, OneNotes dataset but similar datasets are not available/created at large scale for other languages say Bengali, Odia, Telugu etc)\n\n2) Is converting other language data to a transliterated or translated in English a good approach so that common embeddings can be generated (say by w2v or glove). Which one is better transliterated or translated?\n\n3) Are there any advancement wrt GANs use in multi-lingual NER?","preferred_answer":"Not sure what you mean by multilingual, but here's a nice paper on transferring information from a high resource language to a similar low-resource language for NER:\nhttps://aclanthology.coli.uni-saarland.de/papers/D16-1153/d16-1153","full_conversation":[{"role":"OP","user_id":"anon_23b7841c53b5cd8a","comment_id":"8u8zzt","kind":"post","text":"[Deep learning] Looking for papers on multilingual named entity recognition\n\nLooking for current advancements in multilingual named entity recognition, any relevant research paper will be of great use.\n\nFew things that are creating problems for me:\n\n1) Lack of secondary language data sets (for English we have say Gigawords, OneNotes dataset but similar datasets are not available/created at large scale for other languages say Bengali, Odia, Telugu etc)\n\n2) Is converting other language data to a transliterated or translated in English a good approach so that common embeddings can be generated (say by w2v or glove). Which one is better transliterated or translated?\n\n3) Are there any advancement wrt GANs use in multi-lingual NER?","timestamp":"2018-06-27T11:57:04+00:00","score":5},{"role":"answerer","user_id":"anon_1a0ea740b3b35a06","comment_id":"e1ejb63","kind":"comment","text":"Not sure what you mean by multilingual, but here's a nice paper on transferring information from a high resource language to a similar low-resource language for NER:\nhttps://aclanthology.coli.uni-saarland.de/papers/D16-1153/d16-1153","timestamp":"2018-06-27T21:20:29+00:00","score":2},{"role":"OP","user_id":"anon_23b7841c53b5cd8a","comment_id":"e1f9j7c","kind":"comment","text":"Thanks TMills. Haven't really taken phonetic approch, was working with char embedding (CNN)-word emb.-BiLSTM-CRF model. Will go through this paper.\n\nHas photenics based transfer learning in multi-lingual (text corpus consisting of many different langauges) been a success in other tasks of nlp?","timestamp":"2018-06-28T05:04:41+00:00","score":1},{"role":"answerer","user_id":"anon_1a0ea740b3b35a06","comment_id":"e1fjk64","kind":"comment","text":"I'm not aware of it being applied to other tasks.","timestamp":"2018-06-28T10:33:30+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_23b7841c53b5cd8a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1a0ea740b3b35a06","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e1ejb63","thanks_reply_id":"e1f9j7c","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_d7581d355be7d589","answerer_user_id":"anon_8a37dea3c60e116f","subreddit":"LanguageTechnology","timestamp":"2018-07-04T08:55:32+00:00","post_id":"8w06zn","question":"M.Sc. Computational Linguistics in Germany?\n\nHello,\n\nI am currently in the process of applying for several MSc courses for CL/NLP in Germany. It's really hard to find good feedback on individual programmes, with the exception being Saarland. I had a strong focus on general linguistics in my undergrad, which is why I probably need to do some catching up in CS and Mathematics, but that's totally fine. Ideally the course would be nicely balanced (all three aspects: Linguistics, CS and Math) and had a focus on application, but without neglecting theoretical aspects. After graduating, I'd like to have a strong skill set to work in machine translation, machine learning or even speech recognition, but also have the opportunity to do a phd if my grades are good enough. I'd be eternally thankful for any advice/input, especially on the programmes at Stuttgart, Munich(LMU) and Tübingen.\n\nThanks!","preferred_answer":"Hi,\n\nStuttgart here. My gut feeling is that Tübingen has the strongest linguistic focus of the four programs and Saarbrücken the\nmost applied one. We try to balance out the various aspects, but\nprobably have more focus on CS and theory, same for Munich.\nThat being said, I think you'd find a range of excellent researchers\nwith different strengths at each of these universities.\n\nHere in Stuttgart, there isn't a lot of research on MT at the moment, but syntax, semantics, statistical models, deep learning, and speech recognition are all covered. \n\nFor full disclosure: Baden-Württemberg (ie Tübingen and Stuttgart) introduced tuition fees for non-EU students last year, in case that's relevant for you.\n\nPM me if you have specific questions, but I guess you wanted to hear more from actual graduates of the programs...","full_conversation":[{"role":"OP","user_id":"anon_d7581d355be7d589","comment_id":"8w06zn","kind":"post","text":"M.Sc. Computational Linguistics in Germany?\n\nHello,\n\nI am currently in the process of applying for several MSc courses for CL/NLP in Germany. It's really hard to find good feedback on individual programmes, with the exception being Saarland. I had a strong focus on general linguistics in my undergrad, which is why I probably need to do some catching up in CS and Mathematics, but that's totally fine. Ideally the course would be nicely balanced (all three aspects: Linguistics, CS and Math) and had a focus on application, but without neglecting theoretical aspects. After graduating, I'd like to have a strong skill set to work in machine translation, machine learning or even speech recognition, but also have the opportunity to do a phd if my grades are good enough. I'd be eternally thankful for any advice/input, especially on the programmes at Stuttgart, Munich(LMU) and Tübingen.\n\nThanks!","timestamp":"2018-07-04T08:55:32+00:00","score":5},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"e1rq74c","kind":"comment","text":"Hi,\n\nStuttgart here. My gut feeling is that Tübingen has the strongest linguistic focus of the four programs and Saarbrücken the\nmost applied one. We try to balance out the various aspects, but\nprobably have more focus on CS and theory, same for Munich.\nThat being said, I think you'd find a range of excellent researchers\nwith different strengths at each of these universities.\n\nHere in Stuttgart, there isn't a lot of research on MT at the moment, but syntax, semantics, statistical models, deep learning, and speech recognition are all covered. \n\nFor full disclosure: Baden-Württemberg (ie Tübingen and Stuttgart) introduced tuition fees for non-EU students last year, in case that's relevant for you.\n\nPM me if you have specific questions, but I guess you wanted to hear more from actual graduates of the programs...","timestamp":"2018-07-04T09:18:25+00:00","score":8},{"role":"OP","user_id":"anon_d7581d355be7d589","comment_id":"e1rsizs","kind":"comment","text":"Thank you for your answer. Given that both Munich and Stuttgart focus on CS and theory. Why did you choose Stuttgart in the end?","timestamp":"2018-07-04T10:41:17+00:00","score":1},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"e1s5ccv","kind":"comment","text":"I actually did my MSc in Edinburgh -- I came to Stuttgart because they offered me a job. ;)\n\nTo offer some context to /u/DemiourgosD's comments on the LMU program: I agree that the LMU program (the whole institute, really) is methodologically more coherent in that it does almost exclusively deep learning, and does so very well. Stuttgart is more varied in its research and teaching activities, and I like to think you get a broader picture of what computational linguistics is about. YMMV :)","timestamp":"2018-07-04T15:25:33+00:00","score":2},{"role":"OP","user_id":"anon_d7581d355be7d589","comment_id":"e1tptzh","kind":"comment","text":"Ah yes I've heard that Edinburgh is particularly good for linguistics. How would you compare the MSc course of Edinburgh to the one in Stuttgart?","timestamp":"2018-07-05T10:45:11+00:00","score":1},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"e1tq60t","kind":"comment","text":"I graduated in 2002, so I don't really have first hand experience about the Edinburgh program in 2018. I don't think they answer questions about their program on Reddit though ;-)","timestamp":"2018-07-05T10:56:02+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_d7581d355be7d589","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a37dea3c60e116f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e1rq74c","thanks_reply_id":"e1rsizs","post_score":5,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_764c25d3d7ae5b64","answerer_user_id":"anon_33dcb2d75fa5a3a5","subreddit":"LanguageTechnology","timestamp":"2018-07-04T16:02:08+00:00","post_id":"8w2q1p","question":"What approach to take for unsupervised labeling of emails?\n\n**Problem:**\nCustomer service receives thousands of emails a day and uses a lot of energy and time to label and auto-respond emails with templates (e.g. broken hdd? respond with broken hdd template email).\n\n**Dataset:**\nNo labels currently exist. Millions (maybe billions) of emails in a non-english language. Both incoming and sent emails.\n\n**Demand:**\nTo label emails based on the headers or/and the body of the emails. The labels can then be used for automatic classification and auto-responding to high-accuracy classified emails.\n\n**Approach:**\nI am looking into the tools we have in NLP and machine learning and would like to build a prototype that can build labels/groups of emails. So far, I had some success with Word2vec and k-means clustering, which finds a few reasonable clusters. Do you know any other tools or methods to build labels? All help is much appreciated!","preferred_answer":"Try using Corex, which is LDA with anchor words: https://github.com/gregversteeg/corex_topic","full_conversation":[{"role":"OP","user_id":"anon_764c25d3d7ae5b64","comment_id":"8w2q1p","kind":"post","text":"What approach to take for unsupervised labeling of emails?\n\n**Problem:**\nCustomer service receives thousands of emails a day and uses a lot of energy and time to label and auto-respond emails with templates (e.g. broken hdd? respond with broken hdd template email).\n\n**Dataset:**\nNo labels currently exist. Millions (maybe billions) of emails in a non-english language. Both incoming and sent emails.\n\n**Demand:**\nTo label emails based on the headers or/and the body of the emails. The labels can then be used for automatic classification and auto-responding to high-accuracy classified emails.\n\n**Approach:**\nI am looking into the tools we have in NLP and machine learning and would like to build a prototype that can build labels/groups of emails. So far, I had some success with Word2vec and k-means clustering, which finds a few reasonable clusters. Do you know any other tools or methods to build labels? All help is much appreciated!","timestamp":"2018-07-04T16:02:08+00:00","score":7},{"role":"answerer","user_id":"anon_33dcb2d75fa5a3a5","comment_id":"e1udhpp","kind":"comment","text":"Try using Corex, which is LDA with anchor words: https://github.com/gregversteeg/corex_topic","timestamp":"2018-07-05T17:44:37+00:00","score":2},{"role":"OP","user_id":"anon_764c25d3d7ae5b64","comment_id":"e1ukbtq","kind":"comment","text":"Thanks, sounds interesting! I’ll check it out. Where did you hear about this project (in case I want to find similar projects)?","timestamp":"2018-07-05T19:22:40+00:00","score":1},{"role":"answerer","user_id":"anon_33dcb2d75fa5a3a5","comment_id":"e1un9y3","kind":"comment","text":"Asked a question on this subredit about alternatives to LDA that can use anchor words, got this as a recommendation.","timestamp":"2018-07-05T20:04:00+00:00","score":2},{"role":"OP","user_id":"anon_764c25d3d7ae5b64","comment_id":"e1uq1t7","kind":"comment","text":"Ok, thanks! Makes sense :)","timestamp":"2018-07-05T20:43:24+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_764c25d3d7ae5b64","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_33dcb2d75fa5a3a5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e1udhpp","thanks_reply_id":"e1ukbtq","post_score":7,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_1dc534e9c3ea7b1b","answerer_user_id":"anon_6dbe791366c5d0d6","subreddit":"LanguageTechnology","timestamp":"2018-07-13T02:42:58+00:00","post_id":"8yg7rd","question":"[Question] Any NLP application for excel reading?\n\nNot sure if it is the right place to ask this. \n\n \n\nI am a data scientist in financial field. Currently I am tasked with consolidating a large pile of excel financial statement into a report or dashboard. Simple excel vlookup or keyword method is not working, due to different formatting or word usage.\n\n \n\nI have been implementing basic ML model in Python for mapping file names and such, just want to check if there any existing add-in or pointers for NLP excel reader before I need to code my customized solution for this\n\n \n\nThanks for help!!","preferred_answer":"Try comparing fields via edit distance, that might work. https://pypi.org/project/editdistance/\n\nEdit: You can try training fasttext (or any char level word vector algo) unsupervised on the column names and for each column name, get the nearest names. Although, since your data is going to be just a bunch of column names, this is effectively same as edit distance.","full_conversation":[{"role":"OP","user_id":"anon_1dc534e9c3ea7b1b","comment_id":"8yg7rd","kind":"post","text":"[Question] Any NLP application for excel reading?\n\nNot sure if it is the right place to ask this. \n\n \n\nI am a data scientist in financial field. Currently I am tasked with consolidating a large pile of excel financial statement into a report or dashboard. Simple excel vlookup or keyword method is not working, due to different formatting or word usage.\n\n \n\nI have been implementing basic ML model in Python for mapping file names and such, just want to check if there any existing add-in or pointers for NLP excel reader before I need to code my customized solution for this\n\n \n\nThanks for help!!","timestamp":"2018-07-13T02:42:58+00:00","score":2},{"role":"answerer","user_id":"anon_6dbe791366c5d0d6","comment_id":"e2ay85h","kind":"comment","text":"Try comparing fields via edit distance, that might work. https://pypi.org/project/editdistance/\n\nEdit: You can try training fasttext (or any char level word vector algo) unsupervised on the column names and for each column name, get the nearest names. Although, since your data is going to be just a bunch of column names, this is effectively same as edit distance.","timestamp":"2018-07-13T06:15:21+00:00","score":1},{"role":"OP","user_id":"anon_1dc534e9c3ea7b1b","comment_id":"e2azeaq","kind":"comment","text":"Thanks, it is a good suggestion, edit distance should easy enough If I prepare some kind of prototypical column names","timestamp":"2018-07-13T06:46:43+00:00","score":1},{"role":"answerer","user_id":"anon_6dbe791366c5d0d6","comment_id":"e2azmds","kind":"comment","text":"Yeah, get some default columns names or still better, get a list of names for each column. Calculate average edit distance and you should get good results (hopefully)","timestamp":"2018-07-13T06:52:49+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1dc534e9c3ea7b1b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6dbe791366c5d0d6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e2ay85h","thanks_reply_id":"e2azeaq","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_80c0db9b52f84941","answerer_user_id":"anon_025ee1311e0f7ef2","subreddit":"LanguageTechnology","timestamp":"2018-07-24T23:02:14+00:00","post_id":"91mcbj","question":"Can someone give me some tips, methods, magic or any other way to raise money for natural language processing research?\n\nI am researching an algorithm to translate English <-> Chinese and English <-> Japanese.\n**In short:**\n\n* A library will be used to make the morphological and part of speech analysis of each sentence of text (it is a noun, verb, adjective, ... and what is the degree of certainty).\n\n* A graphical interface will be used for a person to send a text to the algorithm and receive a text from the algorithm.\n\n* The understanding of the text and grammar of each language will be through associations of words and their meanings. For example, nouns will be associated with other words and with \"real\" objects; the verbs will be deduced by the algorithm by reading the text or will be implemented directly in the code.\n\n* The meaning of words will come from a dictionary.\n\n* Read text can be interpreted as knowledge or \"translate\". This distinction will be written in the text that will be sent to the algorithm.\n\n* For ease of learning the text may contain metadata such as bold or italic.\n\n* The translation will be done using the grammar and meaning of each word of each language\n\nAt the end of the project, I will create a translation site that will use this algorithm\n\nThis project will take 12 months to finish. I will write the progress of the project on the page of the campaign in https://gogetfunding.com/creation-of-a-new-algorithm-to-translate-between-chinese-japanese-and-english/.\n\nBut I need to raise $20k to buy equipment and work full time on it, but I don't know where I will get this money. I can't save money from my salary because I am poor and I live in Brazil (very expensive electronics). \nAny tips will be very very appreciated. \nIf you want to donate: https://gogetfunding.com/creation-of-a-new-algorithm-to-translate-between-chinese-japanese-and-english/","preferred_answer":"Also, the phrase 'more or less an AGI' is probably going to hurt rather than help you.\n\nIf you have strong evidence of having an algorithm for AGI (or a working AGI) then that would be enough to get funding from companies, investors, etc.\n\nMy guess is that you aren't at that stage yet, or have found a certain type of problem that you can generalise over but haven't found something truly general (not an attack, generality is really hard). You might benefit more about your proposed research without extreme claims like AGI.","full_conversation":[{"role":"OP","user_id":"anon_80c0db9b52f84941","comment_id":"91mcbj","kind":"post","text":"Can someone give me some tips, methods, magic or any other way to raise money for natural language processing research?\n\nI am researching an algorithm to translate English <-> Chinese and English <-> Japanese.\n**In short:**\n\n* A library will be used to make the morphological and part of speech analysis of each sentence of text (it is a noun, verb, adjective, ... and what is the degree of certainty).\n\n* A graphical interface will be used for a person to send a text to the algorithm and receive a text from the algorithm.\n\n* The understanding of the text and grammar of each language will be through associations of words and their meanings. For example, nouns will be associated with other words and with \"real\" objects; the verbs will be deduced by the algorithm by reading the text or will be implemented directly in the code.\n\n* The meaning of words will come from a dictionary.\n\n* Read text can be interpreted as knowledge or \"translate\". This distinction will be written in the text that will be sent to the algorithm.\n\n* For ease of learning the text may contain metadata such as bold or italic.\n\n* The translation will be done using the grammar and meaning of each word of each language\n\nAt the end of the project, I will create a translation site that will use this algorithm\n\nThis project will take 12 months to finish. I will write the progress of the project on the page of the campaign in https://gogetfunding.com/creation-of-a-new-algorithm-to-translate-between-chinese-japanese-and-english/.\n\nBut I need to raise $20k to buy equipment and work full time on it, but I don't know where I will get this money. I can't save money from my salary because I am poor and I live in Brazil (very expensive electronics). \nAny tips will be very very appreciated. \nIf you want to donate: https://gogetfunding.com/creation-of-a-new-algorithm-to-translate-between-chinese-japanese-and-english/","timestamp":"2018-07-24T23:02:14+00:00","score":0},{"role":"answerer","user_id":"anon_025ee1311e0f7ef2","comment_id":"e317i77","kind":"comment","text":"Also, the phrase 'more or less an AGI' is probably going to hurt rather than help you.\n\nIf you have strong evidence of having an algorithm for AGI (or a working AGI) then that would be enough to get funding from companies, investors, etc.\n\nMy guess is that you aren't at that stage yet, or have found a certain type of problem that you can generalise over but haven't found something truly general (not an attack, generality is really hard). You might benefit more about your proposed research without extreme claims like AGI.","timestamp":"2018-07-25T21:52:12+00:00","score":1},{"role":"OP","user_id":"anon_80c0db9b52f84941","comment_id":"e31axls","kind":"comment","text":"Yes, you are right. I will remember this and apply it to other texts. Thank you very much =D","timestamp":"2018-07-25T22:45:16+00:00","score":2},{"role":"answerer","user_id":"anon_025ee1311e0f7ef2","comment_id":"e322da1","kind":"comment","text":"Good luck","timestamp":"2018-07-26T07:33:04+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_80c0db9b52f84941","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_025ee1311e0f7ef2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e317i77","thanks_reply_id":"e31axls","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_9ec12d93c14f1797","answerer_user_id":"anon_e6649730564bbc4f","subreddit":"LanguageTechnology","timestamp":"2018-08-15T08:05:32+00:00","post_id":"97gi10","question":"How does Random Forest work for Sentiment Analysis\n\nI am aware that Random forest is nothing but a collection of decision trees. \n\nDecision trees work on variable's/features and their values. \n\nSo how do decision trees work for sentiment analysis, wherein the input is nothing but a string of text(like a comment or so) ? \n\nWhat do the nodes contain? and how does it end up to the positive/negative/neutral","preferred_answer":"A part of sentiment analysis (and most natural language processing) that is crucial, but not part of the traditional \"model\" (ie regression, naive bayes, decision trees etc) is the preprocessing. There's several different ways of doing it, but a common choice is to first transform the input text to a bag-of-words representation. If so, the input to the model is actually a feature vector where each feature is the presence or the count of a certain word. To take the example back to your question, one decision tree might have a first split based on the presence of the word \"happy\" while another makes that first choice based on the presence of the word \"glad\".","full_conversation":[{"role":"OP","user_id":"anon_9ec12d93c14f1797","comment_id":"97gi10","kind":"post","text":"How does Random Forest work for Sentiment Analysis\n\nI am aware that Random forest is nothing but a collection of decision trees. \n\nDecision trees work on variable's/features and their values. \n\nSo how do decision trees work for sentiment analysis, wherein the input is nothing but a string of text(like a comment or so) ? \n\nWhat do the nodes contain? and how does it end up to the positive/negative/neutral","timestamp":"2018-08-15T08:05:32+00:00","score":2},{"role":"answerer","user_id":"anon_e6649730564bbc4f","comment_id":"e484jeg","kind":"comment","text":"A part of sentiment analysis (and most natural language processing) that is crucial, but not part of the traditional \"model\" (ie regression, naive bayes, decision trees etc) is the preprocessing. There's several different ways of doing it, but a common choice is to first transform the input text to a bag-of-words representation. If so, the input to the model is actually a feature vector where each feature is the presence or the count of a certain word. To take the example back to your question, one decision tree might have a first split based on the presence of the word \"happy\" while another makes that first choice based on the presence of the word \"glad\".","timestamp":"2018-08-15T10:34:47+00:00","score":3},{"role":"OP","user_id":"anon_9ec12d93c14f1797","comment_id":"e4886x1","kind":"comment","text":"Thanks alot, that helped. I do have further queries, so bag of words ignores the order of words in the statement, for example negation, how can that be handled in sentiment analysis with RF, would it be n-grams or so?","timestamp":"2018-08-15T12:13:58+00:00","score":1},{"role":"answerer","user_id":"anon_e6649730564bbc4f","comment_id":"e489mol","kind":"comment","text":"Yeah, n-grams is pretty common and useful. For negations, some people also do some preprocessing where you add a prefix to words in a sentence after a negation, so a sentence like \"I did not like the movie\" is represented as something like \"I\", \"did\", \"not\", \"not_like\", \"not_the\", \"not_movie\". But definitely google for, or sign up for a course on \"natural language processing\".","timestamp":"2018-08-15T12:44:33+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9ec12d93c14f1797","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e6649730564bbc4f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e484jeg","thanks_reply_id":"e4886x1","post_score":2,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_45b4549603e1c9b1","answerer_user_id":"anon_1ce9b3a4677c64ff","subreddit":"LanguageTechnology","timestamp":"2018-08-22T15:08:44+00:00","post_id":"99e4jx","question":"Confused about which NLP/summarization approach is most suitable for my project...\n\nHi all,\n\nI am working on a uni project to either use an open-source tool or ML to create an automatic text summarizer for medical papers. I was inspired by the newsbot here on reddit, so I was aiming to for abstractive summaries rather than extractive ones. So far, I have come across GATE, openNLP, SpaCy and a few others, along with google's cloud natural language tool... and I was wondering, what do you guys recommend that I look at to generate abstractive summaries of medical research?","preferred_answer":"I have used Gensim to summarize news articles. It comes with an inbuilt summarizer. It works great. I can't say if it will be as effective for medical papers, but worth looking into.","full_conversation":[{"role":"OP","user_id":"anon_45b4549603e1c9b1","comment_id":"99e4jx","kind":"post","text":"Confused about which NLP/summarization approach is most suitable for my project...\n\nHi all,\n\nI am working on a uni project to either use an open-source tool or ML to create an automatic text summarizer for medical papers. I was inspired by the newsbot here on reddit, so I was aiming to for abstractive summaries rather than extractive ones. So far, I have come across GATE, openNLP, SpaCy and a few others, along with google's cloud natural language tool... and I was wondering, what do you guys recommend that I look at to generate abstractive summaries of medical research?","timestamp":"2018-08-22T15:08:44+00:00","score":4},{"role":"answerer","user_id":"anon_1ce9b3a4677c64ff","comment_id":"e4noswh","kind":"comment","text":"I have used Gensim to summarize news articles. It comes with an inbuilt summarizer. It works great. I can't say if it will be as effective for medical papers, but worth looking into.","timestamp":"2018-08-22T21:49:45+00:00","score":4},{"role":"OP","user_id":"anon_45b4549603e1c9b1","comment_id":"e4pok4f","kind":"comment","text":"Thank you very much for the referral! Just wondering, I have noticed that most attempts at producing abstractive summarizations usually involve some sort of machine learning technique, is that the case? Or are there tools that perform those types of summarizations as well?","timestamp":"2018-08-23T20:00:50+00:00","score":1},{"role":"answerer","user_id":"anon_1ce9b3a4677c64ff","comment_id":"e4qfqbk","kind":"comment","text":"Sorry I have no experience with it. SpaCy is probably your best bet.","timestamp":"2018-08-24T03:27:01+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_45b4549603e1c9b1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1ce9b3a4677c64ff","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e4noswh","thanks_reply_id":"e4pok4f","post_score":4,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_a0fe1804c64d146c","answerer_user_id":"anon_2227d51ae3c40bdd","subreddit":"LanguageTechnology","timestamp":"2018-09-17T12:46:31+00:00","post_id":"9gk09u","question":"Python language libraries: ability to summarize a text?\n\nI've been experimenting with various Python natural language libraries. They seem to work, and they give very simple results. I'm looking for something more complex -- the ability of a script to process a text and summarize that text with, for instance, three main points. Does such a thing exist in language processing technology? If so, what is the official term for this kind of technology?","preferred_answer":"\"Automatic text summarization\" is the term you're looking for, and there's a lot of work in natural language processing dedicated to this task. Unfortunately, I'm unaware of any out-of-the-box library that you can use for summarization.","full_conversation":[{"role":"OP","user_id":"anon_a0fe1804c64d146c","comment_id":"9gk09u","kind":"post","text":"Python language libraries: ability to summarize a text?\n\nI've been experimenting with various Python natural language libraries. They seem to work, and they give very simple results. I'm looking for something more complex -- the ability of a script to process a text and summarize that text with, for instance, three main points. Does such a thing exist in language processing technology? If so, what is the official term for this kind of technology?","timestamp":"2018-09-17T12:46:31+00:00","score":3},{"role":"answerer","user_id":"anon_2227d51ae3c40bdd","comment_id":"e64rmp1","kind":"comment","text":"\"Automatic text summarization\" is the term you're looking for, and there's a lot of work in natural language processing dedicated to this task. Unfortunately, I'm unaware of any out-of-the-box library that you can use for summarization.","timestamp":"2018-09-17T14:03:46+00:00","score":5},{"role":"OP","user_id":"anon_a0fe1804c64d146c","comment_id":"e64s473","kind":"comment","text":"Thank you! That helps my research.","timestamp":"2018-09-17T14:11:46+00:00","score":2},{"role":"answerer","user_id":"anon_2227d51ae3c40bdd","comment_id":"e64tfuy","kind":"comment","text":"Glad I could help!","timestamp":"2018-09-17T14:32:39+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a0fe1804c64d146c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2227d51ae3c40bdd","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e64rmp1","thanks_reply_id":"e64s473","post_score":3,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_52046ace68ac266f","answerer_user_id":"anon_3aa37d6cc70e86a8","subreddit":"LanguageTechnology","timestamp":"2018-09-25T23:38:27+00:00","post_id":"9ixas5","question":"NLP data supervision/labeling tool\n\nWhat are the best sentence pair alignment tools out there?","preferred_answer":"FOSS, the world is fairly limited.\n\nThere is http://brat.nlplab.org/, although it is moderately buggy.\n\nIf you're willing to pay and/or host your data remotely, there are a slew of SaaS options.","full_conversation":[{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"9ixas5","kind":"post","text":"NLP data supervision/labeling tool\n\nWhat are the best sentence pair alignment tools out there?","timestamp":"2018-09-25T23:38:27+00:00","score":3},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"e6n6kp7","kind":"comment","text":"FOSS, the world is fairly limited.\n\nThere is http://brat.nlplab.org/, although it is moderately buggy.\n\nIf you're willing to pay and/or host your data remotely, there are a slew of SaaS options.","timestamp":"2018-09-26T00:27:58+00:00","score":1},{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"e6n6wqx","kind":"comment","text":"Thanks! Although brat doesn't seem to be made for aligning sentence pairs? It is for annotation.","timestamp":"2018-09-26T00:33:35+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"e6next2","kind":"comment","text":"Ah my apologies, I haven't done sentence alignment before, but I think you are probably right.\n\nWhat is your use case? Do you have a lot of data? E.g., on most large-scale translation alignment is done heuristically...can you get away with that?","timestamp":"2018-09-26T02:48:28+00:00","score":1},{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"e6ohc2c","kind":"comment","text":"I have a paragraphs of English and Chinese legal text I'm hoping to have sentence aligned. Not a lot of data, what do you mean by heuristically?","timestamp":"2018-09-26T16:43:27+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"e6qmdbe","kind":"comment","text":"Things like https://www.microsoft.com/en-us/download/details.aspx?id=52608 or https://github.com/danielvarga/hunalign or https://github.com/machinalis/yalign.\n\nI don't know what SOTA is for Chinese, but auto-alignment is (relatively) solved problem.\n\nofc, if you have (very) small data, you still may want to do by hand","timestamp":"2018-09-27T15:53:53+00:00","score":2},{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"e6tsbu1","kind":"comment","text":"Awesome, I'll check them out. Have you used any of those tools before?","timestamp":"2018-09-28T23:40:17+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"e6twt5j","kind":"comment","text":"Nay. :(\n\nHave used brat, per above is somewhat buggy, but that is it.","timestamp":"2018-09-29T01:03:40+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_52046ace68ac266f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3aa37d6cc70e86a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e6n6kp7","thanks_reply_id":"e6n6wqx","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_61ea34fbfe494be4","answerer_user_id":"anon_0d04e7a637802850","subreddit":"LanguageTechnology","timestamp":"2018-09-28T21:12:15+00:00","post_id":"9jqvma","question":"Classify an ngram as a valid VP (or sentence) or not\n\nWe have a dataset of about 300,000 ngrams beginning with verbs. We'd like to separate the complete verb phrases (e.g., \"engage in war\") from the incomplete ones (e.g., \"engage in a little\"). My initial thought was that we could add a subject to the beginning of the ngram, and then see if an off-the-shelf parser can parse parse it: if the parser succeeded, then the ngram is a valid verb phrase; if the parser fails, it is not. However, I've check spacy and core nlp, and they'll give a parse for anything. Hence, this seems a little more complicated.\n\nI was thinking we could parse or pos tag the ngrams, and see if it's obvious what pos sequences/parses are complete VP's, and which aren't, but I suspect this will be too difficult. I also thought that maybe we could build a classifier of valid/invalid VP's based on pos-sequence or even parse tree, but I'm concerned that the amount of training data required for this would be impractical.\n\nOther thoughts? Perhaps we could use a probabilistic parser to assign a probability or score to each ngram (or arbitrary subject + ngram, e.g,. \"They engage in a little\")?","preferred_answer":"It is standard to part of speech tag (and in this instance wgat you want is a dependency pos tag parse) a dataset before the point where you generate ngrams. But perhaps if you ran the ngrams you have through a dependency parser they could still handle \"chunks\" (noun phrase and verb phrase being common top level components of a depency parsed sentence).","full_conversation":[{"role":"OP","user_id":"anon_61ea34fbfe494be4","comment_id":"9jqvma","kind":"post","text":"Classify an ngram as a valid VP (or sentence) or not\n\nWe have a dataset of about 300,000 ngrams beginning with verbs. We'd like to separate the complete verb phrases (e.g., \"engage in war\") from the incomplete ones (e.g., \"engage in a little\"). My initial thought was that we could add a subject to the beginning of the ngram, and then see if an off-the-shelf parser can parse parse it: if the parser succeeded, then the ngram is a valid verb phrase; if the parser fails, it is not. However, I've check spacy and core nlp, and they'll give a parse for anything. Hence, this seems a little more complicated.\n\nI was thinking we could parse or pos tag the ngrams, and see if it's obvious what pos sequences/parses are complete VP's, and which aren't, but I suspect this will be too difficult. I also thought that maybe we could build a classifier of valid/invalid VP's based on pos-sequence or even parse tree, but I'm concerned that the amount of training data required for this would be impractical.\n\nOther thoughts? Perhaps we could use a probabilistic parser to assign a probability or score to each ngram (or arbitrary subject + ngram, e.g,. \"They engage in a little\")?","timestamp":"2018-09-28T21:12:15+00:00","score":3},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"e6tnwnj","kind":"comment","text":"It is standard to part of speech tag (and in this instance wgat you want is a dependency pos tag parse) a dataset before the point where you generate ngrams. But perhaps if you ran the ngrams you have through a dependency parser they could still handle \"chunks\" (noun phrase and verb phrase being common top level components of a depency parsed sentence).","timestamp":"2018-09-28T22:22:33+00:00","score":3},{"role":"OP","user_id":"anon_61ea34fbfe494be4","comment_id":"e6tq12k","kind":"comment","text":"Ah. I forgot about chunking. I'll look into that. Thanks.","timestamp":"2018-09-28T22:58:38+00:00","score":1},{"role":"answerer","user_id":"anon_0d04e7a637802850","comment_id":"e6ubtb3","kind":"comment","text":"Yep and from there if you still have a question you are welcome to ask me in this thread. Even if it isn't soon.","timestamp":"2018-09-29T06:43:14+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_61ea34fbfe494be4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0d04e7a637802850","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e6tnwnj","thanks_reply_id":"e6tq12k","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_4725237e62f2a221","answerer_user_id":"anon_b23f3b6de432a82c","subreddit":"LanguageTechnology","timestamp":"2018-10-06T17:36:03+00:00","post_id":"9lxs40","question":"I'm starting to get more into NLP can you guys recommend me what I could look into?\n\nI am going through the Stanford lecture for [CS231n](https://www.youtube.com/watch?v=OoUX-nOEjG0&list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv&index=2) which I know is not for NLP but I feel it gives me some useful knowledge overall. I am also reading over [Google's ML Crash Course](https://developers.google.com/machine-learning/crash-course/generalization/peril-of-overfitting) and their [YouTube series](https://www.youtube.com/watch?v=Gj0iyo265bc).\n\n​\n\nAdditionally I was looking at a coursera course for [NLP](https://www.coursera.org/learn/language-processing/home/welcome) but I have found I can't quite follow yet, mostly because I don't enjoy the teaching style so I end up spacing out. Can you guys provide me with some places I could start into this myself?\n\n​\n\nI also was thinking of opting into either [AWS](https://aws.amazon.com/free/?awsf.Free%20Tier%20Types=categories%23featured) or [GCE](https://console.cloud.google.com/freetrial/signup/0?pli=1) but I am unsure if 1) I should right now, and 2) which one would be more beneficial for me. Any insight into that would also be useful please.","preferred_answer":"Word2Vec paper is a good read.\n\nhttps://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf","full_conversation":[{"role":"OP","user_id":"anon_4725237e62f2a221","comment_id":"9lxs40","kind":"post","text":"I'm starting to get more into NLP can you guys recommend me what I could look into?\n\nI am going through the Stanford lecture for [CS231n](https://www.youtube.com/watch?v=OoUX-nOEjG0&list=PL3FW7Lu3i5JvHM8ljYj-zLfQRF3EO8sYv&index=2) which I know is not for NLP but I feel it gives me some useful knowledge overall. I am also reading over [Google's ML Crash Course](https://developers.google.com/machine-learning/crash-course/generalization/peril-of-overfitting) and their [YouTube series](https://www.youtube.com/watch?v=Gj0iyo265bc).\n\n​\n\nAdditionally I was looking at a coursera course for [NLP](https://www.coursera.org/learn/language-processing/home/welcome) but I have found I can't quite follow yet, mostly because I don't enjoy the teaching style so I end up spacing out. Can you guys provide me with some places I could start into this myself?\n\n​\n\nI also was thinking of opting into either [AWS](https://aws.amazon.com/free/?awsf.Free%20Tier%20Types=categories%23featured) or [GCE](https://console.cloud.google.com/freetrial/signup/0?pli=1) but I am unsure if 1) I should right now, and 2) which one would be more beneficial for me. Any insight into that would also be useful please.","timestamp":"2018-10-06T17:36:03+00:00","score":17},{"role":"answerer","user_id":"anon_b23f3b6de432a82c","comment_id":"e7btojn","kind":"comment","text":"Word2Vec paper is a good read.\n\nhttps://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf","timestamp":"2018-10-07T12:17:45+00:00","score":1},{"role":"OP","user_id":"anon_4725237e62f2a221","comment_id":"e7c1dd6","kind":"comment","text":"so much to read, so little time. Thank you!","timestamp":"2018-10-07T14:52:10+00:00","score":1},{"role":"answerer","user_id":"anon_b23f3b6de432a82c","comment_id":"e7c87fz","kind":"comment","text":"Agree. But I would share unless I thought worthwhile.","timestamp":"2018-10-07T16:36:09+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4725237e62f2a221","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b23f3b6de432a82c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e7btojn","thanks_reply_id":"e7c1dd6","post_score":17,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_4d5278fe27226b94","answerer_user_id":"anon_7884998e9ef10ad3","subreddit":"LanguageTechnology","timestamp":"2018-10-22T17:55:34+00:00","post_id":"9qg8u0","question":"Looking for NLP research topic\n\nI'm looking for a research topic for master's degree related to text summarization or question answering. I'm not quite experienced in NLP and at a first look it seems that everything that is possible has already been solved, and any problem that has not been solved yet can only be done by a large company, like Facebook or such. Can you give me advise on what research can be done with only hard work and Google Colaboratory? Thank you in advance!","preferred_answer":"I believe it would be yes. NLP people find languages interesting so seeing how another language works is interesting. Secondly we find NLP interesting and useful. So seeing the tools become available in new languages we think is a good thing.\n\nAt the guess the level of paper publishing would be\n\n1. A particular use case. Sentiment analysis (or transliteration or...) of restaurant reviews in Telugu.\n\n2. A sentiment language classifier in Telugu as applied in these three diverse areas.\n\n3. How to make a sentiment analysis system in new languages with examples from Telugu, Tagalog and...\n\n\nYes it could in the sense that if it allows people to understand each other better that should aid science. Say for example someone writes about you in Hindi. Without good transliteration that could be hard to detect. And without detecting it you might not find out what new information they giving about your research. \n\n\nAlso if it allows detection of a [disease outbreak](https://pdfs.semanticscholar.org/9f13/c5e298179a9369383cf8a742d85b6cb8afb5.pdf) earlier it could be of big humanitarian and economic benefit.","full_conversation":[{"role":"OP","user_id":"anon_4d5278fe27226b94","comment_id":"9qg8u0","kind":"post","text":"Looking for NLP research topic\n\nI'm looking for a research topic for master's degree related to text summarization or question answering. I'm not quite experienced in NLP and at a first look it seems that everything that is possible has already been solved, and any problem that has not been solved yet can only be done by a large company, like Facebook or such. Can you give me advise on what research can be done with only hard work and Google Colaboratory? Thank you in advance!","timestamp":"2018-10-22T17:55:34+00:00","score":15},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"e8b7b8g","kind":"comment","text":"I believe it would be yes. NLP people find languages interesting so seeing how another language works is interesting. Secondly we find NLP interesting and useful. So seeing the tools become available in new languages we think is a good thing.\n\nAt the guess the level of paper publishing would be\n\n1. A particular use case. Sentiment analysis (or transliteration or...) of restaurant reviews in Telugu.\n\n2. A sentiment language classifier in Telugu as applied in these three diverse areas.\n\n3. How to make a sentiment analysis system in new languages with examples from Telugu, Tagalog and...\n\n\nYes it could in the sense that if it allows people to understand each other better that should aid science. Say for example someone writes about you in Hindi. Without good transliteration that could be hard to detect. And without detecting it you might not find out what new information they giving about your research. \n\n\nAlso if it allows detection of a [disease outbreak](https://pdfs.semanticscholar.org/9f13/c5e298179a9369383cf8a742d85b6cb8afb5.pdf) earlier it could be of big humanitarian and economic benefit.","timestamp":"2018-10-23T18:13:50+00:00","score":1},{"role":"OP","user_id":"anon_4d5278fe27226b94","comment_id":"e8b7vs5","kind":"comment","text":"Well, I should have read the thread =\\[ Thanks for the answer! The only problem though is the lack of datasets for such languages","timestamp":"2018-10-23T18:21:17+00:00","score":2},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"e8b9o96","kind":"comment","text":"A webapp to build datasets could be useful.\n\nPlease order these sentences best to worse review:\n\nThe food was terrible\n\nThe food was amazing\n\n....\n\nThe food was great\n\nSomething as simple as that (For a rarer NLP language) could build up a sentiment dataset quickly. Similar stuff on transliteration using names would be useful. Even a fairly beginner web developer if they spoke a language and would work with someone who knew NLP (I volunteer to help if anyone wants to message me) could help build useful datasets.","timestamp":"2018-10-23T18:45:07+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4d5278fe27226b94","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7884998e9ef10ad3","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e8b7b8g","thanks_reply_id":"e8b7vs5","post_score":15,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_13ed7a91e2f9bc85","answerer_user_id":"anon_be888066f725f73d","subreddit":"LanguageTechnology","timestamp":"2018-10-24T05:30:19+00:00","post_id":"9qwy1b","question":"Looking for right direction\n\nHi!\n\nI'm new to NLP and data science in general, and I'm trying to write a research paper for class but I need some direction. The topic I'm interested in is trying to extract 'factual' or 'objective' criticisms against organizations from a piece of document (set of documents/news articles). \n\n​\n\nThese criticisms aren't subjective, but rather fall into either environmental, social, or corporate governance (ESG) type of criticism. For example, oil spills, human rights abuses, unsafe labor practices (OSHA), fraud, tax evasion, those sorts of things. \n\n​\n\nI know this is part of NLP and this isn't part of sentiment analysis, but I'm looking at other topics that can help me achieve this goal. My prof said this falls under information retrieval/extraction aspect of NLP but I haven't been successful in finding a lot of papers or resources about this topic. \n\n \n\nThe general idea is using some form of Named Entity Recognition to identify organizations in a document, and from there perform some summarization or topic extraction around said Named Entity to properly classify it within those 3, if applicable. \n\n \nI'm hoping someone can provide me with direction, even an NLP concept, I can look into that will help me with this problem. Thanks!","preferred_answer":"Ok, so I misunderstood your question at first. The straight forward way is for you to manually label a couple of segments (let's say a couple hundred) with each of the classes you want. Then you can train a classifier to detect what kind of criticism it is. You don't really have to create rules if you have this labeled data but you can use rules to bootstrap this data at first for the first version of your model.","full_conversation":[{"role":"OP","user_id":"anon_13ed7a91e2f9bc85","comment_id":"9qwy1b","kind":"post","text":"Looking for right direction\n\nHi!\n\nI'm new to NLP and data science in general, and I'm trying to write a research paper for class but I need some direction. The topic I'm interested in is trying to extract 'factual' or 'objective' criticisms against organizations from a piece of document (set of documents/news articles). \n\n​\n\nThese criticisms aren't subjective, but rather fall into either environmental, social, or corporate governance (ESG) type of criticism. For example, oil spills, human rights abuses, unsafe labor practices (OSHA), fraud, tax evasion, those sorts of things. \n\n​\n\nI know this is part of NLP and this isn't part of sentiment analysis, but I'm looking at other topics that can help me achieve this goal. My prof said this falls under information retrieval/extraction aspect of NLP but I haven't been successful in finding a lot of papers or resources about this topic. \n\n \n\nThe general idea is using some form of Named Entity Recognition to identify organizations in a document, and from there perform some summarization or topic extraction around said Named Entity to properly classify it within those 3, if applicable. \n\n \nI'm hoping someone can provide me with direction, even an NLP concept, I can look into that will help me with this problem. Thanks!","timestamp":"2018-10-24T05:30:19+00:00","score":3},{"role":"answerer","user_id":"anon_be888066f725f73d","comment_id":"e8d0wsv","kind":"comment","text":"Ok, so I misunderstood your question at first. The straight forward way is for you to manually label a couple of segments (let's say a couple hundred) with each of the classes you want. Then you can train a classifier to detect what kind of criticism it is. You don't really have to create rules if you have this labeled data but you can use rules to bootstrap this data at first for the first version of your model.","timestamp":"2018-10-24T14:44:53+00:00","score":2},{"role":"OP","user_id":"anon_13ed7a91e2f9bc85","comment_id":"e8d2f8k","kind":"comment","text":"Oohh thanks! I reckon I can use this as a basic starting point for my analysis. I am leaning toward supervised learning since it seems straightforward but the manual annotation seems annoying lol thanks for your advice! :)","timestamp":"2018-10-24T15:07:01+00:00","score":1},{"role":"answerer","user_id":"anon_be888066f725f73d","comment_id":"e8d2mzy","kind":"comment","text":"They are indeed. I would create your training set by first detecting entities around a range of documents and subbing them by an entity token ( maybe). Then you can get a sentence parser and get 3 sentences before and after the entity and use that as your document","timestamp":"2018-10-24T15:10:20+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_13ed7a91e2f9bc85","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_be888066f725f73d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e8d0wsv","thanks_reply_id":"e8d2f8k","post_score":3,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_928bd763521c50b8","answerer_user_id":"anon_a528e06d9e15a73d","subreddit":"LanguageTechnology","timestamp":"2018-11-01T07:48:18+00:00","post_id":"9t7grv","question":"[NLP] Are there any techniques to replace noun phrases into pronouns?\n\nHello,\n\nI'm trying to do some data augmentation on text which requires the replacing of certain noun phrases into pronouns. Specifically, I would like to replace only person noun phrases into pronouns.\n\n\nMy idea is to parse each sentence using Semantic Role Labeling(SRL), find noun phrases, then check if the noun phrases are personal entities. Here's an example\n\n\nOriginal sentence: My sister is playing with a ball.\n\nAfter SRL: [My sister]_arg1 [is playing]_# [with a ball]_manner\n\nI want to check if my noun phrase [My sister]_arg1 is a person entity. If true -> replace with a pronoun (\"She\" in this case).\n\nAre there any known techniques for this task? Thank you in advance :)","preferred_answer":"You could try getting dependency trees from both sentences, and if the subject matches exchange into the proper pronoun. But be aware of the thousands of edge cases:\n\n„My dog „Bo“ is very big.“ -> continue the next sentence with He or She?","full_conversation":[{"role":"OP","user_id":"anon_928bd763521c50b8","comment_id":"9t7grv","kind":"post","text":"[NLP] Are there any techniques to replace noun phrases into pronouns?\n\nHello,\n\nI'm trying to do some data augmentation on text which requires the replacing of certain noun phrases into pronouns. Specifically, I would like to replace only person noun phrases into pronouns.\n\n\nMy idea is to parse each sentence using Semantic Role Labeling(SRL), find noun phrases, then check if the noun phrases are personal entities. Here's an example\n\n\nOriginal sentence: My sister is playing with a ball.\n\nAfter SRL: [My sister]_arg1 [is playing]_# [with a ball]_manner\n\nI want to check if my noun phrase [My sister]_arg1 is a person entity. If true -> replace with a pronoun (\"She\" in this case).\n\nAre there any known techniques for this task? Thank you in advance :)","timestamp":"2018-11-01T07:48:18+00:00","score":1},{"role":"answerer","user_id":"anon_a528e06d9e15a73d","comment_id":"e8unoyp","kind":"comment","text":"You could try getting dependency trees from both sentences, and if the subject matches exchange into the proper pronoun. But be aware of the thousands of edge cases:\n\n„My dog „Bo“ is very big.“ -> continue the next sentence with He or She?","timestamp":"2018-11-01T14:53:27+00:00","score":1},{"role":"OP","user_id":"anon_928bd763521c50b8","comment_id":"e8v3i21","kind":"comment","text":"Hello! thank you for the input! but I'm not sure what sentences you're referring to when you say \"get dependency trees from BOTH sentences\"? I have only one sentence there!","timestamp":"2018-11-01T18:28:05+00:00","score":1},{"role":"answerer","user_id":"anon_a528e06d9e15a73d","comment_id":"e8v8lq9","kind":"comment","text":"but if you have only 1 sentence how should the reader know who/what the pronoun refers too?","timestamp":"2018-11-01T19:34:02+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_928bd763521c50b8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a528e06d9e15a73d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e8unoyp","thanks_reply_id":"e8v3i21","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_3b198a6ebeaa6ce0","answerer_user_id":"anon_f28ee0a0749f3618","subreddit":"LanguageTechnology","timestamp":"2018-11-16T10:45:43+00:00","post_id":"9xl4p7","question":"Do we have Q&A machine reading comprehension dataset for Spanish language?\n\nHi guys,\n\nLooking for Spanish language dataset similar to SQUAD dataset.\n\nDo we have any such ?\n\nThanks.","preferred_answer":"you can translate the English version to Spanish using Google Translator or something like [https://www.deepl.com/pro.html](https://www.deepl.com/pro.html). We did it for German and it works.","full_conversation":[{"role":"OP","user_id":"anon_3b198a6ebeaa6ce0","comment_id":"9xl4p7","kind":"post","text":"Do we have Q&A machine reading comprehension dataset for Spanish language?\n\nHi guys,\n\nLooking for Spanish language dataset similar to SQUAD dataset.\n\nDo we have any such ?\n\nThanks.","timestamp":"2018-11-16T10:45:43+00:00","score":1},{"role":"answerer","user_id":"anon_f28ee0a0749f3618","comment_id":"e9tgv26","kind":"comment","text":"you can translate the English version to Spanish using Google Translator or something like [https://www.deepl.com/pro.html](https://www.deepl.com/pro.html). We did it for German and it works.","timestamp":"2018-11-16T15:12:40+00:00","score":2},{"role":"OP","user_id":"anon_3b198a6ebeaa6ce0","comment_id":"e9v5lpz","kind":"comment","text":"Thanks @elyase . \n\nFor German language: what's the validation & test scores did you got ?\n\nAnd What about input embeddings ? Did you used character embedding or word embedding? If word, then is there a pre-trained model or you trained yourself?","timestamp":"2018-11-17T06:01:46+00:00","score":1},{"role":"answerer","user_id":"anon_f28ee0a0749f3618","comment_id":"e9ygtq8","kind":"comment","text":"All the experiments were done in an industrial setting meaning not rigorous at all so take the following with a grain of salt. We tried QANet and FastQA and got test scores about 5% worse than the corresponding English version reported on:\nhttps://rajpurkar.github.io/SQuAD-explorer/\nPossible reasons for that are some evaluation errors (evaluating on Squad 2.0 with the 1.0 script) and also the fact that the translated version has a little less data (due to translation errors some samples are empty). I think with careful handling (was only a quick test) the performance can get similar to the English version.\nFor word embeddings I used Fasttext (also tried Glove doesn't seem to make a big difference) pretrained German embeddings. No pretrained character embeddings where used but the model is able to learn them from scratch on the SQuAD data.","timestamp":"2018-11-18T13:01:09+00:00","score":2},{"role":"OP","user_id":"anon_3b198a6ebeaa6ce0","comment_id":"e9ykf47","kind":"comment","text":"Thanks @elyase for handful of help.","timestamp":"2018-11-18T14:04:54+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_3b198a6ebeaa6ce0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f28ee0a0749f3618","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"e9tgv26","thanks_reply_id":"e9v5lpz","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_05e474df14907d63","answerer_user_id":"anon_e5d1fff02edabeac","subreddit":"LanguageTechnology","timestamp":"2018-11-20T19:50:35+00:00","post_id":"9yvmf5","question":"Where to start learning about Natural Language Understanding?\n\nHey guys, I'm a PMATH student at the University of Waterloo, and for the past few years my interests have mainly been in general machine learning concepts (training neural networks, statistical learning theory, etc.). However, recently I started working on a project that required NLP.\n\nNamely, in a general sense the application would need to convert human text to a (\"small\" but \"dense\") set of computer-readable commands. By \"small\" I mean the space of interaction of the commands is quite small (confined to the environment of the program I'm working on), and by \"dense\" I mean able to represent a high percentage of the total set of programs that can be executed in this environment.\n\nWhere are some good resources to start learning about this sort of stuff? I'm trying, currently, to not overcomplicate things and start with a simple idea like \"I have N commands with generic formats, what is the best way of determining which of these commands a given input is closest too semantically?\". I've started with the bare minimum reading www.nltk.org/book, but I bet there are better resources out there.\n\nAlso, I've been told by my CS friends that this subfield of NLP is relatively emergent, and so most of the groundbreaking work will be in papers and not in textbooks or online courses. Of course, I'm looking to start out small, but I would eventually like to break out into harder problems in language understanding and knowledge representation for this project.\n\nWhat do you guys think?","preferred_answer":"Seconding that : Word embedding (Word2vec being an implementation of it) is one of the core things you have to understand in NLP.\n\nBut before that, you should start with basic stuff (stemming, language detection, named entities recognition, ...). It all has been done already, but you may want to try building your own systems (language detection for instance, is a great exercise).","full_conversation":[{"role":"OP","user_id":"anon_05e474df14907d63","comment_id":"9yvmf5","kind":"post","text":"Where to start learning about Natural Language Understanding?\n\nHey guys, I'm a PMATH student at the University of Waterloo, and for the past few years my interests have mainly been in general machine learning concepts (training neural networks, statistical learning theory, etc.). However, recently I started working on a project that required NLP.\n\nNamely, in a general sense the application would need to convert human text to a (\"small\" but \"dense\") set of computer-readable commands. By \"small\" I mean the space of interaction of the commands is quite small (confined to the environment of the program I'm working on), and by \"dense\" I mean able to represent a high percentage of the total set of programs that can be executed in this environment.\n\nWhere are some good resources to start learning about this sort of stuff? I'm trying, currently, to not overcomplicate things and start with a simple idea like \"I have N commands with generic formats, what is the best way of determining which of these commands a given input is closest too semantically?\". I've started with the bare minimum reading www.nltk.org/book, but I bet there are better resources out there.\n\nAlso, I've been told by my CS friends that this subfield of NLP is relatively emergent, and so most of the groundbreaking work will be in papers and not in textbooks or online courses. Of course, I'm looking to start out small, but I would eventually like to break out into harder problems in language understanding and knowledge representation for this project.\n\nWhat do you guys think?","timestamp":"2018-11-20T19:50:35+00:00","score":16},{"role":"answerer","user_id":"anon_e5d1fff02edabeac","comment_id":"ea4hefc","kind":"comment","text":"Seconding that : Word embedding (Word2vec being an implementation of it) is one of the core things you have to understand in NLP.\n\nBut before that, you should start with basic stuff (stemming, language detection, named entities recognition, ...). It all has been done already, but you may want to try building your own systems (language detection for instance, is a great exercise).","timestamp":"2018-11-20T20:37:56+00:00","score":2},{"role":"OP","user_id":"anon_05e474df14907d63","comment_id":"ea4kpvs","kind":"comment","text":"Thanks for the suggestions! Got any good book or course recommendations for covering the basics like you said? Is there a quintessential NLP book all the experts recommend?","timestamp":"2018-11-20T21:19:26+00:00","score":1},{"role":"answerer","user_id":"anon_e5d1fff02edabeac","comment_id":"ea4m0be","kind":"comment","text":"Right now I'm trying my best to get through \"*Foundations of Statistical Natural Language Processing*\" by Manning & Schütze (both Stanford people iirc). It's not an easy read, but it helps understanding the Math NLP relies on.\n\n\"*Speech and Language Processing*\" by Jurafski & Martin might be my next purchase. It is said to address a wide range of topics, from very basic (n-grams) to very modern (conversational agents) stuff.\n\nA Machine Learning teacher I know strongly recommended \"*Taming text*\" by Ingersoll Morton & Farris.\n\nO'Reilly's \"*NLP with Python*\" and \"*Text mining with R*\" are dated but quite good still, for a more technical overview. Both Python and R have greatly evolved since these books were published though.\n\nI have a few more at work, will try to think about posting those here. But those above are the most common resources it seems.\n\n\n----\n*Edit: Formatting*","timestamp":"2018-11-20T21:36:03+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_05e474df14907d63","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e5d1fff02edabeac","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ea4hefc","thanks_reply_id":"ea4kpvs","post_score":16,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_d11c74681e3f1f42","answerer_user_id":"anon_1ffbeed159a56b20","subreddit":"LanguageTechnology","timestamp":"2018-11-21T17:20:31+00:00","post_id":"9z573o","question":"Adding custom labels for NER in Spacy\n\nI am working on an NLP problem in which from a sentence some certain search parameters for a search engine of employee database are to be picked up. So for this I don't have textual data to train only a database of employees containing job titles, work location etc. I was hoping to use Spacy, and looking for how to add custom labels like these through dictionary or something, can anyone suggest something?","preferred_answer":"What exactly does your data look like? Is is something like this?\n\n John Smith Plumber Hartford CT\n Jane Doe Lawyer Boston MA\n Fred Jones Policeman New York NY\n\njust in tab-separates columns? If that's what your data looks like, how do you expect to train an NER model on this? That doesn't make sense. An NER model relies on textual context to infer what words or ngrams constitute a named entity, and what named entity class that something falls into. You need proper natural language sentences with named entities scattered through them to train a proper NER model. For spaCy, you need to format this in 2 tab-separated columns. The first column is the line of text. The second column contains the start index, end index, and named entity label of each named entity in that line. You will also want to tokenize the text so that punctuation marks and the like don't get accidentally included as part of your named entities.\n\nFor example:\n\n John Smith is a plumber from Hartford , CT . 0,10,EMPLOYEE;16,23,OCCUPATION;29,37,CITY;39,41,STATE","full_conversation":[{"role":"OP","user_id":"anon_d11c74681e3f1f42","comment_id":"9z573o","kind":"post","text":"Adding custom labels for NER in Spacy\n\nI am working on an NLP problem in which from a sentence some certain search parameters for a search engine of employee database are to be picked up. So for this I don't have textual data to train only a database of employees containing job titles, work location etc. I was hoping to use Spacy, and looking for how to add custom labels like these through dictionary or something, can anyone suggest something?","timestamp":"2018-11-21T17:20:31+00:00","score":3},{"role":"answerer","user_id":"anon_1ffbeed159a56b20","comment_id":"ea727z0","kind":"comment","text":"What exactly does your data look like? Is is something like this?\n\n John Smith Plumber Hartford CT\n Jane Doe Lawyer Boston MA\n Fred Jones Policeman New York NY\n\njust in tab-separates columns? If that's what your data looks like, how do you expect to train an NER model on this? That doesn't make sense. An NER model relies on textual context to infer what words or ngrams constitute a named entity, and what named entity class that something falls into. You need proper natural language sentences with named entities scattered through them to train a proper NER model. For spaCy, you need to format this in 2 tab-separated columns. The first column is the line of text. The second column contains the start index, end index, and named entity label of each named entity in that line. You will also want to tokenize the text so that punctuation marks and the like don't get accidentally included as part of your named entities.\n\nFor example:\n\n John Smith is a plumber from Hartford , CT . 0,10,EMPLOYEE;16,23,OCCUPATION;29,37,CITY;39,41,STATE","timestamp":"2018-11-21T22:48:19+00:00","score":2},{"role":"OP","user_id":"anon_d11c74681e3f1f42","comment_id":"ea7ubzz","kind":"comment","text":"Thanks for the input, so what I am thinking to do is, that I generate all the possible search sentences, with the keywords(search parameters)using a python script, that way I will have textual data to train with. Because the keywords are less(3-4) possible sentence generation will not be tough(without using NLP). When I have this I can train my model for NER, what do you think? Does this sound logical or plausible?","timestamp":"2018-11-22T06:36:40+00:00","score":1},{"role":"answerer","user_id":"anon_1ffbeed159a56b20","comment_id":"ea7wxcp","kind":"comment","text":"I don't get it. If you already have column data with an \"Employee\" column containing the names, an \"Occupation\" column containing the jobs, and \"Location\" column containing the city/state, then don't you already have the named entity labels just by how your data is organized? Why do you need an NER model for this? NER is generally for identifying the named entities in something unstructured, like a line of natural language text, where it's supposed to pick up contextual clues like surrounding words and stuff to identify what could be a named entity. In your case, it looks like the columns of your data are already identifying all of your named entities, so why do you need an NER model? Unless I'm misunderstanding this. Am I misunderstanding? What exactly does your data look like?","timestamp":"2018-11-22T07:35:58+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d11c74681e3f1f42","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1ffbeed159a56b20","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ea727z0","thanks_reply_id":"ea7ubzz","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_183b7065adef025d","answerer_user_id":"anon_eaf671ce7e4a0585","subreddit":"LanguageTechnology","timestamp":"2018-12-19T19:28:34+00:00","post_id":"a7pnbs","question":"Where and how should a beginner start with natural language processing?\n\nI've had experience with Python, and I know the basics of machine learning, deep learning and stats. I've been meaning to delve into NLP given how interesting the possibilities are. \n\nI've already looked through reddit for resources but they all suggest Dan Jurafskys online course, which sadly isn't available anymore.\n\nSo are there any alternatives or should I just continue with what my professor has suggested i.e going through the book 'Speech and Language Processing' along with 'Handbook of Natural Language Processing'. But seeing as it's all theory, can someone suggest a good hands on resource or a completely different approach? Thank you.","preferred_answer":"Jurafsky's course lectures are available on YouTube.\n\nI think that if you want something more hands-on you should read \"NLTK book\" alongside Speech and Language Processing. For more advanced DL stuff you could also try Coursera's NLP course. Also Stanford has a class on DL in NLP.\n\nBTW I also suggest reading couple of first chapters from\"Information Retrieval\" book. It has more on Bag of Words than SLP from what I remember. Also knowing about search doesn't help if you want to learn NLP.","full_conversation":[{"role":"OP","user_id":"anon_183b7065adef025d","comment_id":"a7pnbs","kind":"post","text":"Where and how should a beginner start with natural language processing?\n\nI've had experience with Python, and I know the basics of machine learning, deep learning and stats. I've been meaning to delve into NLP given how interesting the possibilities are. \n\nI've already looked through reddit for resources but they all suggest Dan Jurafskys online course, which sadly isn't available anymore.\n\nSo are there any alternatives or should I just continue with what my professor has suggested i.e going through the book 'Speech and Language Processing' along with 'Handbook of Natural Language Processing'. But seeing as it's all theory, can someone suggest a good hands on resource or a completely different approach? Thank you.","timestamp":"2018-12-19T19:28:34+00:00","score":8},{"role":"answerer","user_id":"anon_eaf671ce7e4a0585","comment_id":"ec4rpm0","kind":"comment","text":"Jurafsky's course lectures are available on YouTube.\n\nI think that if you want something more hands-on you should read \"NLTK book\" alongside Speech and Language Processing. For more advanced DL stuff you could also try Coursera's NLP course. Also Stanford has a class on DL in NLP.\n\nBTW I also suggest reading couple of first chapters from\"Information Retrieval\" book. It has more on Bag of Words than SLP from what I remember. Also knowing about search doesn't help if you want to learn NLP.","timestamp":"2018-12-19T19:40:55+00:00","score":6},{"role":"OP","user_id":"anon_183b7065adef025d","comment_id":"ec4tb4v","kind":"comment","text":"Wow thanks, I had no clue about the Information Retrieval book! Thank you. I think I'll start with the Jurafsky course along with the \"NLTK book\". Also how is the Coursera course? Heard mixed reviews about it.","timestamp":"2018-12-19T20:01:18+00:00","score":1},{"role":"answerer","user_id":"anon_eaf671ce7e4a0585","comment_id":"ec4thtm","kind":"comment","text":"It's pretty hard. I think the most important part are the assignments though. And they're really cool. The last one uses stuff from previous weeks to build a chatbot - it's really simple to build a basic conversational agent.","timestamp":"2018-12-19T20:03:41+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_183b7065adef025d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_eaf671ce7e4a0585","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ec4rpm0","thanks_reply_id":"ec4tb4v","post_score":8,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_aa10b5a57fac4bbf","answerer_user_id":"anon_095be9fa64c83a45","subreddit":"LanguageTechnology","timestamp":"2018-12-30T14:12:07+00:00","post_id":"aaw5r7","question":"Is there a tool accessible to layman that extracts key words, phrases and sentences from a corpus?","preferred_answer":"There are a number of ways of extracting keywords, but here's a tool I developed a few years ago: http://crs2.kmutt.ac.th/Key-BNC/","full_conversation":[{"role":"OP","user_id":"anon_aa10b5a57fac4bbf","comment_id":"aaw5r7","kind":"post","text":"Is there a tool accessible to layman that extracts key words, phrases and sentences from a corpus?","timestamp":"2018-12-30T14:12:07+00:00","score":1},{"role":"answerer","user_id":"anon_095be9fa64c83a45","comment_id":"ecwqjep","kind":"comment","text":"There are a number of ways of extracting keywords, but here's a tool I developed a few years ago: http://crs2.kmutt.ac.th/Key-BNC/","timestamp":"2018-12-31T00:06:11+00:00","score":2},{"role":"OP","user_id":"anon_aa10b5a57fac4bbf","comment_id":"ecwrwcd","kind":"comment","text":"Thank you!","timestamp":"2018-12-31T00:23:08+00:00","score":1},{"role":"answerer","user_id":"anon_095be9fa64c83a45","comment_id":"ecx3h0r","kind":"comment","text":"I hope it is useful. Please PM me with any feedback you have","timestamp":"2018-12-31T03:04:05+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_aa10b5a57fac4bbf","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_095be9fa64c83a45","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ecwqjep","thanks_reply_id":"ecwrwcd","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_2bacb7776b7b7806","answerer_user_id":"anon_6dbe791366c5d0d6","subreddit":"LanguageTechnology","timestamp":"2019-01-07T05:38:55+00:00","post_id":"adekzf","question":"what is the current state of the art approach for NER with word (or similar) embeddings?\n\nI have read classical rule-based NER approaches and CRF classification approaches. But I need something related to embedding, so that it can understand the context better. Any related papers or source code that are available?","preferred_answer":"Go with glove/ fasttext vectors + BiLSTM + CRF at character level . It will give you the best results for NER. Check out https://github.com/zalandoresearch/flair and https://github.com/bedapudi6788/seqtag (Full disclosure: It's a repo that I mantain.)","full_conversation":[{"role":"OP","user_id":"anon_2bacb7776b7b7806","comment_id":"adekzf","kind":"post","text":"what is the current state of the art approach for NER with word (or similar) embeddings?\n\nI have read classical rule-based NER approaches and CRF classification approaches. But I need something related to embedding, so that it can understand the context better. Any related papers or source code that are available?","timestamp":"2019-01-07T05:38:55+00:00","score":12},{"role":"answerer","user_id":"anon_6dbe791366c5d0d6","comment_id":"edg9kaz","kind":"comment","text":"Go with glove/ fasttext vectors + BiLSTM + CRF at character level . It will give you the best results for NER. Check out https://github.com/zalandoresearch/flair and https://github.com/bedapudi6788/seqtag (Full disclosure: It's a repo that I mantain.)","timestamp":"2019-01-07T05:44:25+00:00","score":4},{"role":"OP","user_id":"anon_2bacb7776b7b7806","comment_id":"edg9x09","kind":"comment","text":"Thank you. I will look into it. Can I ping you, if i have some doubts?","timestamp":"2019-01-07T05:50:23+00:00","score":1},{"role":"answerer","user_id":"anon_6dbe791366c5d0d6","comment_id":"edgafx5","kind":"comment","text":"I am happy to help. I adopted seqtag from another open source project and made it configurable and easy to use. Would love to get some feedback on it.","timestamp":"2019-01-07T05:59:29+00:00","score":3},{"role":"OP","user_id":"anon_2bacb7776b7b7806","comment_id":"edgangn","kind":"comment","text":"Will surely do. Thank you. You saved me quite a long browsing time.","timestamp":"2019-01-07T06:03:12+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_2bacb7776b7b7806","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6dbe791366c5d0d6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"edg9kaz","thanks_reply_id":"edg9x09","post_score":12,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_caaa2b201f5e96e4","answerer_user_id":"anon_5a1f683434d025b7","subreddit":"LanguageTechnology","timestamp":"2019-01-13T13:02:08+00:00","post_id":"afj4yn","question":"Anyone wants to help me with a seq2seq translation implementation?\n\nHello\n\nI've been working on a seq2seq translation implementation in [Julia](https://julialang.org/) (very similar to Python in terms of code readability) for some time now.\n\nAlthough my code runs and loss decreases a bit, the translations I get are quite rubbish.\n\nI've written a notebook with explanations about my code. [https://nbviewer.jupyter.org/github/merckxiaan/flux-seq2seq/blob/master/seq2seq%20in%20flux.ipynb#The-Model](https://nbviewer.jupyter.org/github/merckxiaan/flux-seq2seq/blob/master/seq2seq%20in%20flux.ipynb#The-Model)\n\nFor the data preparation, I mainly follow [the official Pytorch tutorial on seq2seq](https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html). I'm really not sure what I'm doing wrong so any guidance would be appreciated.","preferred_answer":"Wait, so you can't overfit on a single minibatch of 4?","full_conversation":[{"role":"OP","user_id":"anon_caaa2b201f5e96e4","comment_id":"afj4yn","kind":"post","text":"Anyone wants to help me with a seq2seq translation implementation?\n\nHello\n\nI've been working on a seq2seq translation implementation in [Julia](https://julialang.org/) (very similar to Python in terms of code readability) for some time now.\n\nAlthough my code runs and loss decreases a bit, the translations I get are quite rubbish.\n\nI've written a notebook with explanations about my code. [https://nbviewer.jupyter.org/github/merckxiaan/flux-seq2seq/blob/master/seq2seq%20in%20flux.ipynb#The-Model](https://nbviewer.jupyter.org/github/merckxiaan/flux-seq2seq/blob/master/seq2seq%20in%20flux.ipynb#The-Model)\n\nFor the data preparation, I mainly follow [the official Pytorch tutorial on seq2seq](https://pytorch.org/tutorials/intermediate/seq2seq_translation_tutorial.html). I'm really not sure what I'm doing wrong so any guidance would be appreciated.","timestamp":"2019-01-13T13:02:08+00:00","score":8},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"eebgjs0","kind":"comment","text":"Wait, so you can't overfit on a single minibatch of 4?","timestamp":"2019-01-18T01:08:54+00:00","score":2},{"role":"OP","user_id":"anon_caaa2b201f5e96e4","comment_id":"eedo9w8","kind":"comment","text":"Thanks for your response!\n\nNo, I'm unable to even overfit on a minibatch of 4, the loss steadily decreases until a certain point (about 8,6 in this case).\n\nI'm pretty sure batching and timesteps aren't mixed up...","timestamp":"2019-01-18T19:41:52+00:00","score":2},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"eee0r6h","kind":"comment","text":"make forced decoding always and disable dropout, then try to overfit the minibatch of 4. If you still can't do it, you have a bug in your model and you need to step through with a very very tiny model piece by piece and confirm everything is working as expected. If you can overfit, then toggle the forced decoding and dropout separately and see which gives you the problem.","timestamp":"2019-01-18T21:44:15+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_caaa2b201f5e96e4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5a1f683434d025b7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eebgjs0","thanks_reply_id":"eedo9w8","post_score":8,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_52046ace68ac266f","answerer_user_id":"anon_f48e37ddb22fa49a","subreddit":"LanguageTechnology","timestamp":"2019-01-18T09:51:53+00:00","post_id":"ah8xha","question":"Why are very long sentences not good for deep learning models?\n\nIs this just hearsay or is it true? Why or why not?","preferred_answer":"How long do you mean exactly? \n\nHere are some of my opinion. \n\nFirst, the limitation of the model max sequence length. Anything exceeds that length will be truncated and the rest information is lost. \n\nSeconds, the \"forget\" of rnn and view window of CNN. There's a forget gate in the lstm to control the memory, so it make sense that lstm is not good at capturing long term information. Therefore we have attention. For the CNN, convolution is locally connected. You have to stack multiple layers to enlarge the window. There's a table in the paper \"Attention is all you need\" that list the \"distance\" between two random words in RNN, CNN and transformer. That being said, I think transformer is more capable at understanding long sentence. \n\nThird, the complication of long sentence. Long sentence are more difficult to understand even to humans.","full_conversation":[{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"ah8xha","kind":"post","text":"Why are very long sentences not good for deep learning models?\n\nIs this just hearsay or is it true? Why or why not?","timestamp":"2019-01-18T09:51:53+00:00","score":2},{"role":"answerer","user_id":"anon_f48e37ddb22fa49a","comment_id":"eecdoci","kind":"comment","text":"How long do you mean exactly? \n\nHere are some of my opinion. \n\nFirst, the limitation of the model max sequence length. Anything exceeds that length will be truncated and the rest information is lost. \n\nSeconds, the \"forget\" of rnn and view window of CNN. There's a forget gate in the lstm to control the memory, so it make sense that lstm is not good at capturing long term information. Therefore we have attention. For the CNN, convolution is locally connected. You have to stack multiple layers to enlarge the window. There's a table in the paper \"Attention is all you need\" that list the \"distance\" between two random words in RNN, CNN and transformer. That being said, I think transformer is more capable at understanding long sentence. \n\nThird, the complication of long sentence. Long sentence are more difficult to understand even to humans.","timestamp":"2019-01-18T10:08:37+00:00","score":4},{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"eecfuic","kind":"comment","text":"Thanks @JayYip Your points make a lot of sense. I suppose i meant longer sentences vs shorter sentences in a general sense. Only including sentences that are still comprehensible by humans. \n\nThe transformer model is definitely better for long sentences. Disregarding your third point, how else is the transformer worse vs short sentences though?","timestamp":"2019-01-18T10:54:54+00:00","score":1},{"role":"answerer","user_id":"anon_f48e37ddb22fa49a","comment_id":"eecgw0b","kind":"comment","text":"That depends on the task. I didn't find significant drop for long sentence in NER. For translation, which I'm not very familiar with, I think long sentence is just more difficult to translate. Not model related.","timestamp":"2019-01-18T11:16:11+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_52046ace68ac266f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f48e37ddb22fa49a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eecdoci","thanks_reply_id":"eecfuic","post_score":2,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_b4655eb7ed1ae9d1","answerer_user_id":"anon_844d2f97da6a1a9a","subreddit":"LanguageTechnology","timestamp":"2019-02-13T06:28:25+00:00","post_id":"aq3mce","question":"Any pretrained machine translation systems?\n\nHey guys,\n\nAre there any machine translators available that \n\n1) Are pretrained and ready to translate Russian --> English,\n\n2) Have no limitations regarding amount/length/frequency of requests such as the limitations of Google Translate and Yandex Translate?\n\nTools that can be used in Python are preferred.\n\nThanks!","preferred_answer":"Facebook fasttext has some multilingual pretrained vectors here : https://fasttext.cc/docs/en/aligned-vectors.html","full_conversation":[{"role":"OP","user_id":"anon_b4655eb7ed1ae9d1","comment_id":"aq3mce","kind":"post","text":"Any pretrained machine translation systems?\n\nHey guys,\n\nAre there any machine translators available that \n\n1) Are pretrained and ready to translate Russian --> English,\n\n2) Have no limitations regarding amount/length/frequency of requests such as the limitations of Google Translate and Yandex Translate?\n\nTools that can be used in Python are preferred.\n\nThanks!","timestamp":"2019-02-13T06:28:25+00:00","score":8},{"role":"answerer","user_id":"anon_844d2f97da6a1a9a","comment_id":"egdbja9","kind":"comment","text":"Facebook fasttext has some multilingual pretrained vectors here : https://fasttext.cc/docs/en/aligned-vectors.html","timestamp":"2019-02-13T08:04:01+00:00","score":3},{"role":"OP","user_id":"anon_b4655eb7ed1ae9d1","comment_id":"egdbtqe","kind":"comment","text":"Thank you, bro! But this is not exactly what I'm looking for. I could use Procrustes alignment on word embeddings to find the matching word in English for the given word in Russian, but I'm interested in full sentences with grammar etc.","timestamp":"2019-02-13T08:11:43+00:00","score":3},{"role":"answerer","user_id":"anon_844d2f97da6a1a9a","comment_id":"egdbx2i","kind":"comment","text":"Then I haven't seen any. Sorry.","timestamp":"2019-02-13T08:14:12+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b4655eb7ed1ae9d1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_844d2f97da6a1a9a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"egdbja9","thanks_reply_id":"egdbtqe","post_score":8,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_cee4cb48fb20d749","answerer_user_id":"anon_60c05f7d4ac61d78","subreddit":"LanguageTechnology","timestamp":"2019-02-14T22:28:55+00:00","post_id":"aqpj49","question":"Beginner in NLP, need advice for project\n\nI'm working on a project to classify a twitter user as depressed or not, based on his most recent 3000 tweets. I read a paper which used a number of features for training \"including polarity words, depression-related terms, first-person pronouns and second-person pronouns\". I am familiar with the BoW model, as well as the count vectorizer and TF-IDF to extract features from text - but how would one use these features mentioned above, I thought of maybe creating a vector containing of say all the polarity words and fitting my data to that vector to see how many occurrences from that vector appear in the data. Is that the way to go?","preferred_answer":"If you have transformed your corpus into vector using tfidf vectorizing, each item in that vector represents a feature. And you already have the labels ( supposing you have them ). Now you can use the feature and label set to train a model such as random forest or logistic regression ( since you just have two classes. if you don't have a labelled dataset, you can use unsupervised clustering algo like kNN in a similar fashion ). Each document is a sample and its vector form is the set of needed features. So say if you are using scikit learn, you can pass a list of all the document vectors as the \"x\" value and set of corresponding labels as \"y\" values to fit your model. If you want do something more. You can learn about PCA and use that to shrink your feature space.","full_conversation":[{"role":"OP","user_id":"anon_cee4cb48fb20d749","comment_id":"aqpj49","kind":"post","text":"Beginner in NLP, need advice for project\n\nI'm working on a project to classify a twitter user as depressed or not, based on his most recent 3000 tweets. I read a paper which used a number of features for training \"including polarity words, depression-related terms, first-person pronouns and second-person pronouns\". I am familiar with the BoW model, as well as the count vectorizer and TF-IDF to extract features from text - but how would one use these features mentioned above, I thought of maybe creating a vector containing of say all the polarity words and fitting my data to that vector to see how many occurrences from that vector appear in the data. Is that the way to go?","timestamp":"2019-02-14T22:28:55+00:00","score":2},{"role":"answerer","user_id":"anon_60c05f7d4ac61d78","comment_id":"egi42aj","kind":"comment","text":"If you have transformed your corpus into vector using tfidf vectorizing, each item in that vector represents a feature. And you already have the labels ( supposing you have them ). Now you can use the feature and label set to train a model such as random forest or logistic regression ( since you just have two classes. if you don't have a labelled dataset, you can use unsupervised clustering algo like kNN in a similar fashion ). Each document is a sample and its vector form is the set of needed features. So say if you are using scikit learn, you can pass a list of all the document vectors as the \"x\" value and set of corresponding labels as \"y\" values to fit your model. If you want do something more. You can learn about PCA and use that to shrink your feature space.","timestamp":"2019-02-15T02:18:00+00:00","score":1},{"role":"OP","user_id":"anon_cee4cb48fb20d749","comment_id":"egiripz","kind":"comment","text":"thank you for your reply, do you know how could I incorporate more features other than those automatically derived by TF-IDF? Features as such polarity words or depression-related terms (I already have a list of each of them).","timestamp":"2019-02-15T10:08:04+00:00","score":1},{"role":"answerer","user_id":"anon_60c05f7d4ac61d78","comment_id":"egirsgw","kind":"comment","text":"Do you have a labelled dataset or are you trying to solve an unsupervised problem?","timestamp":"2019-02-15T10:16:26+00:00","score":1},{"role":"OP","user_id":"anon_cee4cb48fb20d749","comment_id":"egirtpl","kind":"comment","text":"It is labeled.","timestamp":"2019-02-15T10:17:30+00:00","score":1},{"role":"answerer","user_id":"anon_60c05f7d4ac61d78","comment_id":"egisvbk","kind":"comment","text":"In that case i don't think you need to add the polarity words manually. When you will train the model it will identify and weigh such occurences itself. Give that a try and see how accurately it performs. If it does not perform as per your requirement you can then think about how to improve.","timestamp":"2019-02-15T10:49:00+00:00","score":1},{"role":"OP","user_id":"anon_cee4cb48fb20d749","comment_id":"egiu11d","kind":"comment","text":"Last question, for each user there are a couple of hundred tweets, each user should have a vector containing features from all their tweets right, since this is a user-based classifier","timestamp":"2019-02-15T11:22:19+00:00","score":1},{"role":"answerer","user_id":"anon_60c05f7d4ac61d78","comment_id":"egiuiv6","kind":"comment","text":"I am not sure if there is a single correct way to do this, but you can either try what you are referring or else for a single user you can classify tweets seperately and each classification will give you a probability for depressed or not depressed. Then you can club these together, scale it and use that as the result","timestamp":"2019-02-15T11:35:33+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_cee4cb48fb20d749","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_60c05f7d4ac61d78","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"egi42aj","thanks_reply_id":"egiripz","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_a832711fe0d07f0b","answerer_user_id":"anon_013eba30380c377a","subreddit":"LanguageTechnology","timestamp":"2019-02-27T15:37:02+00:00","post_id":"aver76","question":"How to improve the quality of a topic model\n\nHello all,\n\nI'm trying to figure out some ways to improve the quality of topic models.\n\n1) In the computation of topic models with Gensim, there are a lot of different factors that we could change: how alpha, eta hyperparameter, number of passes affect the results? I wonder if there exists a resource that provides us with general guidelines for improving the quality of our topic models.\n\n2) I have the feeling that removing stopwords is not necessary if we use a Tf-idf model, as this model already penalizes the most common terms. Is my assumption correct?\n\n3) Can the quality of topic modeling be enhanced by adding bigrams and trigrams? E.g., \"New\\_York\\_Times\" considered as a whole word\n\n4) Can the quality of topic modeling be enhanced by adding the POS tag to words? In this way, for example, the model can discriminate between light/NOUN and light/ADJ\n\n5) Are there some metrics to evaluate the quality of topic models? I know that Gensim has a topic coherence feature, could you spend a bit words about this?\n\nThank you everybody!","preferred_answer":"1. From what I know, quality really depends on what you're doing, so I think it might be hard to specify rule of thumb hyperparameters. I believe in a lot of cases you use a metric like coherence (which you mentioned), or you use a downstream classifier like LogisticRegression trained on the document topic distributions. Then accuracy becomes your notion of \"better.\" Apart from that you could eyeball them yourself. \n\n2. I believe topic models themselves already penalize stopwords, because they are so common they aren't likely to show up in the top N Words of a word-topic distribution. Also I think your intuition is correct about Tfidf.\n\n3 and 4. Yes those may improve topic quality, I think it might depend on your data though. I don't know if there is a paper that definitively explores this or not. \n\n5. Perplexity, Coherence, Significance, and Accuracy are the only ones that come to mind.\n\nIf any of this was helpful feel free to ask more questions or ask me to clarify anything!","full_conversation":[{"role":"OP","user_id":"anon_a832711fe0d07f0b","comment_id":"aver76","kind":"post","text":"How to improve the quality of a topic model\n\nHello all,\n\nI'm trying to figure out some ways to improve the quality of topic models.\n\n1) In the computation of topic models with Gensim, there are a lot of different factors that we could change: how alpha, eta hyperparameter, number of passes affect the results? I wonder if there exists a resource that provides us with general guidelines for improving the quality of our topic models.\n\n2) I have the feeling that removing stopwords is not necessary if we use a Tf-idf model, as this model already penalizes the most common terms. Is my assumption correct?\n\n3) Can the quality of topic modeling be enhanced by adding bigrams and trigrams? E.g., \"New\\_York\\_Times\" considered as a whole word\n\n4) Can the quality of topic modeling be enhanced by adding the POS tag to words? In this way, for example, the model can discriminate between light/NOUN and light/ADJ\n\n5) Are there some metrics to evaluate the quality of topic models? I know that Gensim has a topic coherence feature, could you spend a bit words about this?\n\nThank you everybody!","timestamp":"2019-02-27T15:37:02+00:00","score":3},{"role":"answerer","user_id":"anon_013eba30380c377a","comment_id":"ehfabpr","kind":"comment","text":"1. From what I know, quality really depends on what you're doing, so I think it might be hard to specify rule of thumb hyperparameters. I believe in a lot of cases you use a metric like coherence (which you mentioned), or you use a downstream classifier like LogisticRegression trained on the document topic distributions. Then accuracy becomes your notion of \"better.\" Apart from that you could eyeball them yourself. \n\n2. I believe topic models themselves already penalize stopwords, because they are so common they aren't likely to show up in the top N Words of a word-topic distribution. Also I think your intuition is correct about Tfidf.\n\n3 and 4. Yes those may improve topic quality, I think it might depend on your data though. I don't know if there is a paper that definitively explores this or not. \n\n5. Perplexity, Coherence, Significance, and Accuracy are the only ones that come to mind.\n\nIf any of this was helpful feel free to ask more questions or ask me to clarify anything!","timestamp":"2019-02-27T20:49:14+00:00","score":2},{"role":"OP","user_id":"anon_a832711fe0d07f0b","comment_id":"ehgsify","kind":"comment","text":"Wow thanks a lot for your answer!\n\nFor point 3 and 4, I've found these papers that could be useful for this thread:\n\n​\n\nTopical N-grams: Phrase and Topic Discovery, with an Application to Information Retrieval\n\n[https://people.cs.umass.edu/\\~mccallum/papers/tng-icdm07.pdf](https://people.cs.umass.edu/~mccallum/papers/tng-icdm07.pdf)\n\n​\n\nMore Efficient Topic Modelling Through a Noun Only Approach\n\n[http://aclweb.org/anthology/U15-1013](http://aclweb.org/anthology/U15-1013)\n\n​","timestamp":"2019-02-28T10:39:01+00:00","score":1},{"role":"answerer","user_id":"anon_013eba30380c377a","comment_id":"ehneo96","kind":"comment","text":"Here is a paper that discusses stopword removal with LDA:\n\nhttp://www.aclweb.org/anthology/E17-2069","timestamp":"2019-03-02T20:10:39+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a832711fe0d07f0b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_013eba30380c377a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ehfabpr","thanks_reply_id":"ehgsify","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_928bd763521c50b8","answerer_user_id":"anon_1d449f2ea48bd848","subreddit":"LanguageTechnology","timestamp":"2019-03-01T04:43:35+00:00","post_id":"aw0op3","question":"What do you guys think about this new program at UBC: Master of Data Science program with Computational Linguistics Specialization\n\nI'm finishing up my bachelor's in computer science and linguistics in a few months and debating whether to pursue a master in CS with machine learning specialization or a master of data science program. I'm interning at an ML lab doing a small research project right now but I'm finding more and more that I want to do something that's more practical. I really want to do something related to NLP/computational linguistics and it looks like a lot of job posting require a minimum master's degree so I'm researching what kind of options are out there. I've applied to a CS master with ML specialization which is 2.5 year program but I just came across this new program at University of British Columbia which is just a 10 month program: https://masterdatascience.ubc.ca/programs/computational-linguistics\n\nWhat do you guys think about this? Does the curriculum look like it will prep me to step into NLP career? Any input is appreciated","preferred_answer":"I work in the ML field and have both academic and industry experience in R&D going back 20 years.\n\n​\n\nBe very careful. We've had a great deal of trouble with students graduating out of the Master of Data Science program that started a couple of years ago. This program looks to be about the same with a bit of a shift to CL.\n\nThe program is only 10 months long. And no, you're not going to cram a two year program (plus undergrad computer science) into 10 months. It doesn't work. The courses are very watered down. A data structures and algorithms course we found out was only five classes in four weeks with an emphasis on practical application. Whatever that means. Nothing really. The statistics and probability theory is barely covered in the same way.\n\nAlso the bar is very low to be able to get into this program. Of course they're going to tell you the opposite but from what I've observed directly it does not compare to a real graduate program in a good university. So you're stuck with people who couldn't cut a real program.\n\nAlso notice it's a Master, not a *Master's* program like they call their graduate computer science program. So even they know it's not a real graduate degree but feel comfortable playing word games to get around it.\n\nIt's really the equivalent of what a two year technical diploma would get you from a community college in the past.\n\nThe kicker is that students graduating from this program genuinely expect six or near six figure salaries. We don't even consider students from programs like these any longer, and there are a number around.\n\n​\n\nWe look for people with a solid undergraduate education in the field and proven graduate level originality and problem solving skills that a proper thesis and publications in the technical literature will show. Patents are good, too. A \"capstone\" project does not cut it.\n\n​\n\nGood luck.","full_conversation":[{"role":"OP","user_id":"anon_928bd763521c50b8","comment_id":"aw0op3","kind":"post","text":"What do you guys think about this new program at UBC: Master of Data Science program with Computational Linguistics Specialization\n\nI'm finishing up my bachelor's in computer science and linguistics in a few months and debating whether to pursue a master in CS with machine learning specialization or a master of data science program. I'm interning at an ML lab doing a small research project right now but I'm finding more and more that I want to do something that's more practical. I really want to do something related to NLP/computational linguistics and it looks like a lot of job posting require a minimum master's degree so I'm researching what kind of options are out there. I've applied to a CS master with ML specialization which is 2.5 year program but I just came across this new program at University of British Columbia which is just a 10 month program: https://masterdatascience.ubc.ca/programs/computational-linguistics\n\nWhat do you guys think about this? Does the curriculum look like it will prep me to step into NLP career? Any input is appreciated","timestamp":"2019-03-01T04:43:35+00:00","score":9},{"role":"answerer","user_id":"anon_1d449f2ea48bd848","comment_id":"eiqvjvu","kind":"comment","text":"I work in the ML field and have both academic and industry experience in R&D going back 20 years.\n\n​\n\nBe very careful. We've had a great deal of trouble with students graduating out of the Master of Data Science program that started a couple of years ago. This program looks to be about the same with a bit of a shift to CL.\n\nThe program is only 10 months long. And no, you're not going to cram a two year program (plus undergrad computer science) into 10 months. It doesn't work. The courses are very watered down. A data structures and algorithms course we found out was only five classes in four weeks with an emphasis on practical application. Whatever that means. Nothing really. The statistics and probability theory is barely covered in the same way.\n\nAlso the bar is very low to be able to get into this program. Of course they're going to tell you the opposite but from what I've observed directly it does not compare to a real graduate program in a good university. So you're stuck with people who couldn't cut a real program.\n\nAlso notice it's a Master, not a *Master's* program like they call their graduate computer science program. So even they know it's not a real graduate degree but feel comfortable playing word games to get around it.\n\nIt's really the equivalent of what a two year technical diploma would get you from a community college in the past.\n\nThe kicker is that students graduating from this program genuinely expect six or near six figure salaries. We don't even consider students from programs like these any longer, and there are a number around.\n\n​\n\nWe look for people with a solid undergraduate education in the field and proven graduate level originality and problem solving skills that a proper thesis and publications in the technical literature will show. Patents are good, too. A \"capstone\" project does not cut it.\n\n​\n\nGood luck.","timestamp":"2019-03-17T18:14:05+00:00","score":2},{"role":"OP","user_id":"anon_928bd763521c50b8","comment_id":"ej2qgwd","kind":"comment","text":"Thank you for taking the time to reply! This is very helpful. Not to mention how expensive the program is. I'll stick with a CS master. Thank you!","timestamp":"2019-03-21T22:26:07+00:00","score":1},{"role":"answerer","user_id":"anon_1d449f2ea48bd848","comment_id":"ejnvwwv","kind":"comment","text":"No problem. Understand, too, that your choice of a thesis supervisor has an impact on the quality of direction in your work as well as being able to open doors and make connections for you in the field and industry after graduation. This doesn't apply so much for a Masters as it certainly does for a Ph.D. but it's still a consideration. If you have the opportunity to talk to graduate students of the supervisor you're considering take it. There a good supervisors and not so good ones out there. Again, though, it's not so much a big deal for a Masters.\n\n​\n\nGood luck with everything!","timestamp":"2019-03-29T15:22:31+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_928bd763521c50b8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1d449f2ea48bd848","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eiqvjvu","thanks_reply_id":"ej2qgwd","post_score":9,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_1c72937701e6d735","answerer_user_id":"anon_71b1709e383a81a8","subreddit":"LanguageTechnology","timestamp":"2019-03-03T09:55:11+00:00","post_id":"awsnbc","question":"If I have a target word, what is the best way to find the nearest word2vec correlates?\n\nMy word is 'ugly'. I want to find out the most related words based on word2vec. Is a python script more feasible than some app/website I am not aware of?","preferred_answer":"Get gensim and use similar_by_word method on gensim.models.Word2Vec model.","full_conversation":[{"role":"OP","user_id":"anon_1c72937701e6d735","comment_id":"awsnbc","kind":"post","text":"If I have a target word, what is the best way to find the nearest word2vec correlates?\n\nMy word is 'ugly'. I want to find out the most related words based on word2vec. Is a python script more feasible than some app/website I am not aware of?","timestamp":"2019-03-03T09:55:11+00:00","score":4},{"role":"answerer","user_id":"anon_71b1709e383a81a8","comment_id":"ehowmge","kind":"comment","text":"Get gensim and use similar_by_word method on gensim.models.Word2Vec model.","timestamp":"2019-03-03T10:16:27+00:00","score":8},{"role":"OP","user_id":"anon_1c72937701e6d735","comment_id":"ehowr9h","kind":"comment","text":"Oh lovely, thank you. That sounds doable.","timestamp":"2019-03-03T10:20:23+00:00","score":4},{"role":"answerer","user_id":"anon_71b1709e383a81a8","comment_id":"ehowse4","kind":"comment","text":"A pleasure. Good luck in your quest.","timestamp":"2019-03-03T10:21:19+00:00","score":3},{"role":"OP","user_id":"anon_1c72937701e6d735","comment_id":"ehowteo","kind":"comment","text":"Thank you and to you too!","timestamp":"2019-03-03T10:22:10+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_1c72937701e6d735","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_71b1709e383a81a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ehowmge","thanks_reply_id":"ehowr9h","post_score":4,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_e64d64aa66469e24","answerer_user_id":"anon_9fa4af52b485a476","subreddit":"LanguageTechnology","timestamp":"2019-03-07T17:34:21+00:00","post_id":"ayf8z8","question":"Determine whether or not a company has acquired others using NLP\n\nI'm trying to build a Python script to identify whether a company has acquired others. For this, I intend to seach Google for \" acquisition\", and parse the titles of the first N pages. Then, from the titles that have indicators that there was an actual acquisition, I want to extract the name of the company that was acquired, and I also want to provide a confidence metric. And obviously, it also has to make sure that it was the company I'm looking for that acquired another one, and not the other way around. \n\n​\n\nI have some experience with NER, but with this specific NLP task I don't know where to start. Is there something already implemented for such task?","preferred_answer":"I worked on this previously but I used wikipedia instead. I used spaCy to extract named entities as well as triplets from each sentence. Whenever the verb was a lemma of the words 'acquire' or 'merge' or similar words, I extracted the triplets. Was also able to extract acquisition/ close timelines from the sentences. Let me know if can provide any more insights from my experience. What was your objective, if you don't mind me asking? If this is for commercial work, there are databases that provide readily available and more accurate information.","full_conversation":[{"role":"OP","user_id":"anon_e64d64aa66469e24","comment_id":"ayf8z8","kind":"post","text":"Determine whether or not a company has acquired others using NLP\n\nI'm trying to build a Python script to identify whether a company has acquired others. For this, I intend to seach Google for \" acquisition\", and parse the titles of the first N pages. Then, from the titles that have indicators that there was an actual acquisition, I want to extract the name of the company that was acquired, and I also want to provide a confidence metric. And obviously, it also has to make sure that it was the company I'm looking for that acquired another one, and not the other way around. \n\n​\n\nI have some experience with NER, but with this specific NLP task I don't know where to start. Is there something already implemented for such task?","timestamp":"2019-03-07T17:34:21+00:00","score":2},{"role":"answerer","user_id":"anon_9fa4af52b485a476","comment_id":"ei0p4rt","kind":"comment","text":"I worked on this previously but I used wikipedia instead. I used spaCy to extract named entities as well as triplets from each sentence. Whenever the verb was a lemma of the words 'acquire' or 'merge' or similar words, I extracted the triplets. Was also able to extract acquisition/ close timelines from the sentences. Let me know if can provide any more insights from my experience. What was your objective, if you don't mind me asking? If this is for commercial work, there are databases that provide readily available and more accurate information.","timestamp":"2019-03-07T20:16:47+00:00","score":2},{"role":"OP","user_id":"anon_e64d64aa66469e24","comment_id":"ei0qxyg","kind":"comment","text":"Thanks a lot! This is really the kind of insight I was looking for. I will also use SpaCy for this. Do you mind sharing some of the code you developed for this, if possible?","timestamp":"2019-03-07T20:36:43+00:00","score":1},{"role":"answerer","user_id":"anon_9fa4af52b485a476","comment_id":"ei27jgd","kind":"comment","text":"I will have to look into my older laptop. It wasn't one of my serious projects so I did not build a repo. What are you working towards?","timestamp":"2019-03-08T10:23:48+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e64d64aa66469e24","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9fa4af52b485a476","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ei0p4rt","thanks_reply_id":"ei0qxyg","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_13ed7a91e2f9bc85","answerer_user_id":"anon_c4813dd1b6e3ec20","subreddit":"LanguageTechnology","timestamp":"2019-03-30T02:54:34+00:00","post_id":"b76a6d","question":"Help on a starting point\n\nSo a few days ago, a redditor gave a huge data dump of rotten tomato reviews. [https://www.reddit.com/r/datasets/comments/b4yy6p/480000\\_rotten\\_tomato\\_critic\\_reviews/](https://www.reddit.com/r/datasets/comments/b4yy6p/480000_rotten_tomato_critic_reviews/) \n\n​\n\nFor our big data class, I wanna take a look at this. I'm asking for a starting point, just basics tbh, on how to process this. The dataset is 2 simple columns, 1 for the review being fresh or not, and another for the actual review. Ultimately, I'd like to be able to determine features pertaining to the review (like which types of words, which word groupings, possibly a particular sentiment, etc) that can be a determinant for a review being fresh or rotten. Tbh I'm not very cognizant about NLP techniques, so I'd like some suggestions as a starting point for this. It doesn't have to be very complex, as the class' focus is more on big data technologies and implementation (hadoop, spark, etc) than machine learning. Is it too ambitious for me?","preferred_answer":"This task should be quite straight-forward so no need to worry. You can try something as simple as word2vec and you'll get far. If you are working with PyTorch and you want to combine this with the big data requirement of your classes, you can look into distributed learning. Some resources [here](https://pytorch.org/tutorials/intermediate/dist_tuto.html) and [here](https://pytorch.org/docs/stable/distributed.html?highlight=distributed#module-torch.distributed).\n\nTo get you going here's some code to show you how to build an Embedding layer from the word embeddings from [Google News](https://github.com/mmihaltz/word2vec-GoogleNews-vectors):\n\n```python\nfrom pathlib import Path\n\nimport gensim\nimport torch\nfrom torch import nn\n\nw2v_p = Path('path/to/GoogleNews-vectors-negative300.bin').resolve()\nw2v_model = gensim.models.KeyedVectors.load_word2vec_format(str(w2v_p), binary=True)\n# Extract the w2v weights\nw2v_weights = torch.FloatTensor(w2v_model.vectors)\n# Build the embedding layer\nembedder = nn.Embedding.from_pretrained(w2v_weights, freeze=True)\n```","full_conversation":[{"role":"OP","user_id":"anon_13ed7a91e2f9bc85","comment_id":"b76a6d","kind":"post","text":"Help on a starting point\n\nSo a few days ago, a redditor gave a huge data dump of rotten tomato reviews. [https://www.reddit.com/r/datasets/comments/b4yy6p/480000\\_rotten\\_tomato\\_critic\\_reviews/](https://www.reddit.com/r/datasets/comments/b4yy6p/480000_rotten_tomato_critic_reviews/) \n\n​\n\nFor our big data class, I wanna take a look at this. I'm asking for a starting point, just basics tbh, on how to process this. The dataset is 2 simple columns, 1 for the review being fresh or not, and another for the actual review. Ultimately, I'd like to be able to determine features pertaining to the review (like which types of words, which word groupings, possibly a particular sentiment, etc) that can be a determinant for a review being fresh or rotten. Tbh I'm not very cognizant about NLP techniques, so I'd like some suggestions as a starting point for this. It doesn't have to be very complex, as the class' focus is more on big data technologies and implementation (hadoop, spark, etc) than machine learning. Is it too ambitious for me?","timestamp":"2019-03-30T02:54:34+00:00","score":1},{"role":"answerer","user_id":"anon_c4813dd1b6e3ec20","comment_id":"ejvifxm","kind":"comment","text":"This task should be quite straight-forward so no need to worry. You can try something as simple as word2vec and you'll get far. If you are working with PyTorch and you want to combine this with the big data requirement of your classes, you can look into distributed learning. Some resources [here](https://pytorch.org/tutorials/intermediate/dist_tuto.html) and [here](https://pytorch.org/docs/stable/distributed.html?highlight=distributed#module-torch.distributed).\n\nTo get you going here's some code to show you how to build an Embedding layer from the word embeddings from [Google News](https://github.com/mmihaltz/word2vec-GoogleNews-vectors):\n\n```python\nfrom pathlib import Path\n\nimport gensim\nimport torch\nfrom torch import nn\n\nw2v_p = Path('path/to/GoogleNews-vectors-negative300.bin').resolve()\nw2v_model = gensim.models.KeyedVectors.load_word2vec_format(str(w2v_p), binary=True)\n# Extract the w2v weights\nw2v_weights = torch.FloatTensor(w2v_model.vectors)\n# Build the embedding layer\nembedder = nn.Embedding.from_pretrained(w2v_weights, freeze=True)\n```","timestamp":"2019-04-01T14:21:30+00:00","score":1},{"role":"OP","user_id":"anon_13ed7a91e2f9bc85","comment_id":"ejvkjgi","kind":"comment","text":"This is beyond amazing Thanks! I've never tinkered with PyTorch, or other NN technologies, but I'm sure there are dozens of tutorials out there. And as I've said, i want to keep the ML/DL part very basic, and work on the big data/distributed data part more.","timestamp":"2019-04-01T14:49:39+00:00","score":1},{"role":"answerer","user_id":"anon_c4813dd1b6e3ec20","comment_id":"ejxnai3","kind":"comment","text":"There are plenty, indeed. Even though I have found that for NLP, and perhaps also generally, PyTorch has not matured w.r.t. tutorials, questions, and community. The framework itself is superb, but only recently people have really started using it. This means that you'll have to figure much stuff out by yourself because other people may not have had your specific use case before. In your case, though, simply using an embedding model should be fine and you'll find plenty materials.","timestamp":"2019-04-02T08:03:12+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_13ed7a91e2f9bc85","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c4813dd1b6e3ec20","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ejvifxm","thanks_reply_id":"ejvkjgi","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_f2c0bb31ce7b89ab","answerer_user_id":"anon_7884998e9ef10ad3","subreddit":"LanguageTechnology","timestamp":"2019-03-30T05:34:17+00:00","post_id":"b77mvs","question":"Is NLP a viable approach to this problem? (Legal document analysis)\n\nHey guys, I've come here in the hopes that somebody could tell me whether the following is feasible:\n\n**TLDR:**\n\nPart of my project involves determining the effective sentencing of a defendant given a sentencing document. My sample size is small and the documents are unstructured such that there is no easy rule set to determine what the effective sentencing is. Furthermore there is no easy way to simply lookup the effective sentencing for a given court case like in a database (i.e. no labelled data).\n\n**Is there some sort of feasible way to approach this problem using NLP?** My supervisor had admitted he doesn't know anything about NLP and so I don't know if this task is even realistically doable. \n\nI'd really appreciate any input \n\n(For anybody interested in the exact structuring of the documents I'm referring to, feel free to browse the following link: https://www.countycourt.vic.gov.au/court-decisions/summary-cases)\n\n**Expanded:**\n\nThe following strings are examples that are not the effective sentence but sound very similar:\n\n* \n> On Charge 13 of dealing with the proceeds of crime, you are convicted and sentenced to two months' imprisonment.\n\n* > In the circumstances of your case, I propose to convicted you of the offence of aggravated burglary and sentence you to a term of imprisonment of 18 months.\n\n* > Sentence: 10 months imprisonment (302 days PSD) to be followed by a CCO of 2 years duration with unpaid community work, rehabilitative and supervision conditions.\n\nThe following strings are examples of an actual effective sentence:\n\n* >The total overall sentence is therefore 11 months' imprisonment to be followed by a two year CCO, and I will go back over the conditions shortly.\n\n\n* >I fix no minimum period so you will be required to serve 18 months.\n\n\n* >Overall I have concluded the most appropriate sentence to punish you is a Community Correction Order and not an immediate term of imprisonment to be served, as sought by the Crown. \n\nMy concern is that I cannot conceive of how an NLP algorithm could determine which of these strings are effective sentences and which of these strings just sound like effective sentences but are in fact not. This problem is compounded by the fact that I have no way of checking whether my algorithms effective sentence guesses are actually correct unless I manually check; this is not feasible for thousands of documents.\n\nCurrently, the only way I can imagine doing this is by using a series of regex expressions to weigh the likelihood if any given string being the effective sentence and then selecting the string that has the highest score. However this approach may be seriously flawed and is heavily reliant on some level of structuring that cannot be fully guaranteed.\n\nE.g. (Please excuse my pseudo code regex)\n\n [effective | total | minimum | overall] .* [0 - 9]+ [days | months | years] [imprisonment | prison | parole]\n\nSo the string that matches that regex best (I'd have variations of that regex that are less complex but have a lower weighting) is the string most likely to be the effective sentence. \n\n\n**Examples:**\n\n**[DPP v Skonis](https://www.countycourt.vic.gov.au/court-decisions/summary-cases/dpp-v-skonis-2016-vcc-139)**\n\n\n> 1. **\"Overall I have concluded the most appropriate sentence to punish you is a Community Correction Order and not an immediate term of imprisonment to be served, as sought by the Crown. \"**\n\n> 1. \"I make the following declaration pursuant to s.6AAA: but for your plea of guilty I would have convicted and sentenced you to 12 months' imprisonment to follow a three-year Community Correction Order.\"\n\n> 1. In respect to the two charges on the indictment an aggregate sentence will be imposed because it represents one course of conduct over a short period of time on the date set out on the indictment. \n\n**[DPP v Bowden](https://www.countycourt.vic.gov.au/court-decisions/summary-cases/dpp-v-bowden-2017-vcc-133)**\n\n> 1. **\"I fix no minimum period so you will be required to serve 18 months.\"**\n\n> 1. \"But for your plea of guilty and the operation of s.6AAA of the Sentencing Act 1991, I would have sentenced you to five years' imprisonment with a three-year minimum term.\"\n\n> 1. \"In the circumstances of your case, I propose to convicted you of the offence of aggravated burglary and sentence you to a term of imprisonment of 18 months.\"\n\n> 1. \"Immediately following your release, I sentence you to a community corrections order for a period of a further 24 months with a condition that you perform 200 hours of unpaid community work and that you receive appropriate mental health assessment and treatment as may be required during the period of that order, and those conditions are in addition to the core conditions attaching to a community corrections order which you have agreed to in the course of your assessment and which I am told by Mr Power you agree to today. \"\n\n**[DPP v Spokes](https://www.countycourt.vic.gov.au/court-decisions/summary-cases/dpp-v-spokes-2016-vcc-498)**\n\n> 1. **\"The total overall sentence is therefore 11 months' imprisonment to be followed by a two year CCO, and I will go back over the conditions shortly.\"**\n\n> 1. \"Sentence: 10 months imprisonment (302 days PSD) to be followed by a CCO of 2 years duration with unpaid community work, rehabilitative and supervision conditions.\"\n\n> 1. \"I direct that one month of the sentence on the two summary charges of unlicensed driving be served - it's actually driving whilst disqualified - I have come to realise.\"","preferred_answer":"I would say yes. there might be an issue with lack of data. But if you build something that works you can show this and use it as evidence to get enough data to make it work well","full_conversation":[{"role":"OP","user_id":"anon_f2c0bb31ce7b89ab","comment_id":"b77mvs","kind":"post","text":"Is NLP a viable approach to this problem? (Legal document analysis)\n\nHey guys, I've come here in the hopes that somebody could tell me whether the following is feasible:\n\n**TLDR:**\n\nPart of my project involves determining the effective sentencing of a defendant given a sentencing document. My sample size is small and the documents are unstructured such that there is no easy rule set to determine what the effective sentencing is. Furthermore there is no easy way to simply lookup the effective sentencing for a given court case like in a database (i.e. no labelled data).\n\n**Is there some sort of feasible way to approach this problem using NLP?** My supervisor had admitted he doesn't know anything about NLP and so I don't know if this task is even realistically doable. \n\nI'd really appreciate any input \n\n(For anybody interested in the exact structuring of the documents I'm referring to, feel free to browse the following link: https://www.countycourt.vic.gov.au/court-decisions/summary-cases)\n\n**Expanded:**\n\nThe following strings are examples that are not the effective sentence but sound very similar:\n\n* \n> On Charge 13 of dealing with the proceeds of crime, you are convicted and sentenced to two months' imprisonment.\n\n* > In the circumstances of your case, I propose to convicted you of the offence of aggravated burglary and sentence you to a term of imprisonment of 18 months.\n\n* > Sentence: 10 months imprisonment (302 days PSD) to be followed by a CCO of 2 years duration with unpaid community work, rehabilitative and supervision conditions.\n\nThe following strings are examples of an actual effective sentence:\n\n* >The total overall sentence is therefore 11 months' imprisonment to be followed by a two year CCO, and I will go back over the conditions shortly.\n\n\n* >I fix no minimum period so you will be required to serve 18 months.\n\n\n* >Overall I have concluded the most appropriate sentence to punish you is a Community Correction Order and not an immediate term of imprisonment to be served, as sought by the Crown. \n\nMy concern is that I cannot conceive of how an NLP algorithm could determine which of these strings are effective sentences and which of these strings just sound like effective sentences but are in fact not. This problem is compounded by the fact that I have no way of checking whether my algorithms effective sentence guesses are actually correct unless I manually check; this is not feasible for thousands of documents.\n\nCurrently, the only way I can imagine doing this is by using a series of regex expressions to weigh the likelihood if any given string being the effective sentence and then selecting the string that has the highest score. However this approach may be seriously flawed and is heavily reliant on some level of structuring that cannot be fully guaranteed.\n\nE.g. (Please excuse my pseudo code regex)\n\n [effective | total | minimum | overall] .* [0 - 9]+ [days | months | years] [imprisonment | prison | parole]\n\nSo the string that matches that regex best (I'd have variations of that regex that are less complex but have a lower weighting) is the string most likely to be the effective sentence. \n\n\n**Examples:**\n\n**[DPP v Skonis](https://www.countycourt.vic.gov.au/court-decisions/summary-cases/dpp-v-skonis-2016-vcc-139)**\n\n\n> 1. **\"Overall I have concluded the most appropriate sentence to punish you is a Community Correction Order and not an immediate term of imprisonment to be served, as sought by the Crown. \"**\n\n> 1. \"I make the following declaration pursuant to s.6AAA: but for your plea of guilty I would have convicted and sentenced you to 12 months' imprisonment to follow a three-year Community Correction Order.\"\n\n> 1. In respect to the two charges on the indictment an aggregate sentence will be imposed because it represents one course of conduct over a short period of time on the date set out on the indictment. \n\n**[DPP v Bowden](https://www.countycourt.vic.gov.au/court-decisions/summary-cases/dpp-v-bowden-2017-vcc-133)**\n\n> 1. **\"I fix no minimum period so you will be required to serve 18 months.\"**\n\n> 1. \"But for your plea of guilty and the operation of s.6AAA of the Sentencing Act 1991, I would have sentenced you to five years' imprisonment with a three-year minimum term.\"\n\n> 1. \"In the circumstances of your case, I propose to convicted you of the offence of aggravated burglary and sentence you to a term of imprisonment of 18 months.\"\n\n> 1. \"Immediately following your release, I sentence you to a community corrections order for a period of a further 24 months with a condition that you perform 200 hours of unpaid community work and that you receive appropriate mental health assessment and treatment as may be required during the period of that order, and those conditions are in addition to the core conditions attaching to a community corrections order which you have agreed to in the course of your assessment and which I am told by Mr Power you agree to today. \"\n\n**[DPP v Spokes](https://www.countycourt.vic.gov.au/court-decisions/summary-cases/dpp-v-spokes-2016-vcc-498)**\n\n> 1. **\"The total overall sentence is therefore 11 months' imprisonment to be followed by a two year CCO, and I will go back over the conditions shortly.\"**\n\n> 1. \"Sentence: 10 months imprisonment (302 days PSD) to be followed by a CCO of 2 years duration with unpaid community work, rehabilitative and supervision conditions.\"\n\n> 1. \"I direct that one month of the sentence on the two summary charges of unlicensed driving be served - it's actually driving whilst disqualified - I have come to realise.\"","timestamp":"2019-03-30T05:34:17+00:00","score":13},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"ejpxajh","kind":"comment","text":"I would say yes. there might be an issue with lack of data. But if you build something that works you can show this and use it as evidence to get enough data to make it work well","timestamp":"2019-03-30T07:15:26+00:00","score":1},{"role":"OP","user_id":"anon_f2c0bb31ce7b89ab","comment_id":"ejq6yi9","kind":"comment","text":"Hi cavedave, thanks for providing your input to my thread!\n\nI am unsure what exactly you meant when you said\n\n> But if you build something that works you can show this and use it as evidence to get enough data to make it work well\n\nSpecifically, would you be able to elaborate on what you meant when you referred to getting enough data to make it work well?\n\nThanks again for your response","timestamp":"2019-03-30T11:47:24+00:00","score":1},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"ejqiqh5","kind":"comment","text":"So if you try an easy algorithm like Naive Bayes. And say there are a few bins of sentences: No jail,1 year, 2 years, 2 years+. Id guess you might be able to get 80% accuracy with 200 sentencing recommendations. \n\nIf you can take that to your boss and say 'I did this in a few days' give me 2000+ sentencing recommendations and time to work on the input data soem more and I expect to get 90% accuracy.","timestamp":"2019-03-30T14:54:53+00:00","score":1},{"role":"OP","user_id":"anon_f2c0bb31ce7b89ab","comment_id":"ejqjkio","kind":"comment","text":"Hmmm I see what you mean. \n\nWhen you say \"X sentencing recommendations\" are you referring to X sentencing documents that have the sentencing duration labelled somewhere? The thing is that I need to manually label sentencing duration for training data and so it's less a matter of somebody withholding sentencing recommendations.\n\nI'm not entirely sure I understand how I'd be able to narrow Naive Bayes down to the point that it can pick out the effective sentencing from all the other sentencing strings but I will endeavour to learn more about it over the coming days.\n\nI appreciate your thoughtful response and I hopefully might have a better response to your prompt in a few days.","timestamp":"2019-03-30T15:05:07+00:00","score":1},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"ejql0cu","kind":"comment","text":"Ok I have read over your initial post. It changed since I first replied. \n\nHow do you know the \"The following strings are examples that\" are and the ones that are not the effective sentences? They look really similar to me. If you as an expert can describe the rule you use for deciding which class these sentences are in there is some hope of getting NLP to do it on small amounts of data.","timestamp":"2019-03-30T15:22:49+00:00","score":1},{"role":"OP","user_id":"anon_f2c0bb31ce7b89ab","comment_id":"ejqlqsj","kind":"comment","text":"> Ok I have read over your initial post. It changed since I first replied.\n\nMy apologies, I didn't want to scare people away with a wall of text but the context certainly helps clarify things.\n\n> How do you know the \"The following strings are examples that\" are and the ones that are not the effective sentences? \n\nWhilst I have no background in law, based on having poured over these documents I have identified the following semi rules:\n\n1. The total effective sentence is usually preceded by words such as \"tota\", \"effective\", \"minimum\", \"overall\".\n\n1. If the judge only once refers to sentencing the defendant then that sentence is the total effective sentence\n\n1. The total effective sentence is usually towards the end of the document\n\n> They look really similar to me.\n\nIndeed they look extremely similar in many cases; the fact that as a human it's already very difficult makes me worry about the ability of an algorithm to do the job.\n\nIt kills me knowing somewhere out there is almost certainly a database with all this information but it seems the Australian government has not made such a database public.","timestamp":"2019-03-30T15:31:32+00:00","score":1},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"ejqo6a6","kind":"comment","text":"Would another common law jurisdiction do? The UK releases a lot of court documents.","timestamp":"2019-03-30T15:59:58+00:00","score":1},{"role":"OP","user_id":"anon_f2c0bb31ce7b89ab","comment_id":"ejs4w4f","kind":"comment","text":"Yeah that might be a decent idea, I will investigate this over the next few weeks. Thankyou for the suggestion","timestamp":"2019-03-31T02:53:57+00:00","score":2}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_f2c0bb31ce7b89ab","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7884998e9ef10ad3","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ejpxajh","thanks_reply_id":"ejq6yi9","post_score":13,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_56b4deb861362354","answerer_user_id":"anon_bc9ffebe285eadd6","subreddit":"LanguageTechnology","timestamp":"2019-04-17T10:36:26+00:00","post_id":"be68cu","question":"Need help with texts classification task\n\nI am very New in the nlp field of machinelearning, but i have a task in a company where I am working. The task is to classify messages comming to the support-centre for 8 groups. When I tried to visualize the data from tfid matrix, I saw that there is no visisble consequences between groups. Then I tryed with random forest and it gave 36% accuracy. \nWhat are the ways to increase it? Is it possible to use words chunks or words tagging and how can I apply this techniques to my model?\n\nP. S. Sorry for my English","preferred_answer":"Tfidf using both unigrams and bigrams and a linear SVM usually gives pretty good results and is super easy to implement using sklearn.\n\nOtherwise try BERT or ULMFit if you have a gpu and the resources to put that in production. The Huggingface PyTorch port is good for BERT, allows gradient accumulation if your gpu isn't beefy enough. You can also use bert-as-service (Google it for the github repo) to act as a server.","full_conversation":[{"role":"OP","user_id":"anon_56b4deb861362354","comment_id":"be68cu","kind":"post","text":"Need help with texts classification task\n\nI am very New in the nlp field of machinelearning, but i have a task in a company where I am working. The task is to classify messages comming to the support-centre for 8 groups. When I tried to visualize the data from tfid matrix, I saw that there is no visisble consequences between groups. Then I tryed with random forest and it gave 36% accuracy. \nWhat are the ways to increase it? Is it possible to use words chunks or words tagging and how can I apply this techniques to my model?\n\nP. S. Sorry for my English","timestamp":"2019-04-17T10:36:26+00:00","score":2},{"role":"answerer","user_id":"anon_bc9ffebe285eadd6","comment_id":"el941vc","kind":"comment","text":"Tfidf using both unigrams and bigrams and a linear SVM usually gives pretty good results and is super easy to implement using sklearn.\n\nOtherwise try BERT or ULMFit if you have a gpu and the resources to put that in production. The Huggingface PyTorch port is good for BERT, allows gradient accumulation if your gpu isn't beefy enough. You can also use bert-as-service (Google it for the github repo) to act as a server.","timestamp":"2019-04-19T08:28:56+00:00","score":2},{"role":"OP","user_id":"anon_56b4deb861362354","comment_id":"em4keyj","kind":"comment","text":"Thanks for a comment, it was quite helpful. Currently I have about 83-84 accuracy by using tfidf with ngrams and selectkbest for finding the most important words. I use svm, because it perform accuracy higher for about 10% than random forest and some rnn which i tryed. \nBtw, I am not really sure if selectkbest is important. I tryed to give some parametres to countvecrotizer and it filters the words litteraly the same, but maybe it depends of a task","timestamp":"2019-04-30T09:48:46+00:00","score":1},{"role":"answerer","user_id":"anon_bc9ffebe285eadd6","comment_id":"em4mgu4","kind":"comment","text":"I haven't used selectkbest, just sklearn's tfidfvectorizer setting ngram_range=(1, 2) and feed to sklearn's LinearSVC.\n\nBut you should check out BERT, it's awesome.","timestamp":"2019-04-30T10:40:53+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_56b4deb861362354","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bc9ffebe285eadd6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"el941vc","thanks_reply_id":"em4keyj","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_6ea5379bf3e1a1c1","answerer_user_id":"anon_3aa37d6cc70e86a8","subreddit":"LanguageTechnology","timestamp":"2019-04-23T02:11:51+00:00","post_id":"bgap7o","question":"Best language model for 'middle-out' sentence construction?\n\nI imagine this is something GPT can do, but I am not sure what exactly this function should be called. Basically I have the first few words as well as the ending word of a sentence, and I want to fill out the middle. Anyone know?","preferred_answer":"BertForMaskedLM is closest to what you are looking to do. \n\nSee [3.3.1] in https://arxiv.org/pdf/1810.04805.pdf.\n\nNote that this task is built to replace 1 word : 1 word; if you want to get it to replace with an arbitrary (eg context-specific) number of words, I believe you'll either have to 1) retrain the model on your specific task (not terribly hard: easy to generate data and BertForMaskedLM is very close to what you'd be trying to do here, so not too much overhead, although GPU+eng time) or 2) do something like pre-populate it with some chosen number of [mask] tokens & let it fill in the blank.\n\nWhether you do #1 or #2 is probably going to depend on your use case (although I'd quickly start w/ #2 to see how good it is). The more words you're trying to get it to fill in in one go, the more I'd assume #1 will be required.","full_conversation":[{"role":"OP","user_id":"anon_6ea5379bf3e1a1c1","comment_id":"bgap7o","kind":"post","text":"Best language model for 'middle-out' sentence construction?\n\nI imagine this is something GPT can do, but I am not sure what exactly this function should be called. Basically I have the first few words as well as the ending word of a sentence, and I want to fill out the middle. Anyone know?","timestamp":"2019-04-23T02:11:51+00:00","score":2},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"eljvr1d","kind":"comment","text":"BertForMaskedLM is closest to what you are looking to do. \n\nSee [3.3.1] in https://arxiv.org/pdf/1810.04805.pdf.\n\nNote that this task is built to replace 1 word : 1 word; if you want to get it to replace with an arbitrary (eg context-specific) number of words, I believe you'll either have to 1) retrain the model on your specific task (not terribly hard: easy to generate data and BertForMaskedLM is very close to what you'd be trying to do here, so not too much overhead, although GPU+eng time) or 2) do something like pre-populate it with some chosen number of [mask] tokens & let it fill in the blank.\n\nWhether you do #1 or #2 is probably going to depend on your use case (although I'd quickly start w/ #2 to see how good it is). The more words you're trying to get it to fill in in one go, the more I'd assume #1 will be required.","timestamp":"2019-04-23T04:56:37+00:00","score":2},{"role":"OP","user_id":"anon_6ea5379bf3e1a1c1","comment_id":"elkvxtu","kind":"comment","text":"Thanks my friend! This works great with one word! I am trying to fill in 2-3 words. This does work sometimes when the context is clear.","timestamp":"2019-04-23T15:34:01+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"elkwx20","kind":"comment","text":"Very nice. It will probably work quite well on 2-3 words with some fine-tuning of the task.","timestamp":"2019-04-23T15:44:17+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6ea5379bf3e1a1c1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3aa37d6cc70e86a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eljvr1d","thanks_reply_id":"elkvxtu","post_score":2,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_2cb57b1956b9dce8","answerer_user_id":"anon_470049ac93572b63","subreddit":"LanguageTechnology","timestamp":"2019-04-24T10:30:17+00:00","post_id":"bgsyrd","question":"Need help with entity tagging\n\nI need to design a system which can identify `movie` and `production company` names in a sentence.\n\nThe approach that comes to my mind is to train a `NER` system on labeled data so that it identifies the corresponding entities. But what about new entities (movie or production company name) that trained system hasn't seen, how can we tag them.\n\n Labeled data: Sentences with the position of words that corresponds to movie or production company name\n\nI am a beginner in NLP, any help would be appreciated","preferred_answer":"In my case I have done something similar for an historical archive, where were interested in domain related entities. \n\nI used Spacy and one of the existing models. Since Spacy has online learning, you can update the model with the new entities that you need, and retrain it with new annotated data. \n\nIn the case of names of companies, you can enrich the data creating synthetic examples, in which you take sentences with names of companies and substitute them with other companies which don't appear in your dataset.\n\nYou will find here all the information that you need: [https://spacy.io/usage/training](https://spacy.io/usage/training)\n\nAnd... don't forget to add pseudo-rehearsal data to the training data to avoid the so called \"catastrophic interference\" (or for the Skype authors catastrophic forgetting) [https://explosion.ai/blog/pseudo-rehearsal-catastrophic-forgetting](https://explosion.ai/blog/pseudo-rehearsal-catastrophic-forgetting)","full_conversation":[{"role":"OP","user_id":"anon_2cb57b1956b9dce8","comment_id":"bgsyrd","kind":"post","text":"Need help with entity tagging\n\nI need to design a system which can identify `movie` and `production company` names in a sentence.\n\nThe approach that comes to my mind is to train a `NER` system on labeled data so that it identifies the corresponding entities. But what about new entities (movie or production company name) that trained system hasn't seen, how can we tag them.\n\n Labeled data: Sentences with the position of words that corresponds to movie or production company name\n\nI am a beginner in NLP, any help would be appreciated","timestamp":"2019-04-24T10:30:17+00:00","score":3},{"role":"answerer","user_id":"anon_470049ac93572b63","comment_id":"elu0o98","kind":"comment","text":"In my case I have done something similar for an historical archive, where were interested in domain related entities. \n\nI used Spacy and one of the existing models. Since Spacy has online learning, you can update the model with the new entities that you need, and retrain it with new annotated data. \n\nIn the case of names of companies, you can enrich the data creating synthetic examples, in which you take sentences with names of companies and substitute them with other companies which don't appear in your dataset.\n\nYou will find here all the information that you need: [https://spacy.io/usage/training](https://spacy.io/usage/training)\n\nAnd... don't forget to add pseudo-rehearsal data to the training data to avoid the so called \"catastrophic interference\" (or for the Skype authors catastrophic forgetting) [https://explosion.ai/blog/pseudo-rehearsal-catastrophic-forgetting](https://explosion.ai/blog/pseudo-rehearsal-catastrophic-forgetting)","timestamp":"2019-04-26T14:31:16+00:00","score":2},{"role":"OP","user_id":"anon_2cb57b1956b9dce8","comment_id":"elu1e07","kind":"comment","text":"Thanks for the suggestions have you used spacy for relation extraction or entity linking task","timestamp":"2019-04-26T14:38:22+00:00","score":1},{"role":"answerer","user_id":"anon_470049ac93572b63","comment_id":"elu1qx4","kind":"comment","text":"Right now I have a project for relation extraction \\\\but in this project I use Spacy only for text analysis (entities, POS, dependency paths) and then I use the extracted features to train classifiers. I'm not so far yet on this project, but domain-entity recognition works well, and with external classifiers I'm able to determine whether there is a relation or not and in which direction. Now I have to find out how to classify the relation type.\n\nBut I'm not sure how good can be Spacy to model the relation classification, I haven't tried it.","timestamp":"2019-04-26T14:41:54+00:00","score":2},{"role":"OP","user_id":"anon_2cb57b1956b9dce8","comment_id":"elu1zve","kind":"comment","text":"Ok, Thanks 😊","timestamp":"2019-04-26T14:44:22+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_2cb57b1956b9dce8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_470049ac93572b63","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"elu0o98","thanks_reply_id":"elu1e07","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_078bfd376dd15133","answerer_user_id":"anon_94590e794483ef4d","subreddit":"LanguageTechnology","timestamp":"2019-04-24T18:31:51+00:00","post_id":"bgy6r5","question":"Need help and pointers with industry tagging\n\nHey all. I've got a database of about 30k companies that I need to tagged to an industry/ business vertical. I can obtain a small dataset (probably <5k) of correctly tagged companies to use as training data. I'm also able to obtain more specific info like phone, email and address in hopes to improve the accuracy rate. \n\nWhile I can intuitively understand how all these pieces would fit together, I've never created a classifier like this before and am not sure what tools would best fit my use case here. Given that the data is really messy (misspelled names, incomplete addresses, missing data), I'm not expecting a crazy high accuracy rate. But I would like for this model to at least help cut down the amount of manual labor required. \n\nHow would you approach this problem and what algorithms would be better in this use case? Any help or pointers is appreciated.","preferred_answer":">\tcut down the amount of manual labor required\n\nThis is the key, in my opinion. Assuming that you need the 30k companies to be tagged with 100% accuracy but not necessarily 100% completeness, here’s what I would do.\n\nOne way or another, you will have to manually look at least 30k entries. All we want is to reduce the amount of time spent per entry during this manual validation. The fastest way to validate is a binary yes or no.\n\nTherefore, we want to create pairs of (company, tag), which we will accept or reject.\n\nConsidering that your dataset probably has high variance (each company will have different names and non-generalizable features), I would use k-Nearest Neighbors iteratively.\n\nFirst, chunk the 30k unlabeled companies into lets say 5k groups.\n\nFor each group of 5k companies, find the k-Nearest Neighbors in the original training set. Then for the 5k companies, you’ll have pairs of (company, tag) where the tags are derived from the nearest neighbors. You can throw them into a spreadsheet or something and manually accept or reject the pairing. For any company that has no accepted tags, manually add the tags.\n\nAdd the new labeled datapoints to the training set, and repeat with a new unlabeled chunk.\n\nThe ML part of the problem is figuring out how to best represent each company in a vector space. Maybe this is where you would use feature engineering / word vectors / etc.","full_conversation":[{"role":"OP","user_id":"anon_078bfd376dd15133","comment_id":"bgy6r5","kind":"post","text":"Need help and pointers with industry tagging\n\nHey all. I've got a database of about 30k companies that I need to tagged to an industry/ business vertical. I can obtain a small dataset (probably <5k) of correctly tagged companies to use as training data. I'm also able to obtain more specific info like phone, email and address in hopes to improve the accuracy rate. \n\nWhile I can intuitively understand how all these pieces would fit together, I've never created a classifier like this before and am not sure what tools would best fit my use case here. Given that the data is really messy (misspelled names, incomplete addresses, missing data), I'm not expecting a crazy high accuracy rate. But I would like for this model to at least help cut down the amount of manual labor required. \n\nHow would you approach this problem and what algorithms would be better in this use case? Any help or pointers is appreciated.","timestamp":"2019-04-24T18:31:51+00:00","score":5},{"role":"answerer","user_id":"anon_94590e794483ef4d","comment_id":"eloooiq","kind":"comment","text":">\tcut down the amount of manual labor required\n\nThis is the key, in my opinion. Assuming that you need the 30k companies to be tagged with 100% accuracy but not necessarily 100% completeness, here’s what I would do.\n\nOne way or another, you will have to manually look at least 30k entries. All we want is to reduce the amount of time spent per entry during this manual validation. The fastest way to validate is a binary yes or no.\n\nTherefore, we want to create pairs of (company, tag), which we will accept or reject.\n\nConsidering that your dataset probably has high variance (each company will have different names and non-generalizable features), I would use k-Nearest Neighbors iteratively.\n\nFirst, chunk the 30k unlabeled companies into lets say 5k groups.\n\nFor each group of 5k companies, find the k-Nearest Neighbors in the original training set. Then for the 5k companies, you’ll have pairs of (company, tag) where the tags are derived from the nearest neighbors. You can throw them into a spreadsheet or something and manually accept or reject the pairing. For any company that has no accepted tags, manually add the tags.\n\nAdd the new labeled datapoints to the training set, and repeat with a new unlabeled chunk.\n\nThe ML part of the problem is figuring out how to best represent each company in a vector space. Maybe this is where you would use feature engineering / word vectors / etc.","timestamp":"2019-04-24T20:07:59+00:00","score":1},{"role":"OP","user_id":"anon_078bfd376dd15133","comment_id":"elosnau","kind":"comment","text":"Hey thanks for your help, appreciate you detailing out the framework and model as well. I will do some reading up and testing.","timestamp":"2019-04-24T20:45:28+00:00","score":1},{"role":"answerer","user_id":"anon_94590e794483ef4d","comment_id":"elpjejo","kind":"comment","text":"I’m doing a somewhat similar project at work, so not a problem at all.\n\nIf you can make a simple model that has reasonable predictions, then cleaning up 30K datapoints is like five hours of manual effort, which is a lot better than weeks of development for a deep learning SOTA technology cloud-based blah blah blah with 99% accuracy.","timestamp":"2019-04-25T01:43:58+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_078bfd376dd15133","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_94590e794483ef4d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eloooiq","thanks_reply_id":"elosnau","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_961b3cbf2f18aef3","answerer_user_id":"anon_3aa37d6cc70e86a8","subreddit":"LanguageTechnology","timestamp":"2019-04-26T14:50:19+00:00","post_id":"bhn5p8","question":"State-of-the-art machine translation papers?\n\nFor class I have to compile a list of 15 state-of-the-art and influential machine translation papers. While I have searched, I was wondering if anyone had any good ones they would like to share. Is the cutting edge research very GNMT-oriented?\n\nEDIT: Current list:\n\n\nAttention Is All You Need\n\n\nMixture Models for Diverse Machine Translation: Tricks of the Trade\n\n\nAdaptive Input Representations for Neural Language Modeling\n\n\nPAY LESS ATTENTION WITH LIGHTWEIGHT AND DYNAMIC CONVOLUTIONS\n\n\nEffective Approaches to Attention-based Neural Machine Translation\n\n\nCross-lingual Language Model Pretraining\n\n\nDepthwise Separable Convolutions for Neural Machine Translation\n\n\nNEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE\n\n\nLearning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation\n\n\nGoogle’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation\n\n\nAchieving Open Vocabulary Neural Machine Translation with Hybrid Word-Character Models\n\n\nA Character-Level Decoder without Explicit Segmentation for Neural Machine Translation\n\n\nThe Best of Both Worlds: Combining Recent Advances in Neural Machine Translation\n\n\nPhrase-Based & Neural Unsupervised Machine Translation\n\n\nMeta-Learning for Low-Resource Neural Machine Translation","preferred_answer":"Transformer is the root of most SOTA. A few papers have hybrid rnns and eg self attention.\n\nFollow references from \"attention is all you need\". The fairseq repo (https://github.com/pytorch/fairseq) and tensor2tensor repos list various papers that are related or will be helpful.","full_conversation":[{"role":"OP","user_id":"anon_961b3cbf2f18aef3","comment_id":"bhn5p8","kind":"post","text":"State-of-the-art machine translation papers?\n\nFor class I have to compile a list of 15 state-of-the-art and influential machine translation papers. While I have searched, I was wondering if anyone had any good ones they would like to share. Is the cutting edge research very GNMT-oriented?\n\nEDIT: Current list:\n\n\nAttention Is All You Need\n\n\nMixture Models for Diverse Machine Translation: Tricks of the Trade\n\n\nAdaptive Input Representations for Neural Language Modeling\n\n\nPAY LESS ATTENTION WITH LIGHTWEIGHT AND DYNAMIC CONVOLUTIONS\n\n\nEffective Approaches to Attention-based Neural Machine Translation\n\n\nCross-lingual Language Model Pretraining\n\n\nDepthwise Separable Convolutions for Neural Machine Translation\n\n\nNEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE\n\n\nLearning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation\n\n\nGoogle’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation\n\n\nAchieving Open Vocabulary Neural Machine Translation with Hybrid Word-Character Models\n\n\nA Character-Level Decoder without Explicit Segmentation for Neural Machine Translation\n\n\nThe Best of Both Worlds: Combining Recent Advances in Neural Machine Translation\n\n\nPhrase-Based & Neural Unsupervised Machine Translation\n\n\nMeta-Learning for Low-Resource Neural Machine Translation","timestamp":"2019-04-26T14:50:19+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"elu47gm","kind":"comment","text":"Transformer is the root of most SOTA. A few papers have hybrid rnns and eg self attention.\n\nFollow references from \"attention is all you need\". The fairseq repo (https://github.com/pytorch/fairseq) and tensor2tensor repos list various papers that are related or will be helpful.","timestamp":"2019-04-26T15:06:08+00:00","score":2},{"role":"OP","user_id":"anon_961b3cbf2f18aef3","comment_id":"elwmay8","kind":"comment","text":"Thanks. I have incorporated many papers from that list. My current draft is in the original post, in case you have any constructive criticism.","timestamp":"2019-04-27T11:53:15+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"elxboaq","kind":"comment","text":"Glad it was helpful. I also really like https://arxiv.org/abs/1808.09381 --referenced from the fairseq link-- in the same vein as papers like \"Cross-lingual Language Model Pretraining\" for successfully using outside (non-parallel) data for augmentation. YMMV though, I don't think you're going to get yelled at for leaving that one off this list.","timestamp":"2019-04-27T17:58:07+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_961b3cbf2f18aef3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3aa37d6cc70e86a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"elu47gm","thanks_reply_id":"elwmay8","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ccb12b57de410d44","answerer_user_id":"anon_178ea403d056737c","subreddit":"LanguageTechnology","timestamp":"2019-04-28T19:12:04+00:00","post_id":"bies07","question":"F1-Score\n\nCan someone explain what the numbers mean? For example, is it better to get a higher or lower number?","preferred_answer":"This depends on the problem, the number of classes and their occurrence in the targets of the data. There is no generic answer to your question.","full_conversation":[{"role":"OP","user_id":"anon_ccb12b57de410d44","comment_id":"bies07","kind":"post","text":"F1-Score\n\nCan someone explain what the numbers mean? For example, is it better to get a higher or lower number?","timestamp":"2019-04-28T19:12:04+00:00","score":2},{"role":"answerer","user_id":"anon_178ea403d056737c","comment_id":"em03i76","kind":"comment","text":"This depends on the problem, the number of classes and their occurrence in the targets of the data. There is no generic answer to your question.","timestamp":"2019-04-28T19:20:45+00:00","score":3},{"role":"OP","user_id":"anon_ccb12b57de410d44","comment_id":"em0613j","kind":"comment","text":"OK, thanks\n\nI had one last question: I'm looking to find the accuracy of the \"Quakebot\" system, which takes data on earthquakes and creates a few sentences reporting on it. What would the True/False positives and negatives in this scenario be? If precision and recall aren't suitable for something like Quakebot, what is?","timestamp":"2019-04-28T19:50:59+00:00","score":1},{"role":"answerer","user_id":"anon_178ea403d056737c","comment_id":"em0bh9p","kind":"comment","text":"This should be denoted in an according publication.","timestamp":"2019-04-28T20:55:22+00:00","score":2},{"role":"OP","user_id":"anon_ccb12b57de410d44","comment_id":"em0emls","kind":"comment","text":"There is no publication on it, it's just a system used by the LA Times","timestamp":"2019-04-28T21:31:42+00:00","score":1},{"role":"answerer","user_id":"anon_178ea403d056737c","comment_id":"em1e3xg","kind":"comment","text":"Then you are leaving out so much information that it is not possible to tell anything about it. It is not even clear what exactly the input data is.\n\nHow about drawing 10 random samples and checking manually?","timestamp":"2019-04-29T05:12:25+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_ccb12b57de410d44","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_178ea403d056737c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"em03i76","thanks_reply_id":"em0613j","post_score":2,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_543e2fa813e917ce","answerer_user_id":"anon_cb1fb082dd7f92d7","subreddit":"LanguageTechnology","timestamp":"2019-05-02T00:12:19+00:00","post_id":"bjoheq","question":"NLP area of research recommendations?\n\nHello all, \n\nI have an opportunity to do an independent study/grad research project at my university under a professor I've had. Said prof teaches deep learning, NLP, and CV based courses, some of which I've taken. \n\nRecently, I asked if I could do NLP research under his guidance/supervision. He was open to the idea, but under the pretense that the research idea was mine and that I was the driving force behind its direction. Essentially, he'd be there for course corrections if my findings were faulty.\n\nThat sounds great! But I'm not sure what to research. Better put, I'm not sure what goals appropriately scoped for 1-2 semesters worth of work. (I'm an MS student, not in a PhD program.)\n\nMy inclination is information extraction, text summarization, and topic modeling (in the context of extracting explicit tasks from correspondence.) \n\nAny thoughts on areas that I should explore are appreciated!","preferred_answer":"These are the topics majority of the NLP community is currently interested in: \n1) Transfer Learning for NLP: Just like DNNs led to this surge in the interest for CV by being able to fine-tune a very deep CNN which was pre-trained on ImageNet, people are looking at ways we can pre-train an NLP model and use it as a starting point for down-stream NLP tasks like Summarization, QA etc. Some good papers in this area would be CoVe, ELMo, ULMFiT, BERT, GPT, GPT-2 etc. These are also some of the hottest papers in recent days.\n\n2) Another interesting domain is designing linguistically self-informed NLP models. Prof. Chris Manning is a strong advocate of this approach. The reasoning is that Language, after all, has some structure like Chomsky says. So, coming up with models which can exploit such structures can be useful. This also falls under the domain of using linguistic priors for NLP. You can listen to [this](https://www.abigailsee.com/2018/02/21/deep-learning-structure-and-innate-priors.html) wonderful debate/summary on this topic. Recursive Neural Networks exploit such properties of language (though not much successful). Richard Socher has a lot of papers on Recursive NNs. [This](https://arxiv.org/abs/1804.08199) is another recent interesting paper in this area.\n\n3) Information Extraction: Of course information extraction is a wonderful use-case of NLP. There are many sub-problems in IE. Open-domain QA is a good example where a model should answer questions whose answers can be anywhere in a large corpus (say Wikipedia). Multi-document summarization is another example where, as the name suggests, you try to automatically summarize multiple related documents. There are lots of beautiful ideas that can be explored in this area like applying reinforcement learning, multi-task learning etc. Bonus: My thesis was actually on multi-task learning of QA and Text Summarization, so ping me if you want some pointers on this. But remember, these are some fancy NLP applications which are also very difficult and need very high-level language understanding (for the models)\n\n4) Extending/Creating Knowledge bases in an unsupervised or semi-supervised manner is another interesting topic. Some people work on task-specific knowledge-base creation too. \n\n5) Automatic Speech Recognition (maybe one of the most difficult tasks of all)\n\n6) Learning multi-lingual embeddings: Word embeddings for low-resource languages are difficult to learn since we may not even have unsupervised data for such tasks. Even if we have that, labelled datasets may be hard to come by. So, if we can learn universal embeddings which are language agnostic wrt the vector space they are mapped to, we can alleviate many of the above mentioned problems. [These](https://github.com/facebookresearch/MUSE) [are](https://arxiv.org/abs/1808.08933) [some](http://www.cs.cmu.edu/~wammar/pubs/multilingual.pdf) good resources on this.\n\n7) Gender Bias resolution/Fairness in ML: as the name implies! [This](https://arxiv.org/abs/1707.09457) paper from our lab would be a good starting point. Active research is also conducted on the use of GANs for this task.\n\n​\n\nApart from these hot topics, some fun topics/ideas to explore would be:\n\n1) Exploring the already present architectures like BERT, GPT etc. to actually try to understand what properties of language they are learning.\n\n2) Irony/Sarcasm detection for sentiment analysis.\n\n3) Text Normalization, for low-resource languages.\n\netc.\n\n​\n\nIf you are still lost, I would suggest starting with some shared task like the ones in SemEval, CoNLL or the challenges in Kaggle and dive right away into the problem, doing literature survey etc.\n\n​\n\nAs always, feel free to shoot any question my way!","full_conversation":[{"role":"OP","user_id":"anon_543e2fa813e917ce","comment_id":"bjoheq","kind":"post","text":"NLP area of research recommendations?\n\nHello all, \n\nI have an opportunity to do an independent study/grad research project at my university under a professor I've had. Said prof teaches deep learning, NLP, and CV based courses, some of which I've taken. \n\nRecently, I asked if I could do NLP research under his guidance/supervision. He was open to the idea, but under the pretense that the research idea was mine and that I was the driving force behind its direction. Essentially, he'd be there for course corrections if my findings were faulty.\n\nThat sounds great! But I'm not sure what to research. Better put, I'm not sure what goals appropriately scoped for 1-2 semesters worth of work. (I'm an MS student, not in a PhD program.)\n\nMy inclination is information extraction, text summarization, and topic modeling (in the context of extracting explicit tasks from correspondence.) \n\nAny thoughts on areas that I should explore are appreciated!","timestamp":"2019-05-02T00:12:19+00:00","score":2},{"role":"answerer","user_id":"anon_cb1fb082dd7f92d7","comment_id":"ema18tb","kind":"comment","text":"These are the topics majority of the NLP community is currently interested in: \n1) Transfer Learning for NLP: Just like DNNs led to this surge in the interest for CV by being able to fine-tune a very deep CNN which was pre-trained on ImageNet, people are looking at ways we can pre-train an NLP model and use it as a starting point for down-stream NLP tasks like Summarization, QA etc. Some good papers in this area would be CoVe, ELMo, ULMFiT, BERT, GPT, GPT-2 etc. These are also some of the hottest papers in recent days.\n\n2) Another interesting domain is designing linguistically self-informed NLP models. Prof. Chris Manning is a strong advocate of this approach. The reasoning is that Language, after all, has some structure like Chomsky says. So, coming up with models which can exploit such structures can be useful. This also falls under the domain of using linguistic priors for NLP. You can listen to [this](https://www.abigailsee.com/2018/02/21/deep-learning-structure-and-innate-priors.html) wonderful debate/summary on this topic. Recursive Neural Networks exploit such properties of language (though not much successful). Richard Socher has a lot of papers on Recursive NNs. [This](https://arxiv.org/abs/1804.08199) is another recent interesting paper in this area.\n\n3) Information Extraction: Of course information extraction is a wonderful use-case of NLP. There are many sub-problems in IE. Open-domain QA is a good example where a model should answer questions whose answers can be anywhere in a large corpus (say Wikipedia). Multi-document summarization is another example where, as the name suggests, you try to automatically summarize multiple related documents. There are lots of beautiful ideas that can be explored in this area like applying reinforcement learning, multi-task learning etc. Bonus: My thesis was actually on multi-task learning of QA and Text Summarization, so ping me if you want some pointers on this. But remember, these are some fancy NLP applications which are also very difficult and need very high-level language understanding (for the models)\n\n4) Extending/Creating Knowledge bases in an unsupervised or semi-supervised manner is another interesting topic. Some people work on task-specific knowledge-base creation too. \n\n5) Automatic Speech Recognition (maybe one of the most difficult tasks of all)\n\n6) Learning multi-lingual embeddings: Word embeddings for low-resource languages are difficult to learn since we may not even have unsupervised data for such tasks. Even if we have that, labelled datasets may be hard to come by. So, if we can learn universal embeddings which are language agnostic wrt the vector space they are mapped to, we can alleviate many of the above mentioned problems. [These](https://github.com/facebookresearch/MUSE) [are](https://arxiv.org/abs/1808.08933) [some](http://www.cs.cmu.edu/~wammar/pubs/multilingual.pdf) good resources on this.\n\n7) Gender Bias resolution/Fairness in ML: as the name implies! [This](https://arxiv.org/abs/1707.09457) paper from our lab would be a good starting point. Active research is also conducted on the use of GANs for this task.\n\n​\n\nApart from these hot topics, some fun topics/ideas to explore would be:\n\n1) Exploring the already present architectures like BERT, GPT etc. to actually try to understand what properties of language they are learning.\n\n2) Irony/Sarcasm detection for sentiment analysis.\n\n3) Text Normalization, for low-resource languages.\n\netc.\n\n​\n\nIf you are still lost, I would suggest starting with some shared task like the ones in SemEval, CoNLL or the challenges in Kaggle and dive right away into the problem, doing literature survey etc.\n\n​\n\nAs always, feel free to shoot any question my way!","timestamp":"2019-05-02T01:31:53+00:00","score":15},{"role":"OP","user_id":"anon_543e2fa813e917ce","comment_id":"emaghie","kind":"comment","text":"Thank you for the wonderful summary and all the effort you put into this! Would you mind if I PM you with a few questions? It sounds like that would be alright with you","timestamp":"2019-05-02T04:36:48+00:00","score":1},{"role":"answerer","user_id":"anon_cb1fb082dd7f92d7","comment_id":"emajxic","kind":"comment","text":"Sure! Go ahead!","timestamp":"2019-05-02T05:31:37+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_543e2fa813e917ce","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cb1fb082dd7f92d7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ema18tb","thanks_reply_id":"emaghie","post_score":2,"answer_score":15,"preferred_answer_is_top_level":true}} {"user_id":"anon_f6908a00db712f35","answerer_user_id":"anon_1c62c4e9829e09e0","subreddit":"LanguageTechnology","timestamp":"2019-05-02T17:04:15+00:00","post_id":"bjxdpc","question":"What are some good NLPaaS companies?\n\nI’m aware of Google, Amazon and Microsoft; but want to see what you all might know. I’m looking to find an API to get an idea of the context of articles.\n\n\n Thanks!","preferred_answer":"[https://cloud.google.com/natural-language/](https://cloud.google.com/natural-language/) is probably the best option today for your needs. We are using it inside of [NLPCraft](https://nlpcraft.org).","full_conversation":[{"role":"OP","user_id":"anon_f6908a00db712f35","comment_id":"bjxdpc","kind":"post","text":"What are some good NLPaaS companies?\n\nI’m aware of Google, Amazon and Microsoft; but want to see what you all might know. I’m looking to find an API to get an idea of the context of articles.\n\n\n Thanks!","timestamp":"2019-05-02T17:04:15+00:00","score":3},{"role":"answerer","user_id":"anon_1c62c4e9829e09e0","comment_id":"emc45ac","kind":"comment","text":"[https://cloud.google.com/natural-language/](https://cloud.google.com/natural-language/) is probably the best option today for your needs. We are using it inside of [NLPCraft](https://nlpcraft.org).","timestamp":"2019-05-02T18:00:57+00:00","score":2},{"role":"OP","user_id":"anon_f6908a00db712f35","comment_id":"emc9ruv","kind":"comment","text":"Thanks what exactly is NLPCraft? Like a layer on top of Google NLP?","timestamp":"2019-05-02T18:55:35+00:00","score":1},{"role":"answerer","user_id":"anon_1c62c4e9829e09e0","comment_id":"eme50y0","kind":"comment","text":"No, it's one of the NLP engines we are using inside. [NLPCraft](https://nlpcraft.org/) is an open source library for adding a natural language interface to any applications. Think Amazon Alexa that is developer friendly, works with any private data source, has no hardware or software lock-in while giving you more NLP powers.","timestamp":"2019-05-03T08:07:25+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_f6908a00db712f35","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1c62c4e9829e09e0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"emc45ac","thanks_reply_id":"emc9ruv","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_52046ace68ac266f","answerer_user_id":"anon_eff503c005a1b7f9","subreddit":"LanguageTechnology","timestamp":"2019-05-10T20:08:15+00:00","post_id":"bn33v0","question":"Converting English numbers (in words) into digits\n\nI'm looking for libraries (or algorithms) to parse and convert English words in a sentence/phrase into digits.\n\n​\n\nFor e.g\n\nMy dog is five years old -> My dog is 5 years old\n\nI have two and a half million rocks -> I have 2500000 rocks\n\nThe elephant weights twenty two point five pounds -> The elephant weights 22.5 pounds\n\nI have three green balls, two red balls, and 100 yellow balls -> I have 3 green balls, 2 red balls, and 100 yellow balls\n\n​\n\nThe closest thing I have found is this ruby library but it doesn't parse from an input sentence: [https://github.com/markburns/numbers\\_in\\_words](https://github.com/markburns/numbers_in_words)\n\n​\n\nAnybody with recommendations?","preferred_answer":"I found this on a quick search https://github.com/JDongian/words2num","full_conversation":[{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"bn33v0","kind":"post","text":"Converting English numbers (in words) into digits\n\nI'm looking for libraries (or algorithms) to parse and convert English words in a sentence/phrase into digits.\n\n​\n\nFor e.g\n\nMy dog is five years old -> My dog is 5 years old\n\nI have two and a half million rocks -> I have 2500000 rocks\n\nThe elephant weights twenty two point five pounds -> The elephant weights 22.5 pounds\n\nI have three green balls, two red balls, and 100 yellow balls -> I have 3 green balls, 2 red balls, and 100 yellow balls\n\n​\n\nThe closest thing I have found is this ruby library but it doesn't parse from an input sentence: [https://github.com/markburns/numbers\\_in\\_words](https://github.com/markburns/numbers_in_words)\n\n​\n\nAnybody with recommendations?","timestamp":"2019-05-10T20:08:15+00:00","score":8},{"role":"answerer","user_id":"anon_eff503c005a1b7f9","comment_id":"en238gs","kind":"comment","text":"I found this on a quick search https://github.com/JDongian/words2num","timestamp":"2019-05-10T21:36:57+00:00","score":2},{"role":"OP","user_id":"anon_52046ace68ac266f","comment_id":"en2i310","kind":"comment","text":">https://github.com/JDongian/words2num\n\nThanks! Although it looks similar to the ruby library where it doesn't take a sentence and requires parsing the words relating to the numbers first","timestamp":"2019-05-11T00:06:24+00:00","score":1},{"role":"answerer","user_id":"anon_eff503c005a1b7f9","comment_id":"en2jgfr","kind":"comment","text":"My bad! I misunderstood. As mentioned in the other comment NER and then using this library should work.","timestamp":"2019-05-11T00:20:53+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_52046ace68ac266f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_eff503c005a1b7f9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"en238gs","thanks_reply_id":"en2i310","post_score":8,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_097e0e34c8d08bc2","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2019-05-22T16:41:53+00:00","post_id":"brr15l","question":"How to use LSTM or CNN or any other method for classifying very long text sequences?\n\nI am doing document level text classification and the longest is \\~80,000 words. I used doc2vec (gensim) for the classification task but I am not convinced with the results. I want to use LSTM/CNN but setting the max\\_sequence\\_length to 80000 is not practical. I am using the tokenized format of the document such that all the punctuations (including the period) are removed and so all sentences are like below:\n\n**Document**: Place 25 items in the box. Look for the adjacent ones.\n\n**Tokenized**: place # item in the box look for the adjacent ones\n\nI am also wondering why I need to use max\\_sequence\\_length if I use CNN because CNN uses a sliding window for feature extraction, unlike LSTM. Or maybe if I could chunk the sequence but I am unclear as to how to do that.\n\nI also tried [HAN](https://www.cs.cmu.edu/~./hovy/papers/16HLT-hierarchical-attention-networks.pdf) but not convinced by the results. (compared to the baseline in the paper I am referring to).\n\nAnother thought would be to just use CNN to extract features from the long document but again this feature vector will be quite long too.\n\nAny suggestions? Thanks a lot!","preferred_answer":"One thing that you can do with standard RNNs / LSTMs (not bidirectional!) during inference is that you can take a chunk e.g. of 1000 tokens or whatever your max_sequence_length, take the end state of that chunk, and feed it in as the start state of the next chunk. \n\nDuring training IIRC the standard assumption is that if the whole 80000 token document belongs to class X (e.g. it's about legal domain, not sports) then you can just chunk it up and treat that every 1000 token chunk also belongs to class X, so just generate many training examples from that single document.","full_conversation":[{"role":"OP","user_id":"anon_097e0e34c8d08bc2","comment_id":"brr15l","kind":"post","text":"How to use LSTM or CNN or any other method for classifying very long text sequences?\n\nI am doing document level text classification and the longest is \\~80,000 words. I used doc2vec (gensim) for the classification task but I am not convinced with the results. I want to use LSTM/CNN but setting the max\\_sequence\\_length to 80000 is not practical. I am using the tokenized format of the document such that all the punctuations (including the period) are removed and so all sentences are like below:\n\n**Document**: Place 25 items in the box. Look for the adjacent ones.\n\n**Tokenized**: place # item in the box look for the adjacent ones\n\nI am also wondering why I need to use max\\_sequence\\_length if I use CNN because CNN uses a sliding window for feature extraction, unlike LSTM. Or maybe if I could chunk the sequence but I am unclear as to how to do that.\n\nI also tried [HAN](https://www.cs.cmu.edu/~./hovy/papers/16HLT-hierarchical-attention-networks.pdf) but not convinced by the results. (compared to the baseline in the paper I am referring to).\n\nAnother thought would be to just use CNN to extract features from the long document but again this feature vector will be quite long too.\n\nAny suggestions? Thanks a lot!","timestamp":"2019-05-22T16:41:53+00:00","score":13},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"eog32j2","kind":"comment","text":"One thing that you can do with standard RNNs / LSTMs (not bidirectional!) during inference is that you can take a chunk e.g. of 1000 tokens or whatever your max_sequence_length, take the end state of that chunk, and feed it in as the start state of the next chunk. \n\nDuring training IIRC the standard assumption is that if the whole 80000 token document belongs to class X (e.g. it's about legal domain, not sports) then you can just chunk it up and treat that every 1000 token chunk also belongs to class X, so just generate many training examples from that single document.","timestamp":"2019-05-22T18:28:54+00:00","score":8},{"role":"OP","user_id":"anon_097e0e34c8d08bc2","comment_id":"eog3utt","kind":"comment","text":"Thanks a lot for your answer. I also thought of the latter approach but do you mean that do similar chunking for the test documents as well? Thanks!","timestamp":"2019-05-22T18:37:01+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"eog61dh","kind":"comment","text":"Well no, for test documents you can do the first approach - it's very inconvenient (though probably possible to implement) for training, but for inference you just loop over the chunks (forwarding the end state as the next chunk's start state) and run the final classification layers on the end state of the last chunk.","timestamp":"2019-05-22T18:57:36+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_097e0e34c8d08bc2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eog32j2","thanks_reply_id":"eog3utt","post_score":13,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_c6737cde4317bd27","answerer_user_id":"anon_da52b4c4bdebd51b","subreddit":"LanguageTechnology","timestamp":"2019-05-24T04:45:45+00:00","post_id":"bscqw7","question":"How to use ELMO, BERT, ULMFit, etc with PyTorch?\n\nHello,\n\nΤhere has been a great development in recent years regarding transfer learning in NLP. I'd like to take advantage of the techniques mentioned in the title BUT i can't figure out the proper way to do it. Coding and training it from scratch is either extremely hard or impossible! PyTorch itself doesn't provide something native in order to use those pretrained models. ULMfit appears in [fast.ai](https://fast.ai), ELMO in Allen NLP and BERT in the github repository of hugginface.\n\nI will do my BSc Thesis in Deep Learning & Sentiment Analysis and i can't find good resources in order to learn how to use them. For instance, the example in the github repository of hugginface regarding text classification with BERT, is 1000 lines of code which is kinda discouraging.\n\nHas anyone worked with them in PyTorch? Could someone guide me on how to approach this?\n\nThank you very much :)","preferred_answer":"In BERT there aren't actually any pretrained embeddings. Like ELMO, Bert is the model itself and you pass in your own text to the model to get the embeddings for that specific text. \n\nI've used [this embedder](https://allenai.github.io/allennlp-docs/api/allennlp.modules.token_embedders.html#bert-token-embedder) and [this tutorial](http://mlexplained.com/2019/01/30/an-in-depth-tutorial-to-allennlp-from-basics-to-elmo-and-bert/) is a good introduction.","full_conversation":[{"role":"OP","user_id":"anon_c6737cde4317bd27","comment_id":"bscqw7","kind":"post","text":"How to use ELMO, BERT, ULMFit, etc with PyTorch?\n\nHello,\n\nΤhere has been a great development in recent years regarding transfer learning in NLP. I'd like to take advantage of the techniques mentioned in the title BUT i can't figure out the proper way to do it. Coding and training it from scratch is either extremely hard or impossible! PyTorch itself doesn't provide something native in order to use those pretrained models. ULMfit appears in [fast.ai](https://fast.ai), ELMO in Allen NLP and BERT in the github repository of hugginface.\n\nI will do my BSc Thesis in Deep Learning & Sentiment Analysis and i can't find good resources in order to learn how to use them. For instance, the example in the github repository of hugginface regarding text classification with BERT, is 1000 lines of code which is kinda discouraging.\n\nHas anyone worked with them in PyTorch? Could someone guide me on how to approach this?\n\nThank you very much :)","timestamp":"2019-05-24T04:45:45+00:00","score":19},{"role":"answerer","user_id":"anon_da52b4c4bdebd51b","comment_id":"eonqrzp","kind":"comment","text":"In BERT there aren't actually any pretrained embeddings. Like ELMO, Bert is the model itself and you pass in your own text to the model to get the embeddings for that specific text. \n\nI've used [this embedder](https://allenai.github.io/allennlp-docs/api/allennlp.modules.token_embedders.html#bert-token-embedder) and [this tutorial](http://mlexplained.com/2019/01/30/an-in-depth-tutorial-to-allennlp-from-basics-to-elmo-and-bert/) is a good introduction.","timestamp":"2019-05-24T17:33:56+00:00","score":1},{"role":"OP","user_id":"anon_c6737cde4317bd27","comment_id":"eony798","kind":"comment","text":"Thank you! They will be helpful, especially the tutorial. By the way, is it possible to configure and create the embeddings with Allen NLP and then transfer them to PyTorch? So that i can use them with the architectures that i will build with it.","timestamp":"2019-05-24T19:01:58+00:00","score":1},{"role":"answerer","user_id":"anon_da52b4c4bdebd51b","comment_id":"eoo0elm","kind":"comment","text":"I've only used it once but when I did I'm pretty sure the embedder just returned a pytorch tensor of size (batch_size, seq_len, emb_dim).","timestamp":"2019-05-24T19:28:12+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c6737cde4317bd27","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_da52b4c4bdebd51b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eonqrzp","thanks_reply_id":"eony798","post_score":19,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_da0a3189077ccc03","answerer_user_id":"anon_e7fa7f3ead7655f2","subreddit":"LanguageTechnology","timestamp":"2019-05-26T17:43:49+00:00","post_id":"btary6","question":"Best data formats to store text data on disk, for fast retrieval using index or key ?\n\nI have a ton of text data that I would like to store to disk since it won't all fit into ram, but I would like to retrieve certain rows quickly using an index or key.\n\nSo far it's just rows of text data. I haven't implemented any permanent index or key yet, since the data format chosen may affect that. A situation might be that I'll need to access the text from rows 34, 8493, 39993, 333, and 4903 in an instant. I can not only load a subset because the user may query any of the rows, not just a subset\n\nI was looking at numpy's memmap at first, but it looks like that's won't be the most optimal solution for text data.\n\nI am also looking at hdfy / h5py / pytables but it's unclear these data formats are optimal for text data.\n\nFinally, I also come across SQLite/sqlite3 . I would prefer to avoid this format since I don't want to learn too much database stuff at the moment, but if it's the best option I will use it.","preferred_answer":"A database is your best bet.","full_conversation":[{"role":"OP","user_id":"anon_da0a3189077ccc03","comment_id":"btary6","kind":"post","text":"Best data formats to store text data on disk, for fast retrieval using index or key ?\n\nI have a ton of text data that I would like to store to disk since it won't all fit into ram, but I would like to retrieve certain rows quickly using an index or key.\n\nSo far it's just rows of text data. I haven't implemented any permanent index or key yet, since the data format chosen may affect that. A situation might be that I'll need to access the text from rows 34, 8493, 39993, 333, and 4903 in an instant. I can not only load a subset because the user may query any of the rows, not just a subset\n\nI was looking at numpy's memmap at first, but it looks like that's won't be the most optimal solution for text data.\n\nI am also looking at hdfy / h5py / pytables but it's unclear these data formats are optimal for text data.\n\nFinally, I also come across SQLite/sqlite3 . I would prefer to avoid this format since I don't want to learn too much database stuff at the moment, but if it's the best option I will use it.","timestamp":"2019-05-26T17:43:49+00:00","score":2},{"role":"answerer","user_id":"anon_e7fa7f3ead7655f2","comment_id":"eovgzti","kind":"comment","text":"A database is your best bet.","timestamp":"2019-05-26T18:25:29+00:00","score":5},{"role":"OP","user_id":"anon_da0a3189077ccc03","comment_id":"eovv3h2","kind":"comment","text":"Thanks! It looks like the type I am looking for is a key:value store database.","timestamp":"2019-05-26T20:05:10+00:00","score":1},{"role":"answerer","user_id":"anon_e7fa7f3ead7655f2","comment_id":"eowniky","kind":"comment","text":"If I were you I would start with sqlite, if it is good enough for\nyour dataset, stick with it (but read about tokyo cabinet).\n\nI did (extensive?) work on key-value stores:\n\n- LevelDB has not transaction, which mean in case of code, power,\n hard disk failure you data is corrupted you need to restart\n from scratch!!!\n\n- LMDB, good on paper but memory based, so you must have a lot of\n memory.\n\n- sqlite4 lsm (via https://github.com/coleifer/python-lsm-db/)\n leaks memory tested on 5Go dataset.\n\n- wiredtiger difficult to fine tune, but it would be your best\n bet. The Python 3 API is not documented but I use it in\n [hoply](https://github.com/amirouche/hoply/).\n\n- RocksDB, may be good but the transaction API is not bound in\n Python as of\n yet (https://github.com/twmht/python-rocksdb/issues/36)\n\n- Oracle Berkeley DB, VERY SLOW.\n\n- There is also tokyo cabinet and kyoto cabinet but they don't\n support transactions.\n\n- FoundationDB could be an option even in single machine, single\n process use but there is some limitations that wiredtiger\n doesn't have:\n https://apple.github.io/foundationdb/known-limitations.html\n\n- There is also http://sophia.systems, I did not try it, yet.\n\nTo be honest, I would be very glad if you could try hoply with\nwiredtiger backend. I have been working on that project for at\nleast 3 years, that would help for my (research) work in NLP that\nfits the bigger than RAM niche for those that don't have dozens\nof terabytes of RAM. I am software engineer by trade. Let me know\nif you are interested, I will make a few changes to the repo and\nmake a new release to ease the on-boarding. Maybe add a script or\ntwo to help your particular use case. You store you data in tsv\nor csv correct?\n\nAnd to be VERY honest, I am transitioning from Python to Chez\nScheme\n[(1)[https://www.scheme.com/]][(2)[https://en.wikipedia.org/wiki/Scheme_(programming_language)]]\nfor my \"data science\" work because Python is nice because lots of\nexisting libraries but once you adventure outside the confort of\nsingle thread application it is a pain. Multiprocessing?! Not\ngood enough. Cython? Too painful. I prefer to do all my work in\nthe same language. I benchmarked a triple store (better but\nsimilar design as hoply) written on top of wiredtiger to be two\ntimes faster than blazegraph (without the SPARQL cruft).\n\nI read people succeed at building (massive?) stuff on top of\ntokyo / kyoto cabinet stuff so maybe it can work. It seems to map\nnicely to your usecase in the sens you don't need the database to\nbe ordered you only need to retrieve a few keys that are not\nnecessarly collocated.\n\nPersonally I am hooked to ordered key-value store and it seems to\nbe a trend.","timestamp":"2019-05-26T23:10:44+00:00","score":1},{"role":"OP","user_id":"anon_da0a3189077ccc03","comment_id":"eowoss2","kind":"comment","text":"Thanks, I'll try sqllite first. \n\n>, I would be very glad if you could try hoply with wiredtiger backend. I have been working on that project for at least 3 years, that would help for my (research) work in NLP that fits the bigger than RAM niche for those that don't have dozens of terabytes of RAM. I am software engineer by trade. Let me know if you are interested, I will make a few changes to the repo and make a new release to ease the on-boarding. Maybe add a script or two to help your particular use case. You store you data in tsv or csv correct?\n\nSince this is a project for NLP , I suggest posted this to /r/MachineLearningCollab","timestamp":"2019-05-26T23:19:13+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_da0a3189077ccc03","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e7fa7f3ead7655f2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eovgzti","thanks_reply_id":"eovv3h2","post_score":2,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_d77813f061c6d77e","answerer_user_id":"anon_54c3a58768f5cee9","subreddit":"LanguageTechnology","timestamp":"2019-05-31T09:00:43+00:00","post_id":"bv56kl","question":"Context vectors in Word2vec\n\nWhat are context vectors in Word2vec and how are they obtained?","preferred_answer":"context vectors are the word embeddings themselves for a given token or words as you may say. You can implememt Word2Vec using skipgram or collection of bag of words(CBOW), once trained these models give a vector representation for every word in the training vocab, and these vectors for each word are the word embeddings or context vectors coz they depend on words' context. But actually in word2vec and GLoVE the vectors or embeddings are not proper contextual.\nExample: 'river bank' and 'financial bank' in both of these 'bank' will have same embedding in case of Word2Vec and GLoVE but clearly they have different context.\nPing me for any miscommunication!","full_conversation":[{"role":"OP","user_id":"anon_d77813f061c6d77e","comment_id":"bv56kl","kind":"post","text":"Context vectors in Word2vec\n\nWhat are context vectors in Word2vec and how are they obtained?","timestamp":"2019-05-31T09:00:43+00:00","score":3},{"role":"answerer","user_id":"anon_54c3a58768f5cee9","comment_id":"epli1xm","kind":"comment","text":"context vectors are the word embeddings themselves for a given token or words as you may say. You can implememt Word2Vec using skipgram or collection of bag of words(CBOW), once trained these models give a vector representation for every word in the training vocab, and these vectors for each word are the word embeddings or context vectors coz they depend on words' context. But actually in word2vec and GLoVE the vectors or embeddings are not proper contextual.\nExample: 'river bank' and 'financial bank' in both of these 'bank' will have same embedding in case of Word2Vec and GLoVE but clearly they have different context.\nPing me for any miscommunication!","timestamp":"2019-05-31T09:50:37+00:00","score":4},{"role":"OP","user_id":"anon_d77813f061c6d77e","comment_id":"epli9x8","kind":"comment","text":"Thank You, which is the difference between context vectors and target vectors?","timestamp":"2019-05-31T09:52:59+00:00","score":2},{"role":"answerer","user_id":"anon_54c3a58768f5cee9","comment_id":"eplivv4","kind":"comment","text":"target vectors would be the vector representation of you targets, like in skipgram, you predict words inside a given size window around the input word, so the vector(embedding) for the input word is its context vector and the vector(embeddings) for the target words are their target vector. Basically in skipgram their are 2 matrices, the rows( or columns, based on your representation) are the embeddings. The one corresponding to input is its vector and the ones corresponding to target words in the window around the input are their \"target vectors\".You should read proper implementation of word2vec.\n[Using skipgram its a great paper by Thomas Mikolov et.al. called](https://arxiv.org/pdf/1310.4546.pdf)","timestamp":"2019-05-31T09:59:28+00:00","score":4}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d77813f061c6d77e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_54c3a58768f5cee9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"epli1xm","thanks_reply_id":"epli9x8","post_score":3,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_4c553590a59ddc34","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2019-05-31T11:52:31+00:00","post_id":"bv6kj1","question":"Is calculus useful for NLP?\n\nI’ve read that probability theory and linear algebra are the primary workhorses of NLP technologies, but what about calculus? Is there some role for calculus concepts like limits, derivatives, integrals, or other when creating or reading research about NLP tech? How specifically, if at all, has knowing calculus helped you in doing anything with NLP?\n\nI’m learning calculus just for fun, and am just curious to know whether it might be helpful in mastering NLP. So I’m just hoping this thread will elicit some general discussion about that. Would love to hear your experiences. The more concrete and specific, the better. Thanks!","preferred_answer":"Well, basic calculus and derivatives are key concepts of pretty much all machine learning including the \"pre neural network era\" NLP approaches, but you don't need to go in depth much, just a solid understanding of the core concepts.","full_conversation":[{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"bv6kj1","kind":"post","text":"Is calculus useful for NLP?\n\nI’ve read that probability theory and linear algebra are the primary workhorses of NLP technologies, but what about calculus? Is there some role for calculus concepts like limits, derivatives, integrals, or other when creating or reading research about NLP tech? How specifically, if at all, has knowing calculus helped you in doing anything with NLP?\n\nI’m learning calculus just for fun, and am just curious to know whether it might be helpful in mastering NLP. So I’m just hoping this thread will elicit some general discussion about that. Would love to hear your experiences. The more concrete and specific, the better. Thanks!","timestamp":"2019-05-31T11:52:31+00:00","score":2},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"eplulwv","kind":"comment","text":"Well, basic calculus and derivatives are key concepts of pretty much all machine learning including the \"pre neural network era\" NLP approaches, but you don't need to go in depth much, just a solid understanding of the core concepts.","timestamp":"2019-05-31T11:58:51+00:00","score":5},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"eplvpf6","kind":"comment","text":"Thanks for weighing in. Some follow ups in your response:\n\nWhat would count as the core concepts for NLP?\n\nWhat would you consider “too in depth”? Obviously knowing something inside and out never hurts, all else equal, but since there’s a lot of other stuff to learn too and time is limited, what areas or ideas in calculus as less relevant for NLP and therefore safe to spend less time on?","timestamp":"2019-05-31T12:07:00+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"epm0sra","kind":"comment","text":"Integrals beyond very basics have limited usage, differential equations aren't used at all in NLP (unlike physics).","timestamp":"2019-05-31T12:42:39+00:00","score":0}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4c553590a59ddc34","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eplulwv","thanks_reply_id":"eplvpf6","post_score":2,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_a59f6a16027b1423","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2019-06-05T11:45:15+00:00","post_id":"bx1m2o","question":"How to fix duplicate content distribution bias in NLP training tasks?\n\nHi everyone,\n\nI have a question about document, paragraph, sentence and clause distribution bias in training tasks.\n\nIn lots of NLP training tasks, the dataset is coming from either one source (e.g: Wikipedia) or an ensemble of controlled, unique sources (e.g: BooksCorpus).\n\nWhat I'm wondering is when you have an ensemble of sources that lack this publishing and copyright control like websites, how can you remove the bias of duplicate articles, large citations, etc.\n\nRemoving the tails of the distribution or even applying outlier detection would only remove the worst offenders. The produced word vectors would still be heavily biased or influenced by the non-uniqueness of the content though.\n\nExact hashing could be used to remove duplicates. But duplication isn't always exact and could also be at the document, paragraph, sentence or clause level so not sure how fine-grained that check should be.\nEspecially since nearby sentences are important for context analysis.\n\nLocal sensitive hashing and string distance algorithms can be used to find similar pieces of text but the granularity question still applies with the added problems that a \"canonical\" version has to be picked as well as a threshold distance after which the content is considered to be original again.\n\nThanks in advance for your help!","preferred_answer":"Choose your level of granularity (paragraphs or documents generally - if you're looking at sentences e.g. MT then we often just remove duplicates) and split your data in these items. Do pre-processing with normalization (whitespace, unicode canonical forms, removing ligatures, all kinds of tags like html, possibly normalizing punctuation e.g. all the unicode dashes, etc) so that fragments that are copy&paste become identical despite possible formatting issues.\n\nCount the number of non-unique sentences within each item by exact hashing; pick a threshold value (e.g. 66% or 90%) and if it's mostly duplicate then purge the whole item (paragraph/document). \n\nThat's it. You don't need to be exact, it's all about the total numbers and averages anyway, rules of thumb work well enough. Realistically, what you're looking for is to remove large quantities of systematically copied documents where only some header is added/removed. Any unique singleton cases are irrelevant, you want to catch cases where a million of the same sentences appear in two or more resources.","full_conversation":[{"role":"OP","user_id":"anon_a59f6a16027b1423","comment_id":"bx1m2o","kind":"post","text":"How to fix duplicate content distribution bias in NLP training tasks?\n\nHi everyone,\n\nI have a question about document, paragraph, sentence and clause distribution bias in training tasks.\n\nIn lots of NLP training tasks, the dataset is coming from either one source (e.g: Wikipedia) or an ensemble of controlled, unique sources (e.g: BooksCorpus).\n\nWhat I'm wondering is when you have an ensemble of sources that lack this publishing and copyright control like websites, how can you remove the bias of duplicate articles, large citations, etc.\n\nRemoving the tails of the distribution or even applying outlier detection would only remove the worst offenders. The produced word vectors would still be heavily biased or influenced by the non-uniqueness of the content though.\n\nExact hashing could be used to remove duplicates. But duplication isn't always exact and could also be at the document, paragraph, sentence or clause level so not sure how fine-grained that check should be.\nEspecially since nearby sentences are important for context analysis.\n\nLocal sensitive hashing and string distance algorithms can be used to find similar pieces of text but the granularity question still applies with the added problems that a \"canonical\" version has to be picked as well as a threshold distance after which the content is considered to be original again.\n\nThanks in advance for your help!","timestamp":"2019-06-05T11:45:15+00:00","score":3},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"eq2exnm","kind":"comment","text":"Choose your level of granularity (paragraphs or documents generally - if you're looking at sentences e.g. MT then we often just remove duplicates) and split your data in these items. Do pre-processing with normalization (whitespace, unicode canonical forms, removing ligatures, all kinds of tags like html, possibly normalizing punctuation e.g. all the unicode dashes, etc) so that fragments that are copy&paste become identical despite possible formatting issues.\n\nCount the number of non-unique sentences within each item by exact hashing; pick a threshold value (e.g. 66% or 90%) and if it's mostly duplicate then purge the whole item (paragraph/document). \n\nThat's it. You don't need to be exact, it's all about the total numbers and averages anyway, rules of thumb work well enough. Realistically, what you're looking for is to remove large quantities of systematically copied documents where only some header is added/removed. Any unique singleton cases are irrelevant, you want to catch cases where a million of the same sentences appear in two or more resources.","timestamp":"2019-06-05T11:52:57+00:00","score":5},{"role":"OP","user_id":"anon_a59f6a16027b1423","comment_id":"eq2kotg","kind":"comment","text":"Thank you for your answer!\n\nUsing this method, wouldn't sentences like: \"This article was written by John Doe for the New York Times sport section\" that prefix a news article not be caught?\n\nNow of course, over millions of articles it might only show up a few thousand times but I'm guessing that it would still cement a certain sentence structure as likely. Especially if the words are a bit rarer (like New York Times). No?","timestamp":"2019-06-05T12:51:57+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"eq2m4u5","kind":"comment","text":"I'm not sure of I understand your question.\n\nIf the source data reflect your target domain, then certain sentence structures specific to that domain *should* be learned as very likely, especially in the beginning and closing of documents, so \"This article was written by [X] for [Y]\" becomes just as idiomatic as \"How do you do?\" in conversational language.\n\nYou want to remove *useless* duplicates (that eat up your memory/performance) and *misleading* duplicates (that distort your distribution as they appear because of some artificial reasons). However, if some sentence structure is a thousand times more common in your expected real data, then it also should be a thousand times more common in your training data.","timestamp":"2019-06-05T13:05:14+00:00","score":1},{"role":"OP","user_id":"anon_a59f6a16027b1423","comment_id":"eq2osn1","kind":"comment","text":"You are right. I guess that the issue is less about detecting duplication and than detecting *bad* duplication.\n\nColloquialisms like \"How do you do?\" are fine in the sense that they are legitimately, organically used and \"This article was written by [X] for [Y]\" isn't because it's probably machine generated (some template in the page's rendering step).\n\nSo I guess that maybe this has to be part of the text normalisation step to somehow list, find and remove sentence formulas like this?\n\nThe domain isn't specifically news but more about using the Internet as a data source in general.","timestamp":"2019-06-05T13:28:54+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a59f6a16027b1423","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eq2exnm","thanks_reply_id":"eq2kotg","post_score":3,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_f6515fb460acf169","answerer_user_id":"anon_6dbe791366c5d0d6","subreddit":"LanguageTechnology","timestamp":"2019-06-10T08:56:31+00:00","post_id":"byvifc","question":"OCR: Searching a program that marks up certain defined words onscreen - or how can i code one?\n\nhey there! As a working student i work a lot with tons of data (repetitive data) and have to compare them. I thought it might be a lot easier if i could fill an ecxel sheet with phrases/names and then letting every identical phrase on the screen mark up (e.g. in red) by a computer programm. Does something like this already exist?\n\nGreetings!","preferred_answer":"What you need to do is a write a simple excel formula to do this. You don't need OCR.","full_conversation":[{"role":"OP","user_id":"anon_f6515fb460acf169","comment_id":"byvifc","kind":"post","text":"OCR: Searching a program that marks up certain defined words onscreen - or how can i code one?\n\nhey there! As a working student i work a lot with tons of data (repetitive data) and have to compare them. I thought it might be a lot easier if i could fill an ecxel sheet with phrases/names and then letting every identical phrase on the screen mark up (e.g. in red) by a computer programm. Does something like this already exist?\n\nGreetings!","timestamp":"2019-06-10T08:56:31+00:00","score":0},{"role":"answerer","user_id":"anon_6dbe791366c5d0d6","comment_id":"eqmf4a3","kind":"comment","text":"What you need to do is a write a simple excel formula to do this. You don't need OCR.","timestamp":"2019-06-10T10:14:55+00:00","score":1},{"role":"OP","user_id":"anon_f6515fb460acf169","comment_id":"eqn7zmx","kind":"comment","text":"thanks, but i work with programs/web databases which aren't \"editable\" - is excel able to analyze my whole screen to do so?","timestamp":"2019-06-10T13:20:51+00:00","score":1},{"role":"answerer","user_id":"anon_6dbe791366c5d0d6","comment_id":"eqn8wvr","kind":"comment","text":"If you are able to view the web database, aren't you able to copy the information from there and paste into excel? Or, can you export the database?","timestamp":"2019-06-10T13:26:14+00:00","score":1},{"role":"OP","user_id":"anon_f6515fb460acf169","comment_id":"eqr1dfn","kind":"comment","text":"Unfortunately not. Can't get too much into detail but imagine that i have to go through 1million .pdf sheets from 10.000 different authors (author names are only given in the header of each doc) and 8.000 authors are known and can be ignored. Therefore i have to search for every author of every doc in my excel sheet first to decide in 8 out of 10 cases that i can ignore the pdf because the author is already listed. :D \n\nThus i thought OCR would be the only solution to skip the search process.","timestamp":"2019-06-11T08:44:27+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_f6515fb460acf169","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6dbe791366c5d0d6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eqmf4a3","thanks_reply_id":"eqn7zmx","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_afdbbf5b77280933","answerer_user_id":"anon_1a9b7077ecfab34b","subreddit":"LanguageTechnology","timestamp":"2019-06-15T12:38:11+00:00","post_id":"c0wunl","question":"First NLP project?\n\nHi, \n\nI am a beginner in NLP and recently finished a course at my university covering topics such as vector semantics, hidden markov models, syntactic parsing, dependency parsing. We used mainly Jurafsky during the course.\n\nSummertime is here and I want to try to apply my knowledge.\n\nAny tips for simple and small projects?","preferred_answer":"Check out cs224n old project list for ideasThose are fairly complex ones, so perfect for a summer project\n\n​\n\nHere are the links \n[https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1184/reports.html](https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1184/reports.html) \n[https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1174/reports.html](https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1174/reports.html)","full_conversation":[{"role":"OP","user_id":"anon_afdbbf5b77280933","comment_id":"c0wunl","kind":"post","text":"First NLP project?\n\nHi, \n\nI am a beginner in NLP and recently finished a course at my university covering topics such as vector semantics, hidden markov models, syntactic parsing, dependency parsing. We used mainly Jurafsky during the course.\n\nSummertime is here and I want to try to apply my knowledge.\n\nAny tips for simple and small projects?","timestamp":"2019-06-15T12:38:11+00:00","score":11},{"role":"answerer","user_id":"anon_1a9b7077ecfab34b","comment_id":"er9881y","kind":"comment","text":"Check out cs224n old project list for ideasThose are fairly complex ones, so perfect for a summer project\n\n​\n\nHere are the links \n[https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1184/reports.html](https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1184/reports.html) \n[https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1174/reports.html](https://web.stanford.edu/class/archive/cs/cs224n/cs224n.1174/reports.html)","timestamp":"2019-06-15T17:17:20+00:00","score":2},{"role":"OP","user_id":"anon_afdbbf5b77280933","comment_id":"er990nj","kind":"comment","text":"This is excellent! Thank you. I am sure I will get some great ideas from these.","timestamp":"2019-06-15T17:24:13+00:00","score":2},{"role":"answerer","user_id":"anon_1a9b7077ecfab34b","comment_id":"er99a02","kind":"comment","text":"All the best! :)","timestamp":"2019-06-15T17:26:34+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_afdbbf5b77280933","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1a9b7077ecfab34b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"er9881y","thanks_reply_id":"er990nj","post_score":11,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_543e2fa813e917ce","answerer_user_id":"anon_f3e6d35959b6b728","subreddit":"LanguageTechnology","timestamp":"2019-07-03T19:10:09+00:00","post_id":"c8s7bs","question":"K Means Clustering visualizations for TF-IDF BOW ?\n\nHello all,\n\nI'm looking for a tutorial on using K-Means to cluster my text documents, using TF-IDF word vectors as inputs. Further, I need to visualize these clusters so that I can inspect the level of overlap between clusters.\n\nIs this possible? I understand that my feature space is the size of my BOW, so a 2D graphic representation might be difficult to achieve. \n\nI'm using python FYI.\n\nThank you","preferred_answer":"http://brandonrose.org/clustering_mobile\n\nThis is a good one that touches on moat of your needs","full_conversation":[{"role":"OP","user_id":"anon_543e2fa813e917ce","comment_id":"c8s7bs","kind":"post","text":"K Means Clustering visualizations for TF-IDF BOW ?\n\nHello all,\n\nI'm looking for a tutorial on using K-Means to cluster my text documents, using TF-IDF word vectors as inputs. Further, I need to visualize these clusters so that I can inspect the level of overlap between clusters.\n\nIs this possible? I understand that my feature space is the size of my BOW, so a 2D graphic representation might be difficult to achieve. \n\nI'm using python FYI.\n\nThank you","timestamp":"2019-07-03T19:10:09+00:00","score":2},{"role":"answerer","user_id":"anon_f3e6d35959b6b728","comment_id":"espdkrs","kind":"comment","text":"http://brandonrose.org/clustering_mobile\n\nThis is a good one that touches on moat of your needs","timestamp":"2019-07-03T19:38:39+00:00","score":2},{"role":"OP","user_id":"anon_543e2fa813e917ce","comment_id":"esplhw3","kind":"comment","text":"Sweet! This is exactly what I was looking for!","timestamp":"2019-07-03T20:35:46+00:00","score":1},{"role":"answerer","user_id":"anon_f3e6d35959b6b728","comment_id":"esrdnd4","kind":"comment","text":"No worries. Feel free to DM me if you run across any issues with it.","timestamp":"2019-07-04T06:44:36+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_543e2fa813e917ce","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f3e6d35959b6b728","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"espdkrs","thanks_reply_id":"esplhw3","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_25aa1bfb419240e7","answerer_user_id":"anon_33a7f06f950a238f","subreddit":"LanguageTechnology","timestamp":"2019-07-07T03:42:27+00:00","post_id":"ca2k0w","question":"How to Fine-Tune BERT for Text Classification?","preferred_answer":"Check this example:\nhttps://github.com/huggingface/pytorch-pretrained-BERT/blob/master/examples/run_classifier.py","full_conversation":[{"role":"OP","user_id":"anon_25aa1bfb419240e7","comment_id":"ca2k0w","kind":"post","text":"How to Fine-Tune BERT for Text Classification?","timestamp":"2019-07-07T03:42:27+00:00","score":10},{"role":"answerer","user_id":"anon_33a7f06f950a238f","comment_id":"et5k619","kind":"comment","text":"Check this example:\nhttps://github.com/huggingface/pytorch-pretrained-BERT/blob/master/examples/run_classifier.py","timestamp":"2019-07-07T05:20:57+00:00","score":1},{"role":"OP","user_id":"anon_25aa1bfb419240e7","comment_id":"et5maxh","kind":"comment","text":"Thanks, but the title isn't my question, it's the name of the paper I shared. In retrospect I should have added [paper] to the title.","timestamp":"2019-07-07T06:00:33+00:00","score":1},{"role":"answerer","user_id":"anon_33a7f06f950a238f","comment_id":"et5osyh","kind":"comment","text":"Oh I see, you are not asking any question at all :P","timestamp":"2019-07-07T06:52:16+00:00","score":0}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_25aa1bfb419240e7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_33a7f06f950a238f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"et5k619","thanks_reply_id":"et5maxh","post_score":10,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_13321821155ae715","answerer_user_id":"anon_4db0a21667813b1d","subreddit":"LanguageTechnology","timestamp":"2019-07-08T15:02:40+00:00","post_id":"cam5dz","question":"Polish stemmer in Python\n\nHey! I am looking for a stemmer for the Polish language with Python API. \n\n\nI see that there are a lot of academic solutions (http://clip.ipipan.waw.pl/benchmarks) with quite good efficiency, but requiring a lot of refactoring to be used as an independent library. In addition, these are lemmatizers + disambiguation, and a simple stemmer is enough for my needs. Unless some tools are ready for use :-) \n\n\nSpacy boasts of support for the Polish language, but PR with the lemmatizer is still pending: https://github.com/explosion/spaCy/pull/3711. \n\n\nI see that Stempel stemmer has entered Apache Lucene, a great Java framework, but I cannot find it ported to Python.\n\nDoes anyone know of Polish stemmer in Python ready to use?","preferred_answer":"Have you looked at [this](https://pypi.org/project/python-morfeusz/)?","full_conversation":[{"role":"OP","user_id":"anon_13321821155ae715","comment_id":"cam5dz","kind":"post","text":"Polish stemmer in Python\n\nHey! I am looking for a stemmer for the Polish language with Python API. \n\n\nI see that there are a lot of academic solutions (http://clip.ipipan.waw.pl/benchmarks) with quite good efficiency, but requiring a lot of refactoring to be used as an independent library. In addition, these are lemmatizers + disambiguation, and a simple stemmer is enough for my needs. Unless some tools are ready for use :-) \n\n\nSpacy boasts of support for the Polish language, but PR with the lemmatizer is still pending: https://github.com/explosion/spaCy/pull/3711. \n\n\nI see that Stempel stemmer has entered Apache Lucene, a great Java framework, but I cannot find it ported to Python.\n\nDoes anyone know of Polish stemmer in Python ready to use?","timestamp":"2019-07-08T15:02:40+00:00","score":2},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"et9mh6a","kind":"comment","text":"Have you looked at [this](https://pypi.org/project/python-morfeusz/)?","timestamp":"2019-07-08T15:40:57+00:00","score":1},{"role":"OP","user_id":"anon_13321821155ae715","comment_id":"et9qadz","kind":"comment","text":"Yep, thanks. \n\n​\n\nThis is a lemmatizer that returns all matching lemmas together with their POS tags. Then you need to disambiguate them. There are solutions for that (e.g., see section \"Disambiguated POS tagging\" on [http://clip.ipipan.waw.pl/benchmarks](http://clip.ipipan.waw.pl/benchmarks) ), some even in Python, but they have some technical debt and require significant refactoring effort (I've already worked on Toygger). I can, of course, work on that, but I would prefer to use my time wisely :-)","timestamp":"2019-07-08T16:23:01+00:00","score":1},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"eta1mph","kind":"comment","text":"Ah, it's been a couple of years since I used Morfeusz.\n\n> Widzę kobiety \n\nreturns:\n\n Widzę\t widzieć\tfin:sg:pri:imperf\t\t\n kobiety\tkobieta\tsubst:sg:gen:f\tnazwa_pospolita\t\n kobieta\tsubst:pl:nom.acc.voc:f\tnazwa_pospolita \n\nBut here you'd only want line 1 and 3, right? Wish I could have been of more help.","timestamp":"2019-07-08T18:23:17+00:00","score":1},{"role":"OP","user_id":"anon_13321821155ae715","comment_id":"etborae","kind":"comment","text":"Right, second token has two matching lemmas and I'd need to disambiguate between them. Thanks for helping and for stating the problem so clear.","timestamp":"2019-07-09T06:46:26+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_13321821155ae715","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4db0a21667813b1d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"et9mh6a","thanks_reply_id":"et9qadz","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_baab7dd4f14efa24","answerer_user_id":"anon_a158839f93b5089d","subreddit":"LanguageTechnology","timestamp":"2019-07-17T16:23:50+00:00","post_id":"cef3il","question":"Extracting info from text, suggestions for a rule based approach?\n\nHi, I'm trying to extract entities from text. Have been playing around with spaCy and got something to work but doesn't seem to be getting good results. What I tried was vanila spacy and bunch of hand crafted rules for extracting information entities.\n\nE.g.: 1 tablespoon sugar\n\n1 = Quantity , tablespoon = unit and sugar = entity/food\n\na purely rule based would work but there are some instances, \n\n1 (1/2 oz) can of milk. which throws off the rules.\n\nAny ideas on how to do this? I think my rules method isn't going nowhere and something I should use inbuilt with spaCy. Thank you","preferred_answer":"My suggestion is based more on your specific posted example, and less on \"extracting entities\".\n\nI'm working on a similar task, also involving extracting tokens like numbers, units and other specific terms to get similar parts like yours, however your case seems to be a bit wider with the many ingredients there are. Here's what I would suggest:\n\n\\- Tokenize your text.\n\n\\- For each token, create a layer array witch stores attribute labels for each token: numbers are tagged as '#'; units are tagged as 'u', ingredients are tagged as 'i', optionally, you can tag words like \"of\" as some less relevant symbol. In the case of units, you can hardcode them (there shouldn't be many), or, as in the case with ingredients, use word\\_embeddings and if the word has a good similarity (empirically decision here).\n\n \"1 tablespoon sugar\" becomes:\n #ui\n \n \"1 (1/2 oz) can of milk\" becomes:\n tokens to labels: ('1', #), ('(', _) ('1', #), ('/', _), ('2', #), ('oz', u), (')', _) ('can', u) ('of', _) ('milk', i)\n #_#_#u_u_i\n\n\\- Then use regex to isolate and extract sequences with {#,u,i}, with or without that order of symbols, each symbol separated by a few tokens (how many your choice), with possibly units being optional.\n\n​\n\nAlternatively, I can think about annotating a small dataset delimiting words (quantity, units, ingredients) and then training a Conditional Random Field classifier. But I can't make a guess how good this would turn out to be.","full_conversation":[{"role":"OP","user_id":"anon_baab7dd4f14efa24","comment_id":"cef3il","kind":"post","text":"Extracting info from text, suggestions for a rule based approach?\n\nHi, I'm trying to extract entities from text. Have been playing around with spaCy and got something to work but doesn't seem to be getting good results. What I tried was vanila spacy and bunch of hand crafted rules for extracting information entities.\n\nE.g.: 1 tablespoon sugar\n\n1 = Quantity , tablespoon = unit and sugar = entity/food\n\na purely rule based would work but there are some instances, \n\n1 (1/2 oz) can of milk. which throws off the rules.\n\nAny ideas on how to do this? I think my rules method isn't going nowhere and something I should use inbuilt with spaCy. Thank you","timestamp":"2019-07-17T16:23:50+00:00","score":11},{"role":"answerer","user_id":"anon_a158839f93b5089d","comment_id":"eu25dx1","kind":"comment","text":"My suggestion is based more on your specific posted example, and less on \"extracting entities\".\n\nI'm working on a similar task, also involving extracting tokens like numbers, units and other specific terms to get similar parts like yours, however your case seems to be a bit wider with the many ingredients there are. Here's what I would suggest:\n\n\\- Tokenize your text.\n\n\\- For each token, create a layer array witch stores attribute labels for each token: numbers are tagged as '#'; units are tagged as 'u', ingredients are tagged as 'i', optionally, you can tag words like \"of\" as some less relevant symbol. In the case of units, you can hardcode them (there shouldn't be many), or, as in the case with ingredients, use word\\_embeddings and if the word has a good similarity (empirically decision here).\n\n \"1 tablespoon sugar\" becomes:\n #ui\n \n \"1 (1/2 oz) can of milk\" becomes:\n tokens to labels: ('1', #), ('(', _) ('1', #), ('/', _), ('2', #), ('oz', u), (')', _) ('can', u) ('of', _) ('milk', i)\n #_#_#u_u_i\n\n\\- Then use regex to isolate and extract sequences with {#,u,i}, with or without that order of symbols, each symbol separated by a few tokens (how many your choice), with possibly units being optional.\n\n​\n\nAlternatively, I can think about annotating a small dataset delimiting words (quantity, units, ingredients) and then training a Conditional Random Field classifier. But I can't make a guess how good this would turn out to be.","timestamp":"2019-07-17T16:58:12+00:00","score":6},{"role":"OP","user_id":"anon_baab7dd4f14efa24","comment_id":"eu2bidq","kind":"comment","text":"Thank you for this, it does have some approach I could use. Any suggestions for the packages? I've been playing around with spaCy for the tasks.","timestamp":"2019-07-17T18:01:34+00:00","score":2},{"role":"answerer","user_id":"anon_a158839f93b5089d","comment_id":"eu4psgf","kind":"comment","text":"For the first approach, just standard stuff (re, nltk, word2vec/glove/fasttext which I train/mount\\_pretrained with gensim, but then save the dictionary and load faster with pickle). If you don't need spacy's features, just use nltk to tokenize since it's faster.\n\n​\n\nI'm new to CRF so I don't want to stretch my advice here. For this approach, I have played with sklearn\\_crfsuite, but I'm going to explore other options. You'll also need annotation tools, which is what I'm looking for right now.","timestamp":"2019-07-18T14:32:52+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_baab7dd4f14efa24","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a158839f93b5089d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eu25dx1","thanks_reply_id":"eu2bidq","post_score":11,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_d77813f061c6d77e","answerer_user_id":"anon_72c9a842eab4c43d","subreddit":"LanguageTechnology","timestamp":"2019-07-22T08:28:38+00:00","post_id":"cgajwj","question":"Find associate of multi-word expressions\n\nI'm working on a model capable to predict fillers of a sentence starting from the other words of the sentence using association measures (for example, the best filler of the verb \"sip\" in the object position is something like \"wine\" or \"cognac\").\n\nNow i'm looking for the best fillers for multiword sentences (for example, the best filler of the expression \"leave the stage\" in the position of subject must be something like \"actor\").\n\nCan anyone suggest me a way to extract multiword expression from a parsed corpus (ex. leave-stage=obj) and check for the most frequent subjects?","preferred_answer":"In word2vec paper, they offered this algorithm:\nIf this proportion for any bigram is greater than some threshold, change these bigrams as multiword and repeat this iteratively.\n\nscore(w_i, w_j) = (count(w_iw_j)-§)/count(w_i)*count(w_j) \n\nYou can use this simple algorithm to detect multiword expression and then you can use POS tags for sentences to find associates.\n\nCheck out the beginning of Chapter 4, for more info: [word2vec paper](https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf)","full_conversation":[{"role":"OP","user_id":"anon_d77813f061c6d77e","comment_id":"cgajwj","kind":"post","text":"Find associate of multi-word expressions\n\nI'm working on a model capable to predict fillers of a sentence starting from the other words of the sentence using association measures (for example, the best filler of the verb \"sip\" in the object position is something like \"wine\" or \"cognac\").\n\nNow i'm looking for the best fillers for multiword sentences (for example, the best filler of the expression \"leave the stage\" in the position of subject must be something like \"actor\").\n\nCan anyone suggest me a way to extract multiword expression from a parsed corpus (ex. leave-stage=obj) and check for the most frequent subjects?","timestamp":"2019-07-22T08:28:38+00:00","score":3},{"role":"answerer","user_id":"anon_72c9a842eab4c43d","comment_id":"eufxlhf","kind":"comment","text":"In word2vec paper, they offered this algorithm:\nIf this proportion for any bigram is greater than some threshold, change these bigrams as multiword and repeat this iteratively.\n\nscore(w_i, w_j) = (count(w_iw_j)-§)/count(w_i)*count(w_j) \n\nYou can use this simple algorithm to detect multiword expression and then you can use POS tags for sentences to find associates.\n\nCheck out the beginning of Chapter 4, for more info: [word2vec paper](https://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf)","timestamp":"2019-07-22T11:17:47+00:00","score":2},{"role":"OP","user_id":"anon_d77813f061c6d77e","comment_id":"eufz1ap","kind":"comment","text":"Thank you for the answer, I'm looking for expressions whose meaning results from the composition of the meanings of their parts, not properly \"multi-word expressions\" like Chicago Bulls. Examples are \"leave the stage\" or \"lose 5%\"","timestamp":"2019-07-22T11:39:38+00:00","score":1},{"role":"answerer","user_id":"anon_72c9a842eab4c43d","comment_id":"eugpn48","kind":"comment","text":"Then I believe polm23's idea is worth trying. You can count verb phrases or calculate probabilities of verb phrases when given verbs from a big corpus.","timestamp":"2019-07-22T16:22:04+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d77813f061c6d77e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_72c9a842eab4c43d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eufxlhf","thanks_reply_id":"eufz1ap","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_d669b11870539805","answerer_user_id":"anon_4db0a21667813b1d","subreddit":"LanguageTechnology","timestamp":"2019-07-23T12:48:50+00:00","post_id":"cgs6my","question":"Discover/predict new labels based on supervised training data\n\nMy experience with NLP is very limited, so pardon me in case my question is dumb. So, I've got a roster of similarly written Wikipedia articles, and let's say I manually assign labels to some of them. Is there any NLP algorithm which would reliably discover possible labels for the unlabeled articles?","preferred_answer":"Ah, okay, I see where you’re coming from. The problem with TF-IDF is that its performance depends on the documents’ structure. \n\nTo counter that, I’m thinking you might try combining noun phrase extraction (spaCy can handle that) with TF-IDF for better results. That would, however, mean that those phrases would have to occur within the document. \n\nIf you’re looking for a solution that generates keywords that aren’t present in the documents, I’ don’t recall having seen anything like that. (Because it’s black magic. Jk.) However, as a firm believer in Word2Vec and Doc2Vec, I would bet there’s a clever way to combine them for such a task.","full_conversation":[{"role":"OP","user_id":"anon_d669b11870539805","comment_id":"cgs6my","kind":"post","text":"Discover/predict new labels based on supervised training data\n\nMy experience with NLP is very limited, so pardon me in case my question is dumb. So, I've got a roster of similarly written Wikipedia articles, and let's say I manually assign labels to some of them. Is there any NLP algorithm which would reliably discover possible labels for the unlabeled articles?","timestamp":"2019-07-23T12:48:50+00:00","score":2},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"eupx8rj","kind":"comment","text":"Ah, okay, I see where you’re coming from. The problem with TF-IDF is that its performance depends on the documents’ structure. \n\nTo counter that, I’m thinking you might try combining noun phrase extraction (spaCy can handle that) with TF-IDF for better results. That would, however, mean that those phrases would have to occur within the document. \n\nIf you’re looking for a solution that generates keywords that aren’t present in the documents, I’ don’t recall having seen anything like that. (Because it’s black magic. Jk.) However, as a firm believer in Word2Vec and Doc2Vec, I would bet there’s a clever way to combine them for such a task.","timestamp":"2019-07-24T11:04:42+00:00","score":2},{"role":"OP","user_id":"anon_d669b11870539805","comment_id":"euq0xye","kind":"comment","text":"Thanks for pointers to Word2Vec and Doc2Vec. Actually, no, I'm not trying to generate keywords which are absent in the text :) Example labels I've shown in my previous comment **do exist** in the document. They are just very **rare** from the standpoint of the density.","timestamp":"2019-07-24T11:39:14+00:00","score":1},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"euq2jhr","kind":"comment","text":"That’s splendid. You might try the NP extraction in combination with TF-IDF then, and the experiment with the threshold. At least that seems intuitive to me. Good luck!","timestamp":"2019-07-24T11:57:21+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d669b11870539805","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4db0a21667813b1d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eupx8rj","thanks_reply_id":"euq0xye","post_score":2,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_377648206de5e786","answerer_user_id":"anon_1e0b5a5ba18de41f","subreddit":"LanguageTechnology","timestamp":"2019-07-24T09:56:38+00:00","post_id":"ch660p","question":"How do I do further (domain specific) pre-training with Google BERT in preparation for subsequent fine-tuning? (Tensorflow)\n\nHi y'all I'm running a suite of experiments that touch various pretrained language models. I had an hypothesis that further domain-specific pre-training would make a lot of sense (and, in general, there are good business reasons why this could be more than one level). And interestingly [here's a paper I found](https://www.scihive.org/paper/1905.05583) (14 May 2019) showing evidence of the value of this approach, essentially proving my hypothesis. But no code provided :( Yes I've contacted the authors.\n\nI'm using bert-as-service as a base so Tensorflow is where I'm at. I can move PyTorch models across if need but wanted to check in parallel whether anyone's seen examples of further pre-training (vs task-specific fine-tuning). Accessing checkpoint files seems to be a pretty useful way of doing it. \n\n​\n\nAnother way of phrasing this question could be \"can you create a .ckpt file created from the final output of BERT?\" Looking at tf.train it gets pretty abstract pretty quickly so while I'm not afraid of digging into that, it does look like several days' work potentially.\n\n​\n\nAny guidance most welcome!","preferred_answer":"Yes, you can do fine tuning based on different down stream tasks (classification, question answering, language understanding) example scripts and notebooks are available in the BERT repo. As I remember it, if you want to train on a new corpus or fine tune just the language model itself, this is not in the BERT repo, but the Pytorch/Pytorch Transformers repo does have a fine-tune language model section\n\nhttps://github.com/huggingface/pytorch-transformers/tree/master/examples/lm_finetuning","full_conversation":[{"role":"OP","user_id":"anon_377648206de5e786","comment_id":"ch660p","kind":"post","text":"How do I do further (domain specific) pre-training with Google BERT in preparation for subsequent fine-tuning? (Tensorflow)\n\nHi y'all I'm running a suite of experiments that touch various pretrained language models. I had an hypothesis that further domain-specific pre-training would make a lot of sense (and, in general, there are good business reasons why this could be more than one level). And interestingly [here's a paper I found](https://www.scihive.org/paper/1905.05583) (14 May 2019) showing evidence of the value of this approach, essentially proving my hypothesis. But no code provided :( Yes I've contacted the authors.\n\nI'm using bert-as-service as a base so Tensorflow is where I'm at. I can move PyTorch models across if need but wanted to check in parallel whether anyone's seen examples of further pre-training (vs task-specific fine-tuning). Accessing checkpoint files seems to be a pretty useful way of doing it. \n\n​\n\nAnother way of phrasing this question could be \"can you create a .ckpt file created from the final output of BERT?\" Looking at tf.train it gets pretty abstract pretty quickly so while I'm not afraid of digging into that, it does look like several days' work potentially.\n\n​\n\nAny guidance most welcome!","timestamp":"2019-07-24T09:56:38+00:00","score":3},{"role":"answerer","user_id":"anon_1e0b5a5ba18de41f","comment_id":"euq2hm2","kind":"comment","text":"Yes, you can do fine tuning based on different down stream tasks (classification, question answering, language understanding) example scripts and notebooks are available in the BERT repo. As I remember it, if you want to train on a new corpus or fine tune just the language model itself, this is not in the BERT repo, but the Pytorch/Pytorch Transformers repo does have a fine-tune language model section\n\nhttps://github.com/huggingface/pytorch-transformers/tree/master/examples/lm_finetuning","timestamp":"2019-07-24T11:56:54+00:00","score":1},{"role":"OP","user_id":"anon_377648206de5e786","comment_id":"euv6wgq","kind":"comment","text":"Thanks so yes the documentation and examples for fine-tuning after pre-training is abundant and clear -- it's additional pre-training that I'm seeking guidance on. It feels like it's likely a very simple thing but I've just not had any luck yet. I've not spent much time with the PyTorch world at the moment because model mobility from PyTorch to TF is an additional complexity I'd like to avoid currently but is on my backlog.","timestamp":"2019-07-25T12:06:13+00:00","score":1},{"role":"answerer","user_id":"anon_1e0b5a5ba18de41f","comment_id":"euxuuqd","kind":"comment","text":"Is this what you’re after?\n\nhttps://colab.research.google.com/drive/1nVn6AFpQSzXBt8_ywfx6XR8ZfQXlKGAz?source=post_page---------------------------&utm_source=share&utm_medium=ios_app","timestamp":"2019-07-25T22:00:09+00:00","score":1},{"role":"OP","user_id":"anon_377648206de5e786","comment_id":"ev0b7nk","kind":"comment","text":"Thanks that's pretraining from scratch -- very cool notebook I know it well -- particularly the cost element. This function \n\n`estimator.train(input_fn=train_input_fn, max_steps=TRAIN_STEPS)`\n\n… produces one output that's different to the interim checkpoints in subtle ways that means I can't see a way to take the final output and continue pre-training","timestamp":"2019-07-26T09:58:58+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_377648206de5e786","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1e0b5a5ba18de41f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"euq2hm2","thanks_reply_id":"euv6wgq","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_17da7bfcb4168263","answerer_user_id":"anon_cc72701cbc7c9658","subreddit":"LanguageTechnology","timestamp":"2019-07-24T20:42:05+00:00","post_id":"chdp0w","question":"How do I acquire particular words from word embeddings that were the most relevant for the prediction of a particular task (e.g. classification)?\n\nHi folks,\n\n​\n\nif I have an embedding and an LSTM in say, Pytorch, and train the network against a task to build up embeddings, I want to then be able to eventually find the particular embedding 'words' which mostly led to the prediction. Example being classification of a text as positive and negative: which embedding values fired the hardest to classify a text to positive?\n\n​\n\nEither I am asking something very obvious, or something not exactly possible in this structure; I would still like to know if this is possible.","preferred_answer":"Hey this a great question. I was looking into something like this earlier. It looks like what you're looking for is called Model Explainability. There is a package (https://github.com/marcotcr/lime) out there which for starters might get the job done for you. \nHope this helps! All the best.","full_conversation":[{"role":"OP","user_id":"anon_17da7bfcb4168263","comment_id":"chdp0w","kind":"post","text":"How do I acquire particular words from word embeddings that were the most relevant for the prediction of a particular task (e.g. classification)?\n\nHi folks,\n\n​\n\nif I have an embedding and an LSTM in say, Pytorch, and train the network against a task to build up embeddings, I want to then be able to eventually find the particular embedding 'words' which mostly led to the prediction. Example being classification of a text as positive and negative: which embedding values fired the hardest to classify a text to positive?\n\n​\n\nEither I am asking something very obvious, or something not exactly possible in this structure; I would still like to know if this is possible.","timestamp":"2019-07-24T20:42:05+00:00","score":3},{"role":"answerer","user_id":"anon_cc72701cbc7c9658","comment_id":"euvt9qv","kind":"comment","text":"Hey this a great question. I was looking into something like this earlier. It looks like what you're looking for is called Model Explainability. There is a package (https://github.com/marcotcr/lime) out there which for starters might get the job done for you. \nHope this helps! All the best.","timestamp":"2019-07-25T14:35:27+00:00","score":4},{"role":"OP","user_id":"anon_17da7bfcb4168263","comment_id":"euxxdv2","kind":"comment","text":"Hey thanks for answering! Really appreciate it! I took a quick look and discovered that library SHAP provides support for explainability ([https://github.com/slundberg/shap](https://github.com/slundberg/shap)), I will check it out. Thanks :)!","timestamp":"2019-07-25T22:14:49+00:00","score":2},{"role":"answerer","user_id":"anon_cc72701cbc7c9658","comment_id":"ev1ycv4","kind":"comment","text":"Thanks. I wasn't aware of this. Definitely helpful 🙌","timestamp":"2019-07-26T18:54:20+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_17da7bfcb4168263","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cc72701cbc7c9658","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"euvt9qv","thanks_reply_id":"euxxdv2","post_score":3,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_da0a3189077ccc03","answerer_user_id":"anon_8bac7a0ae9d950e0","subreddit":"LanguageTechnology","timestamp":"2019-08-04T19:24:41+00:00","post_id":"cm0eqo","question":"In word embedding models, why is the softmax matrix initialized as zeros, where as the input embedding matrix is initialized using a normal distribution?\n\nIn every word2vec implementation I've seen, the softmax embeddings are initialized as zero, but the target embeddings are initialized with a random distribution. Anyone know why this is?","preferred_answer":"Lets first talk about why random initialization is used in NNs. The idea is that if everything is the same, backdrop takes you to the same place and as such it breaks learning. \n\nIn a w2vec model we have sparse updates by design, as each words dot product ought to take us to its neighbors (using SG impl for simplicity here). This means that even with a layer being all 0s, the sparse updates of W2vec will still be able to learn","full_conversation":[{"role":"OP","user_id":"anon_da0a3189077ccc03","comment_id":"cm0eqo","kind":"post","text":"In word embedding models, why is the softmax matrix initialized as zeros, where as the input embedding matrix is initialized using a normal distribution?\n\nIn every word2vec implementation I've seen, the softmax embeddings are initialized as zero, but the target embeddings are initialized with a random distribution. Anyone know why this is?","timestamp":"2019-08-04T19:24:41+00:00","score":11},{"role":"answerer","user_id":"anon_8bac7a0ae9d950e0","comment_id":"evz2ik7","kind":"comment","text":"Lets first talk about why random initialization is used in NNs. The idea is that if everything is the same, backdrop takes you to the same place and as such it breaks learning. \n\nIn a w2vec model we have sparse updates by design, as each words dot product ought to take us to its neighbors (using SG impl for simplicity here). This means that even with a layer being all 0s, the sparse updates of W2vec will still be able to learn","timestamp":"2019-08-04T19:35:56+00:00","score":6},{"role":"OP","user_id":"anon_da0a3189077ccc03","comment_id":"evz2yii","kind":"comment","text":"Thanks for the explanation!\n\nI'm stuck at \n\n>words dot product ought to take us to its neighbors (using SG impl for simplicity here)\n\nDoes this mean a dot product should be able to predict its neighbors? A high dot product means that it's a neighbor. If so, I am missing the connection to the following sentence \n\n>This means that even with a layer being all 0s, the sparse updates of W2vec will still be able to learn","timestamp":"2019-08-04T19:41:03+00:00","score":1},{"role":"answerer","user_id":"anon_8bac7a0ae9d950e0","comment_id":"evz542y","kind":"comment","text":"Yes, exactly right, a high dot product indicates neighbors, thats what our objective function is designed to do.\n\nWe can think of the embedding matrix as being N ×D where N is the vocab size and D is the word embedding size. When we take a given word, we map it back to an id, that id represents the specific row of the matrix, so for a word vector we take a single row out of that matrix and take its dot product with what youve referred to as the softmax matrix.","timestamp":"2019-08-04T20:06:03+00:00","score":5},{"role":"OP","user_id":"anon_da0a3189077ccc03","comment_id":"evz8lc1","kind":"comment","text":"Great. But I am still stuck at figuring out why the softmax matrix values are initialized to zero. I see that it can still learn embeddings for those embeddings, but why is it optimal?","timestamp":"2019-08-04T20:46:25+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_da0a3189077ccc03","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8bac7a0ae9d950e0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"evz2ik7","thanks_reply_id":"evz2yii","post_score":11,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_246574f5086bf8fa","answerer_user_id":"anon_a158839f93b5089d","subreddit":"LanguageTechnology","timestamp":"2019-08-14T07:02:29+00:00","post_id":"cq63xp","question":"BERT - how to get word embeddings, not token embeddings?\n\nI am using extract_features.py script from official BERT github and ran into a problem/misunderstanding:\nI want to get contextualized word embeddings for every word of my sentence, however I get token embeddings - sometimes the tokens are same as my words, but more often than not they aren't. For example, for word \"listening\" I get two embeddings - for token \"listen\" and for token \"##ing\".\n\nMy first though is too perform some kind of pooling on the tokens. Is it an acceptable approach?\nhttps://github.com/hanxiao/bert-as-service - this repository claims to provide WORD embeddings from BERT but doesn't seem to clarify how. Or does it also provide token embeddings and just worded poorly?\n\nThank you","preferred_answer":"I am not sure it offers more options, but I found it strange how it outputed word-piece tokens (they weren't matching words and it was driving me insane) and the default server output ommited the subpiece-tokens and I still had to pass that in the call function in Python.\n\nPersonally, I just averaged them.","full_conversation":[{"role":"OP","user_id":"anon_246574f5086bf8fa","comment_id":"cq63xp","kind":"post","text":"BERT - how to get word embeddings, not token embeddings?\n\nI am using extract_features.py script from official BERT github and ran into a problem/misunderstanding:\nI want to get contextualized word embeddings for every word of my sentence, however I get token embeddings - sometimes the tokens are same as my words, but more often than not they aren't. For example, for word \"listening\" I get two embeddings - for token \"listen\" and for token \"##ing\".\n\nMy first though is too perform some kind of pooling on the tokens. Is it an acceptable approach?\nhttps://github.com/hanxiao/bert-as-service - this repository claims to provide WORD embeddings from BERT but doesn't seem to clarify how. Or does it also provide token embeddings and just worded poorly?\n\nThank you","timestamp":"2019-08-14T07:02:29+00:00","score":3},{"role":"answerer","user_id":"anon_a158839f93b5089d","comment_id":"ewu9u3n","kind":"comment","text":"I am not sure it offers more options, but I found it strange how it outputed word-piece tokens (they weren't matching words and it was driving me insane) and the default server output ommited the subpiece-tokens and I still had to pass that in the call function in Python.\n\nPersonally, I just averaged them.","timestamp":"2019-08-14T08:26:09+00:00","score":2},{"role":"OP","user_id":"anon_246574f5086bf8fa","comment_id":"ewui1f8","kind":"comment","text":"Ok, thanks\n\nOne question about how you implemented it (averaging tokens for a word):\nDo tokens always start with ##? So can I just assume that all tokens starting with ## should be averaged with their nearest neighboor from the left without ##?\n\nFor example:\na ##b ##c d ##e ##f\n\nCan I assume that [a, b, c] is the first word and needs to be averaged out, and [d, e, f] is the second?","timestamp":"2019-08-14T11:24:30+00:00","score":2},{"role":"answerer","user_id":"anon_a158839f93b5089d","comment_id":"ewuxt5d","kind":"comment","text":"Your example is what I do, I join them into lists (matrices) and average them by their second axis.","timestamp":"2019-08-14T14:49:38+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_246574f5086bf8fa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a158839f93b5089d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ewu9u3n","thanks_reply_id":"ewui1f8","post_score":3,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_0c8bbf4ba72d5f87","answerer_user_id":"anon_80af6dda1f71bcb5","subreddit":"LanguageTechnology","timestamp":"2019-08-14T22:36:27+00:00","post_id":"cqh3vt","question":"What would it cost to implement Natural Language Processing?\n\nWhat would it take to implement some order of language AI (probably Natural Language Processing) into my product? \n\nI can provide more details in a PM, but the gist is: users play an RPG-like scenario answering questions posed to them from different characters. They respond to multiple choice options, and the path can end, or continue on and branch off. At the end, they receive a score on how they've done based on speed and accuracy of their responses. We can also ask the user to type in their answer, but there is only manual 'grading' as of now.\n\nImmediately (Stage 1), I'd simply want something to classify and rate written responses into categories (i.e. good, average, bad). If it could flag for plagiarism, even better. \n\nDown the road (Stage 2), I'd want to apply a rubric, of sorts, to the written responses and rate them. Eventually (Stage 3), I would want to create the ability to generate responses to their written responses and create a choose your own adventure situation (I imagine that may be another field - Natural Language Generation, perhaps). \n\nWhat kind of cost, resources, and timeline am I looking at for each stage? I realize this is probably difficult to impossible to say precisely, but I appreciate your thought.\n\nThank you!","preferred_answer":"Agree on all points. It’s much easier to evaluate form than content. I’m wondering why plagiarism would even be relevant for this task. It seems the user is simply going to give a short answer to a question.\n\nIncidentally, OP, there’s a lot of relevant research on the areas of language testing and computer assisted language learning.","full_conversation":[{"role":"OP","user_id":"anon_0c8bbf4ba72d5f87","comment_id":"cqh3vt","kind":"post","text":"What would it cost to implement Natural Language Processing?\n\nWhat would it take to implement some order of language AI (probably Natural Language Processing) into my product? \n\nI can provide more details in a PM, but the gist is: users play an RPG-like scenario answering questions posed to them from different characters. They respond to multiple choice options, and the path can end, or continue on and branch off. At the end, they receive a score on how they've done based on speed and accuracy of their responses. We can also ask the user to type in their answer, but there is only manual 'grading' as of now.\n\nImmediately (Stage 1), I'd simply want something to classify and rate written responses into categories (i.e. good, average, bad). If it could flag for plagiarism, even better. \n\nDown the road (Stage 2), I'd want to apply a rubric, of sorts, to the written responses and rate them. Eventually (Stage 3), I would want to create the ability to generate responses to their written responses and create a choose your own adventure situation (I imagine that may be another field - Natural Language Generation, perhaps). \n\nWhat kind of cost, resources, and timeline am I looking at for each stage? I realize this is probably difficult to impossible to say precisely, but I appreciate your thought.\n\nThank you!","timestamp":"2019-08-14T22:36:27+00:00","score":0},{"role":"answerer","user_id":"anon_80af6dda1f71bcb5","comment_id":"ewx4k6k","kind":"comment","text":"Agree on all points. It’s much easier to evaluate form than content. I’m wondering why plagiarism would even be relevant for this task. It seems the user is simply going to give a short answer to a question.\n\nIncidentally, OP, there’s a lot of relevant research on the areas of language testing and computer assisted language learning.","timestamp":"2019-08-15T04:42:12+00:00","score":1},{"role":"OP","user_id":"anon_0c8bbf4ba72d5f87","comment_id":"ewy3msj","kind":"comment","text":"Thank you for the feedback. I can see how the good-average-bad classifications could get fuzzy, and honestly, I don't know how I would tackle that right now...although a few suggestions here have given me some ideas. \n\n\nThis is a pretty new world for me to look at, so it's helpful to hear you reason through this. The integrations to Grammarly, Jigsaw, and TurnItIn may get me some of the way there.","timestamp":"2019-08-15T12:59:22+00:00","score":2},{"role":"answerer","user_id":"anon_80af6dda1f71bcb5","comment_id":"ewzg3ui","kind":"comment","text":"Not sure if Grammarly has a free API. If you just want to see if the syntax is reasonable, you could also use a language model perplexity score or a parser confidence score.","timestamp":"2019-08-15T18:57:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_0c8bbf4ba72d5f87","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_80af6dda1f71bcb5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ewx4k6k","thanks_reply_id":"ewy3msj","post_score":0,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_4bd4b3f87cd51030","answerer_user_id":"anon_86665a7ee1774b8a","subreddit":"LanguageTechnology","timestamp":"2019-09-03T08:46:44+00:00","post_id":"cz26at","question":"How to download Java version of SentiStrength?\n\nI know classic text analysis is not really state-of-the-art but I need this software for a project. I can only find the Windows version but there is a Java version with more features as well - but no download link?\n\nHow can I get the Java version?","preferred_answer":"Contact them directly, might have to buy a license (1000 GBP) \n\n [http://sentistrength.wlv.ac.uk/](http://sentistrength.wlv.ac.uk/)","full_conversation":[{"role":"OP","user_id":"anon_4bd4b3f87cd51030","comment_id":"cz26at","kind":"post","text":"How to download Java version of SentiStrength?\n\nI know classic text analysis is not really state-of-the-art but I need this software for a project. I can only find the Windows version but there is a Java version with more features as well - but no download link?\n\nHow can I get the Java version?","timestamp":"2019-09-03T08:46:44+00:00","score":1},{"role":"answerer","user_id":"anon_86665a7ee1774b8a","comment_id":"eyvq8id","kind":"comment","text":"Contact them directly, might have to buy a license (1000 GBP) \n\n [http://sentistrength.wlv.ac.uk/](http://sentistrength.wlv.ac.uk/)","timestamp":"2019-09-03T10:41:19+00:00","score":1},{"role":"OP","user_id":"anon_4bd4b3f87cd51030","comment_id":"eyvqouj","kind":"comment","text":"Emailed them, got a license for research purposes (my master thesis), thanks.","timestamp":"2019-09-03T10:50:59+00:00","score":1},{"role":"answerer","user_id":"anon_86665a7ee1774b8a","comment_id":"eyvquyy","kind":"comment","text":"Good luck! You've got a nice subject for your master thesis. :)","timestamp":"2019-09-03T10:54:34+00:00","score":1},{"role":"OP","user_id":"anon_4bd4b3f87cd51030","comment_id":"eyvtg5o","kind":"comment","text":"Sentiment analysis is only a part of it, in general it is about echo chambers and homophily in political topics.\n\nHope I get some good results to discuss :).","timestamp":"2019-09-03T11:44:36+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4bd4b3f87cd51030","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_86665a7ee1774b8a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eyvq8id","thanks_reply_id":"eyvqouj","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_e24f24382d35bea6","answerer_user_id":"anon_90188b7208f74aef","subreddit":"LanguageTechnology","timestamp":"2019-09-03T10:42:03+00:00","post_id":"cz356j","question":"What is difference between sentence similarity, paraphrase and textual entailment models?\n\nI am unable to understand the difference between models trained for these 3 tasks. Could someone explain this?\nThanks","preferred_answer":"These three tasks are quite conceptually close, but they each have their own specificity :\n\nSentence similarity is most of the time performed as a regression task : for a given pair of sentences, how similar are their meanings on a given scale ? (Usually 0-5 or 1-5)\n\nParaphrase detection is trying to identify sentence segments that mean the same thing. It doesn't work at the sentence level and the goal is to match segments, not to assign a score.\n\nEntailment is more of a classification task. For a pair of sentences A and B, given A, can we infer B ? There usually are three answers to that : yes (entailment), no (contradiction) or not relevant (neutral)","full_conversation":[{"role":"OP","user_id":"anon_e24f24382d35bea6","comment_id":"cz356j","kind":"post","text":"What is difference between sentence similarity, paraphrase and textual entailment models?\n\nI am unable to understand the difference between models trained for these 3 tasks. Could someone explain this?\nThanks","timestamp":"2019-09-03T10:42:03+00:00","score":4},{"role":"answerer","user_id":"anon_90188b7208f74aef","comment_id":"eyvsizb","kind":"comment","text":"These three tasks are quite conceptually close, but they each have their own specificity :\n\nSentence similarity is most of the time performed as a regression task : for a given pair of sentences, how similar are their meanings on a given scale ? (Usually 0-5 or 1-5)\n\nParaphrase detection is trying to identify sentence segments that mean the same thing. It doesn't work at the sentence level and the goal is to match segments, not to assign a score.\n\nEntailment is more of a classification task. For a pair of sentences A and B, given A, can we infer B ? There usually are three answers to that : yes (entailment), no (contradiction) or not relevant (neutral)","timestamp":"2019-09-03T11:27:45+00:00","score":3},{"role":"OP","user_id":"anon_e24f24382d35bea6","comment_id":"eyvynd4","kind":"comment","text":"Thanks for your reply. But we can also treat sentence similarity as 3 class classifier (Yes, No, Neural). Similarly, sentence similarity can also be treated as 2 class classifier (paraphrase or not).\nHow there models are different from each other, although all tasks can be solved using LSTMs? Could you comment on this?","timestamp":"2019-09-03T13:07:23+00:00","score":1},{"role":"answerer","user_id":"anon_90188b7208f74aef","comment_id":"eywawjv","kind":"comment","text":"I don't really see how sentence similarity would be a 3 class task, either two sentences share the same meaning or they don't, I can't think of an example from the \"neutral\" class.\n\nBut you're right for the binary classification angle. It's just that in research it's usually done as a regression task. That enables more fine grained prediction.\n\nMy reply was a rough description of each task specificity, but sure the concepts can overlap. For example, two sentences that are fully similar in meaning can be described as a mutual entailment, or as full paraphrases. \n\nThe differences lie in the task design, the technical side of it will come from there. You can use LSTMs for classification or regression, it depends on what you try to achieve. There are plenty of resources on the internet to see how to do one or the other.","timestamp":"2019-09-03T15:39:22+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e24f24382d35bea6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_90188b7208f74aef","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"eyvsizb","thanks_reply_id":"eyvynd4","post_score":4,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_5935aa3d91d3902d","answerer_user_id":"anon_dd34e2adcc10b7c4","subreddit":"LanguageTechnology","timestamp":"2019-09-10T13:58:17+00:00","post_id":"d27w93","question":"How do I build and extend a Knowledge Graph with entity extraction while Neo4j for my database?\n\nMy goal is to build an automated Knowledge Graph. I have decided to use Neo4j as my database. I am intending to load a json file from my local directory to Neo4j. The data I will be using are the yelp datasets(the json files are quite large).\n\nI have seen some Neo4j examples with Graphaware and OpenNLP. I read that Neo4j has a good support for JAVA apps. I have also read that Neoj supports python(I am intending to use nltk). Is it advisable to use Neo4j with JAVA maven/gradle and OpenNLP? Or should I use it with py2neo with nltk.\n\nI am really sorry that I don't have any prior experience with these tools. Any advice or recommendation will be greatly appreciated. Thank you so much!","preferred_answer":"I haven’t touched Java in years so take my advice with a grain of salt. I built something similar with Wikipedia using Neo4j + spaCy + py2neo and I really liked it. \n\nI think both Java and Python will work fine with Neo4j. It mostly comes down to what language and NLP library you want to use. Java is probably going to be at least a little faster for loading data into Neo4j and has more type safety due to being statically typed. You can’t develop as fast as you can in Python and the syntax is generally harder to read though. Java is the only language you can write custom procedures for Neo4j though, so keep that in mind. Although spaCy is a python library, all the intensive processing parts are written in C which is generally faster than Java. And you don’t even have to touch C at all; it’s all wrapped in python. So in my mind, the only reason to go with Java is if you want static typing or are much more experienced with it. \n\nTLDR; Try spaCy instead of NLTK in Python unless you already know Java really well and are a novice at Python. \n\nP.S. See if you can get the same data from Yelp’s API instead of downloading their JSON dump. In my experience, working with monolithic files is always a huge pain.","full_conversation":[{"role":"OP","user_id":"anon_5935aa3d91d3902d","comment_id":"d27w93","kind":"post","text":"How do I build and extend a Knowledge Graph with entity extraction while Neo4j for my database?\n\nMy goal is to build an automated Knowledge Graph. I have decided to use Neo4j as my database. I am intending to load a json file from my local directory to Neo4j. The data I will be using are the yelp datasets(the json files are quite large).\n\nI have seen some Neo4j examples with Graphaware and OpenNLP. I read that Neo4j has a good support for JAVA apps. I have also read that Neoj supports python(I am intending to use nltk). Is it advisable to use Neo4j with JAVA maven/gradle and OpenNLP? Or should I use it with py2neo with nltk.\n\nI am really sorry that I don't have any prior experience with these tools. Any advice or recommendation will be greatly appreciated. Thank you so much!","timestamp":"2019-09-10T13:58:17+00:00","score":11},{"role":"answerer","user_id":"anon_dd34e2adcc10b7c4","comment_id":"ezu4lu7","kind":"comment","text":"I haven’t touched Java in years so take my advice with a grain of salt. I built something similar with Wikipedia using Neo4j + spaCy + py2neo and I really liked it. \n\nI think both Java and Python will work fine with Neo4j. It mostly comes down to what language and NLP library you want to use. Java is probably going to be at least a little faster for loading data into Neo4j and has more type safety due to being statically typed. You can’t develop as fast as you can in Python and the syntax is generally harder to read though. Java is the only language you can write custom procedures for Neo4j though, so keep that in mind. Although spaCy is a python library, all the intensive processing parts are written in C which is generally faster than Java. And you don’t even have to touch C at all; it’s all wrapped in python. So in my mind, the only reason to go with Java is if you want static typing or are much more experienced with it. \n\nTLDR; Try spaCy instead of NLTK in Python unless you already know Java really well and are a novice at Python. \n\nP.S. See if you can get the same data from Yelp’s API instead of downloading their JSON dump. In my experience, working with monolithic files is always a huge pain.","timestamp":"2019-09-10T19:54:47+00:00","score":2},{"role":"OP","user_id":"anon_5935aa3d91d3902d","comment_id":"f00gf5n","kind":"comment","text":">Java is the only language you can write custom procedures for Neo4j \n\nHi thanks for your suggestions! If I were to extend my KG(extending the graph database with entity extracted from texts), will I have to use custom procedures from Neo4j to do so?","timestamp":"2019-09-12T15:18:35+00:00","score":2},{"role":"answerer","user_id":"anon_dd34e2adcc10b7c4","comment_id":"f03oe4y","kind":"comment","text":"I’m almost absolutely sure you won’t have to. Custom procedures will probably be faster but you will most likely be able to accomplish the same thing without them.","timestamp":"2019-09-13T08:28:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_5935aa3d91d3902d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dd34e2adcc10b7c4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ezu4lu7","thanks_reply_id":"f00gf5n","post_score":11,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_2cf473d140c6d3e8","answerer_user_id":"anon_a2457ca2a832584a","subreddit":"LanguageTechnology","timestamp":"2019-09-11T14:16:50+00:00","post_id":"d2quu3","question":"What are cross-lingual word embeddings?\n\nSo I've found this survey (http://ruder.io/cross-lingual-embeddings/) that sorts of explains them, but it is not quite what I'm looking for, since it doesn't explain them in detail.\n\nSearching for \"cross-lingual word embeddings\" or similar only results in articles, and I am looking either some chapter of a book or a blog explanation. Does anyone know of something like that?","preferred_answer":"Honestly, that blog is probably the best overview I've seen, because it's quite a diverse area. I think it could be made more clear, though, and not launch straight into the maths before explaining the overview of the methods.\n\nBasically, 'cross lingual word embeddings' simply refers to word embeddings in two or more languages that are aligned to a common space, so that words that translation pairs of words between languages are similar. For example, the word \"cat\" in English will be very close to the word \"neko\" in Japanese, and the word \"chat\" in French. So in theory, were you to submit a query like \"most cosine similar word in French to 'cat'\", it would come up with \"chat\".\n\nI would say these are the two main categories:\n\n\\- **Joint training.** This is where you train the embeddings jointly, using some kind of regularisation to make sure that translation pairs are in similar space. This usually needs at least some kind of bilingual reference, like a dictionary or a parallel corpus.\n\n\\- **Post hoc alignment**. This is based on the intuition that the same words in translation are used similarly regardless of language, so the spaces will be approximately the same shape (isomorphic). You take pretrained word embeddings in two languages and learn an orthogonal (usually) linear transformation of the entire source language space to the target language. [This blog](https://www.samtalksml.net/aligning-vector-representations/) has a pretty good explanation of the intuition behind this method.","full_conversation":[{"role":"OP","user_id":"anon_2cf473d140c6d3e8","comment_id":"d2quu3","kind":"post","text":"What are cross-lingual word embeddings?\n\nSo I've found this survey (http://ruder.io/cross-lingual-embeddings/) that sorts of explains them, but it is not quite what I'm looking for, since it doesn't explain them in detail.\n\nSearching for \"cross-lingual word embeddings\" or similar only results in articles, and I am looking either some chapter of a book or a blog explanation. Does anyone know of something like that?","timestamp":"2019-09-11T14:16:50+00:00","score":20},{"role":"answerer","user_id":"anon_a2457ca2a832584a","comment_id":"ezwc9jz","kind":"comment","text":"Honestly, that blog is probably the best overview I've seen, because it's quite a diverse area. I think it could be made more clear, though, and not launch straight into the maths before explaining the overview of the methods.\n\nBasically, 'cross lingual word embeddings' simply refers to word embeddings in two or more languages that are aligned to a common space, so that words that translation pairs of words between languages are similar. For example, the word \"cat\" in English will be very close to the word \"neko\" in Japanese, and the word \"chat\" in French. So in theory, were you to submit a query like \"most cosine similar word in French to 'cat'\", it would come up with \"chat\".\n\nI would say these are the two main categories:\n\n\\- **Joint training.** This is where you train the embeddings jointly, using some kind of regularisation to make sure that translation pairs are in similar space. This usually needs at least some kind of bilingual reference, like a dictionary or a parallel corpus.\n\n\\- **Post hoc alignment**. This is based on the intuition that the same words in translation are used similarly regardless of language, so the spaces will be approximately the same shape (isomorphic). You take pretrained word embeddings in two languages and learn an orthogonal (usually) linear transformation of the entire source language space to the target language. [This blog](https://www.samtalksml.net/aligning-vector-representations/) has a pretty good explanation of the intuition behind this method.","timestamp":"2019-09-11T14:48:18+00:00","score":6},{"role":"OP","user_id":"anon_2cf473d140c6d3e8","comment_id":"ezwk5d1","kind":"comment","text":"Thanks for the answer, I will read that blog too. But I'm not sure I understand how you would go about embedding the two languages in the same space. I think I understand how would you do it with just one language, but how would some regularisation do it with two?","timestamp":"2019-09-11T16:15:48+00:00","score":3},{"role":"answerer","user_id":"anon_a2457ca2a832584a","comment_id":"ezxlzpu","kind":"comment","text":"In a joint training model, you could regularise the two spaces by implementing a loss function so that a word vector in the source language must be close to its translation(s) in the target language. You might also require, say, a CBOW model to predict both the centre word in the source language and its translations in the target language (and vice versa) - see [this paper](https://www.aclweb.org/anthology/E17-1084) for example. Doing this forces similarity between known translation words, and hopefully the rest should follow.\n\nSome researchers have also found that simply language modelling with parameter sharing between two languages works (can’t find that paper right now).\n\nI don’t know much about those methods, to be honest.","timestamp":"2019-09-11T23:16:28+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2cf473d140c6d3e8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a2457ca2a832584a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ezwc9jz","thanks_reply_id":"ezwk5d1","post_score":20,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_c091a089a4ff13ee","answerer_user_id":"anon_a158839f93b5089d","subreddit":"LanguageTechnology","timestamp":"2019-10-16T03:53:20+00:00","post_id":"dijpvr","question":"Would you like a Chrome extension to train NER?\n\nOur team is planning to build a Chrome extension to make NER training dead easy for anyone.\n\nWorks like this:\n\n1. download the extension and install it;\n2. browse to any real-life web page;\n3. mark a phrase, and add a tag.\n\nHas these features:\n\n* define new tags;\n* export trained data for use in any NLP tool/library;\n* support for multiple users, so that you can hire as many mturks as needed, and manage them efficiently.\n\nThoughts?","preferred_answer":"I haven't tried many but something that:\n\n\\- selects at token level (unlike character level) would be much more handy.\n\n\\- something that suggests previously annotated entities would be welcome as well. I only saw one that did this.\n\n\\- a crazy and harder idea: let users adapt word embeddings or contextualized embeddings or LMs and allow entities suggesting by highlight words. For example, with GloVe alone and some people's names, I can generalize to other names easily, same goes with jobs (but need more examples).","full_conversation":[{"role":"OP","user_id":"anon_c091a089a4ff13ee","comment_id":"dijpvr","kind":"post","text":"Would you like a Chrome extension to train NER?\n\nOur team is planning to build a Chrome extension to make NER training dead easy for anyone.\n\nWorks like this:\n\n1. download the extension and install it;\n2. browse to any real-life web page;\n3. mark a phrase, and add a tag.\n\nHas these features:\n\n* define new tags;\n* export trained data for use in any NLP tool/library;\n* support for multiple users, so that you can hire as many mturks as needed, and manage them efficiently.\n\nThoughts?","timestamp":"2019-10-16T03:53:20+00:00","score":21},{"role":"answerer","user_id":"anon_a158839f93b5089d","comment_id":"f3wqwwi","kind":"comment","text":"I haven't tried many but something that:\n\n\\- selects at token level (unlike character level) would be much more handy.\n\n\\- something that suggests previously annotated entities would be welcome as well. I only saw one that did this.\n\n\\- a crazy and harder idea: let users adapt word embeddings or contextualized embeddings or LMs and allow entities suggesting by highlight words. For example, with GloVe alone and some people's names, I can generalize to other names easily, same goes with jobs (but need more examples).","timestamp":"2019-10-16T08:56:17+00:00","score":1},{"role":"OP","user_id":"anon_c091a089a4ff13ee","comment_id":"f3wr5ev","kind":"comment","text":"Thanks for the suggestions.\n\nI am not sure if I get the last point. Care to elaborate a bit?","timestamp":"2019-10-16T09:02:59+00:00","score":1},{"role":"answerer","user_id":"anon_a158839f93b5089d","comment_id":"f3wvbuz","kind":"comment","text":"When selecting and a paragraph/sentence for annotating, the plugin would parse and tokenize the the text into tokens.\n\nA basic approach, using word embeddings is: for each of those words, compute their embeddings and their cosine similarity against sets of embeddings - of people's names, for example. If the similarity is high (closer to 1), then discretely highlight that word so it draws people's eyes to it.\n\nIf I make a list of embeddings with people's names such as \\[\"Mary\", \"Steve\", \"Richard\", etc\\], when I see \"Arthur\" (not included in the list) it will likely return a value close to elements of this list.\n\nI did something like this, but sloppily in a jupyter notebook, to print and manually C/P people's names with their roles adjacent to them from news articles.","timestamp":"2019-10-16T10:49:56+00:00","score":3},{"role":"OP","user_id":"anon_c091a089a4ff13ee","comment_id":"f3wx7so","kind":"comment","text":"Got you. This would allow people to work in a semi-automated way.\n\nThanks!","timestamp":"2019-10-16T11:28:05+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_c091a089a4ff13ee","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a158839f93b5089d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f3wqwwi","thanks_reply_id":"f3wr5ev","post_score":21,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_90188b7208f74aef","answerer_user_id":"anon_4db0a21667813b1d","subreddit":"LanguageTechnology","timestamp":"2019-10-19T19:12:43+00:00","post_id":"dk88dk","question":"Manipulating syntactic trees ?\n\nHi all,\n\nCan you guide me towards softwares/libraries/packages that one can use to manipulate syntactic representations of sentences ?\n\nI know of tregex, I am finding other stuff here and there and I am interested in anything you may know. \n\nThanks !","preferred_answer":"Have you checked out NLTK’s Tree?","full_conversation":[{"role":"OP","user_id":"anon_90188b7208f74aef","comment_id":"dk88dk","kind":"post","text":"Manipulating syntactic trees ?\n\nHi all,\n\nCan you guide me towards softwares/libraries/packages that one can use to manipulate syntactic representations of sentences ?\n\nI know of tregex, I am finding other stuff here and there and I am interested in anything you may know. \n\nThanks !","timestamp":"2019-10-19T19:12:43+00:00","score":1},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"f4cy7kx","kind":"comment","text":"Have you checked out NLTK’s Tree?","timestamp":"2019-10-20T01:38:17+00:00","score":2},{"role":"OP","user_id":"anon_90188b7208f74aef","comment_id":"f4fn2wd","kind":"comment","text":"My Google skills betrayed me on that one. It looks sweet, thanks !","timestamp":"2019-10-20T11:50:12+00:00","score":1},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"f4gr8ur","kind":"comment","text":"Nice! Good luck, mate.","timestamp":"2019-10-20T15:01:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_90188b7208f74aef","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4db0a21667813b1d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f4cy7kx","thanks_reply_id":"f4fn2wd","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ec35943642d74b30","answerer_user_id":"anon_5a1f683434d025b7","subreddit":"LanguageTechnology","timestamp":"2019-10-23T15:54:47+00:00","post_id":"dm19ly","question":"How were the GPT-2 token embeddings constructed? Byte Pair Encoding is a compression algorithm that returns a list of subword tokens that would best compress the total vocabulary - but how is that list of strings turned into vectors?\n\nI understand that BPE will return a list of which subwords should be encoded. My question is about the next step - how do they turn these subwords - which are just strings - into vectors?\n\n​\n\nHere are the papers for [GPT-1](https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf) and [GPT-2](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)","preferred_answer":"That would be the result if you used a cosine loss or L2 loss. The MLE loss attempts to maximize the probability you put on the correct token. If you used the same embedding everywhere, you’d have uniform probability and your loss would be quite bad.\n\nI suggest you read about neural language modeling. This goes back to 2012.","full_conversation":[{"role":"OP","user_id":"anon_ec35943642d74b30","comment_id":"dm19ly","kind":"post","text":"How were the GPT-2 token embeddings constructed? Byte Pair Encoding is a compression algorithm that returns a list of subword tokens that would best compress the total vocabulary - but how is that list of strings turned into vectors?\n\nI understand that BPE will return a list of which subwords should be encoded. My question is about the next step - how do they turn these subwords - which are just strings - into vectors?\n\n​\n\nHere are the papers for [GPT-1](https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/language-unsupervised/language_understanding_paper.pdf) and [GPT-2](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)","timestamp":"2019-10-23T15:54:47+00:00","score":11},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"f4wvup5","kind":"comment","text":"That would be the result if you used a cosine loss or L2 loss. The MLE loss attempts to maximize the probability you put on the correct token. If you used the same embedding everywhere, you’d have uniform probability and your loss would be quite bad.\n\nI suggest you read about neural language modeling. This goes back to 2012.","timestamp":"2019-10-23T19:50:08+00:00","score":4},{"role":"OP","user_id":"anon_ec35943642d74b30","comment_id":"f4wyjwh","kind":"comment","text":"Thanks for pointing that out. Any specific paper you'd recommend I read to introduce me to these concepts?","timestamp":"2019-10-23T20:01:19+00:00","score":3},{"role":"answerer","user_id":"anon_5a1f683434d025b7","comment_id":"f4y96iu","kind":"comment","text":"Pytorch tutorial on language modeling is reasonable.","timestamp":"2019-10-23T23:33:04+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ec35943642d74b30","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5a1f683434d025b7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f4wvup5","thanks_reply_id":"f4wyjwh","post_score":11,"answer_score":4,"preferred_answer_is_top_level":false}} {"user_id":"anon_3bc3ff5c28d90508","answerer_user_id":"anon_13ed7a91e2f9bc85","subreddit":"LanguageTechnology","timestamp":"2019-10-25T09:46:45+00:00","post_id":"dmv41l","question":"NLP Data Preprocessing\n\nHey guys, a newbie here to the field of NLP and ML.\n\nI have a large dataset of about 25,000 rows of customer feedback on which I want to perform Sentiment Analysis. So obviously the first step would be to perform data preprocessing which would involve tasks like removal of stop words and punctuation, stemming, lemmatization, POS tagging and so on. I am intending to create a function which would perform all these steps.\n\nMy question here is that originally I had thought of writing a for loop which would take every row of the dataset and and pass it to the preprocessing function. However, this would mean calling that function 25000 times for all inputs. Is there any way of optimizing this task? For example, could it be possible for me to pass the entire dataframe to the function for preprocessing?","preferred_answer":"Writing a function seems like the easiest way to do it. Rather than make a look that appends to a list, use the apply() method of pandas. I think (can't confirm) that this method is faster than making a loop.","full_conversation":[{"role":"OP","user_id":"anon_3bc3ff5c28d90508","comment_id":"dmv41l","kind":"post","text":"NLP Data Preprocessing\n\nHey guys, a newbie here to the field of NLP and ML.\n\nI have a large dataset of about 25,000 rows of customer feedback on which I want to perform Sentiment Analysis. So obviously the first step would be to perform data preprocessing which would involve tasks like removal of stop words and punctuation, stemming, lemmatization, POS tagging and so on. I am intending to create a function which would perform all these steps.\n\nMy question here is that originally I had thought of writing a for loop which would take every row of the dataset and and pass it to the preprocessing function. However, this would mean calling that function 25000 times for all inputs. Is there any way of optimizing this task? For example, could it be possible for me to pass the entire dataframe to the function for preprocessing?","timestamp":"2019-10-25T09:46:45+00:00","score":3},{"role":"answerer","user_id":"anon_13ed7a91e2f9bc85","comment_id":"f5556e3","kind":"comment","text":"Writing a function seems like the easiest way to do it. Rather than make a look that appends to a list, use the apply() method of pandas. I think (can't confirm) that this method is faster than making a loop.","timestamp":"2019-10-25T10:41:10+00:00","score":3},{"role":"OP","user_id":"anon_3bc3ff5c28d90508","comment_id":"f55g64l","kind":"comment","text":"Thanks! I will compare the times and see which is more faster","timestamp":"2019-10-25T12:34:25+00:00","score":1},{"role":"answerer","user_id":"anon_13ed7a91e2f9bc85","comment_id":"f55ml5l","kind":"comment","text":"If you want, get a small sample (like 10%) and use the %timeit to check processing speed.","timestamp":"2019-10-25T13:29:22+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3bc3ff5c28d90508","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_13ed7a91e2f9bc85","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f5556e3","thanks_reply_id":"f55g64l","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_5287ce59bca2cfd4","answerer_user_id":"anon_e63c15f51ae7118a","subreddit":"LanguageTechnology","timestamp":"2019-10-28T15:32:07+00:00","post_id":"doafeu","question":"Advice wanted, new to NLP and need to classify emails at work in Python\n\nHi, I just got assigned to an NLP project at work, and I have little to no experience in this. I would love some pointers in the right direction as to what type of algorithm/framework to use for this, so that I can research the right thing. I'm decently experienced in Python, and I'm familiar with basic NLP and ML terms, but that's about it.\n\nI have a labeled database of ~3000 emails that I can use to train a model to classify emails into two categories. The thing is, only ~7% of the emails are in one of the categories (same thing for the labeled database), and it's not just a few simple keywords to filter but a relatively abstract category.\n\nThank you so much, please tell me if there is any key information I'm missing with my question!","preferred_answer":"Idk how long the emails are, but one thing that helped me a ton for more short-form text classification with imbalanced classes was verifying the labels are accurate, given a basic model. The way I did this was:\n\n1. Run cross validation with the model of your choice, and save the predictions over the dataset. Scikit-learn has a good function for this: cross_val_predict \n\n2. Encode all of the data in your dataset you use in the cross validation into feature vectors (I used bag of words vectors, but this would work with the encoding vector from BERT or ULMFit as well)\n\n3. Iterate over the emails your model misclassified, and find the top N most similar examples that were in the class your classifier predicted. \nSo for example: your first email is classified CLASS1, but your classifier predicted CLASS2. Find the distance between this email and all the other email vectors, and sort them in ascending order, then filter out only the emails that are in CLASS2. Take the first N of this list, and associate them to the misclassified email.\nThis set of N related emails will help you decide whether the misclassified email actually should have been classified the other way - kind of like a reminder of similar things that humans said should belong in the class.\n\n4. Sort your list of misclassified emails by the confidence of being CLASS1 predicted by your model (Descending). Ideally, this will give you a list where the first few emails should have actually been classified as CLASS1, but were not because of human error. \nAs you get towards the 0.5 confidence mark, those will be the emails more likely to have just been missed by your model because of natural language limitations. Then, down toward the bottom of the list, those will be emails that may have been classified as CLASS1 that should actually been classified as CLASS2.\nViewing the beginning and ending of the list can be a quick way to make some corrections to the training data, and lets you train a more accurate model. The reason I bring this up is because when you have a severe class imbalance on a relatively small dataset, even small amounts of noise/errors in classification matter. Being able to fix 20 errors in a dataset where only 0.07 * 3000 = 210 emails were in CLASS1 will make a pretty decent impact on your model.\n\n\nTL;DR basically use cross validation with your classifier and distance between feature vectors of the emails to see if there are any corrections you could make to the training data, because that will go a long way with a small set of imbalanced data","full_conversation":[{"role":"OP","user_id":"anon_5287ce59bca2cfd4","comment_id":"doafeu","kind":"post","text":"Advice wanted, new to NLP and need to classify emails at work in Python\n\nHi, I just got assigned to an NLP project at work, and I have little to no experience in this. I would love some pointers in the right direction as to what type of algorithm/framework to use for this, so that I can research the right thing. I'm decently experienced in Python, and I'm familiar with basic NLP and ML terms, but that's about it.\n\nI have a labeled database of ~3000 emails that I can use to train a model to classify emails into two categories. The thing is, only ~7% of the emails are in one of the categories (same thing for the labeled database), and it's not just a few simple keywords to filter but a relatively abstract category.\n\nThank you so much, please tell me if there is any key information I'm missing with my question!","timestamp":"2019-10-28T15:32:07+00:00","score":14},{"role":"answerer","user_id":"anon_e63c15f51ae7118a","comment_id":"f5mtb02","kind":"comment","text":"Idk how long the emails are, but one thing that helped me a ton for more short-form text classification with imbalanced classes was verifying the labels are accurate, given a basic model. The way I did this was:\n\n1. Run cross validation with the model of your choice, and save the predictions over the dataset. Scikit-learn has a good function for this: cross_val_predict \n\n2. Encode all of the data in your dataset you use in the cross validation into feature vectors (I used bag of words vectors, but this would work with the encoding vector from BERT or ULMFit as well)\n\n3. Iterate over the emails your model misclassified, and find the top N most similar examples that were in the class your classifier predicted. \nSo for example: your first email is classified CLASS1, but your classifier predicted CLASS2. Find the distance between this email and all the other email vectors, and sort them in ascending order, then filter out only the emails that are in CLASS2. Take the first N of this list, and associate them to the misclassified email.\nThis set of N related emails will help you decide whether the misclassified email actually should have been classified the other way - kind of like a reminder of similar things that humans said should belong in the class.\n\n4. Sort your list of misclassified emails by the confidence of being CLASS1 predicted by your model (Descending). Ideally, this will give you a list where the first few emails should have actually been classified as CLASS1, but were not because of human error. \nAs you get towards the 0.5 confidence mark, those will be the emails more likely to have just been missed by your model because of natural language limitations. Then, down toward the bottom of the list, those will be emails that may have been classified as CLASS1 that should actually been classified as CLASS2.\nViewing the beginning and ending of the list can be a quick way to make some corrections to the training data, and lets you train a more accurate model. The reason I bring this up is because when you have a severe class imbalance on a relatively small dataset, even small amounts of noise/errors in classification matter. Being able to fix 20 errors in a dataset where only 0.07 * 3000 = 210 emails were in CLASS1 will make a pretty decent impact on your model.\n\n\nTL;DR basically use cross validation with your classifier and distance between feature vectors of the emails to see if there are any corrections you could make to the training data, because that will go a long way with a small set of imbalanced data","timestamp":"2019-10-28T20:11:04+00:00","score":4},{"role":"OP","user_id":"anon_5287ce59bca2cfd4","comment_id":"f5pekwn","kind":"comment","text":"Thank you so much for this, gonna need a while to digest it, I appreciate the work you put into this comment!","timestamp":"2019-10-29T13:56:55+00:00","score":1},{"role":"answerer","user_id":"anon_e63c15f51ae7118a","comment_id":"f5q58qj","kind":"comment","text":"No problem! Honestly, rereading this advice again its kind of a lot of work - you can achieve almost the same thing by just sorting your misclassifications by model confidence, and putting an eye on the top and bottom parts of the list. The similar emails thing might be overkill for one label lol","timestamp":"2019-10-29T18:12:12+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_5287ce59bca2cfd4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e63c15f51ae7118a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f5mtb02","thanks_reply_id":"f5pekwn","post_score":14,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_90188b7208f74aef","answerer_user_id":"anon_849c3c3a92780330","subreddit":"LanguageTechnology","timestamp":"2019-10-29T21:31:34+00:00","post_id":"dowmj6","question":"CONLL-X to tree ?\n\nHi,\n\nI am working with texts in the CONLL-X format. I would like to be able to work on their sentence structures (ideally as a tree). I found a lot of things to work with the CONLL-U format but they are not compatible with X.\n\nDo you know a way to convert automatically from X to U or to the parenthesis format* ?\n\nThanks !\n\n*I don't know the standard name, it looks like this : (S (NP I) (VP (V saw) (NP him)))","preferred_answer":"The example you gave is a syntactic tree, whereas conll-x contains dependency trees, so converting that seems impossible.. Perhaps you could write a quick script to convert to conll-u though, I'm not quite sure of the differences between the two formats however","full_conversation":[{"role":"OP","user_id":"anon_90188b7208f74aef","comment_id":"dowmj6","kind":"post","text":"CONLL-X to tree ?\n\nHi,\n\nI am working with texts in the CONLL-X format. I would like to be able to work on their sentence structures (ideally as a tree). I found a lot of things to work with the CONLL-U format but they are not compatible with X.\n\nDo you know a way to convert automatically from X to U or to the parenthesis format* ?\n\nThanks !\n\n*I don't know the standard name, it looks like this : (S (NP I) (VP (V saw) (NP him)))","timestamp":"2019-10-29T21:31:34+00:00","score":4},{"role":"answerer","user_id":"anon_849c3c3a92780330","comment_id":"f5rihhs","kind":"comment","text":"The example you gave is a syntactic tree, whereas conll-x contains dependency trees, so converting that seems impossible.. Perhaps you could write a quick script to convert to conll-u though, I'm not quite sure of the differences between the two formats however","timestamp":"2019-10-30T00:25:46+00:00","score":2},{"role":"OP","user_id":"anon_90188b7208f74aef","comment_id":"f5t04d6","kind":"comment","text":"Thanks ! \n\nNow I feel a bit stupid for assuming that building syntactic trees from dependency trees was trivial without giving it a thought. \n This should be doable though, right ?\n\n \nFrom what I've seen, converting from X to U doesn't seem easy. The layout is the same for both but the underlying principles for building/annotating the sentence structures are not the same, this is why it looks tricky.","timestamp":"2019-10-30T14:56:31+00:00","score":1},{"role":"answerer","user_id":"anon_849c3c3a92780330","comment_id":"f5t8xy5","kind":"comment","text":"Well, I said impossible, but I should have said they're different things and given a dependency tree there is no single obvious constituent tree that corresponds to it.\n\nThat said, you could either represent a dependency tree in parentheses by just listing head nodes before lists of dependents:\n\n(hit/V john/N (ball/N the/D)) \n\nOr you could try several algorithms to convert to a constituency tree using certain rules. See for example here: https://github.com/wenkokke/dep2con/blob/master/README.md","timestamp":"2019-10-30T16:30:56+00:00","score":2},{"role":"OP","user_id":"anon_90188b7208f74aef","comment_id":"f5td54n","kind":"comment","text":"I hadn't included \"constituent\" in my searches, and with it it now appears to me that the relationship between those two types of trees is the focus of many research papers. Maybe someday I'll work on that, it looks really interesting. Thanks for showing me this ! \nI may try what you suggest or I'll just use another tool that outputs the proper type of tree for what I am doing. If I ever succeed in converting I'll let you know !","timestamp":"2019-10-30T17:18:55+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_90188b7208f74aef","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_849c3c3a92780330","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f5rihhs","thanks_reply_id":"f5t04d6","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_615cfb597fce786e","answerer_user_id":"anon_342cb4cb0e455f4a","subreddit":"LanguageTechnology","timestamp":"2019-11-01T02:02:41+00:00","post_id":"dpxvtd","question":"Text2Image: A new way to NLP?\n\nNatural Language Processing(NLP) has long been considered a tough nut to crack, at least in comparison to Computer Vision. NLP models take longer to run, are generally more difficult to implement and require substantially higher computational resources. On the other hand, Image recognition models have got much simpler to implement and are less taxing on your GPUs. This got me thinking, can we convert a corpus of text to an image? Can we interpret text as an image? It turns out, yes and with surprisingly promising results! \n\n​\n\nRead more at : [https://towardsdatascience.com/text2image-a-new-way-to-nlp-cbf63376aa0d](https://towardsdatascience.com/text2image-a-new-way-to-nlp-cbf63376aa0d)\n\nDo let me know if you like it:)","preferred_answer":"This is an interesting thought but there are some flaws in the finer details of the intuition. CNNs exploit local features in spatial data (e.g. an image). By turning an article into an 11x11 matrix/heatmap of the most frequent words you're artificially forcing a vertical spatial correlation in the heat map, this is purely an artifact of the data transformation. There isn't really anything for the CNN to learn along this dimension (the horizontal dimension has some relevance to how the words are ordered) so using a CNN is not really appropriate for the way you're pre-processing the data.\n\nAlso, there is no need to turn the TF-IDF matrices into actual images. At a fundamental level, images are just matrices/tensors of numbers representing the rgb value at each pixel. By turning your original 11x11 matrices into an image you're just blowing them up into a significantly larger matrix that doesn't actually contain any additional information (it all originated from the original matrix, at this point there is a one-to-one mapping between the two). This is most likely why you are seeing over fitting. You're using a model that has the capacity to learn patterns in real images containing millions of pixels but the data you're feeding it can all be compressed down to an 11x11 matrix. The model is just memorizing your training data. \n\nAgain, this was an interesting thought and it's great that you experimented with variations of it but it is helpful sometimes to step away and think about what you want the model to exploit in the data.\n\nLastly, as others mentioned, you should look into using real word embeddings (like Fast Text or Glove). TF-IDF by itself isn't nearly as informative as the actual embedding representations, which encode actual semantic meaning.","full_conversation":[{"role":"OP","user_id":"anon_615cfb597fce786e","comment_id":"dpxvtd","kind":"post","text":"Text2Image: A new way to NLP?\n\nNatural Language Processing(NLP) has long been considered a tough nut to crack, at least in comparison to Computer Vision. NLP models take longer to run, are generally more difficult to implement and require substantially higher computational resources. On the other hand, Image recognition models have got much simpler to implement and are less taxing on your GPUs. This got me thinking, can we convert a corpus of text to an image? Can we interpret text as an image? It turns out, yes and with surprisingly promising results! \n\n​\n\nRead more at : [https://towardsdatascience.com/text2image-a-new-way-to-nlp-cbf63376aa0d](https://towardsdatascience.com/text2image-a-new-way-to-nlp-cbf63376aa0d)\n\nDo let me know if you like it:)","timestamp":"2019-11-01T02:02:41+00:00","score":6},{"role":"answerer","user_id":"anon_342cb4cb0e455f4a","comment_id":"f5ztrvq","kind":"comment","text":"This is an interesting thought but there are some flaws in the finer details of the intuition. CNNs exploit local features in spatial data (e.g. an image). By turning an article into an 11x11 matrix/heatmap of the most frequent words you're artificially forcing a vertical spatial correlation in the heat map, this is purely an artifact of the data transformation. There isn't really anything for the CNN to learn along this dimension (the horizontal dimension has some relevance to how the words are ordered) so using a CNN is not really appropriate for the way you're pre-processing the data.\n\nAlso, there is no need to turn the TF-IDF matrices into actual images. At a fundamental level, images are just matrices/tensors of numbers representing the rgb value at each pixel. By turning your original 11x11 matrices into an image you're just blowing them up into a significantly larger matrix that doesn't actually contain any additional information (it all originated from the original matrix, at this point there is a one-to-one mapping between the two). This is most likely why you are seeing over fitting. You're using a model that has the capacity to learn patterns in real images containing millions of pixels but the data you're feeding it can all be compressed down to an 11x11 matrix. The model is just memorizing your training data. \n\nAgain, this was an interesting thought and it's great that you experimented with variations of it but it is helpful sometimes to step away and think about what you want the model to exploit in the data.\n\nLastly, as others mentioned, you should look into using real word embeddings (like Fast Text or Glove). TF-IDF by itself isn't nearly as informative as the actual embedding representations, which encode actual semantic meaning.","timestamp":"2019-11-01T05:52:12+00:00","score":1},{"role":"OP","user_id":"anon_615cfb597fce786e","comment_id":"f5zuo74","kind":"comment","text":"Thanks for the detailed explanation! \nI do realize that plotting them as heatmaps won't result in any new information. Just wanted to try it as a new approach. I was also thinking of visualizing the GloVe embeddings, again just an experiment. I guess since I am a high schooler I have the opportunity to think much more freely than a PhD:) \n\nWill keep in mind what you said!","timestamp":"2019-11-01T06:14:16+00:00","score":0},{"role":"answerer","user_id":"anon_342cb4cb0e455f4a","comment_id":"f60yzkv","kind":"comment","text":"> I guess since I am a high schooler I have the opportunity to think much more freely than a PhD\n\nI'm sorry, but this is a nonsense. You're not thinking more freely, you just don't have the foundations to realize that what you're doing here doesn't really make sense. Again, sorry to be blunt but it seems obvious from your comments and your post that you have some significant gaps in understanding. By diving into an experiment like this and making a grandeous claim like \"a new way to NLP\" you are putting the cart way before the horse. \n\nI encourage you to continue to pursue such ideas but you need to temper your expectations that you're going to revolutionize the field until you have a more solid foundation. It's great that modern frameworks make it so easy to play around with cutting edge models but it also abstracts away far too much and makes it possible for people to use them without actually understanding what they are doing. I'd suggest spending more time learning about the fundamentals of machine learning and deep learning.\n\nEDIT: just want to add that you're well ahead of where I was at your age so I'm not trying to be discouraging. This comment probably comes across as pretty harsh but it's not meant as criticism, it's meant to try and ground you a little closer to the reality of the field.","timestamp":"2019-11-01T17:27:44+00:00","score":3},{"role":"OP","user_id":"anon_615cfb597fce786e","comment_id":"f63sssr","kind":"comment","text":"I know way meant to claim that this is a practical way. I apologise, if it sounded that way. Will keep in mind your comments. Thanks!","timestamp":"2019-11-02T08:21:55+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_615cfb597fce786e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_342cb4cb0e455f4a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f5ztrvq","thanks_reply_id":"f5zuo74","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_e1702c4654a977d9","answerer_user_id":"anon_2ced49a50982294e","subreddit":"LanguageTechnology","timestamp":"2019-11-01T07:25:40+00:00","post_id":"dq0y7g","question":"Any ideas for podcast name?\n\ni have 've decided to create a podcast about deep learning ، machine learning ، artifical inteligence , neuroscience ,....... which interviews with experts . But unfortunately I can't choose a suitable title for it. Could anyone choose some titles for it ? plase hellp me","preferred_answer":"Learn with the machines?","full_conversation":[{"role":"OP","user_id":"anon_e1702c4654a977d9","comment_id":"dq0y7g","kind":"post","text":"Any ideas for podcast name?\n\ni have 've decided to create a podcast about deep learning ، machine learning ، artifical inteligence , neuroscience ,....... which interviews with experts . But unfortunately I can't choose a suitable title for it. Could anyone choose some titles for it ? plase hellp me","timestamp":"2019-11-01T07:25:40+00:00","score":0},{"role":"answerer","user_id":"anon_2ced49a50982294e","comment_id":"f5zz4zf","kind":"comment","text":"Learn with the machines?","timestamp":"2019-11-01T08:18:44+00:00","score":1},{"role":"OP","user_id":"anon_e1702c4654a977d9","comment_id":"f5zzsat","kind":"comment","text":"thanks . Not good","timestamp":"2019-11-01T08:37:22+00:00","score":1},{"role":"answerer","user_id":"anon_2ced49a50982294e","comment_id":"f5zzuhq","kind":"comment","text":"How about Learn with the machines?","timestamp":"2019-11-01T08:39:06+00:00","score":4}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e1702c4654a977d9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2ced49a50982294e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f5zz4zf","thanks_reply_id":"f5zzsat","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_51afa0ee11ea9301","answerer_user_id":"anon_e805e17bcefe411c","subreddit":"LanguageTechnology","timestamp":"2019-11-03T17:02:43+00:00","post_id":"dr38i8","question":"Does anyone have an idea of how the ranking-type cost works? What do we try to maximize? and what do we try to minimize? And how the backpropagation is done for it?","preferred_answer":"The basic idea of ranking loss is that you're comparing pairs of points which are considered related/unrelated. For a \"related\" pair, you want the distance between them to be small, while for an \"unrelated \" pair, you want the distance between them to be large. This is basically a form of metric learning.\n\nIn the first equation, you're doing a pairwise ranking loss, where your considering all pairs within a minibatch, taking all the pairs along the diagonal as related and all other pairs as unrelated, and using cosine distance as the distance function. \n\nRanking loss is a loss function, so you're trying to minimize it. In particular you can imagine for the second formulation if f is parameterized by w, you're trying to find min_w J(S, D, w) where J is the function described. The max in the equation is so that when your related point is closer than the unrelated points, it doesn't contribute to the cost function.\n\nLike any other cost function, you backpropogate by calculating a gradient dJ/dw and then doing your GD based update rule.\n\nThis article may be helpful for your understanding:\nhttps://gombru.github.io/2019/04/03/ranking_loss/","full_conversation":[{"role":"OP","user_id":"anon_51afa0ee11ea9301","comment_id":"dr38i8","kind":"post","text":"Does anyone have an idea of how the ranking-type cost works? What do we try to maximize? and what do we try to minimize? And how the backpropagation is done for it?","timestamp":"2019-11-03T17:02:43+00:00","score":2},{"role":"answerer","user_id":"anon_e805e17bcefe411c","comment_id":"f6ez7ii","kind":"comment","text":"The basic idea of ranking loss is that you're comparing pairs of points which are considered related/unrelated. For a \"related\" pair, you want the distance between them to be small, while for an \"unrelated \" pair, you want the distance between them to be large. This is basically a form of metric learning.\n\nIn the first equation, you're doing a pairwise ranking loss, where your considering all pairs within a minibatch, taking all the pairs along the diagonal as related and all other pairs as unrelated, and using cosine distance as the distance function. \n\nRanking loss is a loss function, so you're trying to minimize it. In particular you can imagine for the second formulation if f is parameterized by w, you're trying to find min_w J(S, D, w) where J is the function described. The max in the equation is so that when your related point is closer than the unrelated points, it doesn't contribute to the cost function.\n\nLike any other cost function, you backpropogate by calculating a gradient dJ/dw and then doing your GD based update rule.\n\nThis article may be helpful for your understanding:\nhttps://gombru.github.io/2019/04/03/ranking_loss/","timestamp":"2019-11-03T19:25:56+00:00","score":5},{"role":"OP","user_id":"anon_51afa0ee11ea9301","comment_id":"f6f1l8c","kind":"comment","text":"Thank you for you detailed explanation.\n\nSo, the goal here is similar to the negative sampling approach, where the objective function is trying to minimize the distance with words in context and maximize the distance with the negative words.\n\nBut why they are doing the max (0,....) in which case we will have negative values? and what will be the problem if it's a negative value?\n\n​\n\nThank you again","timestamp":"2019-11-03T19:37:07+00:00","score":1},{"role":"answerer","user_id":"anon_e805e17bcefe411c","comment_id":"f6f9qup","kind":"comment","text":"> \n\nYes exactly, negative sampling iirc is a form of ranking loss.\n\nThe idea behind the max is you only want to penalize the model if it makes a mistake. The max (0, ...) will be 0 if the distance between the related points is small, but the distance between the unrelated points is large so 1 + distance(similar) -distance(dissimilar) < 0. This is the exact property we're looking for, so it shouldn't contribute to the cost. \n\nWe don't allow for this to be negative because then the model could easily minimize the cost function by forcing a single dissimilar pair to be farther apart, without consideration to the other pairs.","timestamp":"2019-11-03T20:13:40+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_51afa0ee11ea9301","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e805e17bcefe411c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f6ez7ii","thanks_reply_id":"f6f1l8c","post_score":2,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_96518e92f7f4d4b7","answerer_user_id":"anon_6280cfc00bbac15b","subreddit":"LanguageTechnology","timestamp":"2019-11-06T13:02:11+00:00","post_id":"dsfzpo","question":"Help for NLP Interview preparation\n\nI have experience in Deep learning and Time series and some hands on exposure to NLP. I have an interview tomorrow for a job posting for NLP . What questions should I expect in the interview and what topics should I cover(theoretically)?\n\nP. S. The company primarily works on chatbot and assistant","preferred_answer":"You may need to know word embedding algorithms(CBOW, Skip-diagram, ...), how RNN layer work. These are some of basic theory that you must know to work in NLP. Btw, don't be nervous, just be confident and you will pass the interview. Good luck!","full_conversation":[{"role":"OP","user_id":"anon_96518e92f7f4d4b7","comment_id":"dsfzpo","kind":"post","text":"Help for NLP Interview preparation\n\nI have experience in Deep learning and Time series and some hands on exposure to NLP. I have an interview tomorrow for a job posting for NLP . What questions should I expect in the interview and what topics should I cover(theoretically)?\n\nP. S. The company primarily works on chatbot and assistant","timestamp":"2019-11-06T13:02:11+00:00","score":15},{"role":"answerer","user_id":"anon_6280cfc00bbac15b","comment_id":"f6p4cys","kind":"comment","text":"You may need to know word embedding algorithms(CBOW, Skip-diagram, ...), how RNN layer work. These are some of basic theory that you must know to work in NLP. Btw, don't be nervous, just be confident and you will pass the interview. Good luck!","timestamp":"2019-11-06T13:30:47+00:00","score":8},{"role":"OP","user_id":"anon_96518e92f7f4d4b7","comment_id":"f6p4hx0","kind":"comment","text":"Thank you. I've worked extensively in rnn. And know how cbow and skip works. Anything else I should be aware?","timestamp":"2019-11-06T13:32:42+00:00","score":1},{"role":"answerer","user_id":"anon_6280cfc00bbac15b","comment_id":"f6p5nxr","kind":"comment","text":"Because company works on chatbot and assistant, I think some knowledge text classification, entity extraction may be useful. You can also read about Rasa, a chatbot framework.","timestamp":"2019-11-06T13:48:53+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_96518e92f7f4d4b7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6280cfc00bbac15b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f6p4cys","thanks_reply_id":"f6p4hx0","post_score":15,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_159c65c673e72a22","answerer_user_id":"anon_f0b8387272751f91","subreddit":"LanguageTechnology","timestamp":"2019-11-12T02:17:19+00:00","post_id":"dv3aka","question":"How to sample z from normal distribution?\n\nRecently, I learned about variational autoencoder(VAE) from this post[https://towardsdatascience.com/deep-generative-models-25ab2821afd3](https://towardsdatascience.com/deep-generative-models-25ab2821afd3). I think it is really a nice post about VAE introduction and I think that I have a clear understanding after read it.\n\nHowever, when I read some code from github, I am very confused about one thing. We all know that we need to sample a vector z from prior distribution like N(0,1) for reparameterize. In some code, the implement of sampling z is using (assuming implement by pytorch) torch.randn() or torch.normal() or something like these. These methods are just drawing numbers from normal distribution. Mathematically, the vector z may be not following normal distribution.\n\nSo, have I misunderstanding about something?\n\nAny help is great! Thank you so much!","preferred_answer":"Sorry, I didn't get that. Drawing numbers from a normal distribution, but they may not be following the normal distribution? What do you mean? If z is drawn from the normal distribution then its statistics will follow the normal distribution in the long run.","full_conversation":[{"role":"OP","user_id":"anon_159c65c673e72a22","comment_id":"dv3aka","kind":"post","text":"How to sample z from normal distribution?\n\nRecently, I learned about variational autoencoder(VAE) from this post[https://towardsdatascience.com/deep-generative-models-25ab2821afd3](https://towardsdatascience.com/deep-generative-models-25ab2821afd3). I think it is really a nice post about VAE introduction and I think that I have a clear understanding after read it.\n\nHowever, when I read some code from github, I am very confused about one thing. We all know that we need to sample a vector z from prior distribution like N(0,1) for reparameterize. In some code, the implement of sampling z is using (assuming implement by pytorch) torch.randn() or torch.normal() or something like these. These methods are just drawing numbers from normal distribution. Mathematically, the vector z may be not following normal distribution.\n\nSo, have I misunderstanding about something?\n\nAny help is great! Thank you so much!","timestamp":"2019-11-12T02:17:19+00:00","score":1},{"role":"answerer","user_id":"anon_f0b8387272751f91","comment_id":"f7ay5sn","kind":"comment","text":"Sorry, I didn't get that. Drawing numbers from a normal distribution, but they may not be following the normal distribution? What do you mean? If z is drawn from the normal distribution then its statistics will follow the normal distribution in the long run.","timestamp":"2019-11-12T07:58:06+00:00","score":1},{"role":"OP","user_id":"anon_159c65c673e72a22","comment_id":"f7b19hi","kind":"comment","text":"Sorry for my confused statement and thank you for your reply! I mean, in theory, we need to draw vector from N(0,1). But in practice, we use tensor.randn() method. This method draw numbers from N(0,1). That means every elements in vector respect to N(0,1). But it dosen't mean the vector respects to N(0,1). Isn't it?","timestamp":"2019-11-12T09:15:30+00:00","score":1},{"role":"answerer","user_id":"anon_f0b8387272751f91","comment_id":"f7b54tk","kind":"comment","text":"Well, that's what the law of large numbers is right? In the long run, the vector will be normally distributed. You can't dictate anything in the short term, else it wouldn't be random, would it?","timestamp":"2019-11-12T10:58:35+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_159c65c673e72a22","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f0b8387272751f91","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f7ay5sn","thanks_reply_id":"f7b19hi","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_9913fc49794b91ab","answerer_user_id":"anon_777378c05ebd5ff5","subreddit":"LanguageTechnology","timestamp":"2019-11-18T04:45:12+00:00","post_id":"dxyebb","question":"Is there a model implementation that lets me generate text between head and tail input?\n\nI'm looking for a model or an implementation of a model that lets me generate the inbetween paragraph(s) given some start sentences and some end sentences.\n\nI have been playing with gpt2 and that's really fun but I want to anchor the generated text at the end too and not just the beginning.\n\nI thought that XLNet might do that but I haven't seen any clear examples of it and also I think I read that the theory supports it but the available implementation didn't?","preferred_answer":"Look into HAIM from AI21Labs https://www.ai21.com/haim. Haven't tried it bit is seems to provide what you are looking for","full_conversation":[{"role":"OP","user_id":"anon_9913fc49794b91ab","comment_id":"dxyebb","kind":"post","text":"Is there a model implementation that lets me generate text between head and tail input?\n\nI'm looking for a model or an implementation of a model that lets me generate the inbetween paragraph(s) given some start sentences and some end sentences.\n\nI have been playing with gpt2 and that's really fun but I want to anchor the generated text at the end too and not just the beginning.\n\nI thought that XLNet might do that but I haven't seen any clear examples of it and also I think I read that the theory supports it but the available implementation didn't?","timestamp":"2019-11-18T04:45:12+00:00","score":4},{"role":"answerer","user_id":"anon_777378c05ebd5ff5","comment_id":"f8126ny","kind":"comment","text":"Look into HAIM from AI21Labs https://www.ai21.com/haim. Haven't tried it bit is seems to provide what you are looking for","timestamp":"2019-11-19T06:57:43+00:00","score":1},{"role":"OP","user_id":"anon_9913fc49794b91ab","comment_id":"f83s0ao","kind":"comment","text":"Oh yeah perfect they are talking about exactly what I was hoping to find. Drawback is that it seems they are not releasing HAIM to the public. At least they have some pointers but realistically I'm not going to be able to write my own version.","timestamp":"2019-11-20T03:09:40+00:00","score":1},{"role":"answerer","user_id":"anon_777378c05ebd5ff5","comment_id":"f8498hz","kind":"comment","text":"If you are working in a company then you could apply for tensorflow research cloud https://www.tensorflow.org/tfrc and train the model for free. As for the dataset, maybe the same webtext dataset which was used in gpt-2 and is available for download could be adapted for this task.","timestamp":"2019-11-20T07:52:44+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9913fc49794b91ab","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_777378c05ebd5ff5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f8126ny","thanks_reply_id":"f83s0ao","post_score":4,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_b7c0d85d3419de70","answerer_user_id":"anon_7c8eb0a8a7999243","subreddit":"LanguageTechnology","timestamp":"2019-11-21T17:24:57+00:00","post_id":"dzmlky","question":"How to give weights to certain features by using algorithm?\n\nPlease suggest me some algorithms for giving weights to features.","preferred_answer":"Linear regression\nGiven your feature vector f, the weights and biases for it being respectively W and b, you have the following model:\nweighted_model = W.f + b\nYou can consider this output as an input to any model, although I would recommend applying a non-linear activation function to the output of a model that starts with a matrix multiplication.\n\nIf you dont think you need the bias b, you can remove it, although I would recommend leaving it.\n\nYou can use backpropagation the same way you would use it in a neural network.","full_conversation":[{"role":"OP","user_id":"anon_b7c0d85d3419de70","comment_id":"dzmlky","kind":"post","text":"How to give weights to certain features by using algorithm?\n\nPlease suggest me some algorithms for giving weights to features.","timestamp":"2019-11-21T17:24:57+00:00","score":0},{"role":"answerer","user_id":"anon_7c8eb0a8a7999243","comment_id":"f8awcnq","kind":"comment","text":"Linear regression\nGiven your feature vector f, the weights and biases for it being respectively W and b, you have the following model:\nweighted_model = W.f + b\nYou can consider this output as an input to any model, although I would recommend applying a non-linear activation function to the output of a model that starts with a matrix multiplication.\n\nIf you dont think you need the bias b, you can remove it, although I would recommend leaving it.\n\nYou can use backpropagation the same way you would use it in a neural network.","timestamp":"2019-11-22T09:37:29+00:00","score":1},{"role":"OP","user_id":"anon_b7c0d85d3419de70","comment_id":"f8awlq2","kind":"comment","text":"Thank you.....the dimension size output of weighted model whether it is similar to the our feature vector? Or it will gives some probability vector...","timestamp":"2019-11-22T09:44:11+00:00","score":1},{"role":"answerer","user_id":"anon_7c8eb0a8a7999243","comment_id":"f8bepzy","kind":"comment","text":"I just realised I said something wrong, it's not supposed to be a weight matrix, but a weight vector, the same size as your feature vector.\nthe formula is still the same, just that you multiply term by term your feature vector and the weight vector","timestamp":"2019-11-22T15:04:38+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b7c0d85d3419de70","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7c8eb0a8a7999243","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f8awcnq","thanks_reply_id":"f8awlq2","post_score":0,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_d6be2f59a84ea10d","answerer_user_id":"anon_180811b0098f7b14","subreddit":"LanguageTechnology","timestamp":"2019-11-21T18:45:50+00:00","post_id":"dznswy","question":"How to build a supervised WSD model from un-annotated data?\n\nI'm required to implement a supervised WSD model for an assignment. The problem is that my training set is a set of tokenized sentences without the respective senses. The word I need to disambiguate each have two possible senses (found using wordnet synsets). So my question is: how do I annotate (i.e. find the right sense between the two) my training data so that I can actually train the model?","preferred_answer":"If I understand your problem, the question is really how to generate the training data for the supervised model in an unsupervised way.\n\nSince you already know your target vocabulary (the different senses of each word you're interested in detecting), you may be able to annotate a dataset using a distant supervision/weak supervision approach. For instance, let's say one of the words you're disambiguating is the classic example \"bank\" with its financial sense (\"money bank\", let's call it 'Fin') and its topographical sense (\"river bank\", let's call it 'Top').\n\nThe expectation in a supervised learning setting is that your training instances are unambiguously mapped to either sense. If you simply collected matches of \"bank\" over a large corpus as your training data, you'd still be mixing up its two senses (hence the problem). However, if you define manually a set of unambiguous keywords (or keyword combinations) for each sense, you \\*will\\* be able to collect examples given a sufficiently large corpus.\n\nFore example, you should be able to isolate the 'Fin' sense by searching the corpus for expressions like \"savings bank\", \"commercial bank\" and \"bank branch\" (virtually all occurrences of this \"bank\" will be for Fin, not Top). For the Top sense, on the other hand, I think there are fewer possibilities, but you may consider expressions like \"river bank\" or simply a rule checking for two regular expressions consecutively, something like (as a BASH script) \\`cat my\\_large\\_corpus.txt | grep \"bank\" | grep \"river\" | grep \"water\"\\`. A few examples I just extracted this way:\n\n`Santa Monica, San Gabriel, and Newport Canyons are products of rivers that coursed out onto the continental shelf during periods of low sea levels when ocean waters were locked up in the great ice caps of North America, Greenland, Europe, and Antarctica. Only 15,000 years ago, sea levels stood as much as 120 meters lower than today. During these periods of low sea levels, the coastline in the Los Angeles region was located where water is now 120 meters deep. Consequently, during these periods, coastal rivers reached the coast at the same locations as the Santa Monica, San Gabriel, and Newport canyons head on the continental shelf.`\n\n`The Mara Safari ClubThe well-appointed Mara Safari Club is set by the Mara River at the foot of the Aitong Hills in the Ol-Choro Oiroua Conservation Area that borders the Masai Mara Game Reserve. All tents have their own private river frontage with a viewing deck from where hippo and crocodile are regularly seen. Also occasionally elephants wander past to drink the water The rooms have twin and double four-poster beds, electricity and modern en-suite facilities with hot and cold running water. The main building, with lounge, bar and dining room is cantilevered over the river, providing a superb vantage point to view the resident hippos and the amazingriverine birdlife. The superb pool set on the banks of the river, al fresco lunches and evening Masai dances, cultural and wildlife talks and wildlife shows all add greatly to the Club experience.`\n\nAt that point, you just need to replace the matched expressions (that you know in advance, so no issues there) for your target word (\"river\" in this case) to make sure the vocabulary of the model you train on this data matches the vocabulary in your task.\n\nIf you don't have any large datasets handy, I recommend the super-valuable UMBC corpus at [http://ebiquity.umbc.edu/blogger/2013/05/01/umbc-webbase-corpus-of-3b-english-words/](http://ebiquity.umbc.edu/blogger/2013/05/01/umbc-webbase-corpus-of-3b-english-words/)\n\nYou'll probably find a bunch of matches for any reasonable English general-domain expression.\n\nHope this helps!","full_conversation":[{"role":"OP","user_id":"anon_d6be2f59a84ea10d","comment_id":"dznswy","kind":"post","text":"How to build a supervised WSD model from un-annotated data?\n\nI'm required to implement a supervised WSD model for an assignment. The problem is that my training set is a set of tokenized sentences without the respective senses. The word I need to disambiguate each have two possible senses (found using wordnet synsets). So my question is: how do I annotate (i.e. find the right sense between the two) my training data so that I can actually train the model?","timestamp":"2019-11-21T18:45:50+00:00","score":2},{"role":"answerer","user_id":"anon_180811b0098f7b14","comment_id":"f8ar58j","kind":"comment","text":"If I understand your problem, the question is really how to generate the training data for the supervised model in an unsupervised way.\n\nSince you already know your target vocabulary (the different senses of each word you're interested in detecting), you may be able to annotate a dataset using a distant supervision/weak supervision approach. For instance, let's say one of the words you're disambiguating is the classic example \"bank\" with its financial sense (\"money bank\", let's call it 'Fin') and its topographical sense (\"river bank\", let's call it 'Top').\n\nThe expectation in a supervised learning setting is that your training instances are unambiguously mapped to either sense. If you simply collected matches of \"bank\" over a large corpus as your training data, you'd still be mixing up its two senses (hence the problem). However, if you define manually a set of unambiguous keywords (or keyword combinations) for each sense, you \\*will\\* be able to collect examples given a sufficiently large corpus.\n\nFore example, you should be able to isolate the 'Fin' sense by searching the corpus for expressions like \"savings bank\", \"commercial bank\" and \"bank branch\" (virtually all occurrences of this \"bank\" will be for Fin, not Top). For the Top sense, on the other hand, I think there are fewer possibilities, but you may consider expressions like \"river bank\" or simply a rule checking for two regular expressions consecutively, something like (as a BASH script) \\`cat my\\_large\\_corpus.txt | grep \"bank\" | grep \"river\" | grep \"water\"\\`. A few examples I just extracted this way:\n\n`Santa Monica, San Gabriel, and Newport Canyons are products of rivers that coursed out onto the continental shelf during periods of low sea levels when ocean waters were locked up in the great ice caps of North America, Greenland, Europe, and Antarctica. Only 15,000 years ago, sea levels stood as much as 120 meters lower than today. During these periods of low sea levels, the coastline in the Los Angeles region was located where water is now 120 meters deep. Consequently, during these periods, coastal rivers reached the coast at the same locations as the Santa Monica, San Gabriel, and Newport canyons head on the continental shelf.`\n\n`The Mara Safari ClubThe well-appointed Mara Safari Club is set by the Mara River at the foot of the Aitong Hills in the Ol-Choro Oiroua Conservation Area that borders the Masai Mara Game Reserve. All tents have their own private river frontage with a viewing deck from where hippo and crocodile are regularly seen. Also occasionally elephants wander past to drink the water The rooms have twin and double four-poster beds, electricity and modern en-suite facilities with hot and cold running water. The main building, with lounge, bar and dining room is cantilevered over the river, providing a superb vantage point to view the resident hippos and the amazingriverine birdlife. The superb pool set on the banks of the river, al fresco lunches and evening Masai dances, cultural and wildlife talks and wildlife shows all add greatly to the Club experience.`\n\nAt that point, you just need to replace the matched expressions (that you know in advance, so no issues there) for your target word (\"river\" in this case) to make sure the vocabulary of the model you train on this data matches the vocabulary in your task.\n\nIf you don't have any large datasets handy, I recommend the super-valuable UMBC corpus at [http://ebiquity.umbc.edu/blogger/2013/05/01/umbc-webbase-corpus-of-3b-english-words/](http://ebiquity.umbc.edu/blogger/2013/05/01/umbc-webbase-corpus-of-3b-english-words/)\n\nYou'll probably find a bunch of matches for any reasonable English general-domain expression.\n\nHope this helps!","timestamp":"2019-11-22T07:29:33+00:00","score":2},{"role":"OP","user_id":"anon_d6be2f59a84ea10d","comment_id":"f8auhv4","kind":"comment","text":"Thank you this is extremely helpful. Does this technique have a name?","timestamp":"2019-11-22T08:49:28+00:00","score":1},{"role":"answerer","user_id":"anon_180811b0098f7b14","comment_id":"f8awim5","kind":"comment","text":"As for the name, nothing beyond \"weak/distant supervision\", as far as I know. If you Google either term you should find a number of tutorials/implementations/papers.","timestamp":"2019-11-22T09:41:56+00:00","score":2},{"role":"OP","user_id":"anon_d6be2f59a84ea10d","comment_id":"f8awl53","kind":"comment","text":"Great, thanks!","timestamp":"2019-11-22T09:43:47+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_d6be2f59a84ea10d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_180811b0098f7b14","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f8ar58j","thanks_reply_id":"f8auhv4","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_66b57ad3f8368568","answerer_user_id":"anon_6ac92c0a4cbc9223","subreddit":"LanguageTechnology","timestamp":"2019-11-25T09:58:44+00:00","post_id":"e1dxme","question":"Are they any rules of thumb about data set size to build language models?\n\nI have an idea about the vocabulary size of a specific domain. Is it possible with this information to estimate the volume of data required in order to build an efficient language model?\n\n\\[Update\\] The language model will be used for an ASR system.","preferred_answer":"You should be thinking bin terms of hundreds of hours of audio-transcription pairs to train an ASR model from scratch.. ideally at least ... say... 300 hrs or more? With 100 hrs it will probably 'work' but not very well. However with transfer learning you can take a model already trained on, say, Spanish and use a much smaller amount of Italian to transfer the model over to italian. Alternatively if you have a much smaller domain (eg just trying to understand whether someone has said 'go' 'stop' or then a much smaller amount of data will also work)\n\nI can provide some more academic references for the above based on the work we did with the reo Māori but the above is a rough guide.","full_conversation":[{"role":"OP","user_id":"anon_66b57ad3f8368568","comment_id":"e1dxme","kind":"post","text":"Are they any rules of thumb about data set size to build language models?\n\nI have an idea about the vocabulary size of a specific domain. Is it possible with this information to estimate the volume of data required in order to build an efficient language model?\n\n\\[Update\\] The language model will be used for an ASR system.","timestamp":"2019-11-25T09:58:44+00:00","score":2},{"role":"answerer","user_id":"anon_6ac92c0a4cbc9223","comment_id":"f8qxwhc","kind":"comment","text":"You should be thinking bin terms of hundreds of hours of audio-transcription pairs to train an ASR model from scratch.. ideally at least ... say... 300 hrs or more? With 100 hrs it will probably 'work' but not very well. However with transfer learning you can take a model already trained on, say, Spanish and use a much smaller amount of Italian to transfer the model over to italian. Alternatively if you have a much smaller domain (eg just trying to understand whether someone has said 'go' 'stop' or then a much smaller amount of data will also work)\n\nI can provide some more academic references for the above based on the work we did with the reo Māori but the above is a rough guide.","timestamp":"2019-11-26T00:09:28+00:00","score":1},{"role":"OP","user_id":"anon_66b57ad3f8368568","comment_id":"f8ry7iy","kind":"comment","text":"Thank you for your answer. However, for the moment, let's suppose that I have enough audio data. My main interest right now is the size of the dataset to use for the language your model.","timestamp":"2019-11-26T09:05:01+00:00","score":1},{"role":"answerer","user_id":"anon_6ac92c0a4cbc9223","comment_id":"f8u0on7","kind":"comment","text":"Ah. Sorry I misunderstood the question.\n\nFor what it's worth we found that a total size of uncompressed plain text of about 20 MB was enough to form a good general purpose language model for an ASR application for a new language. You'll definitely see English language data sets (based on wikipedia, twitter etc) that are orders of magnitude bigger but as a rule of thumb I'd say 10MB or more of uncompressed text is 'heaps' for most applications. You may well get away with less. Again, of course, for a more narrow domain much less will do. That said we found that a bigger language model (going from 5 to 20 MB) significantly improved our accuracy in our domain (where WER - word error rate - is the primary measure).","timestamp":"2019-11-27T00:54:51+00:00","score":2},{"role":"OP","user_id":"anon_66b57ad3f8368568","comment_id":"f8v5byi","kind":"comment","text":"Thank you for your answer. Do you have any papers in this regard to use as a reference?","timestamp":"2019-11-27T13:06:47+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_66b57ad3f8368568","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6ac92c0a4cbc9223","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f8qxwhc","thanks_reply_id":"f8ry7iy","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_e4b291e1a0da7a1c","answerer_user_id":"anon_aea7cbbe61fbf1dc","subreddit":"LanguageTechnology","timestamp":"2019-12-02T09:35:46+00:00","post_id":"e4wr0r","question":"How can i Train Bert NLP on specific task after a fine-tuning on the language model\n\nHi\n\nI want to use Bert for English topics news. For expecting a better performance in the end, i would like first tune the pre-trained model offered by Google on our own domain-specific corpus (title of articles) and in a second time training it on a specific task. \n I prefer first trying to tune the language model than training from scratch. \n How i can do this? \n I try to pretrain the langage model as explain [here ](https://github.com/google-research/bert#pre-training-with-bert) \n But after when i train it as i am told [here](https://github.com/google-research/bert#fine-tuning-with-bert), i want to start at the checkpoint given by the pretraining. I failed to load the pretrained checkpoint. \n Here is the 3 Bert function :\n\n python create_pretraining_data.py \\ --input_file=gs://google_bucket/sample_text.txt \\ --output_file=gs://google_bucket/bert-checkpoints/models/tf_examples.tfrecord \\ --vocab_file=gs://google_bucket/uncased_L-12_H-768_A-12/vocab.txt \\ \n --do_lower_case=True \\ --max_seq_length=128 \\ \n --max_predictions_per_seq=20 \\ \n --masked_lm_prob=0.15 \\ \n --random_seed=12345 \\ \n --dupe_factor=5\n \n python run_pretraining.py \\ \n --input_file=gs://google_bucket/bert-checkpoints/models/tf_examples.tfrecord \\ --output_dir=gs://google_bucket/bert-checkpoints/models/output_dir\\ --do_train=True \\ --do_eval=True \\ \n --bert_config_file=gs://google_bucket/uncased_L-12_H-768_A-12/bert_config.json \\ --init_checkpoint=gs://google_bucket/uncased_L-12_H-768_A-12/bert_model.ckpt \\ --train_batch_size=32 \\ \n --max_seq_length=128 \\ \n --max_predictions_per_seq=20 \\ \n --num_train_steps=500 \\ \n --num_warmup_steps=10 \\ \n --learning_rate=2e-5 \\ \n --use_tpu=True \\ \n --tpu_name=test-tpu\n python run_classifier.py \\ \n --task_name=MRPC \\ \n --do_train=true \\ \n --do_eval=true \\ \n --data_dir=gs://google_bucket/MRPC \\ \n --vocab_file=gs://google_bucket/uncased_L-12_H-768_A-12/vocab.txt \\ --bert_config_file=gs://google_bucket/uncased_L-12_H-768_A-12/bert_config.json \\ --init_checkpoint=gs://google_bucket/bert-checkpoints/output_dir \\ \n --max_seq_length=128 \\ \n --train_batch_size=32 \\ \n --learning_rate=2e-5 \\ \n --num_train_epochs=3.0 \\ \n --output_dir=gs://google_bucket/bert-checkpoints/models/MRPC \\ \n --use_tpu=True \\ \n --tpu_name=test-tpu \n\nSomeone as already do this? \n Thanks for your help.","preferred_answer":"You should use run_lm_finetuning.py instead of run_pretraining.py for the second command. Details [here](https://huggingface.co/transformers/examples.html#language-model-fine-tuning).","full_conversation":[{"role":"OP","user_id":"anon_e4b291e1a0da7a1c","comment_id":"e4wr0r","kind":"post","text":"How can i Train Bert NLP on specific task after a fine-tuning on the language model\n\nHi\n\nI want to use Bert for English topics news. For expecting a better performance in the end, i would like first tune the pre-trained model offered by Google on our own domain-specific corpus (title of articles) and in a second time training it on a specific task. \n I prefer first trying to tune the language model than training from scratch. \n How i can do this? \n I try to pretrain the langage model as explain [here ](https://github.com/google-research/bert#pre-training-with-bert) \n But after when i train it as i am told [here](https://github.com/google-research/bert#fine-tuning-with-bert), i want to start at the checkpoint given by the pretraining. I failed to load the pretrained checkpoint. \n Here is the 3 Bert function :\n\n python create_pretraining_data.py \\ --input_file=gs://google_bucket/sample_text.txt \\ --output_file=gs://google_bucket/bert-checkpoints/models/tf_examples.tfrecord \\ --vocab_file=gs://google_bucket/uncased_L-12_H-768_A-12/vocab.txt \\ \n --do_lower_case=True \\ --max_seq_length=128 \\ \n --max_predictions_per_seq=20 \\ \n --masked_lm_prob=0.15 \\ \n --random_seed=12345 \\ \n --dupe_factor=5\n \n python run_pretraining.py \\ \n --input_file=gs://google_bucket/bert-checkpoints/models/tf_examples.tfrecord \\ --output_dir=gs://google_bucket/bert-checkpoints/models/output_dir\\ --do_train=True \\ --do_eval=True \\ \n --bert_config_file=gs://google_bucket/uncased_L-12_H-768_A-12/bert_config.json \\ --init_checkpoint=gs://google_bucket/uncased_L-12_H-768_A-12/bert_model.ckpt \\ --train_batch_size=32 \\ \n --max_seq_length=128 \\ \n --max_predictions_per_seq=20 \\ \n --num_train_steps=500 \\ \n --num_warmup_steps=10 \\ \n --learning_rate=2e-5 \\ \n --use_tpu=True \\ \n --tpu_name=test-tpu\n python run_classifier.py \\ \n --task_name=MRPC \\ \n --do_train=true \\ \n --do_eval=true \\ \n --data_dir=gs://google_bucket/MRPC \\ \n --vocab_file=gs://google_bucket/uncased_L-12_H-768_A-12/vocab.txt \\ --bert_config_file=gs://google_bucket/uncased_L-12_H-768_A-12/bert_config.json \\ --init_checkpoint=gs://google_bucket/bert-checkpoints/output_dir \\ \n --max_seq_length=128 \\ \n --train_batch_size=32 \\ \n --learning_rate=2e-5 \\ \n --num_train_epochs=3.0 \\ \n --output_dir=gs://google_bucket/bert-checkpoints/models/MRPC \\ \n --use_tpu=True \\ \n --tpu_name=test-tpu \n\nSomeone as already do this? \n Thanks for your help.","timestamp":"2019-12-02T09:35:46+00:00","score":5},{"role":"answerer","user_id":"anon_aea7cbbe61fbf1dc","comment_id":"f9hvbq3","kind":"comment","text":"You should use run_lm_finetuning.py instead of run_pretraining.py for the second command. Details [here](https://huggingface.co/transformers/examples.html#language-model-fine-tuning).","timestamp":"2019-12-02T21:34:13+00:00","score":1},{"role":"OP","user_id":"anon_e4b291e1a0da7a1c","comment_id":"f9jb0kc","kind":"comment","text":"Hi thanks for your answer\n\nHuggingFace made a [PyTorch version of BERT](https://github.com/huggingface/pytorch-pretrained-BERT) not a tensorflow version. Is the checkpoint created will be compatible with google bert implementation (tensorflow)?","timestamp":"2019-12-03T09:20:19+00:00","score":1},{"role":"answerer","user_id":"anon_aea7cbbe61fbf1dc","comment_id":"f9jbdl4","kind":"comment","text":"Hi sorry I didn't read your post thoroughly and thought you were using the huggingface library. I am not familiar with google's tensorflow version. I did read through the instructions and from my understanding I didn't see anything wrong with your scripts. You could try opening an issue in the github repo asking for help. Don't forget to provide the error message.","timestamp":"2019-12-03T09:29:53+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e4b291e1a0da7a1c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_aea7cbbe61fbf1dc","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"f9hvbq3","thanks_reply_id":"f9jb0kc","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_543e2fa813e917ce","answerer_user_id":"anon_ba730638d9944d47","subreddit":"LanguageTechnology","timestamp":"2019-12-07T01:48:05+00:00","post_id":"e7822s","question":"POS tagger HMM model from scratch?\n\nHello all,\n\nI want to write an HMM based POS-tagger from scratch. This is entirely for the purposes of better understanding graphical models & NLP, and to better develop my python proficiency.\n\nHas anyone on here done this before? Any tips/advice? Is this a reasonable goal... or will this be my \"white whale\"? \n\nCheers!","preferred_answer":"The recipe is quite standard:\n\n1) use a corpus with word/tags like brown or wsj\n\n2) add and tags before and after each sequence\n\n3) compute emission probs based on maximum likelihood estimation\n\n4) compute transition probs\n\n5) add smoothing to your probability distribution to account for unseen events (Laplace +1 smoothing is a crude but good starting point)\n\n6) compute your probabilities in log-space so that you can replace multiplications with additions\n\n7) use all that to compute the perplexity of a tagged sentence\n\n8) implement viterbi to find the most likely tagging of a sentence (see it as an extension of shortest distance in a graph)\n\n9) find a word/pos tag dictionary to constrain possible predictions\n\n10) evaluate performance on an unseen test set (should be about 95% on wsj data)\n\n11) profit\n\nedit: forgot about logspace","full_conversation":[{"role":"OP","user_id":"anon_543e2fa813e917ce","comment_id":"e7822s","kind":"post","text":"POS tagger HMM model from scratch?\n\nHello all,\n\nI want to write an HMM based POS-tagger from scratch. This is entirely for the purposes of better understanding graphical models & NLP, and to better develop my python proficiency.\n\nHas anyone on here done this before? Any tips/advice? Is this a reasonable goal... or will this be my \"white whale\"? \n\nCheers!","timestamp":"2019-12-07T01:48:05+00:00","score":7},{"role":"answerer","user_id":"anon_ba730638d9944d47","comment_id":"fa3dlvw","kind":"comment","text":"The recipe is quite standard:\n\n1) use a corpus with word/tags like brown or wsj\n\n2) add and tags before and after each sequence\n\n3) compute emission probs based on maximum likelihood estimation\n\n4) compute transition probs\n\n5) add smoothing to your probability distribution to account for unseen events (Laplace +1 smoothing is a crude but good starting point)\n\n6) compute your probabilities in log-space so that you can replace multiplications with additions\n\n7) use all that to compute the perplexity of a tagged sentence\n\n8) implement viterbi to find the most likely tagging of a sentence (see it as an extension of shortest distance in a graph)\n\n9) find a word/pos tag dictionary to constrain possible predictions\n\n10) evaluate performance on an unseen test set (should be about 95% on wsj data)\n\n11) profit\n\nedit: forgot about logspace","timestamp":"2019-12-08T08:15:15+00:00","score":2},{"role":"OP","user_id":"anon_543e2fa813e917ce","comment_id":"fa66xtp","kind":"comment","text":"Awesome, thank you. I think computing emissions probabilities and transition probabilities will be the only \"new skills\" I need to master. I've built n-gram language models before so I'm familiar with smoothing. \n\nIf you happen to know a place where I can read up on that, awesome! If not, you've already been tremendously helpful :)","timestamp":"2019-12-08T16:14:37+00:00","score":1},{"role":"answerer","user_id":"anon_ba730638d9944d47","comment_id":"fa6qufv","kind":"comment","text":"Transition probabilities are just a bigram language model on tags. \n\nEmission probabilities can be derived from the joint word, tag sequence probability with Bayes and Markov assumption.","timestamp":"2019-12-08T17:53:52+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_543e2fa813e917ce","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ba730638d9944d47","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fa3dlvw","thanks_reply_id":"fa66xtp","post_score":7,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_2b1b5b0997bfeb55","answerer_user_id":"anon_4f81b323888db3e6","subreddit":"LanguageTechnology","timestamp":"2019-12-10T14:50:05+00:00","post_id":"e8rj9z","question":"Need help making sentence embeddings using a pre-trained Word2Vec model\n\nHey guys! I have a pre-trained (danish) Word2Vec model, but I don't want vectors for each word, I want to make vectors for each sentence (in a text), so I can cluster the sentences in a multidimensional vector-space - what's the simplest way to do this?\n\nI basically want a tool that does the following\n\n1. Clean the text input\n2. Tokenization (split into sentences)\n3. Make sentence embeddings - Plot sentence clusters into vector space\n4. Calculate the centroid of the clusters.\n\nThe first 2 are pretty easy, but I'm stuck at 3 trying to figure out the best way!","preferred_answer":"You try gensim? If I'm not mistaken there is document embeddings too. If I may ask (anyone else is invited to answer) aren't sentence embeddings not that useful?","full_conversation":[{"role":"OP","user_id":"anon_2b1b5b0997bfeb55","comment_id":"e8rj9z","kind":"post","text":"Need help making sentence embeddings using a pre-trained Word2Vec model\n\nHey guys! I have a pre-trained (danish) Word2Vec model, but I don't want vectors for each word, I want to make vectors for each sentence (in a text), so I can cluster the sentences in a multidimensional vector-space - what's the simplest way to do this?\n\nI basically want a tool that does the following\n\n1. Clean the text input\n2. Tokenization (split into sentences)\n3. Make sentence embeddings - Plot sentence clusters into vector space\n4. Calculate the centroid of the clusters.\n\nThe first 2 are pretty easy, but I'm stuck at 3 trying to figure out the best way!","timestamp":"2019-12-10T14:50:05+00:00","score":5},{"role":"answerer","user_id":"anon_4f81b323888db3e6","comment_id":"fadzvk4","kind":"comment","text":"You try gensim? If I'm not mistaken there is document embeddings too. If I may ask (anyone else is invited to answer) aren't sentence embeddings not that useful?","timestamp":"2019-12-10T15:09:10+00:00","score":2},{"role":"OP","user_id":"anon_2b1b5b0997bfeb55","comment_id":"fae0df1","kind":"comment","text":"Thanks for answering! As far as I know they're pretty useful for the kind of extractive summarization I'm trying to make. I might be wrong though, and I know that there are more sophisticated ways to do automatic summarization.","timestamp":"2019-12-10T15:14:45+00:00","score":2},{"role":"answerer","user_id":"anon_4f81b323888db3e6","comment_id":"fae3euv","kind":"comment","text":"Does this work for you?: https://www.google.com/url?sa=t&source=web&rct=j&url=https://web.stanford.edu/class/cs224n/posters/15839671.pdf&ved=2ahUKEwiLuYbDtqvmAhVooFkKHajoAEQQFjABegQIBBAG&usg=AOvVaw2UfU9f9q3qK3GL9k72HbHT\n\nI suspect transformers may help yah","timestamp":"2019-12-10T15:47:28+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2b1b5b0997bfeb55","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4f81b323888db3e6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fadzvk4","thanks_reply_id":"fae0df1","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4c553590a59ddc34","answerer_user_id":"anon_f7a4b162ec25bc03","subreddit":"LanguageTechnology","timestamp":"2019-12-18T15:37:14+00:00","post_id":"ece62z","question":"Seeking opinions on pros and cons of NLP packages in Python (NLTK, SpaCy, gensim, textblob, etc.)\n\nTitle says it all. I am somewhat familiar with NLTK, but know nothing about the others. I need to expand my skill set, but am wondering where and how to start. Since a given package probably excels more at certain NLP tasks than others, I’m just wondering what the relative strengths and weaknesses of the various NLP packages are. Care to weigh in?","preferred_answer":"I must have understood your post wrong. \n\nI guess it is indeed not very helpful to say \"use the tool that fits the job\" when one does not know what tools would fit which job.\n\nHere are some quick recommendations that might be more useful:\n\nIf you want to do more advanced text processing and preparation for statistical analysis (eg machine learning) -> Spacy\n\nIf you want state of the art text generation -> look into huggingface/transformers\n\nIf you want to get into machine learning -> use text as input for scikit learn\n\nIf you want topic clustering (eg LDA / word2vec) -> try out Gensim /scikit learn and check out pyldavis\n\nThat covers a huge junk of the NLP space, and I would recommend to play with all of them as they are all cool and useful in their own way!","full_conversation":[{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"ece62z","kind":"post","text":"Seeking opinions on pros and cons of NLP packages in Python (NLTK, SpaCy, gensim, textblob, etc.)\n\nTitle says it all. I am somewhat familiar with NLTK, but know nothing about the others. I need to expand my skill set, but am wondering where and how to start. Since a given package probably excels more at certain NLP tasks than others, I’m just wondering what the relative strengths and weaknesses of the various NLP packages are. Care to weigh in?","timestamp":"2019-12-18T15:37:14+00:00","score":26},{"role":"answerer","user_id":"anon_f7a4b162ec25bc03","comment_id":"fbcsua3","kind":"comment","text":"I must have understood your post wrong. \n\nI guess it is indeed not very helpful to say \"use the tool that fits the job\" when one does not know what tools would fit which job.\n\nHere are some quick recommendations that might be more useful:\n\nIf you want to do more advanced text processing and preparation for statistical analysis (eg machine learning) -> Spacy\n\nIf you want state of the art text generation -> look into huggingface/transformers\n\nIf you want to get into machine learning -> use text as input for scikit learn\n\nIf you want topic clustering (eg LDA / word2vec) -> try out Gensim /scikit learn and check out pyldavis\n\nThat covers a huge junk of the NLP space, and I would recommend to play with all of them as they are all cool and useful in their own way!","timestamp":"2019-12-19T05:18:50+00:00","score":5},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"fbctwei","kind":"comment","text":"Excellent response, thank you!\n\nMy context is very much in the machine learning space. What specifically makes spaCy particularly useful for that application?\n\nAnd along the same lines, could you elaborate on \"use text as input\" (re: scikit learn)? I know of that package, but have only used a few functions, and definitely don't think of it as an NLP package per se.","timestamp":"2019-12-19T05:35:12+00:00","score":1},{"role":"answerer","user_id":"anon_f7a4b162ec25bc03","comment_id":"fbcv6z1","kind":"comment","text":"My practical answer would be that Spacy makes it a lot easier to properly clean the data before using it as an input. Things like sentence segmentation and entity recognition are relatively trivial with Spacy (as it use state of the art models under the hood), the quality of your input will be a big impact to the quality of your machine learning predictions. Furthermore, Spacy includes a lot of features to create machine learning pipelines, but I don't have much experience with those.\n\nScikit learn is an amazing machine learning library, it is not specific to NLP but that is irrelevant. All ML models take some numerical input, which for NLP usually is a vector representation of a piece of text. Scikit learn will serve you perfectly fine for NLP machine learning until you get to deep learning type models where you would be better served creating models with tensorflow or pytorch (or a wrapper on top of these). You can also do LDA with Scikit learn, but for other unsupervised models you might need to use Gensim instead.","timestamp":"2019-12-19T05:56:08+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4c553590a59ddc34","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f7a4b162ec25bc03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fbcsua3","thanks_reply_id":"fbctwei","post_score":26,"answer_score":5,"preferred_answer_is_top_level":false}} {"user_id":"anon_3039f3e6401d88d9","answerer_user_id":"anon_1eaec667aa152d95","subreddit":"LanguageTechnology","timestamp":"2019-12-23T23:18:12+00:00","post_id":"eescs9","question":"Need help finding a fairly comprehensive resource for NLP fundamentals\n\nHi everyone, \nSo I’m hoping you all might be able to help me locate a good resource for my needs. Basically, I am working on a long term ML research project at my university where we are trying to predict sentiment, specifically in this case valence and arousal of musical pieces, using text conversations mined from various sources on the internet. \n\nI have collected a data set of 60,000 conversations and began training some ML models, but at this point the decisions I am making as far as implementation are somewhat arbitrary due to my lack of experience in NLP. \n\nWhat I am looking for is a resource that can help me build a foundation in NLP concepts, specifically the things I should know to be working competently with NLP, that way I can make better and more informed decisions when thinking about how I want to train my models.\n\nI am thinking some like this. \nhttps://www.cs.vassar.edu/~cs366/docs/Manning_Schuetze_StatisticalNLP.pdf\nHowever being that it’s from 1999, I am looking for something more up to date with current technologies.\n\nOther than that the courses I have found online seem to be too focused on applications of NLP with deep learning and NN, which is fine but I am looking for something with more focus on the NLP. \n\nI was think this course might be good but not sure how comprehensive it is.\nNatural Language Processing with Python\nhttps://www.udemy.com/share/101WNAAkEccFxQRXg=/","preferred_answer":"https://mitpress.mit.edu/books/introduction-natural-language-processing is probably the best book to start with currently. The PDF of a draft version of that book that is close to (maybe identical to) the printed version is at https://github.com/jacobeisenstein/gt-nlp-class/blob/master/notes/eisenstein-nlp-notes.pdf.","full_conversation":[{"role":"OP","user_id":"anon_3039f3e6401d88d9","comment_id":"eescs9","kind":"post","text":"Need help finding a fairly comprehensive resource for NLP fundamentals\n\nHi everyone, \nSo I’m hoping you all might be able to help me locate a good resource for my needs. Basically, I am working on a long term ML research project at my university where we are trying to predict sentiment, specifically in this case valence and arousal of musical pieces, using text conversations mined from various sources on the internet. \n\nI have collected a data set of 60,000 conversations and began training some ML models, but at this point the decisions I am making as far as implementation are somewhat arbitrary due to my lack of experience in NLP. \n\nWhat I am looking for is a resource that can help me build a foundation in NLP concepts, specifically the things I should know to be working competently with NLP, that way I can make better and more informed decisions when thinking about how I want to train my models.\n\nI am thinking some like this. \nhttps://www.cs.vassar.edu/~cs366/docs/Manning_Schuetze_StatisticalNLP.pdf\nHowever being that it’s from 1999, I am looking for something more up to date with current technologies.\n\nOther than that the courses I have found online seem to be too focused on applications of NLP with deep learning and NN, which is fine but I am looking for something with more focus on the NLP. \n\nI was think this course might be good but not sure how comprehensive it is.\nNatural Language Processing with Python\nhttps://www.udemy.com/share/101WNAAkEccFxQRXg=/","timestamp":"2019-12-23T23:18:12+00:00","score":17},{"role":"answerer","user_id":"anon_1eaec667aa152d95","comment_id":"fbw8wz5","kind":"comment","text":"https://mitpress.mit.edu/books/introduction-natural-language-processing is probably the best book to start with currently. The PDF of a draft version of that book that is close to (maybe identical to) the printed version is at https://github.com/jacobeisenstein/gt-nlp-class/blob/master/notes/eisenstein-nlp-notes.pdf.","timestamp":"2019-12-23T23:27:46+00:00","score":9},{"role":"OP","user_id":"anon_3039f3e6401d88d9","comment_id":"fbwaelq","kind":"comment","text":"Sweet this is the type of thing I’m looking for. Thanks!","timestamp":"2019-12-23T23:45:59+00:00","score":1},{"role":"answerer","user_id":"anon_1eaec667aa152d95","comment_id":"fbwbtoa","kind":"comment","text":"Awesome! You might check this out, too: https://web.stanford.edu/~jurafsky/slp3.","timestamp":"2019-12-24T00:03:31+00:00","score":4}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3039f3e6401d88d9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1eaec667aa152d95","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fbw8wz5","thanks_reply_id":"fbwaelq","post_score":17,"answer_score":9,"preferred_answer_is_top_level":true}} {"user_id":"anon_e1702c4654a977d9","answerer_user_id":"anon_6e7f322cbe8a5334","subreddit":"LanguageTechnology","timestamp":"2019-12-26T08:05:05+00:00","post_id":"efstj1","question":"Any ideas for podcast name?","preferred_answer":"bruh - how about... \"The Not So Creative Podcast Title\"","full_conversation":[{"role":"OP","user_id":"anon_e1702c4654a977d9","comment_id":"efstj1","kind":"post","text":"Any ideas for podcast name?","timestamp":"2019-12-26T08:05:05+00:00","score":0},{"role":"answerer","user_id":"anon_6e7f322cbe8a5334","comment_id":"fc29zrp","kind":"comment","text":"bruh - how about... \"The Not So Creative Podcast Title\"","timestamp":"2019-12-26T08:10:18+00:00","score":1},{"role":"OP","user_id":"anon_e1702c4654a977d9","comment_id":"fc2a7m3","kind":"comment","text":"> bruh - how about... \"The Not So Creative Podcast Title\n\nthanks . not good name . hidden layer ?","timestamp":"2019-12-26T08:16:19+00:00","score":3},{"role":"answerer","user_id":"anon_6e7f322cbe8a5334","comment_id":"fc2bo9u","kind":"comment","text":"Hidden layer isn't half bad...\n\n​\n\nPod to Pod Transformer\n\nConversations with BERT","timestamp":"2019-12-26T08:57:43+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e1702c4654a977d9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6e7f322cbe8a5334","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fc29zrp","thanks_reply_id":"fc2a7m3","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_a017675803132a91","answerer_user_id":"anon_bf3bbb4c6934bbd8","subreddit":"LanguageTechnology","timestamp":"2020-01-15T13:22:37+00:00","post_id":"ep29py","question":"Is there a away to get the part of the text where classification was found?\n\nSo my problem is, I have made a text classifier model, to predict if a part of the text, lets call it block, has information about the owner of a property. What happens is that the model performs good on a test environment, where each document is split manually into blocks, but in the production environment the document is sent to an OCR and is impossible to assemble the result into the blocks I want, and if the block is not built right the model doesn't get the prediction right. \n\nI was thinking if there are any way to make this segmentation/split combined with the classifier, kind of like a CNN, where it classifies and gives the position where it found that information. Has anyone been through this problem?","preferred_answer":"[https://github.com/sergioburdisso/pyss3](https://github.com/sergioburdisso/pyss3) check it out, it could be what you're looking for :)\n\nLive test examples: http://tworld.io/ss3/","full_conversation":[{"role":"OP","user_id":"anon_a017675803132a91","comment_id":"ep29py","kind":"post","text":"Is there a away to get the part of the text where classification was found?\n\nSo my problem is, I have made a text classifier model, to predict if a part of the text, lets call it block, has information about the owner of a property. What happens is that the model performs good on a test environment, where each document is split manually into blocks, but in the production environment the document is sent to an OCR and is impossible to assemble the result into the blocks I want, and if the block is not built right the model doesn't get the prediction right. \n\nI was thinking if there are any way to make this segmentation/split combined with the classifier, kind of like a CNN, where it classifies and gives the position where it found that information. Has anyone been through this problem?","timestamp":"2020-01-15T13:22:37+00:00","score":6},{"role":"answerer","user_id":"anon_bf3bbb4c6934bbd8","comment_id":"fegltpb","kind":"comment","text":"[https://github.com/sergioburdisso/pyss3](https://github.com/sergioburdisso/pyss3) check it out, it could be what you're looking for :)\n\nLive test examples: http://tworld.io/ss3/","timestamp":"2020-01-15T13:58:35+00:00","score":3},{"role":"OP","user_id":"anon_a017675803132a91","comment_id":"fehb55z","kind":"comment","text":"I will try this later. From what I saw in the example this could help me. Thanks a lot.","timestamp":"2020-01-15T18:28:46+00:00","score":2},{"role":"answerer","user_id":"anon_bf3bbb4c6934bbd8","comment_id":"fehimk3","kind":"comment","text":"If you need any type of help conntact me and I'll be glad to give you a hand (y). The classifier has a \"classify\" method that takes an extra parameter if you want not only the classification result but also a JSON object describing the classification at different levels (paragraphs, sentences, word n-grams) i.e. it gives you the confidence value computed on each block. For instance, using those values you should be able to select the \"most relevant blocks\" of the input. If you need a working example of this just let me know.","timestamp":"2020-01-15T19:41:41+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a017675803132a91","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bf3bbb4c6934bbd8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fegltpb","thanks_reply_id":"fehb55z","post_score":6,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_795fb1ce33a1f662","answerer_user_id":"anon_b3fb7a4972e51f96","subreddit":"LanguageTechnology","timestamp":"2020-01-16T09:40:01+00:00","post_id":"eph6ja","question":"Fine-tuning the BERT with unlabelled data\n\nHello, how can I fine-tune the BERT language model with simply training text file that contains sentences per line.\nAlso, what is the difference between pre-training the model from pretrained checkpoints and fine-tuning?","preferred_answer":"The easiest way to do it would be to use [the HuggingFace transformers library](https://github.com/huggingface/transformers). They have [instructions on how to do language model fine-tuning](https://github.com/huggingface/transformers/tree/master/examples#language-model-fine-tuning) in the repo using data in the exact format you describe.\n\nIn specifically the case of *language model* fine-tuning, fine-tuning and \"pretraining from a checkpoint\" are the same thing. Note, however, that fine-tuning the weights also refers to training the pretrained model on a different downstream task, like NER or sentence classification.","full_conversation":[{"role":"OP","user_id":"anon_795fb1ce33a1f662","comment_id":"eph6ja","kind":"post","text":"Fine-tuning the BERT with unlabelled data\n\nHello, how can I fine-tune the BERT language model with simply training text file that contains sentences per line.\nAlso, what is the difference between pre-training the model from pretrained checkpoints and fine-tuning?","timestamp":"2020-01-16T09:40:01+00:00","score":11},{"role":"answerer","user_id":"anon_b3fb7a4972e51f96","comment_id":"fejm6ws","kind":"comment","text":"The easiest way to do it would be to use [the HuggingFace transformers library](https://github.com/huggingface/transformers). They have [instructions on how to do language model fine-tuning](https://github.com/huggingface/transformers/tree/master/examples#language-model-fine-tuning) in the repo using data in the exact format you describe.\n\nIn specifically the case of *language model* fine-tuning, fine-tuning and \"pretraining from a checkpoint\" are the same thing. Note, however, that fine-tuning the weights also refers to training the pretrained model on a different downstream task, like NER or sentence classification.","timestamp":"2020-01-16T12:59:54+00:00","score":2},{"role":"OP","user_id":"anon_795fb1ce33a1f662","comment_id":"fejmu31","kind":"comment","text":"Thanks. Yeah, hugging face provides language model training. They need the data in which each sequence should have length of 512 tokens. I was looking for alternative. But, thanks for the information.","timestamp":"2020-01-16T13:09:52+00:00","score":1},{"role":"answerer","user_id":"anon_b3fb7a4972e51f96","comment_id":"fejpn7p","kind":"comment","text":"If you go back to an earlier release around June or July (1.2.0 has it, iirc), they have a script to read and fine-tune BERT in the style of BERT (i.e. with next sentence prediction). Sequences can be of arbitrary length, though they require that there are “document” breaks inserted in your text to sample sentences for the next sentence prediction task.\n\nAnother alternative is to use the original TF1.0 BERT library. Basically, there are two important scripts you’ll need to run:\n\ncreate_pretraining_data.py to tokenize your data and write it to a set of tfrecords, and\nrun_pretraining.py, where you specify the location of the tfrecords and a model checkpoint.","timestamp":"2020-01-16T13:50:05+00:00","score":1},{"role":"OP","user_id":"anon_795fb1ce33a1f662","comment_id":"fejqkbq","kind":"comment","text":"Yes, this could be the proper way. Thanks a lot ☺️","timestamp":"2020-01-16T14:02:14+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_795fb1ce33a1f662","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b3fb7a4972e51f96","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fejm6ws","thanks_reply_id":"fejmu31","post_score":11,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_68f171ac13094569","answerer_user_id":"anon_92f1a6a9ab3e7cc7","subreddit":"LanguageTechnology","timestamp":"2020-01-20T20:17:51+00:00","post_id":"eriy1d","question":"Values2vec or personalviews2vec, does something like this exist? And is there a way to mine all text data of one person from the entire internet? (e.g. interviews, books, articles, etc.)?\n\nLet's say I want to mine all of what Bill Gates has ever said. Is there some kind of 'mega-tool' that can find interviews in blogs, articles, web pages, then filter out all sentences said by Bill Gates into some text or CSV file. Then, lets say, takes videos from Bill Gates on youtube, and filter out everything he has said, discriminating when he speaks vs. another person speaking. etc...\n\nIf this is not already available out there, are there pre-existing tools that could serve as a backbone to this tool? E.g. an AI that recognizes whether Bill Gates is speaking or someone else? Another algorithm that is able to recognize when Bill Gates is saying something in an article or if it's the author writing, etc.\n\nFrom this data I'd like to create some type of 'views or values 2 vec' which I believe might be possible (I've experience with behavioral science so I have some ideas on how to implement this), but I was wondering if there were already pre-existing pre-trained embeddings out there for entity opinions or entity personal views or values.","preferred_answer":"The Author-Topic Model might be in the direction of what you're looking for.","full_conversation":[{"role":"OP","user_id":"anon_68f171ac13094569","comment_id":"eriy1d","kind":"post","text":"Values2vec or personalviews2vec, does something like this exist? And is there a way to mine all text data of one person from the entire internet? (e.g. interviews, books, articles, etc.)?\n\nLet's say I want to mine all of what Bill Gates has ever said. Is there some kind of 'mega-tool' that can find interviews in blogs, articles, web pages, then filter out all sentences said by Bill Gates into some text or CSV file. Then, lets say, takes videos from Bill Gates on youtube, and filter out everything he has said, discriminating when he speaks vs. another person speaking. etc...\n\nIf this is not already available out there, are there pre-existing tools that could serve as a backbone to this tool? E.g. an AI that recognizes whether Bill Gates is speaking or someone else? Another algorithm that is able to recognize when Bill Gates is saying something in an article or if it's the author writing, etc.\n\nFrom this data I'd like to create some type of 'views or values 2 vec' which I believe might be possible (I've experience with behavioral science so I have some ideas on how to implement this), but I was wondering if there were already pre-existing pre-trained embeddings out there for entity opinions or entity personal views or values.","timestamp":"2020-01-20T20:17:51+00:00","score":1},{"role":"answerer","user_id":"anon_92f1a6a9ab3e7cc7","comment_id":"ff60ppz","kind":"comment","text":"The Author-Topic Model might be in the direction of what you're looking for.","timestamp":"2020-01-21T14:15:34+00:00","score":1},{"role":"OP","user_id":"anon_68f171ac13094569","comment_id":"ffa2gsa","kind":"comment","text":"Thank you so much! I was also thinking \"Values Coding\" might be worth investigating","timestamp":"2020-01-22T20:55:56+00:00","score":1},{"role":"answerer","user_id":"anon_92f1a6a9ab3e7cc7","comment_id":"ffa3b03","kind":"comment","text":"Haven't heard of that.","timestamp":"2020-01-22T21:03:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_68f171ac13094569","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_92f1a6a9ab3e7cc7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ff60ppz","thanks_reply_id":"ffa2gsa","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_0ba2bd6cd089b470","answerer_user_id":"anon_4db0a21667813b1d","subreddit":"LanguageTechnology","timestamp":"2020-01-24T00:13:41+00:00","post_id":"et23v9","question":"Freeling dependency parser, where to find a list of dependency tags meaning ?\n\nEDIT : Found them here -> [http://clic.ub.edu/corpus/webfm\\_send/49](http://clic.ub.edu/corpus/webfm_send/49)\n\nHello dear friends,\n\nI searched but couldn't find tag meanings for dependency in the user manual of Freeling 4.1\n\nFor exemple :\n\n​\n\nhttps://preview.redd.it/dwssu2hmcmc41.png?width=633&format=png&auto=webp&s=f67a15e6c20ee7deb994706e338e4d5f385b9925\n\nwhat does cpred , mod or cd stand for ?\n\nIf anybody could give me link to a list or something,\n\nRegards, M","preferred_answer":"https://gist.github.com/nlothian/9240750","full_conversation":[{"role":"OP","user_id":"anon_0ba2bd6cd089b470","comment_id":"et23v9","kind":"post","text":"Freeling dependency parser, where to find a list of dependency tags meaning ?\n\nEDIT : Found them here -> [http://clic.ub.edu/corpus/webfm\\_send/49](http://clic.ub.edu/corpus/webfm_send/49)\n\nHello dear friends,\n\nI searched but couldn't find tag meanings for dependency in the user manual of Freeling 4.1\n\nFor exemple :\n\n​\n\nhttps://preview.redd.it/dwssu2hmcmc41.png?width=633&format=png&auto=webp&s=f67a15e6c20ee7deb994706e338e4d5f385b9925\n\nwhat does cpred , mod or cd stand for ?\n\nIf anybody could give me link to a list or something,\n\nRegards, M","timestamp":"2020-01-24T00:13:41+00:00","score":2},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"ffe32sb","kind":"comment","text":"https://gist.github.com/nlothian/9240750","timestamp":"2020-01-24T03:10:22+00:00","score":1},{"role":"OP","user_id":"anon_0ba2bd6cd089b470","comment_id":"ffe3pqa","kind":"comment","text":"thank you, but this is not what I am looking for, \n\nyou gave me the link to the labels used by stanford parser to define words, \n\nyou find no dependency labels such as cpred, cd etc. on this link","timestamp":"2020-01-24T03:18:14+00:00","score":1},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"ffe71cj","kind":"comment","text":"Ah, sorry, mate, I thought this list was more extensive. However, many of these seem to stem from X-bar theory and its terminology: ‘pred’ being predicate (and ‘cpred’ clausal predicate). You might want to check that out - at the very least, these labels are mostly taken from linguistics theory.","timestamp":"2020-01-24T04:00:11+00:00","score":1},{"role":"OP","user_id":"anon_0ba2bd6cd089b470","comment_id":"ffeopg0","kind":"comment","text":"no worries, I found them finally : \n\n[http://clic.ub.edu/corpus/webfm\\_send/49](http://clic.ub.edu/corpus/webfm_send/49)","timestamp":"2020-01-24T09:22:18+00:00","score":1},{"role":"answerer","user_id":"anon_4db0a21667813b1d","comment_id":"ffepq89","kind":"comment","text":"Nice one!","timestamp":"2020-01-24T09:48:02+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_0ba2bd6cd089b470","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4db0a21667813b1d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ffe32sb","thanks_reply_id":"ffe3pqa","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_baab7dd4f14efa24","answerer_user_id":"anon_f347ff44008e3bff","subreddit":"LanguageTechnology","timestamp":"2020-01-24T01:44:38+00:00","post_id":"et3as1","question":"What sort of things do you look for when hiring an intern for an NLP position?\n\nI'm a researcher on theoretical machine learning and with an interest on NLP. This is from previous research and current unpublished work. But I'm curious on what sort of things the teams look for when hunting for an intern for an NLP related position.","preferred_answer":"If they worked on a dataset other than \"20 newsgroups\" or \"imdb movie reviews\". The biggest part in NLP projects is usually the data cleaning and preprocessing, this can be best trained with some unprocessed real data (eg crawling the data from Websites). It's completely fine to start with such a dataset (there are many tutorials online), but I think it's important that people understand what expects them. \nAlso I ask which NLP tasks and preprocessing methods they know. I'm looking for people who know more tasks than 'sentiment analysis'","full_conversation":[{"role":"OP","user_id":"anon_baab7dd4f14efa24","comment_id":"et3as1","kind":"post","text":"What sort of things do you look for when hiring an intern for an NLP position?\n\nI'm a researcher on theoretical machine learning and with an interest on NLP. This is from previous research and current unpublished work. But I'm curious on what sort of things the teams look for when hunting for an intern for an NLP related position.","timestamp":"2020-01-24T01:44:38+00:00","score":25},{"role":"answerer","user_id":"anon_f347ff44008e3bff","comment_id":"fffki9a","kind":"comment","text":"If they worked on a dataset other than \"20 newsgroups\" or \"imdb movie reviews\". The biggest part in NLP projects is usually the data cleaning and preprocessing, this can be best trained with some unprocessed real data (eg crawling the data from Websites). It's completely fine to start with such a dataset (there are many tutorials online), but I think it's important that people understand what expects them. \nAlso I ask which NLP tasks and preprocessing methods they know. I'm looking for people who know more tasks than 'sentiment analysis'","timestamp":"2020-01-24T17:12:12+00:00","score":3},{"role":"OP","user_id":"anon_baab7dd4f14efa24","comment_id":"fffppi3","kind":"comment","text":"Appreciate your insight into it! Just curious wha sort of things do you look for when you say tasks? Is it things like NER, POStags etc.. or things similar to vectorization, embeddings etc.?","timestamp":"2020-01-24T18:05:10+00:00","score":2},{"role":"answerer","user_id":"anon_f347ff44008e3bff","comment_id":"ffm14p0","kind":"comment","text":"Yes, NER etc. Just to see if there is a real interest.","timestamp":"2020-01-26T13:53:41+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_baab7dd4f14efa24","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f347ff44008e3bff","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fffki9a","thanks_reply_id":"fffppi3","post_score":25,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_12d3c355e5a6d8c9","answerer_user_id":"anon_cb00e4a0317dc2c4","subreddit":"LanguageTechnology","timestamp":"2020-01-26T05:13:11+00:00","post_id":"eu2jy3","question":"Looking for insights for a project\n\nI'm essentially trying to build a basic voice authentication program with Python as a step into NLP. \nThe basic idea, as I see it, is going to be to have someone say some phrase to set the template (I'd probably have to create an allowance for vocal variance) and then simply have it compare that template to any following 'attempts'. I'm not looking for it to do much, probably a simple message \"Voice match!\" if the same user uses the same passphrase or \"Not a match!\" in other cases. \n\n\nI'm fairly comfortable in Python, but I'm curious if anyone has any suggestions about tools or resources to get going, or insights on the idea above, as I've never done an NLP project before. \n\n\nCurrently, I'm thinking about using Parselmouth so I can utilize spectrograms from Praat. But Praat only comes to mind because it's the default from Phonetics classes, so maybe there's a better tool out there for this? \n\n\nEventually, I'd like to evolve this into something meatier - analyzing different aspects of different users' voices, but I figure this would be a good starting point.","preferred_answer":"You can build a phrase independent speaker recognition system using MFCC (Mel Frequency cepstral coefficient ) features.","full_conversation":[{"role":"OP","user_id":"anon_12d3c355e5a6d8c9","comment_id":"eu2jy3","kind":"post","text":"Looking for insights for a project\n\nI'm essentially trying to build a basic voice authentication program with Python as a step into NLP. \nThe basic idea, as I see it, is going to be to have someone say some phrase to set the template (I'd probably have to create an allowance for vocal variance) and then simply have it compare that template to any following 'attempts'. I'm not looking for it to do much, probably a simple message \"Voice match!\" if the same user uses the same passphrase or \"Not a match!\" in other cases. \n\n\nI'm fairly comfortable in Python, but I'm curious if anyone has any suggestions about tools or resources to get going, or insights on the idea above, as I've never done an NLP project before. \n\n\nCurrently, I'm thinking about using Parselmouth so I can utilize spectrograms from Praat. But Praat only comes to mind because it's the default from Phonetics classes, so maybe there's a better tool out there for this? \n\n\nEventually, I'd like to evolve this into something meatier - analyzing different aspects of different users' voices, but I figure this would be a good starting point.","timestamp":"2020-01-26T05:13:11+00:00","score":3},{"role":"answerer","user_id":"anon_cb00e4a0317dc2c4","comment_id":"ffm5m8y","kind":"comment","text":"You can build a phrase independent speaker recognition system using MFCC (Mel Frequency cepstral coefficient ) features.","timestamp":"2020-01-26T14:27:26+00:00","score":3},{"role":"OP","user_id":"anon_12d3c355e5a6d8c9","comment_id":"ffofuaj","kind":"comment","text":"This led to some good reading. Thank you!","timestamp":"2020-01-26T22:20:59+00:00","score":2},{"role":"answerer","user_id":"anon_cb00e4a0317dc2c4","comment_id":"ffopjb0","kind":"comment","text":"Let me know if you need more info.","timestamp":"2020-01-26T23:09:56+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_12d3c355e5a6d8c9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cb00e4a0317dc2c4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ffm5m8y","thanks_reply_id":"ffofuaj","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_a3125e6366b23a00","answerer_user_id":"anon_e71f177644b74eda","subreddit":"LanguageTechnology","timestamp":"2020-01-29T03:34:15+00:00","post_id":"evh4f0","question":"Guidance on getting started?\n\nHey all. I'm an experienced software engineer who hasn't done much in NLP. Some folks on one of our teams have been trying to get a workable NLP solution for a while, and in my inexperienced in this field's opinion, I think the use case is fairly uncomplicated.\n\nWe have some reports that are written in free text. We are looking only for certain keywords. We are attempting to codify these old reports by searching for certain text strings such as \"thingy type of medical term\". It is all medical data. \n\nIs NLP overkill for this? Or a perfect use case? Would it perhaps be simpler to write some regex and then process this way?\n\nDon't really know where to start. Happy if the answer is: \"Follow this guide and come back and ask again.\" Thanks in advance.","preferred_answer":"Just want to add to the answer above, one benefit you might get from topic classification/modelling approaches is being able to classify documents that don't fit the patterns you already have.\n\nThis might prove more efficient/scalable if you have lots of documents and if the patterns have to be written by humans","full_conversation":[{"role":"OP","user_id":"anon_a3125e6366b23a00","comment_id":"evh4f0","kind":"post","text":"Guidance on getting started?\n\nHey all. I'm an experienced software engineer who hasn't done much in NLP. Some folks on one of our teams have been trying to get a workable NLP solution for a while, and in my inexperienced in this field's opinion, I think the use case is fairly uncomplicated.\n\nWe have some reports that are written in free text. We are looking only for certain keywords. We are attempting to codify these old reports by searching for certain text strings such as \"thingy type of medical term\". It is all medical data. \n\nIs NLP overkill for this? Or a perfect use case? Would it perhaps be simpler to write some regex and then process this way?\n\nDon't really know where to start. Happy if the answer is: \"Follow this guide and come back and ask again.\" Thanks in advance.","timestamp":"2020-01-29T03:34:15+00:00","score":3},{"role":"answerer","user_id":"anon_e71f177644b74eda","comment_id":"ffww3pg","kind":"comment","text":"Just want to add to the answer above, one benefit you might get from topic classification/modelling approaches is being able to classify documents that don't fit the patterns you already have.\n\nThis might prove more efficient/scalable if you have lots of documents and if the patterns have to be written by humans","timestamp":"2020-01-29T15:39:09+00:00","score":1},{"role":"OP","user_id":"anon_a3125e6366b23a00","comment_id":"ffwz0pz","kind":"comment","text":"Thanks for the input. That makes sense. I'll need to do more domain analysis regarding how these data were initially captured. Drop downs make the work easy. Free text make the work hard. At this point I'm not sure. \n\nBut to recap: essentially what you're saying is the classification and modelling approach would be best if it was entered free text by humans, yes?","timestamp":"2020-01-29T16:09:53+00:00","score":1},{"role":"answerer","user_id":"anon_e71f177644b74eda","comment_id":"ffy80p1","kind":"comment","text":"No, what I'm saying is regex patterns require humans to write them and to map them to the \"codification\" (label).\n\nHowever, given enough document label pairs, a model might be able to take a new type of document you have no pattern for and classify it correctly. Maybe in your case it's not sustainable to have people write down new patterns all the time.","timestamp":"2020-01-29T23:25:54+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a3125e6366b23a00","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e71f177644b74eda","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ffww3pg","thanks_reply_id":"ffwz0pz","post_score":3,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_da9f502a008c6d5e","answerer_user_id":"anon_52046ace68ac266f","subreddit":"LanguageTechnology","timestamp":"2020-01-31T03:29:30+00:00","post_id":"ewi25d","question":"How difficult/easy is to learn NLP once you have experience in CV/Deep learning?","preferred_answer":"u/Brudaks is on point. But while experience helps, I'm not sure it is as important as it seems. I got into both ML (deep learning) and NLP over the past year or so. I would say I've been able to pick up A LOT of the subtleties over time through asking people (online) questions and following the best practices in SOTA research.\n\nIf anything, I've learned that statistical methods still very much hold up against neural networks for various NLP tasks. I started off pro-neural networks, i've come to find the best methods tend to be a combination of both statistical and neural.","full_conversation":[{"role":"OP","user_id":"anon_da9f502a008c6d5e","comment_id":"ewi25d","kind":"post","text":"How difficult/easy is to learn NLP once you have experience in CV/Deep learning?","timestamp":"2020-01-31T03:29:30+00:00","score":3},{"role":"answerer","user_id":"anon_52046ace68ac266f","comment_id":"fg3huf1","kind":"comment","text":"u/Brudaks is on point. But while experience helps, I'm not sure it is as important as it seems. I got into both ML (deep learning) and NLP over the past year or so. I would say I've been able to pick up A LOT of the subtleties over time through asking people (online) questions and following the best practices in SOTA research.\n\nIf anything, I've learned that statistical methods still very much hold up against neural networks for various NLP tasks. I started off pro-neural networks, i've come to find the best methods tend to be a combination of both statistical and neural.","timestamp":"2020-01-31T14:44:56+00:00","score":3},{"role":"OP","user_id":"anon_da9f502a008c6d5e","comment_id":"fg5m0qs","kind":"comment","text":"Your experience is encouraging. Thanks\n\nYeah, I have taken courses on Traditional Machine Learning in my college. If you can point out important concepts so that I can brush up before joining?\n\nThanks in advance.","timestamp":"2020-02-01T04:26:47+00:00","score":1},{"role":"answerer","user_id":"anon_52046ace68ac266f","comment_id":"fg87cse","kind":"comment","text":"Language models are a big deal now, google BERT and learn how they work and what you can do with them","timestamp":"2020-02-02T02:44:24+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_da9f502a008c6d5e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_52046ace68ac266f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fg3huf1","thanks_reply_id":"fg5m0qs","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_da9f502a008c6d5e","answerer_user_id":"anon_c63bb552e5e06253","subreddit":"LanguageTechnology","timestamp":"2020-01-31T03:37:35+00:00","post_id":"ewi600","question":"How difficult/easy is to learn NLP once you have experience in CV/Deep learning?\n\nI have experience in computer vision/deep learning from last 3-4 years. \nNow I am getting a job offer which deals with NLP/chatbots. My confusion/doubts is how much overlap dies these both techniques have? Is it easy to learn NLP given deep learning experience? Having understanding about both is a good choice or shall I stick to only CV?\nWhat are pros/cons of taking this position?","preferred_answer":"In my opinion, it's good to know about both and this job offer is a good opportunity to broaden your knowledge. The only downside I could think of is that you are planning to go for jobs that are so specialised that you or potential employers might think that the NLP job is a distraction to getting more knowledge in CV.\nIn my experience, NLP and CV are often mentioned next to each other in job specs, but I'm probably looking at more general job specs.\n\nAs to the overlap: a growing proportion of NLP is solved by deep learning/neural nets. The architectures of the models used in NLP are slightly different than those for CV, due to language being sequential - this means that you might use RecurrentNNs (or RNN-based models) in NLP as opposed to ConvolutionalNN used in vision. Having a good grasp of neural nets will help you to understand the details of these different architectures better.\n\nThere might still be a part of your particular job, where they use more traditional NLP approaches that are not based on deep learning, which you would have to learn. Similarly, the job might involve reinforcement learning approaches, which requires different learning algorithms, which night be implemented as a neural net.\n\nIf you managed to get an offer based on your current experience, I would go for it. You can still decide later that you prefer to focus on CV and get a job accordingly.","full_conversation":[{"role":"OP","user_id":"anon_da9f502a008c6d5e","comment_id":"ewi600","kind":"post","text":"How difficult/easy is to learn NLP once you have experience in CV/Deep learning?\n\nI have experience in computer vision/deep learning from last 3-4 years. \nNow I am getting a job offer which deals with NLP/chatbots. My confusion/doubts is how much overlap dies these both techniques have? Is it easy to learn NLP given deep learning experience? Having understanding about both is a good choice or shall I stick to only CV?\nWhat are pros/cons of taking this position?","timestamp":"2020-01-31T03:37:35+00:00","score":4},{"role":"answerer","user_id":"anon_c63bb552e5e06253","comment_id":"fg2hxdh","kind":"comment","text":"In my opinion, it's good to know about both and this job offer is a good opportunity to broaden your knowledge. The only downside I could think of is that you are planning to go for jobs that are so specialised that you or potential employers might think that the NLP job is a distraction to getting more knowledge in CV.\nIn my experience, NLP and CV are often mentioned next to each other in job specs, but I'm probably looking at more general job specs.\n\nAs to the overlap: a growing proportion of NLP is solved by deep learning/neural nets. The architectures of the models used in NLP are slightly different than those for CV, due to language being sequential - this means that you might use RecurrentNNs (or RNN-based models) in NLP as opposed to ConvolutionalNN used in vision. Having a good grasp of neural nets will help you to understand the details of these different architectures better.\n\nThere might still be a part of your particular job, where they use more traditional NLP approaches that are not based on deep learning, which you would have to learn. Similarly, the job might involve reinforcement learning approaches, which requires different learning algorithms, which night be implemented as a neural net.\n\nIf you managed to get an offer based on your current experience, I would go for it. You can still decide later that you prefer to focus on CV and get a job accordingly.","timestamp":"2020-01-31T04:35:44+00:00","score":5},{"role":"OP","user_id":"anon_da9f502a008c6d5e","comment_id":"fg2xuld","kind":"comment","text":"Great reply. It helped. Thanks!\nI have worked on RNN and LSTMs for temporal CV. So my skillset summary lokks like this: python, tensorflow, keras, pytorch, CV, CNN, RNN. What next I should learn/know for performing good at NLP job roles?:What are good sources to understand traditional NLP? \n\nThanks in advance.","timestamp":"2020-01-31T08:52:28+00:00","score":1},{"role":"answerer","user_id":"anon_c63bb552e5e06253","comment_id":"fg7v9y0","kind":"comment","text":"Books: \n[Natural Language Processing with Python](http://www.nltk.org/book/). This is a very accessible and practical introduction and useful even if you won't be working in Python. Another, more detailed text book is [Speech and Language Processing by Jurafsky and Martin](https://web.stanford.edu/~jurafsky/slp3/ed3book.pdf). A book that focuses on statistical methods (as opposed to symbolic/knowledge based) is [Foundations of statistical language processing](https://nlp.stanford.edu/fsnlp/). It is quite old though.\n\nVideos: \n[Stanford NLP Lecture series 2012 with Dan Jurafsky and Chris Manning](https://www.youtube.com/playlist?list=PLoROMvodv4rOFZnDyrlW3-nI7tMLtmiJZ)\n\nI think if you have worked with RNN and LSTMs for temporal CV, then you are pretty well prepared (I didn't think of videos when I wrote my first comment), but the [Stanford Lecture series NLP with Deep Learning by Chris Manning](https://www.youtube.com/playlist?list=PLoROMvodv4rOhcuXMZkNm7j3fVwBBY42z) might help to give you more insights. \n\nGood luck!","timestamp":"2020-02-02T00:12:17+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_da9f502a008c6d5e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c63bb552e5e06253","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fg2hxdh","thanks_reply_id":"fg2xuld","post_score":4,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_31bdd001613f8269","answerer_user_id":"anon_64c717f5fddecab5","subreddit":"LanguageTechnology","timestamp":"2020-02-04T23:45:56+00:00","post_id":"eyzmfh","question":"Someone in NLP with linguistics background?\n\nHello, is there someone in this forum who is working in NLP or computational linguistics, but comes from a linguistics or languages background (teaching, translation etc.)?","preferred_answer":"Yes. My PhD in Linguistics and I work in NLP. But to be clear, linguistics doesn't have much to do with translation and language teaching directly. Like an archeologist and a historian. They are very different fields.","full_conversation":[{"role":"OP","user_id":"anon_31bdd001613f8269","comment_id":"eyzmfh","kind":"post","text":"Someone in NLP with linguistics background?\n\nHello, is there someone in this forum who is working in NLP or computational linguistics, but comes from a linguistics or languages background (teaching, translation etc.)?","timestamp":"2020-02-04T23:45:56+00:00","score":2},{"role":"answerer","user_id":"anon_64c717f5fddecab5","comment_id":"fgl24v4","kind":"comment","text":"Yes. My PhD in Linguistics and I work in NLP. But to be clear, linguistics doesn't have much to do with translation and language teaching directly. Like an archeologist and a historian. They are very different fields.","timestamp":"2020-02-05T05:14:27+00:00","score":5},{"role":"OP","user_id":"anon_31bdd001613f8269","comment_id":"fgmi0s8","kind":"comment","text":"Thanks. I'd have to agree with theeskimosparty on this :) What's the nature of the job you do in nlp?","timestamp":"2020-02-05T17:49:25+00:00","score":1},{"role":"answerer","user_id":"anon_64c717f5fddecab5","comment_id":"fgnbpw7","kind":"comment","text":"Conversational AI","timestamp":"2020-02-05T22:25:15+00:00","score":1},{"role":"OP","user_id":"anon_31bdd001613f8269","comment_id":"fgor6yd","kind":"comment","text":"Is that something that helped you focus on this field? I'm choosing my area of specialisation at the moment and while translation seems like the natural way to go (as I have plenty of experience in that area), I'm wondering how other people have made the decision. I'm also not sure whether I want to go on to a PhD or not.","timestamp":"2020-02-06T09:49:58+00:00","score":1},{"role":"answerer","user_id":"anon_64c717f5fddecab5","comment_id":"fgro940","kind":"comment","text":"Yes, but I would not recommend a PhD unless you want to publish research and teach. Otherwise, it's overkill. Industry application of linguistic paradigms barely scratches the surface, while most NLP programmers are engineers with a passing interesting in language problems.","timestamp":"2020-02-07T05:09:40+00:00","score":1},{"role":"OP","user_id":"anon_31bdd001613f8269","comment_id":"fgsi0b7","kind":"comment","text":"I did have the same view on a PhD but I've also seen an increasing number of job advertisements in this field in which a PhD holder is given preference over other applicants.","timestamp":"2020-02-07T14:13:54+00:00","score":2},{"role":"answerer","user_id":"anon_64c717f5fddecab5","comment_id":"fgstheb","kind":"comment","text":"You’re right they are increasing. If you got the stones for it, you should definitely follow your passion. Not for a job or job title, because you can always start your own company solving the problems that keep you up at night. Do it because you have an insatiable drive to learn without end. Either way, it's an exciting time to be working on language problems in tech. Check out Digital Humanities as well.","timestamp":"2020-02-07T16:18:39+00:00","score":1},{"role":"OP","user_id":"anon_31bdd001613f8269","comment_id":"fguarfd","kind":"comment","text":"Thanks for the advice, I'll make sure to check that as well. It is indeed an exciting time to be in this field, but at times the possibilities seem overwhelming and it is difficult to select an area of research that makes sense money- and job-wise.","timestamp":"2020-02-07T22:58:42+00:00","score":1}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_31bdd001613f8269","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_64c717f5fddecab5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fgl24v4","thanks_reply_id":"fgmi0s8","post_score":2,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_829e38d47fdeb788","answerer_user_id":"anon_8e6d36ec19977d3c","subreddit":"LanguageTechnology","timestamp":"2020-02-07T15:34:02+00:00","post_id":"f0c255","question":"Semantic search on a document\n\nHi Guys,\n\nI am trying to search a query through a large text document semantically. A query could be a phrase, few keywords or a complete sentence. Say a document (large) could be about HR policy containing various policies and a query could be \"food expense\". \n\nRight now I am getting the embedding of the query and looping through the sentences of the document and calculating the cosine similarity. I am using Universal Sentence Encoder to get the embedding. I am getting similarity with unrelated sentences as well.\n\nCan something else be done? Any suggestions?","preferred_answer":"Sorry, but it is a part of commercial project. But I can answer any questions, if u decide to implement this method.","full_conversation":[{"role":"OP","user_id":"anon_829e38d47fdeb788","comment_id":"f0c255","kind":"post","text":"Semantic search on a document\n\nHi Guys,\n\nI am trying to search a query through a large text document semantically. A query could be a phrase, few keywords or a complete sentence. Say a document (large) could be about HR policy containing various policies and a query could be \"food expense\". \n\nRight now I am getting the embedding of the query and looping through the sentences of the document and calculating the cosine similarity. I am using Universal Sentence Encoder to get the embedding. I am getting similarity with unrelated sentences as well.\n\nCan something else be done? Any suggestions?","timestamp":"2020-02-07T15:34:02+00:00","score":10},{"role":"answerer","user_id":"anon_8e6d36ec19977d3c","comment_id":"fhdh2cm","kind":"comment","text":"Sorry, but it is a part of commercial project. But I can answer any questions, if u decide to implement this method.","timestamp":"2020-02-12T05:41:39+00:00","score":1},{"role":"OP","user_id":"anon_829e38d47fdeb788","comment_id":"fhdu1oo","kind":"comment","text":"Sure. Thanks.\n\nHow many keywords are you considering and are those keywords able to cover all the possible words that could occur?\n\nIf I understand this correct you're trying to create labelled training data (with LDA/Guided LDA) to train a classifier (CNN)?","timestamp":"2020-02-12T10:00:39+00:00","score":2},{"role":"answerer","user_id":"anon_8e6d36ec19977d3c","comment_id":"fhe8iig","kind":"comment","text":"Yes, you understand right. 200 keywords arranged by frequency. At the top I see the most commonly used. But for making correct list you should create stopword list and remove those that make noise. Then you have to analyze if the list contains what you're looking for. If not then you will not find or it will be very seldom.","timestamp":"2020-02-12T14:09:46+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_829e38d47fdeb788","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8e6d36ec19977d3c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fhdh2cm","thanks_reply_id":"fhdu1oo","post_score":10,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_c9c0e682b57e8fca","answerer_user_id":"anon_9b17d42dc9283361","subreddit":"LanguageTechnology","timestamp":"2020-02-11T14:06:08+00:00","post_id":"f28rm4","question":"[P] How do I approach this NLP task?","preferred_answer":"Your problem sounds like [textual entailment](https://en.wikipedia.org/wiki/Textual_entailment) generation, i.e., given a sentence, generate another sentence that can be inferred from the input sentence. Maybe you can look into finding [datasets](https://aclweb.org/aclwiki/Textual_Entailment_Resource_Pool) of textual entailments for training a generator, although I doubt you'll find a dataset in your particular domain.","full_conversation":[{"role":"OP","user_id":"anon_c9c0e682b57e8fca","comment_id":"f28rm4","kind":"post","text":"[P] How do I approach this NLP task?","timestamp":"2020-02-11T14:06:08+00:00","score":2},{"role":"answerer","user_id":"anon_9b17d42dc9283361","comment_id":"fhb2ern","kind":"comment","text":"Your problem sounds like [textual entailment](https://en.wikipedia.org/wiki/Textual_entailment) generation, i.e., given a sentence, generate another sentence that can be inferred from the input sentence. Maybe you can look into finding [datasets](https://aclweb.org/aclwiki/Textual_Entailment_Resource_Pool) of textual entailments for training a generator, although I doubt you'll find a dataset in your particular domain.","timestamp":"2020-02-11T15:00:43+00:00","score":6},{"role":"OP","user_id":"anon_c9c0e682b57e8fca","comment_id":"fhb42rs","kind":"comment","text":"Yes, textual entailment seems to describe the problem well! Thanks, at least I now know what kind of problem I'm looking to solve :)\n\nAs for the training, I somehow assumed that large, pre-trained models like GPT-2 already may have an underlying understanding of relatedness, that could be leveraged for this purpose and that fine-tuning a model would suffice?","timestamp":"2020-02-11T15:18:58+00:00","score":1},{"role":"answerer","user_id":"anon_9b17d42dc9283361","comment_id":"fhbqshb","kind":"comment","text":"I see you mention you have enough statements to use for training, so maybe with transfer learning you can generate your paraphrases. See for example \"Paraphrasing with Large Language Models\", by Sam Witteveen, Martin Andrews. \n\nThey generate paraphrases by fine-tuning gpt-2:\n\n[https://www.aclweb.org/anthology/D19-5623.pdf](https://www.aclweb.org/anthology/D19-5623.pdf)\n\nCheck also this. The idea of using a GAN sounds promising:\n\n[https://arxiv.org/abs/1805.04680](https://arxiv.org/abs/1805.04680)","timestamp":"2020-02-11T19:04:57+00:00","score":2},{"role":"OP","user_id":"anon_c9c0e682b57e8fca","comment_id":"fhc10qy","kind":"comment","text":"Thanks a lot, the paper by Witteveen & Andrews, (2019) was pretty much what I intended to do :) Too bad that their exemplary results still feel a bit too close to the input, but it's something ¯\\\\\\_(ツ)\\_/¯ \n\nThe GAN-idea is interesting too. Will have to think more about that! Thanks again!","timestamp":"2020-02-11T20:47:18+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_c9c0e682b57e8fca","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9b17d42dc9283361","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fhb2ern","thanks_reply_id":"fhb42rs","post_score":2,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_aafe04d313d72b80","answerer_user_id":"anon_d4a7cdf9aa213912","subreddit":"LanguageTechnology","timestamp":"2020-02-13T18:20:42+00:00","post_id":"f3e816","question":"State of the Art Keyword Extraction\n\nWhat is the state of the Art of Keyword Extraction without regarding the language of a Corpus?\n\nI am reading in KeyGraph, Chi Square, RAKE or even LTSM Networks to extract Keywords. \n\nAre there any resources on how Amazon, Facebook or Google handle this?\n\nCan anybody here share his experience with Keyword Extraction?","preferred_answer":"Building a Deep Neural Network only for keyword extraction is a quite heavy task I guess. Imagine you being in production and you would be having 2 different deep learning models. Use spacy and most of the related stuff you find would be somehow related to TF-IDF. You can also use Parse trees.","full_conversation":[{"role":"OP","user_id":"anon_aafe04d313d72b80","comment_id":"f3e816","kind":"post","text":"State of the Art Keyword Extraction\n\nWhat is the state of the Art of Keyword Extraction without regarding the language of a Corpus?\n\nI am reading in KeyGraph, Chi Square, RAKE or even LTSM Networks to extract Keywords. \n\nAre there any resources on how Amazon, Facebook or Google handle this?\n\nCan anybody here share his experience with Keyword Extraction?","timestamp":"2020-02-13T18:20:42+00:00","score":20},{"role":"answerer","user_id":"anon_d4a7cdf9aa213912","comment_id":"fhji8xy","kind":"comment","text":"Building a Deep Neural Network only for keyword extraction is a quite heavy task I guess. Imagine you being in production and you would be having 2 different deep learning models. Use spacy and most of the related stuff you find would be somehow related to TF-IDF. You can also use Parse trees.","timestamp":"2020-02-14T02:21:08+00:00","score":1},{"role":"OP","user_id":"anon_aafe04d313d72b80","comment_id":"fhkad3k","kind":"comment","text":"Thanks for your Input!\n\n>Parse trees\n\nCould you elaborate what you mean by this?","timestamp":"2020-02-14T10:04:54+00:00","score":1},{"role":"answerer","user_id":"anon_d4a7cdf9aa213912","comment_id":"fhkd6hc","kind":"comment","text":"Check out noun phrase extraction using Standford CoreNLP, it uses the parse tree to extract keywords.","timestamp":"2020-02-14T11:11:45+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_aafe04d313d72b80","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d4a7cdf9aa213912","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fhji8xy","thanks_reply_id":"fhkad3k","post_score":20,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_b40ee873df0f07ad","answerer_user_id":"anon_d323d931724a2fbb","subreddit":"LanguageTechnology","timestamp":"2020-02-23T16:18:38+00:00","post_id":"f8bjus","question":"What does end-to-end mean\n\nMaybe a stupid question which i couldve googled, but what does end-to-end mean in words like 'end to end speech recognition' ?","preferred_answer":"It usually refers to the size of the neural blackbox. For example, an end-to-end speech recognition system takes a waveform as input and directly delivers recognized words or characters as output without any additional encoding on the input side or steps such as a language model filtering on the output side. The message is kinda “it just works” but that also puts it in the territory of a marketing phrase.","full_conversation":[{"role":"OP","user_id":"anon_b40ee873df0f07ad","comment_id":"f8bjus","kind":"post","text":"What does end-to-end mean\n\nMaybe a stupid question which i couldve googled, but what does end-to-end mean in words like 'end to end speech recognition' ?","timestamp":"2020-02-23T16:18:38+00:00","score":7},{"role":"answerer","user_id":"anon_d323d931724a2fbb","comment_id":"fik9fag","kind":"comment","text":"It usually refers to the size of the neural blackbox. For example, an end-to-end speech recognition system takes a waveform as input and directly delivers recognized words or characters as output without any additional encoding on the input side or steps such as a language model filtering on the output side. The message is kinda “it just works” but that also puts it in the territory of a marketing phrase.","timestamp":"2020-02-23T16:36:37+00:00","score":0},{"role":"OP","user_id":"anon_b40ee873df0f07ad","comment_id":"fik9nu9","kind":"comment","text":"Thank you! So adding a statistical language model would make it not end to end?","timestamp":"2020-02-23T16:39:11+00:00","score":1},{"role":"answerer","user_id":"anon_d323d931724a2fbb","comment_id":"fikc4fk","kind":"comment","text":"Maybe end-to-beyond ;)","timestamp":"2020-02-23T17:04:56+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b40ee873df0f07ad","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d323d931724a2fbb","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fik9fag","thanks_reply_id":"fik9nu9","post_score":7,"answer_score":0,"preferred_answer_is_top_level":true}} {"user_id":"anon_19e8362f4c1bfdf0","answerer_user_id":"anon_b069d078b4df3947","subreddit":"LanguageTechnology","timestamp":"2020-03-19T01:36:03+00:00","post_id":"fl1i50","question":"Can someone give constructive feedback on a proposed path from a ling BA --> working in industry compling? (w/o a masters)\n\nI've searched far and wide and haven't found anything exactly like this yet, so here goes. (feel free to prove me wrong; I would love to see somebody else working through this specific problem)\n\nA little background: I got a ling BA (w/ some CS coursework, little bit of python knowledge) from Cal a little under a year ago, and after doing a lot of research, I am strongly considering pursuing a career in compling. I haven't found much in the way of well-trodden paths from a BA to real CL work, but I'm hoping they exist, because I am not in a position to pay for grad school rn. Thanks in advance to anyone reading. The following guide is based on helpful redditors' DMs, other reddit self posts articles, and countless linkedin work histories.\n\nThis is my road map:\n\n**- do essential readings.** Jurafsky and Martin, NLTK book, [recent](https://medium.com/nurture-ai/nlp-must-reads-9ec8ac1a0402) [papers](https://www.reddit.com/r/LanguageTechnology/comments/aup0p5/nlp_papers_reading_roadmap/), [this primer](https://u.cs.biu.ac.il/~yogo/nnlp.pdf), [Foundations of Statistical Natural Language Processing](https://nlp.stanford.edu/fsnlp/), [Information Retrieval](https://nlp.stanford.edu/IR-book/). (I'm sure there are more, so throw 'em at me if you have some)\n\n**- make a few basic projects**\n\n**- make something original**, or original-ish, put it under the projects tab on my resume\n\n**- apply to a billion internships, eventually get one.** as a data analyst, language analyst, linguist, etc.\n\n**- do a good job as an intern, make useful things, prove myself**\n\n**- get CL job either (at company I interned for or otherwise)**\n\nLike I said, this is based on a patchwork of things I've read various places, from the perspective of somebody on the outside, so it could be misinformed or lacking in nuance in all sorts of ways. I expect constructive criticism and I'm all ears--notebook ready. Cheers!","preferred_answer":"Doing the readings of basic CL are not going to be enough to get a job as a computational linguist. They're historical more than anything. And the reality is that most CL jobs want more of the C than the L.\n\nYour best bet is to take courses in CS (think local community colleges, Coursera/EdX/etc) and get a good understanding of the basics (and not just a hodgepodge of python knowledge - you need to know how to manipulate data, work with databases, and then analyze data). You should also learn plenty of statistics.\n\nIn the meanwhile, assuming you need to make a living, apply to *linguist* jobs. There are plenty, and they will be mindless, but they will introduce you to how engineers are looking at data by doing annotations and evaluations. That, and it's a good thing for your resume while giving you the opportunity to earn money and practice your CS skills.\n\nIterate until you can pass an interview. Get a job. Yay.","full_conversation":[{"role":"OP","user_id":"anon_19e8362f4c1bfdf0","comment_id":"fl1i50","kind":"post","text":"Can someone give constructive feedback on a proposed path from a ling BA --> working in industry compling? (w/o a masters)\n\nI've searched far and wide and haven't found anything exactly like this yet, so here goes. (feel free to prove me wrong; I would love to see somebody else working through this specific problem)\n\nA little background: I got a ling BA (w/ some CS coursework, little bit of python knowledge) from Cal a little under a year ago, and after doing a lot of research, I am strongly considering pursuing a career in compling. I haven't found much in the way of well-trodden paths from a BA to real CL work, but I'm hoping they exist, because I am not in a position to pay for grad school rn. Thanks in advance to anyone reading. The following guide is based on helpful redditors' DMs, other reddit self posts articles, and countless linkedin work histories.\n\nThis is my road map:\n\n**- do essential readings.** Jurafsky and Martin, NLTK book, [recent](https://medium.com/nurture-ai/nlp-must-reads-9ec8ac1a0402) [papers](https://www.reddit.com/r/LanguageTechnology/comments/aup0p5/nlp_papers_reading_roadmap/), [this primer](https://u.cs.biu.ac.il/~yogo/nnlp.pdf), [Foundations of Statistical Natural Language Processing](https://nlp.stanford.edu/fsnlp/), [Information Retrieval](https://nlp.stanford.edu/IR-book/). (I'm sure there are more, so throw 'em at me if you have some)\n\n**- make a few basic projects**\n\n**- make something original**, or original-ish, put it under the projects tab on my resume\n\n**- apply to a billion internships, eventually get one.** as a data analyst, language analyst, linguist, etc.\n\n**- do a good job as an intern, make useful things, prove myself**\n\n**- get CL job either (at company I interned for or otherwise)**\n\nLike I said, this is based on a patchwork of things I've read various places, from the perspective of somebody on the outside, so it could be misinformed or lacking in nuance in all sorts of ways. I expect constructive criticism and I'm all ears--notebook ready. Cheers!","timestamp":"2020-03-19T01:36:03+00:00","score":7},{"role":"answerer","user_id":"anon_b069d078b4df3947","comment_id":"fkwh35f","kind":"comment","text":"Doing the readings of basic CL are not going to be enough to get a job as a computational linguist. They're historical more than anything. And the reality is that most CL jobs want more of the C than the L.\n\nYour best bet is to take courses in CS (think local community colleges, Coursera/EdX/etc) and get a good understanding of the basics (and not just a hodgepodge of python knowledge - you need to know how to manipulate data, work with databases, and then analyze data). You should also learn plenty of statistics.\n\nIn the meanwhile, assuming you need to make a living, apply to *linguist* jobs. There are plenty, and they will be mindless, but they will introduce you to how engineers are looking at data by doing annotations and evaluations. That, and it's a good thing for your resume while giving you the opportunity to earn money and practice your CS skills.\n\nIterate until you can pass an interview. Get a job. Yay.","timestamp":"2020-03-19T04:31:44+00:00","score":3},{"role":"OP","user_id":"anon_19e8362f4c1bfdf0","comment_id":"fkwjut3","kind":"comment","text":"Thanks for the advice. I'll take a look at some classes to get a solid foundation.\n\nWhat are the actual job titles of the linguist jobs you're talking about? I'm assuming they aren't the same \"linguist\" jobs I've seen that want PhDs.","timestamp":"2020-03-19T05:12:10+00:00","score":2},{"role":"answerer","user_id":"anon_b069d078b4df3947","comment_id":"fky8c0a","kind":"comment","text":"They're probably not the same jobs you've seen, but they are often called Linguists:\n\nhttps://www.linkedin.com/jobs/view/1535912149/?alternateChannel=search\n\nhttps://www.linkedin.com/jobs/view/1790038761/?alternateChannel=search&refId=cdeb92dc-d98e-46d9-be6b-832e3986e52e&trk=flagship3_search_srp_jobs\n\nhttps://www.linkedin.com/jobs/view/1554426937/?alternateChannel=search&refId=cdeb92dc-d98e-46d9-be6b-832e3986e52e&trk=flagship3_search_srp_jobs\n\nhttps://www.linkedin.com/jobs/view/1731099851/?alternateChannel=search&refId=cdeb92dc-d98e-46d9-be6b-832e3986e52e&trk=flagship3_search_srp_jobs\n\nhttps://www.linkedin.com/jobs/view/1742597307/?alternateChannel=search&refId=cdeb92dc-d98e-46d9-be6b-832e3986e52e&trk=flagship3_search_srp_jobs\n\netc. Just spend some time on LinkedIn searching for:\n\nLinguist\n\nLanguage Analyst\n\nData Annotator\n\nData Evaluator\n\netc","timestamp":"2020-03-19T18:47:19+00:00","score":1},{"role":"OP","user_id":"anon_19e8362f4c1bfdf0","comment_id":"fl2v8vs","kind":"comment","text":"Thanks for the info. I went ahead and applied to \\~10 linguist jobs, and I'm wondering (aside from what they directly ask for) what ways I could make my resume stand out?","timestamp":"2020-03-21T03:20:02+00:00","score":1},{"role":"answerer","user_id":"anon_b069d078b4df3947","comment_id":"fl2viqw","kind":"comment","text":"Focus on your skills and experience, and not your education/grades/etc. No one cares that you went to Cal, and don't have an \"Objective\" portion on your resume. \n\nEveryone will care that you are learning to program (in order to learn how to automate), have taken courses in language data analysis (e.g., syntax, morphology, phonology, etc), etc etc etc.\n\nOther than that, it's mostly interviewing skills. I wouldn't worry so much about your resume. And don't feel bad if you don't get one of the 10. Remember that there are a ton of new graduates and unemployed previous graduates who majored in linguistics also applying. Just stay diligent and you'll find something.\n\nI'd also encourage you to look for Quality Assurance/Software Tester jobs and things that are neither NLP or linguistics to get your foot in the door and gain some general experience.\n\nGood luck!","timestamp":"2020-03-21T03:23:29+00:00","score":1},{"role":"OP","user_id":"anon_19e8362f4c1bfdf0","comment_id":"fl2webz","kind":"comment","text":"Thanks!","timestamp":"2020-03-21T03:34:41+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_19e8362f4c1bfdf0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b069d078b4df3947","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fkwh35f","thanks_reply_id":"fkwjut3","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_68f171ac13094569","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2020-03-22T11:12:18+00:00","post_id":"fmybl7","question":"How can I do next word prediction using my own corpus? (E.g. what would person x say after this set of words, or in this context)\n\nI have a corpus (around 15K sentences) from an author and I’d like to apply or play with (preferably) an already built tool or plug n play tool where I give it those sentences and have it predict what THAT person would most likely say after a set of words I type or what word I’d say in a particular context (something like masked word prediction) \n\nIs this possible and if so are there already tools out there I can use to do this? I’m most comfortable with python and not really an NLP expert, but have played around with existing NLP tools in the past","preferred_answer":"This task is generally called 'languge modeling', with the most common technical definition being estimating the probability distribution of the next word given the previous context.\n\nThe simplest methods are n-gram counts. You might want to read the Jurafsky-Martin book chapter 3 on them - https://web.stanford.edu/~jurafsky/slp3/ ; some tools to do that (build and query language models) are mentioned here http://www.statmt.org/moses/?n=FactoredTraining.BuildingLanguageModel\n\n\nIt's worth noting that 1500 sentences is a tiny toy corpus that *by itself* is not sufficient to get a meaningful next word prediction. You can get something interesting by taking all the works of an author or all the speeches of a prolific politician, but for 1500 sentences you're not going to get anything nice unless you somehow incorporate a large corpus of general language.","full_conversation":[{"role":"OP","user_id":"anon_68f171ac13094569","comment_id":"fmybl7","kind":"post","text":"How can I do next word prediction using my own corpus? (E.g. what would person x say after this set of words, or in this context)\n\nI have a corpus (around 15K sentences) from an author and I’d like to apply or play with (preferably) an already built tool or plug n play tool where I give it those sentences and have it predict what THAT person would most likely say after a set of words I type or what word I’d say in a particular context (something like masked word prediction) \n\nIs this possible and if so are there already tools out there I can use to do this? I’m most comfortable with python and not really an NLP expert, but have played around with existing NLP tools in the past","timestamp":"2020-03-22T11:12:18+00:00","score":16},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"fl6n2lw","kind":"comment","text":"This task is generally called 'languge modeling', with the most common technical definition being estimating the probability distribution of the next word given the previous context.\n\nThe simplest methods are n-gram counts. You might want to read the Jurafsky-Martin book chapter 3 on them - https://web.stanford.edu/~jurafsky/slp3/ ; some tools to do that (build and query language models) are mentioned here http://www.statmt.org/moses/?n=FactoredTraining.BuildingLanguageModel\n\n\nIt's worth noting that 1500 sentences is a tiny toy corpus that *by itself* is not sufficient to get a meaningful next word prediction. You can get something interesting by taking all the works of an author or all the speeches of a prolific politician, but for 1500 sentences you're not going to get anything nice unless you somehow incorporate a large corpus of general language.","timestamp":"2020-03-22T11:25:07+00:00","score":7},{"role":"OP","user_id":"anon_68f171ac13094569","comment_id":"fl6nst3","kind":"comment","text":"Wow thank you so much! Super helpful. Sorry I made a typo there, it was 15K sentences. I assume that’s still not sufficient? By incorporating a large corpus would that be something like training a model on a large corpus then fine tuning it with my small corpus?","timestamp":"2020-03-22T11:39:14+00:00","score":3},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"fl6ptm5","kind":"comment","text":"Yes, that would be the case. I've also seen simply a weighed combination of corpora, i.e. you take a larger corpus of the appropriate general domain, and add \"your\" corpus with 10x or 100x the weight.","timestamp":"2020-03-22T12:15:30+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_68f171ac13094569","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fl6n2lw","thanks_reply_id":"fl6nst3","post_score":16,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_3f2e0dc9da83b311","answerer_user_id":"anon_207f26471430a974","subreddit":"LanguageTechnology","timestamp":"2020-03-22T18:37:46+00:00","post_id":"fn4lpc","question":"Multi-class classification for reviews?\n\nI have a set of what is essentially customer reviews, and I want to be able to classify them by category aka what they're talking about. There's twenty-ish categories, and some reviews belong to more than one category. Right now I have a training set where there's a row for each review and a column for each category, filled with 0's and 1's depending on if the review has to do with the category or not. \n\nAny idea how to use this set to develop a model that will be able to assign labels to a new set of reviews based on which categories are applicable that review? I'm very new to NLP so sorry if this doesn't make sense.\n\nThanks!","preferred_answer":"It sounds like you're on the right track. Check out the \"Multilabel classification\" section of [this sklearn page](https://scikit-learn.org/stable/modules/multiclass.html). This page explains that \"multiclass\" refers to problems where there are multiple labels (e.g. your \"category\"), but each review could have only one. \"Multilabel\" means each review can have multiple categories.\n\nThere are a lot of different models you could use here (all the way up to sophisticated deep learning models), but I'd suggest getting something simple working so that you can see it run end-to-end and compute metrics. This is typically done by separating your data into \"train\" and \"test\" sets so that you can train a model on \"train\" and see how well it does on \"test\", with the idea being that test set performance shows you how well your model will generalize to new reviews that it has never seen before.\n\nHere's roughly what I'd suggest:\n\n1. Split your data into train and test sets if you haven't already. [This sklearn page](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html) shows how. Assuming you don't have millions of reviews, a 70%/30% train/test split is probably good.\n2. Featurize your reviews to turn each one into a vector so that it's useable by sklearn. [CountVectorizer](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer) is probably a good starting point. You'll want to explore TF-IDF and other things eventually, but for now just do enough to get everything working.\n3. It sounds like your labels (the columns of 0s and 1s for the category) might already be in a useable format, but if not you'll need to figure out how to convert it to the format expected below by the LogisticRegression model.\n4. Get sklearn's [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression) classifier working. If you set the \\`multi\\_class\\` argument to \"ovr\" then under the hood sklearn will train one model for each of your categories, where the positive examples are reviews with that label and the negative examples are reviews with other labels. Train your model on the training set. You'll have to munge your data into the format sklearn wants.\n5. See how well your trained model performs on the test set using sklearn's [classification\\_report](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html).\n\nIf you get all of this working then you'll have a nice framework for testing new models: train a model on your train set and compare its test set performance against other models.\n\nI was a little loose on the details, but feel free to post any code you have if you run into issues.","full_conversation":[{"role":"OP","user_id":"anon_3f2e0dc9da83b311","comment_id":"fn4lpc","kind":"post","text":"Multi-class classification for reviews?\n\nI have a set of what is essentially customer reviews, and I want to be able to classify them by category aka what they're talking about. There's twenty-ish categories, and some reviews belong to more than one category. Right now I have a training set where there's a row for each review and a column for each category, filled with 0's and 1's depending on if the review has to do with the category or not. \n\nAny idea how to use this set to develop a model that will be able to assign labels to a new set of reviews based on which categories are applicable that review? I'm very new to NLP so sorry if this doesn't make sense.\n\nThanks!","timestamp":"2020-03-22T18:37:46+00:00","score":3},{"role":"answerer","user_id":"anon_207f26471430a974","comment_id":"fl7pzfk","kind":"comment","text":"It sounds like you're on the right track. Check out the \"Multilabel classification\" section of [this sklearn page](https://scikit-learn.org/stable/modules/multiclass.html). This page explains that \"multiclass\" refers to problems where there are multiple labels (e.g. your \"category\"), but each review could have only one. \"Multilabel\" means each review can have multiple categories.\n\nThere are a lot of different models you could use here (all the way up to sophisticated deep learning models), but I'd suggest getting something simple working so that you can see it run end-to-end and compute metrics. This is typically done by separating your data into \"train\" and \"test\" sets so that you can train a model on \"train\" and see how well it does on \"test\", with the idea being that test set performance shows you how well your model will generalize to new reviews that it has never seen before.\n\nHere's roughly what I'd suggest:\n\n1. Split your data into train and test sets if you haven't already. [This sklearn page](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html) shows how. Assuming you don't have millions of reviews, a 70%/30% train/test split is probably good.\n2. Featurize your reviews to turn each one into a vector so that it's useable by sklearn. [CountVectorizer](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html#sklearn.feature_extraction.text.CountVectorizer) is probably a good starting point. You'll want to explore TF-IDF and other things eventually, but for now just do enough to get everything working.\n3. It sounds like your labels (the columns of 0s and 1s for the category) might already be in a useable format, but if not you'll need to figure out how to convert it to the format expected below by the LogisticRegression model.\n4. Get sklearn's [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression) classifier working. If you set the \\`multi\\_class\\` argument to \"ovr\" then under the hood sklearn will train one model for each of your categories, where the positive examples are reviews with that label and the negative examples are reviews with other labels. Train your model on the training set. You'll have to munge your data into the format sklearn wants.\n5. See how well your trained model performs on the test set using sklearn's [classification\\_report](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html).\n\nIf you get all of this working then you'll have a nice framework for testing new models: train a model on your train set and compare its test set performance against other models.\n\nI was a little loose on the details, but feel free to post any code you have if you run into issues.","timestamp":"2020-03-22T19:55:09+00:00","score":5},{"role":"OP","user_id":"anon_3f2e0dc9da83b311","comment_id":"fle7pj2","kind":"comment","text":"Thank you so much!!! This was incredibly helpful; just knowing the right term for what I'm actually trying to do made a huge difference. I ended up finding a [Towards Data Science article] (https://towardsdatascience.com/multi-label-text-classification-with-scikit-learn-30714b7819c5) that I'm as a template. (They used a tf-idf format, which I know a tiny bit about bc I've also been trying to learn about LDA/topic modeling) \n\nI've been stuck on how to address this problem for awhile and your response was super helpful and thorough so thank youuuuuuuuuu","timestamp":"2020-03-24T19:45:53+00:00","score":2},{"role":"answerer","user_id":"anon_207f26471430a974","comment_id":"flfpbq3","kind":"comment","text":"Awesome, I'm glad I could help. Good luck!","timestamp":"2020-03-25T05:11:55+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3f2e0dc9da83b311","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_207f26471430a974","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fl7pzfk","thanks_reply_id":"fle7pj2","post_score":3,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_84967d1b72c66256","answerer_user_id":"anon_e71f177644b74eda","subreddit":"LanguageTechnology","timestamp":"2020-04-01T17:21:13+00:00","post_id":"ft41ll","question":"Training with characters instead of words in sklearn?\n\nI am a beginner, so bare with me here.\n\nI have a single text column with max of 5 words per each row. The words in text are not very common words, and there are lots of spelling mistakes. Considering these factors, it seems like I would have more success with vectorizing characters with ngrams, and then training on them.\n\n\nQuestions, I have for you guys:\n\n\n1) How do I do this in sklearn? \n\n2) Specifically, how do I convert characters into vectors and do ngrams? \n\n3) How can I account for spaces between the words?\n\nAny help would be nice. Thanks!","preferred_answer":"Checkout sklearn TfidfVectorizer's analyzer and ngram_range parameters.","full_conversation":[{"role":"OP","user_id":"anon_84967d1b72c66256","comment_id":"ft41ll","kind":"post","text":"Training with characters instead of words in sklearn?\n\nI am a beginner, so bare with me here.\n\nI have a single text column with max of 5 words per each row. The words in text are not very common words, and there are lots of spelling mistakes. Considering these factors, it seems like I would have more success with vectorizing characters with ngrams, and then training on them.\n\n\nQuestions, I have for you guys:\n\n\n1) How do I do this in sklearn? \n\n2) Specifically, how do I convert characters into vectors and do ngrams? \n\n3) How can I account for spaces between the words?\n\nAny help would be nice. Thanks!","timestamp":"2020-04-01T17:21:13+00:00","score":1},{"role":"answerer","user_id":"anon_e71f177644b74eda","comment_id":"fm53avz","kind":"comment","text":"Checkout sklearn TfidfVectorizer's analyzer and ngram_range parameters.","timestamp":"2020-04-01T18:25:52+00:00","score":3},{"role":"OP","user_id":"anon_84967d1b72c66256","comment_id":"fm630oq","kind":"comment","text":"Thanks, I got another question.\n\nI did use TfidfVEctorizer to create a vectorizer for charecters. Now, I am trying to find similarity between each rows within my data.\n\nWhat is the best way to do this? I am looking into jaccard similarity and cosine similarity, but I am having trouble, since my tf-idf vector is containing normalized-continuous values.... I think (atleast for jaccard) they want a binary value.","timestamp":"2020-04-01T23:53:27+00:00","score":1},{"role":"answerer","user_id":"anon_e71f177644b74eda","comment_id":"fm6r8lp","kind":"comment","text":"Yeah cosine or euclidean seems like a good start. Consider approximate nearest neighbor algorithms if you need something fast to compute pairwise distances","timestamp":"2020-04-02T04:16:53+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_84967d1b72c66256","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e71f177644b74eda","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fm53avz","thanks_reply_id":"fm630oq","post_score":1,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_3333a75a8bbe5609","answerer_user_id":"anon_abb00b5b60650f50","subreddit":"LanguageTechnology","timestamp":"2020-04-03T09:50:14+00:00","post_id":"fu5jz0","question":"Looking for data engineers to talk to for my master thesis\n\nHi all!\n\nHopefully, I am not breaking the law here.\n\nSo, I am currently working on my thesis for the Media Studies master program at Maastricht University. My topic is on the intersection between data classification and engineering ethics.\n\nAs part of my research, I would really like to have a quick chat with data scientists or knowledge engineers with experience in data classification and DBpedia's ontology in particular.\n\nIf some of you have such an experience and would be willing to a quick chat over Skype, Hangouts, or something else, do let me know.\n\nThanks a bunch.","preferred_answer":"Why would you be breaking the law?","full_conversation":[{"role":"OP","user_id":"anon_3333a75a8bbe5609","comment_id":"fu5jz0","kind":"post","text":"Looking for data engineers to talk to for my master thesis\n\nHi all!\n\nHopefully, I am not breaking the law here.\n\nSo, I am currently working on my thesis for the Media Studies master program at Maastricht University. My topic is on the intersection between data classification and engineering ethics.\n\nAs part of my research, I would really like to have a quick chat with data scientists or knowledge engineers with experience in data classification and DBpedia's ontology in particular.\n\nIf some of you have such an experience and would be willing to a quick chat over Skype, Hangouts, or something else, do let me know.\n\nThanks a bunch.","timestamp":"2020-04-03T09:50:14+00:00","score":1},{"role":"answerer","user_id":"anon_abb00b5b60650f50","comment_id":"fmayuoy","kind":"comment","text":"Why would you be breaking the law?","timestamp":"2020-04-03T11:25:20+00:00","score":1},{"role":"OP","user_id":"anon_3333a75a8bbe5609","comment_id":"fmb1bvn","kind":"comment","text":"I’ve noticed that some communities don’t appreciate that kind of posts.","timestamp":"2020-04-03T12:04:22+00:00","score":2},{"role":"answerer","user_id":"anon_abb00b5b60650f50","comment_id":"fmb1dli","kind":"comment","text":"Oh right","timestamp":"2020-04-03T12:05:06+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3333a75a8bbe5609","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_abb00b5b60650f50","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fmayuoy","thanks_reply_id":"fmb1bvn","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_f1e660264955e075","answerer_user_id":"anon_543e2fa813e917ce","subreddit":"LanguageTechnology","timestamp":"2020-04-09T17:11:26+00:00","post_id":"fxwb78","question":"What tools, software, etc. would you say are essential for significant NLP work?\n\nI work for a small company that is looking to build out its NLP capabilities, and I'm tasked with identifying the key tools, software, environment configuration, etc. that would be essential in non-trivial NLP development. Our use case is primarily information extraction from electronic health records, but could possibly go into other areas such as search and Q&A.\n\nI'm the only one on the team with background in NLP (from projects for my master's), but I don't have any experience building NLP products from the ground up that are scalable and production-ready. Right now, I have on my list: Python (libraries: spacy, scikit-learn, nltk, pandas), Anaconda, and Jupyter Notebooks. \n\nAny advice or recommended reading would be greatly appreciated!","preferred_answer":"One quick tip is that \"text mining\", \"computational linguistics\", 'information retrieval\", and \"natural language processing\" are all tangentially related paradigms built around programmatically extracting insights from text (and speech) data. \n\n* text mining - The business paradigm; built around modelling business metrics given text; ie sentiment analysis, emotional mapping, etc. (These were the most frequent adjectives found in Yelp reviews, they're primarily positive. Negative adjectives like \"slow\" was attributed to service/wait time.)\n* computational linguistics - the linguistics paradigm; Discourse analysis, word sense disambiguation, part of speech tagging, CYK algorithm, etc. This is not often readily malleable to a business's needs. (Oh and named entity recognition)\n* information retrieval - search engine paradigm; latent semantic indexing, edit distance, autocorrect, etc. Think anytime you want to index information that leads to easier retrieval. Search engines were a big movement within IR. \n* Natural Language Processing - this paradigm combines and expands the other paradigms. Think , text summarization, question answering, and translation. \n\nI mention these \"paradigms\" because NLP is so huge it can be overwhelming very quickly. Depending on your business needs, you might only need text mining for example. I work mostly in information retrieval and text mining, personally. So the state of the art developments are often more firepower than I need. \n\nHopefully this helps shape your skill/tool search!","full_conversation":[{"role":"OP","user_id":"anon_f1e660264955e075","comment_id":"fxwb78","kind":"post","text":"What tools, software, etc. would you say are essential for significant NLP work?\n\nI work for a small company that is looking to build out its NLP capabilities, and I'm tasked with identifying the key tools, software, environment configuration, etc. that would be essential in non-trivial NLP development. Our use case is primarily information extraction from electronic health records, but could possibly go into other areas such as search and Q&A.\n\nI'm the only one on the team with background in NLP (from projects for my master's), but I don't have any experience building NLP products from the ground up that are scalable and production-ready. Right now, I have on my list: Python (libraries: spacy, scikit-learn, nltk, pandas), Anaconda, and Jupyter Notebooks. \n\nAny advice or recommended reading would be greatly appreciated!","timestamp":"2020-04-09T17:11:26+00:00","score":24},{"role":"answerer","user_id":"anon_543e2fa813e917ce","comment_id":"fmx26ph","kind":"comment","text":"One quick tip is that \"text mining\", \"computational linguistics\", 'information retrieval\", and \"natural language processing\" are all tangentially related paradigms built around programmatically extracting insights from text (and speech) data. \n\n* text mining - The business paradigm; built around modelling business metrics given text; ie sentiment analysis, emotional mapping, etc. (These were the most frequent adjectives found in Yelp reviews, they're primarily positive. Negative adjectives like \"slow\" was attributed to service/wait time.)\n* computational linguistics - the linguistics paradigm; Discourse analysis, word sense disambiguation, part of speech tagging, CYK algorithm, etc. This is not often readily malleable to a business's needs. (Oh and named entity recognition)\n* information retrieval - search engine paradigm; latent semantic indexing, edit distance, autocorrect, etc. Think anytime you want to index information that leads to easier retrieval. Search engines were a big movement within IR. \n* Natural Language Processing - this paradigm combines and expands the other paradigms. Think , text summarization, question answering, and translation. \n\nI mention these \"paradigms\" because NLP is so huge it can be overwhelming very quickly. Depending on your business needs, you might only need text mining for example. I work mostly in information retrieval and text mining, personally. So the state of the art developments are often more firepower than I need. \n\nHopefully this helps shape your skill/tool search!","timestamp":"2020-04-09T18:32:17+00:00","score":13},{"role":"OP","user_id":"anon_f1e660264955e075","comment_id":"fn01qpg","kind":"comment","text":"Thanks for the helpful breakdown! I expect our business needs will fall under text mining and IR. In your experience, what tools do you find yourself turning to to address NLP problems in those realms?","timestamp":"2020-04-10T15:50:48+00:00","score":2},{"role":"answerer","user_id":"anon_543e2fa813e917ce","comment_id":"fn03kro","kind":"comment","text":"Great question, so I'll offer up some context to help frame the problem and solution. I work as a DS contractor at a well known tech company. They have an HR application that matches job seekers with job posters. It's like the inverse of glassdoor, they'd rather have 1-5 high quality matches than 100-500 potentially adequate matches.\n\nSo, their application infrastructure never forced job posters to make discrete job or skill selections. (You could post literally any combination of words and the system would push your job out.) So I've had a number of tasks working with this data.\n\n1. Text classifier - Classify job postings according to their bureau of labor statistics (BLS) code (helps meaningfully aggregate jobs by title)\n2. Recommender systems, used matrix of BLS codes and skills assigned to discover latent job features and latent skill features increasing the quality of job matches and reducing the time until a satisfactory match was found. (A client really wanted C++ experience but they were only looking at software engineers. We told them that a physicist's latent job vector was more closely mapped to C++ latent features, this helped procure better matches faster)\n3. Salary regression - using job descriptions and salaries to predict the hourly wage a client should expect to pay for a given job description (in progress)\n4. Named entity recognition - Tagging skills as named entities using surrounding context. Very similar to POS tagging. (In progress, we're still in the annotation phase)\n\nAs for the tools used:\n\n1. Sklearn, TF-IDF vectorization and random forest classifier \\~94% accurate for 125 classes.\n2. PyTorch - single layer NN for matrix factorization\n3. Current approach TF-IDF vectorization with random forest regressor. We're consider diving wages into buckets and predicting the bucket average as the wage. This would open the door to boilerplate LSTM classifiers using PyTorch.\n4. We haven't reached the model training phase yet, but expect to use LSTM sequence to sequence model, where text goes in and tokens come out (skill, non-skill, ... skill)\n\nHope this helps! Shoot me a DM if you'd like some info on getting started :)","timestamp":"2020-04-10T16:07:12+00:00","score":1},{"role":"OP","user_id":"anon_f1e660264955e075","comment_id":"fn4l6wv","kind":"comment","text":"Wow, thank you so much for taking the time to share your experience. I will definitely reach out to you via DM to pick your brain!","timestamp":"2020-04-11T22:20:51+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_f1e660264955e075","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_543e2fa813e917ce","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fmx26ph","thanks_reply_id":"fn01qpg","post_score":24,"answer_score":13,"preferred_answer_is_top_level":true}} {"user_id":"anon_b7c0d85d3419de70","answerer_user_id":"anon_06d179354a2056f0","subreddit":"LanguageTechnology","timestamp":"2020-04-13T16:28:15+00:00","post_id":"g0mamx","question":"[D]:Is there any repository only papers related to text classification using deep learning or non-deep learning papers?\n\nPlease suggest any latest papers including tweet classification.","preferred_answer":"You can try out the Sanity-Preserver service by A. Karpathy. Use with the search-phrase \"Text Classification\".\n\n [https://www.arxiv-sanity.com/search?q=text+classification](https://www.arxiv-sanity.com/search?q=text+classification)","full_conversation":[{"role":"OP","user_id":"anon_b7c0d85d3419de70","comment_id":"g0mamx","kind":"post","text":"[D]:Is there any repository only papers related to text classification using deep learning or non-deep learning papers?\n\nPlease suggest any latest papers including tweet classification.","timestamp":"2020-04-13T16:28:15+00:00","score":1},{"role":"answerer","user_id":"anon_06d179354a2056f0","comment_id":"fnaf36q","kind":"comment","text":"You can try out the Sanity-Preserver service by A. Karpathy. Use with the search-phrase \"Text Classification\".\n\n [https://www.arxiv-sanity.com/search?q=text+classification](https://www.arxiv-sanity.com/search?q=text+classification)","timestamp":"2020-04-13T16:46:29+00:00","score":1},{"role":"OP","user_id":"anon_b7c0d85d3419de70","comment_id":"fnagube","kind":"comment","text":"Thank you so much. Can you suggest some other link other than this?","timestamp":"2020-04-13T17:01:08+00:00","score":1},{"role":"answerer","user_id":"anon_06d179354a2056f0","comment_id":"fnahmls","kind":"comment","text":"Maybe you can try [https://www.shortscience.org/](https://www.shortscience.org/)","timestamp":"2020-04-13T17:07:41+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b7c0d85d3419de70","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_06d179354a2056f0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fnaf36q","thanks_reply_id":"fnagube","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_6d3c58b0ffc4b753","answerer_user_id":"anon_b4ebf001097548c9","subreddit":"LanguageTechnology","timestamp":"2020-04-14T09:48:39+00:00","post_id":"g12nvv","question":"Can I build a language model with my own vocabulary on top of pre-trained word embeddings?\n\nThe best way to achieve high accuracy in NLP tasks is to use SOTA pre-trained word embeddings.\nIs there any value in building my own language model using my vocabulary on top of the word embeddings? Would it achieve better accuracy in downstream tasks like text classification or summarization?","preferred_answer":"Hey, that’s a good question. I am not sure if I have the right answer, so let’s get through it together, okay?\n\nWhat are word embeddings? These are some dense vector representation of a token (be it a character, subside unit, word and whatnot, let’s talk words for the sake of simplicity). In other words, these are sets of numbers associated with particular words. It is thought that these numbers encode some information about the words, but it is arbitrary and have any context only in the space the words were projected to. \n\nWhen we have a pre-trained neural network, the words are converted to their indices in a dictionary, then this index serves as, well, an index for retrieving a corresponding embedding vector from the vector matrix. Then this set of numbers goes through a series of linear and nonlinear transformations with pre-defined weights, i.e. matrices of numbers. And in the end it has to arrive to some prediction. \n\nWhat happens if the word you have on your vocabulary does not present in the dictionary and thus cannot be mapped to an index? Well, it would give an error (or rather get mapped to an OOV token). What if we made an index for this word? There is no corresponding embedding for this index, so we’d have to initialize a vector for this word and train it from scratch. What if we replaced words in the dictionary, effectively mapping all our new words to pre-existing indices? They would get embeddings, but the embedding would not represent words properly, and forward-passing them through already existing weights would yield nonsensical results. \n\nTherefore, if you are using a pretrained LM, you have to use the tokenizer and the vocabulary it used for training. \n\nI don’t really know if it is possible to extend the pre-existing vocabulary and add new words to it and re-train the embeddings layers. I think it is, but it is a huge task and might not be the most efficient thing to do. Also keep in mind that if we are talking pre-trained models they don’t usually use words nowadays, but rather BPE or WordPiece, i.e. sub words units. That essentially means that (almost) every word can be represented. However, if your texts are really specific and have tons of domain-specific words, this sub word representation might not be accurate enough. \n\nHowever, I might be understanding your question wrong. If you want to train an LM from scratch and don’t want to train your own embeddings, you can get some pre-trained embedding, but they might be missing some of the word you have. You’ll have to deal with this.","full_conversation":[{"role":"OP","user_id":"anon_6d3c58b0ffc4b753","comment_id":"g12nvv","kind":"post","text":"Can I build a language model with my own vocabulary on top of pre-trained word embeddings?\n\nThe best way to achieve high accuracy in NLP tasks is to use SOTA pre-trained word embeddings.\nIs there any value in building my own language model using my vocabulary on top of the word embeddings? Would it achieve better accuracy in downstream tasks like text classification or summarization?","timestamp":"2020-04-14T09:48:39+00:00","score":9},{"role":"answerer","user_id":"anon_b4ebf001097548c9","comment_id":"fnd6oca","kind":"comment","text":"Hey, that’s a good question. I am not sure if I have the right answer, so let’s get through it together, okay?\n\nWhat are word embeddings? These are some dense vector representation of a token (be it a character, subside unit, word and whatnot, let’s talk words for the sake of simplicity). In other words, these are sets of numbers associated with particular words. It is thought that these numbers encode some information about the words, but it is arbitrary and have any context only in the space the words were projected to. \n\nWhen we have a pre-trained neural network, the words are converted to their indices in a dictionary, then this index serves as, well, an index for retrieving a corresponding embedding vector from the vector matrix. Then this set of numbers goes through a series of linear and nonlinear transformations with pre-defined weights, i.e. matrices of numbers. And in the end it has to arrive to some prediction. \n\nWhat happens if the word you have on your vocabulary does not present in the dictionary and thus cannot be mapped to an index? Well, it would give an error (or rather get mapped to an OOV token). What if we made an index for this word? There is no corresponding embedding for this index, so we’d have to initialize a vector for this word and train it from scratch. What if we replaced words in the dictionary, effectively mapping all our new words to pre-existing indices? They would get embeddings, but the embedding would not represent words properly, and forward-passing them through already existing weights would yield nonsensical results. \n\nTherefore, if you are using a pretrained LM, you have to use the tokenizer and the vocabulary it used for training. \n\nI don’t really know if it is possible to extend the pre-existing vocabulary and add new words to it and re-train the embeddings layers. I think it is, but it is a huge task and might not be the most efficient thing to do. Also keep in mind that if we are talking pre-trained models they don’t usually use words nowadays, but rather BPE or WordPiece, i.e. sub words units. That essentially means that (almost) every word can be represented. However, if your texts are really specific and have tons of domain-specific words, this sub word representation might not be accurate enough. \n\nHowever, I might be understanding your question wrong. If you want to train an LM from scratch and don’t want to train your own embeddings, you can get some pre-trained embedding, but they might be missing some of the word you have. You’ll have to deal with this.","timestamp":"2020-04-14T10:40:46+00:00","score":9},{"role":"OP","user_id":"anon_6d3c58b0ffc4b753","comment_id":"fne2vhe","kind":"comment","text":"Hey, thanks for the detailed answer! :) my issue is not from an insufficient vocabulary perspective as much as it is from an insufficient understanding of language perspective. \n\nSay I want to use a pre-trained LM to predict the next word in the scientific domain, would just training it on a google news vector, or wikipedia text suffice? Or say I want to train my model to understand what Shakespeare's writing is like and identify the writing that deviates from is in order to identify the plagiarized writings, how do I get my language model to do that?","timestamp":"2020-04-14T16:34:53+00:00","score":2},{"role":"answerer","user_id":"anon_b4ebf001097548c9","comment_id":"fne9q3l","kind":"comment","text":"Okay, so if you are taking a pre-trained model, it would be trained on huge corpus of common texts. To adapt it to a specific domain, you would need to fine-tune it -- basically continue training with new data where you can choose to keep some layers as they are (freeze them).\n\nIf we are talking Language Modelling (next word prediction), you just need to fine-tune the model on the new data. It is similar to pre-training, really, you just don't have to do ALL the job, just a small fraction + pre-training infuses the model with general language knowledge while fine-tuning should adjust the probabilities to better represent the domain you want to generate text from.\n\nNow, specific tasks. If you look at Huggingface implementation, they usually have something like a base model and several \"heads\" for them, each tailored to do some task. E.g. if you wanna do a plagiarism identification, that sounds like a classification to me. So you'll need a classification head -- or, simply put, a small network (like MLP -- multi-layered perceptron, which is usually used, I don't know if other options are available) which would take the LM outputs and do it's job to produce a class prediction (Shakespeare/not Shakespeare). There the model does backprop to correct mistakes, and doing so it also changes the weights of the network (if you unfreeze them, otherwise it would just change the weights of the MLP) to better perform the job it should do (i.e. classification).\n\nSo, embeddings. Vocabulary per se should not be an issue if you are working with 1 language. The majority of pre-trained models uses some sort of sub-word tokenization, and you can do one yourself if you are building a model from scratch. In principle, it should be able to tokenize any text in that language and embedd it, however it might be not the best fit, which could deteriorate the performance a bit but should not really break it too much, I think.","timestamp":"2020-04-14T17:31:59+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6d3c58b0ffc4b753","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b4ebf001097548c9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fnd6oca","thanks_reply_id":"fne2vhe","post_score":9,"answer_score":9,"preferred_answer_is_top_level":true}} {"user_id":"anon_9a57ff747914c939","answerer_user_id":"anon_4afe2e35292e6802","subreddit":"LanguageTechnology","timestamp":"2020-04-14T10:31:11+00:00","post_id":"g1354e","question":"Clustering dependency trees?\n\nGiven a large collection of sentences and their dependency trees, is there a good way to cluster the trees to determine different types of utterances? \n \nI've had limited success on arxiv-sanity etc., so I'd be happy to hear more takes on how to do this. Current approaches seem to be based on various graph embeddings, e.g. [\"Structural Embedding of Syntactic Trees for Machine Comprehension\"](https://arxiv.org/pdf/1703.00572.pdf), where a window around each word defines a neighborhood on a graph. \n \nAny other approaches?","preferred_answer":"If you convert them to constituency trees, you can linearize the structures and vectorize them. These vectors can then be used for clustering.","full_conversation":[{"role":"OP","user_id":"anon_9a57ff747914c939","comment_id":"g1354e","kind":"post","text":"Clustering dependency trees?\n\nGiven a large collection of sentences and their dependency trees, is there a good way to cluster the trees to determine different types of utterances? \n \nI've had limited success on arxiv-sanity etc., so I'd be happy to hear more takes on how to do this. Current approaches seem to be based on various graph embeddings, e.g. [\"Structural Embedding of Syntactic Trees for Machine Comprehension\"](https://arxiv.org/pdf/1703.00572.pdf), where a window around each word defines a neighborhood on a graph. \n \nAny other approaches?","timestamp":"2020-04-14T10:31:11+00:00","score":1},{"role":"answerer","user_id":"anon_4afe2e35292e6802","comment_id":"fnhwvhz","kind":"comment","text":"If you convert them to constituency trees, you can linearize the structures and vectorize them. These vectors can then be used for clustering.","timestamp":"2020-04-15T17:03:17+00:00","score":2},{"role":"OP","user_id":"anon_9a57ff747914c939","comment_id":"fnijqin","kind":"comment","text":"Interesting idea, thanks! How would you vectorize them in the end? And is there a publication you can recommend?","timestamp":"2020-04-15T20:06:29+00:00","score":1},{"role":"answerer","user_id":"anon_4afe2e35292e6802","comment_id":"fo2hwz6","kind":"comment","text":"You can linearize constituency trees into bracket notation (or [s-epressions](https://en.wikipedia.org/wiki/S-expression)), like \n(S((NP(...)),VP(VP(...), NP(...))) \nand then use some method to derive a binary vector that encodes the structure (I don't have any methods handy, sorry).\n\nAnother route would be to use tree distance measures, like [apted](https://pypi.org/project/apted/), as the base for your clustering approach. This gives you pairwise distances between the dependency/constituency trees, without having to vectorize them.","timestamp":"2020-04-21T09:58:10+00:00","score":2},{"role":"OP","user_id":"anon_9a57ff747914c939","comment_id":"fo2jt3g","kind":"comment","text":"Cool, thanks a lot. \n \nIn the meanwhile I actually ended up solving my problem with frequent subgraph mining. Which gives another way to vectorize a tree: construct a vector x s.t. x[i] == 1 iff subgraph pattern i is in the tree.","timestamp":"2020-04-21T10:32:00+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_9a57ff747914c939","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4afe2e35292e6802","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fnhwvhz","thanks_reply_id":"fnijqin","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_9d76ca0bb2290cf9","answerer_user_id":"anon_4afe2e35292e6802","subreddit":"LanguageTechnology","timestamp":"2020-04-15T09:02:48+00:00","post_id":"g1odvt","question":"The input length limit for the transformer encoder?\n\nhi, i want to know if there is a length limit for input to transformer encoder? Latest, i want to use the transformer encoder decoder to train a chatbot, and for the history utterances, a simple method is that concats these history utterances and input to encoder and decode the response?","preferred_answer":"You could apply a hierarchical architecture, like HAN: [https://www.aclweb.org/anthology/N16-1174/](https://www.aclweb.org/anthology/N16-1174/)\n\nYou can encode each utterance with e.g. BERT, which has a limit of 512 tokens. If this is not enough, you can sentence-split the utterances, encode them separately using BERT and input the sentence representations to an LSTM/GRU to aggregate the utterance representation. An additional LSTM encodes the dialogue history. And you can throw in attention at every aggregation level.\n\nHave a look at ParlAI framework: [https://github.com/facebookresearch/ParlAI/](https://github.com/facebookresearch/ParlAI/) and the convai2 challenge: [http://convai.io/](http://convai.io/)\n\nThe winning teams have released their code ([https://github.com/atselousov/transformer\\_chatbot](https://github.com/atselousov/transformer_chatbot), [https://github.com/atselousov/transformer\\_chatbot](https://github.com/atselousov/transformer_chatbot))","full_conversation":[{"role":"OP","user_id":"anon_9d76ca0bb2290cf9","comment_id":"g1odvt","kind":"post","text":"The input length limit for the transformer encoder?\n\nhi, i want to know if there is a length limit for input to transformer encoder? Latest, i want to use the transformer encoder decoder to train a chatbot, and for the history utterances, a simple method is that concats these history utterances and input to encoder and decode the response?","timestamp":"2020-04-15T09:02:48+00:00","score":2},{"role":"answerer","user_id":"anon_4afe2e35292e6802","comment_id":"fnhvd5b","kind":"comment","text":"You could apply a hierarchical architecture, like HAN: [https://www.aclweb.org/anthology/N16-1174/](https://www.aclweb.org/anthology/N16-1174/)\n\nYou can encode each utterance with e.g. BERT, which has a limit of 512 tokens. If this is not enough, you can sentence-split the utterances, encode them separately using BERT and input the sentence representations to an LSTM/GRU to aggregate the utterance representation. An additional LSTM encodes the dialogue history. And you can throw in attention at every aggregation level.\n\nHave a look at ParlAI framework: [https://github.com/facebookresearch/ParlAI/](https://github.com/facebookresearch/ParlAI/) and the convai2 challenge: [http://convai.io/](http://convai.io/)\n\nThe winning teams have released their code ([https://github.com/atselousov/transformer\\_chatbot](https://github.com/atselousov/transformer_chatbot), [https://github.com/atselousov/transformer\\_chatbot](https://github.com/atselousov/transformer_chatbot))","timestamp":"2020-04-15T16:51:21+00:00","score":5},{"role":"OP","user_id":"anon_9d76ca0bb2290cf9","comment_id":"fnjocan","kind":"comment","text":"Thanks, i'll read this materials! For the transformer\\_encoder\\_decoder, how make the training effecient if not use pre-trained model, like Bert ? Are there some trainging tricks?","timestamp":"2020-04-16T02:14:21+00:00","score":1},{"role":"answerer","user_id":"anon_4afe2e35292e6802","comment_id":"fo2bi9b","kind":"comment","text":"I don't think you need to train it from scratch. You can fine-tune BERT on your task. The [Huggingface library](https://github.com/huggingface/transformers) has an easy interface to do that.","timestamp":"2020-04-21T08:02:31+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9d76ca0bb2290cf9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4afe2e35292e6802","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fnhvd5b","thanks_reply_id":"fnjocan","post_score":2,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_2a7b31c5fef9c287","answerer_user_id":"anon_9fe4d7621a44c4a6","subreddit":"LanguageTechnology","timestamp":"2020-04-16T02:47:29+00:00","post_id":"g26ljp","question":"Odd man out tests for evaluating/comparing word embeddings\n\nHi,\n\nI'm interested in comparing the word embeddings (word2vec) derived from various texts. What I'd like to figure out is how the structure of the resulting semantic networks differ. Ideally, I'd compare the embeddings in a way that's a bit more nuanced than asking how well each reproduces human pairwise similarity judgements. Right now, I'm considering using odd-man-out tests, and two stick out:\n\ngensim's doesn't match (calculates a mean of the set of words and then asks which word's distance is greatest from mean of the set)\n\nand this:\n\n[https://www.aclweb.org/anthology/D18-1182/](https://www.aclweb.org/anthology/D18-1182/)\n\nDoes one of these seem better suited to answer my question? Are there other methods that I'm overlooking?","preferred_answer":"Gensims test is quite effective and I recommend that until you can implement something better. Hell, I made a game using it and the results are pretty good","full_conversation":[{"role":"OP","user_id":"anon_2a7b31c5fef9c287","comment_id":"g26ljp","kind":"post","text":"Odd man out tests for evaluating/comparing word embeddings\n\nHi,\n\nI'm interested in comparing the word embeddings (word2vec) derived from various texts. What I'd like to figure out is how the structure of the resulting semantic networks differ. Ideally, I'd compare the embeddings in a way that's a bit more nuanced than asking how well each reproduces human pairwise similarity judgements. Right now, I'm considering using odd-man-out tests, and two stick out:\n\ngensim's doesn't match (calculates a mean of the set of words and then asks which word's distance is greatest from mean of the set)\n\nand this:\n\n[https://www.aclweb.org/anthology/D18-1182/](https://www.aclweb.org/anthology/D18-1182/)\n\nDoes one of these seem better suited to answer my question? Are there other methods that I'm overlooking?","timestamp":"2020-04-16T02:47:29+00:00","score":7},{"role":"answerer","user_id":"anon_9fe4d7621a44c4a6","comment_id":"fnlofdo","kind":"comment","text":"Gensims test is quite effective and I recommend that until you can implement something better. Hell, I made a game using it and the results are pretty good","timestamp":"2020-04-16T17:09:38+00:00","score":1},{"role":"OP","user_id":"anon_2a7b31c5fef9c287","comment_id":"fnltocp","kind":"comment","text":"Thanks for the input. The approach I linked in my post outlines an alternative to gensim's approach. It looks like a pretty decent option","timestamp":"2020-04-16T17:52:21+00:00","score":1},{"role":"answerer","user_id":"anon_9fe4d7621a44c4a6","comment_id":"fnm8q6g","kind":"comment","text":"It may be quite difficult to implement - especially since it's difficult to get the vocabulary out of any word-embedding format done later than ElMo (and even difficult in ElMo) but things like word2vec, GloVe, and FastText it's trivially easy.\n\nFor instance, you'll need lots of compute to get the embeddings for a large vocabulary of words, or words with context, or sentences, or any combination of them with BERT","timestamp":"2020-04-16T19:57:25+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2a7b31c5fef9c287","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9fe4d7621a44c4a6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fnlofdo","thanks_reply_id":"fnltocp","post_score":7,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_8468549fd686394c","answerer_user_id":"anon_cba0632f81795803","subreddit":"LanguageTechnology","timestamp":"2020-04-19T14:12:03+00:00","post_id":"g48aql","question":"What are the best universities in Europe for NLP?\n\nEdit: thank you all for the useful information!","preferred_answer":"I just talked at length about my interest in linguistics in my statement of purpose. That was really the extent of me \"proving\" myself. My work provided my experience on the computer science aspect. I don't really recommend taking additional courses mainly because I sunk a lot of effort in trying to show proof of my interest about a year ago and just didn't find it worth it, when I can just take the risk of applying to a full degree.\n\nI somewhat agree about letters of recommendation. Professor and student relationships can lead to no deeper connection a lot of the time, but 2/3 of my recommendations came from professors that I naturally had a good personal relationship with due to our personalities and senses of humor aligning, and my deep interest in their respective classes. The third letter came from my mentor at work.","full_conversation":[{"role":"OP","user_id":"anon_8468549fd686394c","comment_id":"g48aql","kind":"post","text":"What are the best universities in Europe for NLP?\n\nEdit: thank you all for the useful information!","timestamp":"2020-04-19T14:12:03+00:00","score":28},{"role":"answerer","user_id":"anon_cba0632f81795803","comment_id":"fo05mbj","kind":"comment","text":"I just talked at length about my interest in linguistics in my statement of purpose. That was really the extent of me \"proving\" myself. My work provided my experience on the computer science aspect. I don't really recommend taking additional courses mainly because I sunk a lot of effort in trying to show proof of my interest about a year ago and just didn't find it worth it, when I can just take the risk of applying to a full degree.\n\nI somewhat agree about letters of recommendation. Professor and student relationships can lead to no deeper connection a lot of the time, but 2/3 of my recommendations came from professors that I naturally had a good personal relationship with due to our personalities and senses of humor aligning, and my deep interest in their respective classes. The third letter came from my mentor at work.","timestamp":"2020-04-20T18:14:54+00:00","score":1},{"role":"OP","user_id":"anon_8468549fd686394c","comment_id":"fo2exrd","kind":"comment","text":"I see, thank you very much!","timestamp":"2020-04-21T09:03:20+00:00","score":2},{"role":"answerer","user_id":"anon_cba0632f81795803","comment_id":"fo2h88w","kind":"comment","text":"No problem","timestamp":"2020-04-21T09:45:37+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8468549fd686394c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cba0632f81795803","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fo05mbj","thanks_reply_id":"fo2exrd","post_score":28,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_38c68b1170a2efcb","answerer_user_id":"anon_a2457ca2a832584a","subreddit":"LanguageTechnology","timestamp":"2020-04-20T11:28:32+00:00","post_id":"g4r39s","question":"What's the simplest way to generate word vectors for out of vocabulary words using FastText or something similar?","preferred_answer":"Yes, for example from [here](https://fasttext.cc/docs/en/crawl-vectors.html). Make sure it’s the .bin file, though, as the .txt is in word2vec format so won’t support ngrams.","full_conversation":[{"role":"OP","user_id":"anon_38c68b1170a2efcb","comment_id":"g4r39s","kind":"post","text":"What's the simplest way to generate word vectors for out of vocabulary words using FastText or something similar?","timestamp":"2020-04-20T11:28:32+00:00","score":5},{"role":"answerer","user_id":"anon_a2457ca2a832584a","comment_id":"fnz2u0z","kind":"comment","text":"Yes, for example from [here](https://fasttext.cc/docs/en/crawl-vectors.html). Make sure it’s the .bin file, though, as the .txt is in word2vec format so won’t support ngrams.","timestamp":"2020-04-20T12:07:38+00:00","score":2},{"role":"OP","user_id":"anon_38c68b1170a2efcb","comment_id":"fnz3ish","kind":"comment","text":"Ok great thank you!","timestamp":"2020-04-20T12:17:15+00:00","score":3},{"role":"answerer","user_id":"anon_a2457ca2a832584a","comment_id":"fnzd58d","kind":"comment","text":"You’re welcome! Though as u/mpk3 says, beware of the memory overhead in FastText models. If memory is a concern, look into one of the other suggestions in this thread. If it’s not, then using FastText is the simplest.","timestamp":"2020-04-20T14:07:56+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_38c68b1170a2efcb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a2457ca2a832584a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fnz2u0z","thanks_reply_id":"fnz3ish","post_score":5,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_82fcf06e059d126d","answerer_user_id":"anon_0e9253e38458e772","subreddit":"LanguageTechnology","timestamp":"2020-04-20T23:05:27+00:00","post_id":"g53i3d","question":"Named entity resolution and linking\n\nI am looking for advice / approaches to try. The problem is twofold: in a corpus of documents, I need to identify references to a specific reference to a lab measurement (named entity recognition #1). If there is an associated value , I would like to return that as well (NER # 2). Lastly, I want to find the specific reference to a date in the document that relates to when the measurement was taken (NER#3).\n\nThose three tasks form \"part 1\". \"Part 2\" is correctly linking a lab\\_text to value and date.\n\nThe catch (maybe?) is that there could be multiple of any of these in a document. Multiple references to the lab / values and multiple dates (though only one true date for each specific measurement).\n\nI was thinking one approach would be to train a sequence classifier: token by token label the named entity and train a model to assign to labels: lab\\_text / lab\\_value/ date. However, the end goal is for an automated system that can correctly return (lab\\_text,lab\\_value,date) triplets ... or an incomplete triplet populated with what is available in the text.\n\nAny thoughts on how to approach the problem? Or guidance on ways to better reframe the problem? I'm sure many people have solved a similar problem. Am I overcomplicating it? \n\nI would love to learn about alternative ways to structure the training labels that make most sense. For example, would \\[document, (text , value, date) \\] work as a regression task? (returning the encoding of the values from the original text) Or some form of generative model?","preferred_answer":">Thanks for the response!I will definitely try out AllenNLP. Out of curiosity, have you used it in past? This seems quick+dirty since it offers a no-training approach.\n\nYes, I use it mostly as a baseline to evaluate potential solution. For production use, I would train it from scratch with my own data.\n\n​\n\n>Framing it as a question and answering problem was another idea - I wasnt sure best label representation (start + end token index / actual text/ whatnot).How much data is a point of contention haha.\n\nAs long as the label provided enough information and consistent, it should be able to move across various representation.\n\n​\n\n>My business counterparts want a set number of records to label and I'm trying to get them to understand that there's not a deterministic answer.\n\nIndeed, there are randomness involved. It is hard to guess-timate the number of labels needed as it is related to the problem complexity. There isn't a way to get 100% accuracy for real world data so it is more or less about outperforming human.\n\nPlot how well it learns with 80%, 60%, 40% of data and so on see if more data helps.\n\nUnderstand what confuse the model, for example there is only one sample of particular case.","full_conversation":[{"role":"OP","user_id":"anon_82fcf06e059d126d","comment_id":"g53i3d","kind":"post","text":"Named entity resolution and linking\n\nI am looking for advice / approaches to try. The problem is twofold: in a corpus of documents, I need to identify references to a specific reference to a lab measurement (named entity recognition #1). If there is an associated value , I would like to return that as well (NER # 2). Lastly, I want to find the specific reference to a date in the document that relates to when the measurement was taken (NER#3).\n\nThose three tasks form \"part 1\". \"Part 2\" is correctly linking a lab\\_text to value and date.\n\nThe catch (maybe?) is that there could be multiple of any of these in a document. Multiple references to the lab / values and multiple dates (though only one true date for each specific measurement).\n\nI was thinking one approach would be to train a sequence classifier: token by token label the named entity and train a model to assign to labels: lab\\_text / lab\\_value/ date. However, the end goal is for an automated system that can correctly return (lab\\_text,lab\\_value,date) triplets ... or an incomplete triplet populated with what is available in the text.\n\nAny thoughts on how to approach the problem? Or guidance on ways to better reframe the problem? I'm sure many people have solved a similar problem. Am I overcomplicating it? \n\nI would love to learn about alternative ways to structure the training labels that make most sense. For example, would \\[document, (text , value, date) \\] work as a regression task? (returning the encoding of the values from the original text) Or some form of generative model?","timestamp":"2020-04-20T23:05:27+00:00","score":15},{"role":"answerer","user_id":"anon_0e9253e38458e772","comment_id":"fo3k4rm","kind":"comment","text":">Thanks for the response!I will definitely try out AllenNLP. Out of curiosity, have you used it in past? This seems quick+dirty since it offers a no-training approach.\n\nYes, I use it mostly as a baseline to evaluate potential solution. For production use, I would train it from scratch with my own data.\n\n​\n\n>Framing it as a question and answering problem was another idea - I wasnt sure best label representation (start + end token index / actual text/ whatnot).How much data is a point of contention haha.\n\nAs long as the label provided enough information and consistent, it should be able to move across various representation.\n\n​\n\n>My business counterparts want a set number of records to label and I'm trying to get them to understand that there's not a deterministic answer.\n\nIndeed, there are randomness involved. It is hard to guess-timate the number of labels needed as it is related to the problem complexity. There isn't a way to get 100% accuracy for real world data so it is more or less about outperforming human.\n\nPlot how well it learns with 80%, 60%, 40% of data and so on see if more data helps.\n\nUnderstand what confuse the model, for example there is only one sample of particular case.","timestamp":"2020-04-21T16:57:23+00:00","score":2},{"role":"OP","user_id":"anon_82fcf06e059d126d","comment_id":"fo46b82","kind":"comment","text":"Thanks again for taking the time to answer! This was really helpful. I'll try your approach out.\n\n​\n\n>Plot how well it learns with 80%, 60%, 40% of data and so on see if more data helps.\n\nSuch a simple idea but I totally overlooked it. I guess random samples give some form of benchmark. Ideally I would stratify but beyond stratifying over the type of document the text comes from it's hard to tell a priori where edge case text that confuses the model could come from. NLP is so messy it's wild. \n\n​\n\nSo much to learn!","timestamp":"2020-04-21T19:55:32+00:00","score":1},{"role":"answerer","user_id":"anon_0e9253e38458e772","comment_id":"fo51141","kind":"comment","text":">Ideally I would stratify but beyond stratifying over the type of document the text comes from it's hard to tell a priori where edge case text that confuses the model could come from. NLP is so messy it's wild.\n\nThere are couple of ways I imagine that could identify the types of edge cases:\n\nThe first thing to try is gathering the samples around both side of the decision boundary see if there are inconsistent labels among them. Most likely the first couple of iteration, you pick up the feeling of how data distribute.\n\nThen gather the activation of the last hidden layer before the output layer. Analyse these with T-SNE (see word2vec but for the span of text instead of word). Find out which sample land on the wrong cluster. Then add more samples of that types.","timestamp":"2020-04-22T00:26:57+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_82fcf06e059d126d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0e9253e38458e772","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fo3k4rm","thanks_reply_id":"fo46b82","post_score":15,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_f18f844178f2cc32","answerer_user_id":"anon_94590e794483ef4d","subreddit":"LanguageTechnology","timestamp":"2020-04-21T21:06:11+00:00","post_id":"g5npil","question":"What can I do to land a job in NLP?\n\nI am about to graduate in Data Science (MSc) in Europe, but when I first enrolled I had no prior experience in programming. I have done many projects during my master's and I am now comfortable with classes, inheritance, machine learning algorithms, and neural networks using pytorch, but I definitely still have a lot to learn. My thesis was in NLP, and I'd like to find a job in the field, but I don't really know the best strategy to get an offer. I surely don't have as much experience as someone with a background in CS or statistics, and I know many companies now require a PhD to be even considered for a position. Which companies should I target? And what could I do to improve my chances of getting a job offer?","preferred_answer":"The field is hot enough that you will land interviews by bombing out applications via LinkedIn. I would be open-minded about it because lots of non-FAANG companies are doing cool stuff with NLP.\n\nDoing side projects / Kaggle imo is a waste of time. Better to focus on interviewing well (coding interview prep, ability to speak intelligently about general topics, in depth knowledge of a few papers).\n\nWould be especially cautious of companies that are too small to do real ML work. You need data, users, and money to do it properly, and unless you have senior SWE/SRE chops to build everything yourself, you will want to make sure that the company has an existing ML pipeline. You should ask whether they have deployed any models in production. If not, probably should look somewhere else.","full_conversation":[{"role":"OP","user_id":"anon_f18f844178f2cc32","comment_id":"g5npil","kind":"post","text":"What can I do to land a job in NLP?\n\nI am about to graduate in Data Science (MSc) in Europe, but when I first enrolled I had no prior experience in programming. I have done many projects during my master's and I am now comfortable with classes, inheritance, machine learning algorithms, and neural networks using pytorch, but I definitely still have a lot to learn. My thesis was in NLP, and I'd like to find a job in the field, but I don't really know the best strategy to get an offer. I surely don't have as much experience as someone with a background in CS or statistics, and I know many companies now require a PhD to be even considered for a position. Which companies should I target? And what could I do to improve my chances of getting a job offer?","timestamp":"2020-04-21T21:06:11+00:00","score":0},{"role":"answerer","user_id":"anon_94590e794483ef4d","comment_id":"fo4hvdn","kind":"comment","text":"The field is hot enough that you will land interviews by bombing out applications via LinkedIn. I would be open-minded about it because lots of non-FAANG companies are doing cool stuff with NLP.\n\nDoing side projects / Kaggle imo is a waste of time. Better to focus on interviewing well (coding interview prep, ability to speak intelligently about general topics, in depth knowledge of a few papers).\n\nWould be especially cautious of companies that are too small to do real ML work. You need data, users, and money to do it properly, and unless you have senior SWE/SRE chops to build everything yourself, you will want to make sure that the company has an existing ML pipeline. You should ask whether they have deployed any models in production. If not, probably should look somewhere else.","timestamp":"2020-04-21T21:31:43+00:00","score":3},{"role":"OP","user_id":"anon_f18f844178f2cc32","comment_id":"fo4mymg","kind":"comment","text":"Thank you for your advice, I was unsure whether taking on side projects would be beneficial, especially since I have a few already linked on LinkedIn. Are there specific fields you'd recommend targeting? I don't have a clear idea of what a job in NLP entails, I gather it varies tremendously depending on whether the job is in consulting, health, etc. , but do you reckon there might be higher demand in a specific field?","timestamp":"2020-04-21T22:16:02+00:00","score":1},{"role":"answerer","user_id":"anon_94590e794483ef4d","comment_id":"fo4wp5j","kind":"comment","text":"It depends on a lot of things, I imagine. I work in Silicon Valley where virtually everyone is shoehorning ML into everything, even if they shouldn’t.\n\nI think that in general, the industry can give you a sense of what type of data is going to be available, but it will be up to the company itself on if they have the data or not. Unless you feel passionate about a certain field, I don’t think it’s a big factor TBH. People I’ve worked with have been in all sorts of unrelated industries, so even if you decide you don’t like it, it won’t pigeonhole you.\n\nActually, the NLP part probably won’t change much from job to job. From my limited experience, everyone is just trying to develop their own vectors or fine-tune on their data, with varying degrees of success. My experience has so far been that NLP is a crapshoot, and even the low-hanging fruit are not easy at all. It’s gotten to the point where I don’t really care what validation accuracy someone gets; if the model doesn’t improve business metrics, the project will get scrapped.\n\nHonestly, as far as your career in ML is concerned, I think that the deciding factor should be whether or not you can see yourself succeeding at the company. It doesn’t matter how many models/demos you build if they don’t go into production and improve the business. That’s why I think money, data, users, and existing infra are the most important considerations in an ML position. They’ll give you the highest chances of being successful.","timestamp":"2020-04-21T23:45:02+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_f18f844178f2cc32","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_94590e794483ef4d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fo4hvdn","thanks_reply_id":"fo4mymg","post_score":0,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_69c02c9e0c3320d5","answerer_user_id":"anon_8fd6e511c5a8dfb1","subreddit":"LanguageTechnology","timestamp":"2020-04-21T23:20:55+00:00","post_id":"g5q3h3","question":"Looking for advice on generating grammatically correct English for haiku generation\n\nAs the title reads, I am looking to generate grammatically correct English text to generate haiku. My first thought is to design a feature-based grammar with NLTK, but it appears that NLTK can only parse with fcfg's, not generate text.\n\nI have no machine learning experience, and it seems like machine learning approaches struggle to maintain strict grammar rules anyway.\n\nWhere should I look to perform such a task? Any and all pointers are very much appreciated!","preferred_answer":"You might try a large (over 1 meg) dataset of proper haiku? I've seen GPT-2 match rhyme and meter a little bit, but it's not perfect. Try to find a large dump of haiku, split them, then fine-tune something like GPT-2 with it. That would be my first direction. It'll be crude, but you might get lucky. Let us know how it goes!","full_conversation":[{"role":"OP","user_id":"anon_69c02c9e0c3320d5","comment_id":"g5q3h3","kind":"post","text":"Looking for advice on generating grammatically correct English for haiku generation\n\nAs the title reads, I am looking to generate grammatically correct English text to generate haiku. My first thought is to design a feature-based grammar with NLTK, but it appears that NLTK can only parse with fcfg's, not generate text.\n\nI have no machine learning experience, and it seems like machine learning approaches struggle to maintain strict grammar rules anyway.\n\nWhere should I look to perform such a task? Any and all pointers are very much appreciated!","timestamp":"2020-04-21T23:20:55+00:00","score":2},{"role":"answerer","user_id":"anon_8fd6e511c5a8dfb1","comment_id":"fo5cdax","kind":"comment","text":"You might try a large (over 1 meg) dataset of proper haiku? I've seen GPT-2 match rhyme and meter a little bit, but it's not perfect. Try to find a large dump of haiku, split them, then fine-tune something like GPT-2 with it. That would be my first direction. It'll be crude, but you might get lucky. Let us know how it goes!","timestamp":"2020-04-22T02:24:59+00:00","score":2},{"role":"OP","user_id":"anon_69c02c9e0c3320d5","comment_id":"fo6wtua","kind":"comment","text":"Thanks for the response. I just did some googling, GPT-2 looks like an approach worth pursuing. However, it looks like it requires a bit of machine learning experience. I have only a week or two to complete this- could you estimate how long it would take to learn to implement GPT-2?","timestamp":"2020-04-22T15:10:05+00:00","score":1},{"role":"answerer","user_id":"anon_8fd6e511c5a8dfb1","comment_id":"fo74vtc","kind":"comment","text":"This [Google Colab](https://colab.research.google.com/drive/1VLG8e7YSEwypxU-noRNhsv5dW4NfTGce#scrollTo=H7LoMj4GA4n_) from /u/minimaxir should get you up and going quickly. You can find more info [here](https://github.com/minimaxir/gpt-2-simple). \n\nHere's a great, [in-depth study](https://www.gwern.net/GPT-2) on GPT-2 + Poetry put together by /u/gwern that you might want to check out as well. \n\nGood luck!","timestamp":"2020-04-22T16:18:11+00:00","score":2},{"role":"OP","user_id":"anon_69c02c9e0c3320d5","comment_id":"fo78979","kind":"comment","text":"Wow, thanks a ton for the links! Greatly appreciated.","timestamp":"2020-04-22T16:45:45+00:00","score":1},{"role":"answerer","user_id":"anon_8fd6e511c5a8dfb1","comment_id":"fo78f4d","kind":"comment","text":"This is the way. ;)","timestamp":"2020-04-22T16:47:05+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_69c02c9e0c3320d5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8fd6e511c5a8dfb1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fo5cdax","thanks_reply_id":"fo6wtua","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_a6ba3cc445e87160","answerer_user_id":"anon_ed710ed039d9d20b","subreddit":"LanguageTechnology","timestamp":"2020-04-23T02:58:28+00:00","post_id":"g6f1ub","question":"Cleaning Wikipedia for Word Embeddings?\n\nHi, \nI have trained a number of fasttext monolingual word embeddings on wikipedia, however I realized that it contains a lot of \"bad\" data such as obscure acronyms and words in different languages.\n\nI am looking to clean up the word embeddings from such words, what would be the ideal approach?\n\n* Option 1: Perform some sort of rule-based detection of bad words.\n* Option 2: Perform a check against a clean dictionary and only include those words\n\nI am leaning towards option 2 because it is easy and will surely give better results, but on the other hand I do not want to limit myself to a vocabulary.\n\nMy final aim is to align the monolingual embeddings to a single vector space.\n\nAdvice appreciated.","preferred_answer":"Just drop words with fewer than N occurrences?","full_conversation":[{"role":"OP","user_id":"anon_a6ba3cc445e87160","comment_id":"g6f1ub","kind":"post","text":"Cleaning Wikipedia for Word Embeddings?\n\nHi, \nI have trained a number of fasttext monolingual word embeddings on wikipedia, however I realized that it contains a lot of \"bad\" data such as obscure acronyms and words in different languages.\n\nI am looking to clean up the word embeddings from such words, what would be the ideal approach?\n\n* Option 1: Perform some sort of rule-based detection of bad words.\n* Option 2: Perform a check against a clean dictionary and only include those words\n\nI am leaning towards option 2 because it is easy and will surely give better results, but on the other hand I do not want to limit myself to a vocabulary.\n\nMy final aim is to align the monolingual embeddings to a single vector space.\n\nAdvice appreciated.","timestamp":"2020-04-23T02:58:28+00:00","score":6},{"role":"answerer","user_id":"anon_ed710ed039d9d20b","comment_id":"fo96a1a","kind":"comment","text":"Just drop words with fewer than N occurrences?","timestamp":"2020-04-23T03:12:07+00:00","score":2},{"role":"OP","user_id":"anon_a6ba3cc445e87160","comment_id":"fo97yf0","kind":"comment","text":"Thanks for the suggestion, that makes sense. How would one decide N? I am thinking of something along the lines of Zipf's law.","timestamp":"2020-04-23T03:30:49+00:00","score":2},{"role":"answerer","user_id":"anon_ed710ed039d9d20b","comment_id":"fo999b0","kind":"comment","text":"Usually I just play around with the data or do some visualizations for making those kinds of decisions. You could write a small script that generates a csv where each row is [N, 100 random words with that N]. Then just scroll down through the csv to find an N that minimizes the number of bad data you're receiving.","timestamp":"2020-04-23T03:45:37+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a6ba3cc445e87160","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ed710ed039d9d20b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fo96a1a","thanks_reply_id":"fo97yf0","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_45027414b43a8f3c","answerer_user_id":"anon_9f4395bc20415e48","subreddit":"LanguageTechnology","timestamp":"2020-04-25T02:19:23+00:00","post_id":"g7low7","question":"Running LDA (gensim + pyLDAvis) on data from a subreddit + newspaper. How to make the results more relevant / insightful?\n\nTotal newbie here, but I’m really impressed by the potential of this field.\n\nI run these data files separately as I want to compare the results.\n\nHowever, the output I get from the pyLDAvis is not helpful at all. Most salient 30 words for a subreddit include stuff like ‘i’m’, ‘said’, ‘asked’, ‘one’, and so on.\n\nI guess all I need is the nouns. How do I filter the rest?","preferred_answer":"I used it once. Try to compose the vocabulary with trigrams or bigrams and add the words that you consider useless in a filter list of words as the stopwords list.","full_conversation":[{"role":"OP","user_id":"anon_45027414b43a8f3c","comment_id":"g7low7","kind":"post","text":"Running LDA (gensim + pyLDAvis) on data from a subreddit + newspaper. How to make the results more relevant / insightful?\n\nTotal newbie here, but I’m really impressed by the potential of this field.\n\nI run these data files separately as I want to compare the results.\n\nHowever, the output I get from the pyLDAvis is not helpful at all. Most salient 30 words for a subreddit include stuff like ‘i’m’, ‘said’, ‘asked’, ‘one’, and so on.\n\nI guess all I need is the nouns. How do I filter the rest?","timestamp":"2020-04-25T02:19:23+00:00","score":5},{"role":"answerer","user_id":"anon_9f4395bc20415e48","comment_id":"foi9ot3","kind":"comment","text":"I used it once. Try to compose the vocabulary with trigrams or bigrams and add the words that you consider useless in a filter list of words as the stopwords list.","timestamp":"2020-04-25T02:27:53+00:00","score":1},{"role":"OP","user_id":"anon_45027414b43a8f3c","comment_id":"foia99u","kind":"comment","text":"Thanks. But the list of useless words can be endless. The more I remove, the more new useless words will appear as most salient?\n\nAlso, do I use spacy for what you suggest?","timestamp":"2020-04-25T02:33:55+00:00","score":1},{"role":"answerer","user_id":"anon_9f4395bc20415e48","comment_id":"foiaxw2","kind":"comment","text":"Usually the list of words is based on what you want to retrieve from data. If you know that some kind of words will not increase the meaning of a sentence is better to take them off, otherwise keep them. When I used it I kept in the ok-list word as \"not\" and \"off\" because they were meaningful in the context.\n\nFor the vocabulary, I used the scikit-learn countervectorizer and set the ngram to (2,2) or (2,3) to keep just bigram or both bigram and trigram.","timestamp":"2020-04-25T02:41:11+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_45027414b43a8f3c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9f4395bc20415e48","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"foi9ot3","thanks_reply_id":"foia99u","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_cb1e54d8bee88183","answerer_user_id":"anon_3e3a068925193de9","subreddit":"LanguageTechnology","timestamp":"2020-04-25T12:25:29+00:00","post_id":"g7soks","question":"If I want to ultimately work in NLP, what should I do after completing DataQuest and working through the NLTK book?\n\nI've always been interested in literature. I got bored of my old teaching job and decided to learn programming. This was in hopes of doing something NLP-related in my off time while also switching careers. I'm not really thinking about \"where\" in NLP I want to end up, just building the skills first and seeing what's out there.\n\nSo, I'm going through DataQuest's \"Data Scientist\" path (it's excellent) as well as the NLTK book. I know the NLTK book is pretty outdated, but it's a good foundational resource, and so much is built with NLTK anyway. Question is, what should I do when I'm done with DataQuest and NLTK?\n\nAndrew Ng's \"Intro to Machine Learning\" course is constantly recommended, so I'm thinking of taking that for the more theoretical stuff. Then I plan to get through [fast.ai](https://fast.ai/)'s more practical \"Deep Learning\" courses, and work through their (however brief) NLP course.\n\nIs that a sensible plan? There's a lot to learn, so what comes after this foundation is laid down? I definitely have some projects in mind I'd like to build, but how should I be continuing my education? I have a bachelor's in Classical Studies and English Literature, so lack a background in computer science.\n\nUdacity's NLP nanodegree looks good, and I definitely got a lot out of their Front-End track some time ago. Don't really know what else is out there, however, or if this is where I should be looking.","preferred_answer":"For NLP, nothing beats Dan Jurafsky's [book](https://web.stanford.edu/~jurafsky/slp3/) in terms of relevancy and conciseness. You can start with it.\n\nUse kaggle competitions (and read others' kernels) to get your hands dirty with real textual data, take your time and make sure you understand when and how to use the tools you see.\n\nNLTK is super useful, once you get more familiar with NLP tasks check SpaCy and HuggingFace for applications.\n\n(I've been working in NLP and scanned tons of materials/courses for self-learning)","full_conversation":[{"role":"OP","user_id":"anon_cb1e54d8bee88183","comment_id":"g7soks","kind":"post","text":"If I want to ultimately work in NLP, what should I do after completing DataQuest and working through the NLTK book?\n\nI've always been interested in literature. I got bored of my old teaching job and decided to learn programming. This was in hopes of doing something NLP-related in my off time while also switching careers. I'm not really thinking about \"where\" in NLP I want to end up, just building the skills first and seeing what's out there.\n\nSo, I'm going through DataQuest's \"Data Scientist\" path (it's excellent) as well as the NLTK book. I know the NLTK book is pretty outdated, but it's a good foundational resource, and so much is built with NLTK anyway. Question is, what should I do when I'm done with DataQuest and NLTK?\n\nAndrew Ng's \"Intro to Machine Learning\" course is constantly recommended, so I'm thinking of taking that for the more theoretical stuff. Then I plan to get through [fast.ai](https://fast.ai/)'s more practical \"Deep Learning\" courses, and work through their (however brief) NLP course.\n\nIs that a sensible plan? There's a lot to learn, so what comes after this foundation is laid down? I definitely have some projects in mind I'd like to build, but how should I be continuing my education? I have a bachelor's in Classical Studies and English Literature, so lack a background in computer science.\n\nUdacity's NLP nanodegree looks good, and I definitely got a lot out of their Front-End track some time ago. Don't really know what else is out there, however, or if this is where I should be looking.","timestamp":"2020-04-25T12:25:29+00:00","score":3},{"role":"answerer","user_id":"anon_3e3a068925193de9","comment_id":"fojii9c","kind":"comment","text":"For NLP, nothing beats Dan Jurafsky's [book](https://web.stanford.edu/~jurafsky/slp3/) in terms of relevancy and conciseness. You can start with it.\n\nUse kaggle competitions (and read others' kernels) to get your hands dirty with real textual data, take your time and make sure you understand when and how to use the tools you see.\n\nNLTK is super useful, once you get more familiar with NLP tasks check SpaCy and HuggingFace for applications.\n\n(I've been working in NLP and scanned tons of materials/courses for self-learning)","timestamp":"2020-04-25T13:37:06+00:00","score":7},{"role":"OP","user_id":"anon_cb1e54d8bee88183","comment_id":"fojuxhf","kind":"comment","text":"Thanks for the input. How does SpaCy compare to NLTK? I know its algorithms are 'opinionated', and many prefer one over the other, but what does SpaCy offer that builds on NLTK? Does anything in SpaCy truly replace parts of NLTK? Also, how does HuggingFace fit into all this?\n\nDid you start with Jurafsky's book? Should that be the next thing I tackle after finishing the NLTK book?","timestamp":"2020-04-25T15:51:48+00:00","score":5},{"role":"answerer","user_id":"anon_3e3a068925193de9","comment_id":"fomjgzs","kind":"comment","text":"Yes, to complete what @sayounh wrote - if NLTK is a toolbox for processing language with various classic NLP methods, SpaCy would be a modern, higher level infrastructure that is also more \"pythonic\" and consistent. It has an accessible built in class to directly extract from each token (~word) multiple layers of information: part of speech, dependency parsing, lemma, and even named entities (using pretrained ML/DL models).\n\nAt this point, before you train your own models you can probably do without HuggingFace.\n\nIf I were you I'd first dive into Jurafsky's book, before anything else. It will give you all the context you need.","timestamp":"2020-04-26T09:12:01+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_cb1e54d8bee88183","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3e3a068925193de9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fojii9c","thanks_reply_id":"fojuxhf","post_score":3,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_93b1b1fcf9dc66c3","answerer_user_id":"anon_739437dfb0738911","subreddit":"LanguageTechnology","timestamp":"2020-05-08T00:17:12+00:00","post_id":"gfikzh","question":"How to use machine learning to improve performance of dictionary-based analysis?\n\nI have a dictionary of words rated for an attribute, concreteness. Right now, I analyze language by just averaging the concreteness scores for all the words in the text. The issue is that just averaging the scores for all the words doesn't capture well the perceived concreteness, because some words matter more than others. \n\nI have a second dataset of several thousands of paragraphs rated as either concrete or abstract. How could I train a model to detect what words matter the most to predict concreteness? Any recommendation on how to do that in Python?","preferred_answer":"Sometimes people using continuous dictionaries cut out the middle third of words if their construct (like concreteness) is bipolar. \n\nYou might want to look into weightings, like TF-IDF. Or you could take another neutral, non finance, corpus, and weight words with higher frequency in finance documents more. \n\nAlso, in my experience concreteness has tiny tiny effect sizes when you code corpora with it. How big an effect are you looking for? \n\nAre you looking at other abstractness/concreteness related variables, like syntactic complexity?","full_conversation":[{"role":"OP","user_id":"anon_93b1b1fcf9dc66c3","comment_id":"gfikzh","kind":"post","text":"How to use machine learning to improve performance of dictionary-based analysis?\n\nI have a dictionary of words rated for an attribute, concreteness. Right now, I analyze language by just averaging the concreteness scores for all the words in the text. The issue is that just averaging the scores for all the words doesn't capture well the perceived concreteness, because some words matter more than others. \n\nI have a second dataset of several thousands of paragraphs rated as either concrete or abstract. How could I train a model to detect what words matter the most to predict concreteness? Any recommendation on how to do that in Python?","timestamp":"2020-05-08T00:17:12+00:00","score":3},{"role":"answerer","user_id":"anon_739437dfb0738911","comment_id":"fpvmvqv","kind":"comment","text":"Sometimes people using continuous dictionaries cut out the middle third of words if their construct (like concreteness) is bipolar. \n\nYou might want to look into weightings, like TF-IDF. Or you could take another neutral, non finance, corpus, and weight words with higher frequency in finance documents more. \n\nAlso, in my experience concreteness has tiny tiny effect sizes when you code corpora with it. How big an effect are you looking for? \n\nAre you looking at other abstractness/concreteness related variables, like syntactic complexity?","timestamp":"2020-05-08T14:25:42+00:00","score":1},{"role":"OP","user_id":"anon_93b1b1fcf9dc66c3","comment_id":"fpvr0g6","kind":"comment","text":"This is so useful, thank you! I do get a small effect using the dictionary. The issue is that differences in means are pretty small so I am looking for a way to remove a lot of the noise. How would you combine T-IDF with concreteness rattings? I am comparing the performance of my dictionary with the Brysbaert et al, and with the Linguistic Category Model.","timestamp":"2020-05-08T15:03:56+00:00","score":1},{"role":"answerer","user_id":"anon_739437dfb0738911","comment_id":"fpvroiz","kind":"comment","text":"Do TF-IDF, use the TF-IDF as weights in a weighted mean of concreteness in the document. \n\nAlternatively, if your task is predicting abstractness of paragraphs, maybe see if the concreteness of the sentence with highest TF-IDF is better than an average of the whole paragraph. Maybe your raters are treating some sentences as more important than others.","timestamp":"2020-05-08T15:09:59+00:00","score":1},{"role":"OP","user_id":"anon_93b1b1fcf9dc66c3","comment_id":"fpvv631","kind":"comment","text":"This is extremely useful, thank you so much for your help.","timestamp":"2020-05-08T15:40:10+00:00","score":1},{"role":"answerer","user_id":"anon_739437dfb0738911","comment_id":"fpvvap1","kind":"comment","text":"No prob, measuring concreteness in corpora is part of my research.","timestamp":"2020-05-08T15:41:16+00:00","score":1},{"role":"OP","user_id":"anon_93b1b1fcf9dc66c3","comment_id":"fpvvwyi","kind":"comment","text":"That's great! I'll stay in touch then.","timestamp":"2020-05-08T15:46:31+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_93b1b1fcf9dc66c3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_739437dfb0738911","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fpvmvqv","thanks_reply_id":"fpvr0g6","post_score":3,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_6907c726bc99571c","answerer_user_id":"anon_cf2300a86291a061","subreddit":"LanguageTechnology","timestamp":"2020-05-08T19:51:09+00:00","post_id":"gg08bt","question":"NLP for Argument Analysis?\n\nHi All,\nI'm going to start a data science graduate program in the fall. I'm interested in doing research in NLP.\n\nI was wondering if anyone has any thoughts on using NLP to classify an argument style to point out logical fallacy.\n\nI'm motivated to build a tool that will provide a critical thinking crutch, that is arguably necessary in apost truth world. \n\nIf anyone has research papers to point out please do!\n\nThanks.","preferred_answer":"You might be pleased to learn there's a whole subfield around this https://en.wikipedia.org/wiki/Argument_mining\n\nI haven't discovered anything for finding logical fallacies, but it sounds like a very difficult problem to solve even with the successful argument mining approaches so far. You do have things like IBM's Project Debator, but that deals with more socio-economic topics and arguments, rather than the looking at logical structures.\n\nAnd here's a paper going into some depth about argument mining:\nhttps://www.ijcai.org/Proceedings/2018/0766.pdf","full_conversation":[{"role":"OP","user_id":"anon_6907c726bc99571c","comment_id":"gg08bt","kind":"post","text":"NLP for Argument Analysis?\n\nHi All,\nI'm going to start a data science graduate program in the fall. I'm interested in doing research in NLP.\n\nI was wondering if anyone has any thoughts on using NLP to classify an argument style to point out logical fallacy.\n\nI'm motivated to build a tool that will provide a critical thinking crutch, that is arguably necessary in apost truth world. \n\nIf anyone has research papers to point out please do!\n\nThanks.","timestamp":"2020-05-08T19:51:09+00:00","score":17},{"role":"answerer","user_id":"anon_cf2300a86291a061","comment_id":"fpxgppf","kind":"comment","text":"You might be pleased to learn there's a whole subfield around this https://en.wikipedia.org/wiki/Argument_mining\n\nI haven't discovered anything for finding logical fallacies, but it sounds like a very difficult problem to solve even with the successful argument mining approaches so far. You do have things like IBM's Project Debator, but that deals with more socio-economic topics and arguments, rather than the looking at logical structures.\n\nAnd here's a paper going into some depth about argument mining:\nhttps://www.ijcai.org/Proceedings/2018/0766.pdf","timestamp":"2020-05-08T23:58:53+00:00","score":7},{"role":"OP","user_id":"anon_6907c726bc99571c","comment_id":"fpxta53","kind":"comment","text":"yessss!!!! Than you thank you!","timestamp":"2020-05-09T01:52:05+00:00","score":2},{"role":"answerer","user_id":"anon_cf2300a86291a061","comment_id":"fpzifuv","kind":"comment","text":"Also, not sure how relevant this is to you but I think it's a pretty hot topic for Universities right now, as Edinburgh is offering funded Phds in argument-mining.","timestamp":"2020-05-09T10:04:31+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6907c726bc99571c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cf2300a86291a061","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fpxgppf","thanks_reply_id":"fpxta53","post_score":17,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_dc3c7995b33aa096","answerer_user_id":"anon_f0b90be1f14be423","subreddit":"LanguageTechnology","timestamp":"2020-05-09T05:32:43+00:00","post_id":"gg9mut","question":"Looking for resources for an overview of NLP\n\nSorry if this isn't the right place for this question! \n\nI'm doing a report about NLP and I was wondering if anyone here could point me towards any good books or websites to draw from. I'm only in my first semester so it's nothing too in depth, I'm hoping to do a sort of overview of the topic and talk about some of its importance/influence.","preferred_answer":"I found this book a few weeks ago, would highly recommend:\n\nhttps://web.stanford.edu/~jurafsky/slp3/\n\nIt's a draft but it was super useful to get going with NLP (I'm a first year student).","full_conversation":[{"role":"OP","user_id":"anon_dc3c7995b33aa096","comment_id":"gg9mut","kind":"post","text":"Looking for resources for an overview of NLP\n\nSorry if this isn't the right place for this question! \n\nI'm doing a report about NLP and I was wondering if anyone here could point me towards any good books or websites to draw from. I'm only in my first semester so it's nothing too in depth, I'm hoping to do a sort of overview of the topic and talk about some of its importance/influence.","timestamp":"2020-05-09T05:32:43+00:00","score":1},{"role":"answerer","user_id":"anon_f0b90be1f14be423","comment_id":"fpzkuef","kind":"comment","text":"I found this book a few weeks ago, would highly recommend:\n\nhttps://web.stanford.edu/~jurafsky/slp3/\n\nIt's a draft but it was super useful to get going with NLP (I'm a first year student).","timestamp":"2020-05-09T10:20:13+00:00","score":2},{"role":"OP","user_id":"anon_dc3c7995b33aa096","comment_id":"fq4rjob","kind":"comment","text":"This looks great, thanks a heap!","timestamp":"2020-05-10T03:48:14+00:00","score":2},{"role":"answerer","user_id":"anon_f0b90be1f14be423","comment_id":"fq6cjwi","kind":"comment","text":"No problem :)","timestamp":"2020-05-10T16:41:33+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_dc3c7995b33aa096","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f0b90be1f14be423","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fpzkuef","thanks_reply_id":"fq4rjob","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_5e0d0a5f7cc643ea","answerer_user_id":"anon_dfdcb5dae7f887a9","subreddit":"LanguageTechnology","timestamp":"2020-05-17T11:29:40+00:00","post_id":"gldv8u","question":"AI authors - how do they work?\n\nI'm interested in how applications, such as the Washington Post's Heliograf, Bloomberg’s Cyborg, and Forbes' Bertie tools work.\n\nIt seems they are primarily used for creating posts about sport scores/outcomes (clearly easier than broader, less data driven topics). How is this sort of thing achieved? I presume it's along the lines of adjusting something like GPT-2 to focus on a topic, or is it much simpler than that?\n\nDoes anyone have any resources they can recommend to learn about influencing text generation so that it addresses a chosen topic?","preferred_answer":"Outside of academic research, the sports game reports you see are generally using templates, but they aren't flat templates, generally they have some logic to make some more sophisticated kinds of expressions. Something like:\n\n if team1.points - team2.points > 20:\n print(\"{} defeated {} by a wide margin\".format(team1, team2))\n\nSo while there is academic research in generative and neural NLG, the articles you see on the web are approaching it more as a problem of statistically aided authorship. \n\nWordsmith by Automated Insights is one tool in this space. I thought they had articles about their technology online but I'm having trouble finding them now; you might get some insight from [their docs](https://wordsmithhelp.readme.io/docs) though.","full_conversation":[{"role":"OP","user_id":"anon_5e0d0a5f7cc643ea","comment_id":"gldv8u","kind":"post","text":"AI authors - how do they work?\n\nI'm interested in how applications, such as the Washington Post's Heliograf, Bloomberg’s Cyborg, and Forbes' Bertie tools work.\n\nIt seems they are primarily used for creating posts about sport scores/outcomes (clearly easier than broader, less data driven topics). How is this sort of thing achieved? I presume it's along the lines of adjusting something like GPT-2 to focus on a topic, or is it much simpler than that?\n\nDoes anyone have any resources they can recommend to learn about influencing text generation so that it addresses a chosen topic?","timestamp":"2020-05-17T11:29:40+00:00","score":1},{"role":"answerer","user_id":"anon_dfdcb5dae7f887a9","comment_id":"fr3twc5","kind":"comment","text":"Outside of academic research, the sports game reports you see are generally using templates, but they aren't flat templates, generally they have some logic to make some more sophisticated kinds of expressions. Something like:\n\n if team1.points - team2.points > 20:\n print(\"{} defeated {} by a wide margin\".format(team1, team2))\n\nSo while there is academic research in generative and neural NLG, the articles you see on the web are approaching it more as a problem of statistically aided authorship. \n\nWordsmith by Automated Insights is one tool in this space. I thought they had articles about their technology online but I'm having trouble finding them now; you might get some insight from [their docs](https://wordsmithhelp.readme.io/docs) though.","timestamp":"2020-05-19T05:29:09+00:00","score":2},{"role":"OP","user_id":"anon_5e0d0a5f7cc643ea","comment_id":"fr4i1tt","kind":"comment","text":"Thanks very much. I presume generative isn't reliable enough then? I know that some news outlets are using NLP to generate drafts which they then manually edit. Would it be fair to assume these were employing ML approaches?","timestamp":"2020-05-19T11:46:55+00:00","score":1},{"role":"answerer","user_id":"anon_dfdcb5dae7f887a9","comment_id":"fr4iow0","kind":"comment","text":"I guess this is an example of what you're referring to, and I'm honestly not sure if they're using statistical models or not, though I suspect many of them are not doing that. (Note that even if you are not using neural nets it can still be NLP!)\n\nhttps://www.bbc.com/news/technology-50779761\n\nIf you want to know more about this, Ehud Reiter is a professor who's been in the field a long time and rights very accessible blog articles often. \n\nhttps://ehudreiter.com/","timestamp":"2020-05-19T11:55:35+00:00","score":2},{"role":"OP","user_id":"anon_5e0d0a5f7cc643ea","comment_id":"fr6tjwg","kind":"comment","text":"That's really helpful, thanks. NLG looks super interesting!","timestamp":"2020-05-20T00:02:38+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_5e0d0a5f7cc643ea","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dfdcb5dae7f887a9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fr3twc5","thanks_reply_id":"fr4i1tt","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_38ee2698f99f6867","answerer_user_id":"anon_df6a21a54000abe9","subreddit":"LanguageTechnology","timestamp":"2020-05-21T19:10:13+00:00","post_id":"go33db","question":"How to learn automatic speech recognition from scratch?\n\nHello, I am a novice learner in the field of machine learning and I have just started picking up basics of python. I am good at statistics. \n\nRecently, I have picked up a research project where I have to use automatic speech recognition (ASR) to translate English language videos into other regional languages. I am very excited about this project but right now, I do not have any knowledge at all about ASR or NLP, for that matter. The project is of long duration so I do have time to start from basics and build my knowledge up to deliver this project well. \n\nCan anyone here guide me on how should I learn ASR from scratch? what resources should I refer? Thanks in advance.","preferred_answer":"I was having trouble with the same thing a couple of months ago.\n\nRight now, there are mainly three approaches that are most popular. Encoder-decoder with attention, CTC (+RNN-T), and Deep Neural Network-HMM hybrids.\n\nIf you got far enough with deep learning, end-to-end models are very easy to get started with, particularly encoder-decoder models. Just going from the papers is easy enough. Check out listen, attend spell to get an introduction: https://arxiv.org/abs/1508.01211\n\nAnd you can check out this one to see for sota-results: https://arxiv.org/abs/1911.08460\n\nFor CTC, to me the paper was pretty difficult to fully visualize. This is a good tutorial that helped me: https://distill.pub/2017/ctc/\nDeep Speech which was mentioned here is based on CTC, and it's less computationally heavy than the other approaches. \n\nDNN-HMM hybrids are the most difficult in my opinion. I recommend starting with Rabiner 1989, and then Speech and Natural Language Processing (book), which also have NLP chapters. Can be especially good to go quickly through the part where they explain how input vectors are made, even for the other approaches (from how speech is formed in your body and how it relates to signal processing techniques that give useful vectors.) More details can then be found in the HTK book. You can easily get a system up and running with Kaldi.","full_conversation":[{"role":"OP","user_id":"anon_38ee2698f99f6867","comment_id":"go33db","kind":"post","text":"How to learn automatic speech recognition from scratch?\n\nHello, I am a novice learner in the field of machine learning and I have just started picking up basics of python. I am good at statistics. \n\nRecently, I have picked up a research project where I have to use automatic speech recognition (ASR) to translate English language videos into other regional languages. I am very excited about this project but right now, I do not have any knowledge at all about ASR or NLP, for that matter. The project is of long duration so I do have time to start from basics and build my knowledge up to deliver this project well. \n\nCan anyone here guide me on how should I learn ASR from scratch? what resources should I refer? Thanks in advance.","timestamp":"2020-05-21T19:10:13+00:00","score":7},{"role":"answerer","user_id":"anon_df6a21a54000abe9","comment_id":"frezyqs","kind":"comment","text":"I was having trouble with the same thing a couple of months ago.\n\nRight now, there are mainly three approaches that are most popular. Encoder-decoder with attention, CTC (+RNN-T), and Deep Neural Network-HMM hybrids.\n\nIf you got far enough with deep learning, end-to-end models are very easy to get started with, particularly encoder-decoder models. Just going from the papers is easy enough. Check out listen, attend spell to get an introduction: https://arxiv.org/abs/1508.01211\n\nAnd you can check out this one to see for sota-results: https://arxiv.org/abs/1911.08460\n\nFor CTC, to me the paper was pretty difficult to fully visualize. This is a good tutorial that helped me: https://distill.pub/2017/ctc/\nDeep Speech which was mentioned here is based on CTC, and it's less computationally heavy than the other approaches. \n\nDNN-HMM hybrids are the most difficult in my opinion. I recommend starting with Rabiner 1989, and then Speech and Natural Language Processing (book), which also have NLP chapters. Can be especially good to go quickly through the part where they explain how input vectors are made, even for the other approaches (from how speech is formed in your body and how it relates to signal processing techniques that give useful vectors.) More details can then be found in the HTK book. You can easily get a system up and running with Kaldi.","timestamp":"2020-05-22T04:10:16+00:00","score":3},{"role":"OP","user_id":"anon_38ee2698f99f6867","comment_id":"frfrien","kind":"comment","text":"Thanks a lot. To be honest, the recommendations are slightly difficult to follow for me right now as I am a novice yet in this field. But I am bookmarking this and will refer this advice when I have built up my knowledge to a sufficiently advanced level. Thanks.","timestamp":"2020-05-22T11:04:31+00:00","score":1},{"role":"answerer","user_id":"anon_df6a21a54000abe9","comment_id":"frftqvt","kind":"comment","text":"Sure thing, no worries! If you need some resources on the deep learning part, I started with the courses from Andrew Ng/deeplearning.ai on Coursera. Covers most of the deep learning background for what I posted and are easy and quick.","timestamp":"2020-05-22T11:38:48+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_38ee2698f99f6867","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_df6a21a54000abe9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"frezyqs","thanks_reply_id":"frfrien","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_7c15c649569b5945","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2020-05-21T21:23:20+00:00","post_id":"go5m5m","question":"2 Questions: What are some of the technical prerequisites for machine translation? And how would one start a project I have in mind (see desc.)?\n\nI hope this post doesn't sound naive or uninformed. NLP is very different from my background, and unrelated to my career aspirations in data analytics. I have two questions:\n\n(1) How much mathematical maturity is needed for natural language processing in general, or does this depend on the particular area of application? I have basic programming Python programming skills and am doing Khan Academy's Probability and Statistics course, so it will be a long road with a steep learning curve -- I am ok with that -- but where does a person start?\n\n(2) But my side project is to write a program that can translate a philosophy text from German to English. I know some German and I know these texts decent. I have a German-English and English-German dictionary of philosophical terms, a dictionary in German and English of terms for this author, and a long book of suggestions for how to translate into English most German words seen in the text. Can you use these resources as training data somehow? This author has 30+ books with many untranslated which is why I am eager to pursue this project. Is this project too ambitious?\n\nOK, thanks everyone! I don't know much about this stuff and am a total noobie, so I would be extremely grateful for your input.","preferred_answer":"If you're just interested in customising a competitive system to get a better result for your domain (philosophy), then I would suggest playing with ModernMT.\n\nAs they offer a competitive system to easily customise, you won't need to gather the very large amount of parallel data you would need just as a base.\n\n(With OpenNMT/SYSTRAN, which is the next best choice, you'd need to somehow jump the chasm and start training seq2seq models just to get basic basic customisation.)\n\nIt has instant adaptation so you'll have a quicker feedback loop when playing around. And it's open-source so when you want to understand how it's working or do everything from scratch, you can. It's also free this month. Main drawback is that it's in Java.\n\nThe 3 basic sources of parallel training data are:\n\n1. human translations\n2. crawled and aligned data\n3. back-translation from monolingual corpora\n\nAll of them have their drawbacks for training machine translation. (I explain more here: https://www.youtube.com/watch?v=21HsKQwVegY)\n\nThere is also an r/machinetranslation sub.","full_conversation":[{"role":"OP","user_id":"anon_7c15c649569b5945","comment_id":"go5m5m","kind":"post","text":"2 Questions: What are some of the technical prerequisites for machine translation? And how would one start a project I have in mind (see desc.)?\n\nI hope this post doesn't sound naive or uninformed. NLP is very different from my background, and unrelated to my career aspirations in data analytics. I have two questions:\n\n(1) How much mathematical maturity is needed for natural language processing in general, or does this depend on the particular area of application? I have basic programming Python programming skills and am doing Khan Academy's Probability and Statistics course, so it will be a long road with a steep learning curve -- I am ok with that -- but where does a person start?\n\n(2) But my side project is to write a program that can translate a philosophy text from German to English. I know some German and I know these texts decent. I have a German-English and English-German dictionary of philosophical terms, a dictionary in German and English of terms for this author, and a long book of suggestions for how to translate into English most German words seen in the text. Can you use these resources as training data somehow? This author has 30+ books with many untranslated which is why I am eager to pursue this project. Is this project too ambitious?\n\nOK, thanks everyone! I don't know much about this stuff and am a total noobie, so I would be extremely grateful for your input.","timestamp":"2020-05-21T21:23:20+00:00","score":4},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"frf8qi1","kind":"comment","text":"If you're just interested in customising a competitive system to get a better result for your domain (philosophy), then I would suggest playing with ModernMT.\n\nAs they offer a competitive system to easily customise, you won't need to gather the very large amount of parallel data you would need just as a base.\n\n(With OpenNMT/SYSTRAN, which is the next best choice, you'd need to somehow jump the chasm and start training seq2seq models just to get basic basic customisation.)\n\nIt has instant adaptation so you'll have a quicker feedback loop when playing around. And it's open-source so when you want to understand how it's working or do everything from scratch, you can. It's also free this month. Main drawback is that it's in Java.\n\nThe 3 basic sources of parallel training data are:\n\n1. human translations\n2. crawled and aligned data\n3. back-translation from monolingual corpora\n\nAll of them have their drawbacks for training machine translation. (I explain more here: https://www.youtube.com/watch?v=21HsKQwVegY)\n\nThere is also an r/machinetranslation sub.","timestamp":"2020-05-22T06:02:27+00:00","score":2},{"role":"OP","user_id":"anon_7c15c649569b5945","comment_id":"frhh3qn","kind":"comment","text":"Thanks for the video. I will check it out. Is ModernMT in Java or just the other two? I only know Python and don't want to spend a lot of time learning another language for this one project.","timestamp":"2020-05-22T20:36:23+00:00","score":1},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"frhofly","kind":"comment","text":"ModernMT outer code is in Java, however, at the core ModernMT actually uses Fairseq, which is in Python, like all the others.\n\nI'm not really suggesting to run it, just play with customisation there, in the UI.","timestamp":"2020-05-22T21:39:40+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7c15c649569b5945","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"frf8qi1","thanks_reply_id":"frhh3qn","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_68f171ac13094569","answerer_user_id":"anon_6310af6b8dce614f","subreddit":"LanguageTechnology","timestamp":"2020-05-22T16:04:22+00:00","post_id":"gom2n7","question":"Is there something like vecs2vec? How to compare similarity of collections of vectors (e.g. 100K sentences from Person X and 100K sentences from Person Y)?\n\nHere's what I mean:\n\nLets say I have a corpus of all the speeches of person X, and a similar corpus for person Y.\n\nI want to 'measure' how similar the views of these 2 people are.\n\nAs someone with some behavioral science experience, I know that frequency is an important factor. For example, the more frequently you drink orange juice, that can lead me to greater confidence that you like orange juice.\n\nSame thing with 'frequently expressed thoughts' - the more frequently you talk about a certain topic or rephrase the same thought, the more I'm certain that you have a stronger attachment to that than other thoughts lets say (speaking loosely).\n\nNow, I had this idea: When you cluster sentences with say T-SNE and you see these clusters of sentences by a person, you begin to see that there are dense clusters and more sparse ones.\n\nCan I somehow compare the similarity of the densest clusters from person X's sentence embeddings to person Y's sentence embeddings? I don't want really to do a 1-to-1 comparison of every single sentence. Instead I want to compare 'general thought similarity' combined with the frequency of that thought.\n\nFor example if someone says \"I like potatoes\" then \"I love potatoes\" then \"I'm passionate about potatoes\" etc. etc. all of those cluster.\n\nThen person Y says \"I like sweet potatoes because they remind me of potatoes\", \"I love the skin of potatoes\" and \"I'm passionate about fried potatoes\", there's another cluster.\n\nThe question is: Is it possible to compare the similarity of all of person X's clusters and person Y's clusters as a whole? Or to compare simply the densest clusters (clusters containing the most similar sentences)?\n\nWould one approach to this be something like:\n\n1. Reduce 100K sentence embeddings down to 1 vector which represents the densest clusters (since frequency is what matters). Or maybe instead of all 100K sentence embeddings, find the densest clusters (say 10K sentences), and take each cluster and create an embedding for it. Is there some vecs2vec approach?\n2. Compare that to person Y's vector?\n\nNote: I know this approach is likely to fail. Why? Because there seem to be too many edge cases I have in mind. Frequent sentences could be about something else entirely not related to that person's views. I understand that. However the point here is to start thinking about the problem, and those other issues I can try to work out as I go along.\n\nEdit: Another challenge is tokenization. How do you tokenize by 'thought expressed' or 'topic'? Sometimes views are expressed over 10 sentences, not just 1. If we split by sentences, we might lose essential elements of the view. Therefore tokenization that is based on shifts of a thought expressed or meaning would be preferable.","preferred_answer":"I'm wondering if you could do something like creat word2vec style embeddings for both corpora separately and then examine a word/topic you are interested in. \n\nRunning with the potato example..say person 1 hates potatoes, you might find the most similar words to 'potato' being 'hate', 'dislike', 'nasty' etc. Person 2 who likes potatoes might have the most similar words be things like 'like', 'enjoy', 'tasty' etc. I doubt the results will actually be that clean, but might be worth a shot.","full_conversation":[{"role":"OP","user_id":"anon_68f171ac13094569","comment_id":"gom2n7","kind":"post","text":"Is there something like vecs2vec? How to compare similarity of collections of vectors (e.g. 100K sentences from Person X and 100K sentences from Person Y)?\n\nHere's what I mean:\n\nLets say I have a corpus of all the speeches of person X, and a similar corpus for person Y.\n\nI want to 'measure' how similar the views of these 2 people are.\n\nAs someone with some behavioral science experience, I know that frequency is an important factor. For example, the more frequently you drink orange juice, that can lead me to greater confidence that you like orange juice.\n\nSame thing with 'frequently expressed thoughts' - the more frequently you talk about a certain topic or rephrase the same thought, the more I'm certain that you have a stronger attachment to that than other thoughts lets say (speaking loosely).\n\nNow, I had this idea: When you cluster sentences with say T-SNE and you see these clusters of sentences by a person, you begin to see that there are dense clusters and more sparse ones.\n\nCan I somehow compare the similarity of the densest clusters from person X's sentence embeddings to person Y's sentence embeddings? I don't want really to do a 1-to-1 comparison of every single sentence. Instead I want to compare 'general thought similarity' combined with the frequency of that thought.\n\nFor example if someone says \"I like potatoes\" then \"I love potatoes\" then \"I'm passionate about potatoes\" etc. etc. all of those cluster.\n\nThen person Y says \"I like sweet potatoes because they remind me of potatoes\", \"I love the skin of potatoes\" and \"I'm passionate about fried potatoes\", there's another cluster.\n\nThe question is: Is it possible to compare the similarity of all of person X's clusters and person Y's clusters as a whole? Or to compare simply the densest clusters (clusters containing the most similar sentences)?\n\nWould one approach to this be something like:\n\n1. Reduce 100K sentence embeddings down to 1 vector which represents the densest clusters (since frequency is what matters). Or maybe instead of all 100K sentence embeddings, find the densest clusters (say 10K sentences), and take each cluster and create an embedding for it. Is there some vecs2vec approach?\n2. Compare that to person Y's vector?\n\nNote: I know this approach is likely to fail. Why? Because there seem to be too many edge cases I have in mind. Frequent sentences could be about something else entirely not related to that person's views. I understand that. However the point here is to start thinking about the problem, and those other issues I can try to work out as I go along.\n\nEdit: Another challenge is tokenization. How do you tokenize by 'thought expressed' or 'topic'? Sometimes views are expressed over 10 sentences, not just 1. If we split by sentences, we might lose essential elements of the view. Therefore tokenization that is based on shifts of a thought expressed or meaning would be preferable.","timestamp":"2020-05-22T16:04:22+00:00","score":5},{"role":"answerer","user_id":"anon_6310af6b8dce614f","comment_id":"frhgj0u","kind":"comment","text":"I'm wondering if you could do something like creat word2vec style embeddings for both corpora separately and then examine a word/topic you are interested in. \n\nRunning with the potato example..say person 1 hates potatoes, you might find the most similar words to 'potato' being 'hate', 'dislike', 'nasty' etc. Person 2 who likes potatoes might have the most similar words be things like 'like', 'enjoy', 'tasty' etc. I doubt the results will actually be that clean, but might be worth a shot.","timestamp":"2020-05-22T20:31:30+00:00","score":1},{"role":"OP","user_id":"anon_68f171ac13094569","comment_id":"frv6954","kind":"comment","text":"A fascinating idea! thank you, I'll explore that.","timestamp":"2020-05-26T12:47:51+00:00","score":1},{"role":"answerer","user_id":"anon_6310af6b8dce614f","comment_id":"frvlh4n","kind":"comment","text":"Of course! The idea is inspired by this work, the authors use a similar method to see how public opinion on a given topic changes over time; [https://arxiv.org/pdf/1904.03352.pdf](https://arxiv.org/pdf/1904.03352.pdf)","timestamp":"2020-05-26T15:13:20+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_68f171ac13094569","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6310af6b8dce614f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"frhgj0u","thanks_reply_id":"frv6954","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_c3ac4e2a82da099e","answerer_user_id":"anon_0d0670714adb801e","subreddit":"LanguageTechnology","timestamp":"2020-05-26T05:18:17+00:00","post_id":"gqqw9z","question":"improving topic clustering on tweets in k-means\n\nHi, I have a dataset of tweets about security and am using doc2vec embeddings to train a k-means classifier and cluster the tweets. I am trying to get clusters such as headline tweets, advertising, researcher tweets, etc. I have used the silhouette score to find what I should use as a k-value. \n\n\nSome clusters have somewhat similar tweets but many are still mixed, are there any other techniques I can use on k-means to help improve these results? or do I just have to change the clustering algorithm?","preferred_answer":"I suggest trying with Fuzzy K-means and even Fuzzy k-means with noise cluster. When you use FKM the hyperparameter m have to be tuned, currently are used 2 or 2,5 but better test different options. Also, if the data are so overlapping and don't have a clear separate structure try one kernel with FKM. Try with fclust package from R. \n\nUse word2vec and tf-idf to get a punctual representation of word vectors, just to check the differences.","full_conversation":[{"role":"OP","user_id":"anon_c3ac4e2a82da099e","comment_id":"gqqw9z","kind":"post","text":"improving topic clustering on tweets in k-means\n\nHi, I have a dataset of tweets about security and am using doc2vec embeddings to train a k-means classifier and cluster the tweets. I am trying to get clusters such as headline tweets, advertising, researcher tweets, etc. I have used the silhouette score to find what I should use as a k-value. \n\n\nSome clusters have somewhat similar tweets but many are still mixed, are there any other techniques I can use on k-means to help improve these results? or do I just have to change the clustering algorithm?","timestamp":"2020-05-26T05:18:17+00:00","score":7},{"role":"answerer","user_id":"anon_0d0670714adb801e","comment_id":"frvmy0t","kind":"comment","text":"I suggest trying with Fuzzy K-means and even Fuzzy k-means with noise cluster. When you use FKM the hyperparameter m have to be tuned, currently are used 2 or 2,5 but better test different options. Also, if the data are so overlapping and don't have a clear separate structure try one kernel with FKM. Try with fclust package from R. \n\nUse word2vec and tf-idf to get a punctual representation of word vectors, just to check the differences.","timestamp":"2020-05-26T15:25:53+00:00","score":1},{"role":"OP","user_id":"anon_c3ac4e2a82da099e","comment_id":"frxgssg","kind":"comment","text":"thanks for the suggestion, I have been using tfidf to rank words in each cluster to get a better idea of differences but getting some overlap","timestamp":"2020-05-27T00:34:10+00:00","score":1},{"role":"answerer","user_id":"anon_0d0670714adb801e","comment_id":"frz5w9u","kind":"comment","text":"You can try with tf-idf + LSA, LSA gives you a better representation because use svd to get eigenvectors, and eliminate the sparse columns.","timestamp":"2020-05-27T13:26:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c3ac4e2a82da099e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0d0670714adb801e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"frvmy0t","thanks_reply_id":"frxgssg","post_score":7,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_706b66fb6d4eaf6a","answerer_user_id":"anon_9450b8c1025769c9","subreddit":"LanguageTechnology","timestamp":"2020-06-01T14:39:44+00:00","post_id":"gulscd","question":"Need help in Automatic Categorization of Author Gender\n\nHello ,\n\nI am doing a project where I have to read an article and then build a program that can predict author gender using n-gram in any language . However after reading the article I am having a difficult time understanding how to do so . I would be forever grateful if anyone can help me understand how to do so . \n\nI understood that i need a training set and test set and that i need to build a profile for each book in the training set however i dont understand what this profile is made of and i dont understand the equation to determine the closest profile. how do i do that with n-gram too . \n\ni am confused by alot of things in the article and as i failed to find partners i ended up having to do this project by myself . thanks for your help . i will also link the article .\n\n[http://vlado.cs.dal.ca/papers/SNLP05J.pdf](http://vlado.cs.dal.ca/papers/SNLP05J.pdf)","preferred_answer":"Sounds like you need machine learning 101, not NLP help. I don't mean this as a knock, I just think by looking into basic ML project design you'll have all your questions answered, since you already seem to grasp the language concepts. Check out scikit learn. They have tons of examples you can adapt your data to.","full_conversation":[{"role":"OP","user_id":"anon_706b66fb6d4eaf6a","comment_id":"gulscd","kind":"post","text":"Need help in Automatic Categorization of Author Gender\n\nHello ,\n\nI am doing a project where I have to read an article and then build a program that can predict author gender using n-gram in any language . However after reading the article I am having a difficult time understanding how to do so . I would be forever grateful if anyone can help me understand how to do so . \n\nI understood that i need a training set and test set and that i need to build a profile for each book in the training set however i dont understand what this profile is made of and i dont understand the equation to determine the closest profile. how do i do that with n-gram too . \n\ni am confused by alot of things in the article and as i failed to find partners i ended up having to do this project by myself . thanks for your help . i will also link the article .\n\n[http://vlado.cs.dal.ca/papers/SNLP05J.pdf](http://vlado.cs.dal.ca/papers/SNLP05J.pdf)","timestamp":"2020-06-01T14:39:44+00:00","score":0},{"role":"answerer","user_id":"anon_9450b8c1025769c9","comment_id":"fsj60y8","kind":"comment","text":"Sounds like you need machine learning 101, not NLP help. I don't mean this as a knock, I just think by looking into basic ML project design you'll have all your questions answered, since you already seem to grasp the language concepts. Check out scikit learn. They have tons of examples you can adapt your data to.","timestamp":"2020-06-01T15:05:08+00:00","score":3},{"role":"OP","user_id":"anon_706b66fb6d4eaf6a","comment_id":"fsk01hj","kind":"comment","text":"hello thanks for your help . I went to the site and saw a few projects that i did like text classification , SVM , KNN , k-means . however i could not connect them to my current project .\n\nIs the profile for each text the frequency of each word in the text ? \n\nwith the equation i dont understand for example what p1(n) is supposed to be .\n\nThanks again and sorry for asking too many questions its just this is a replacment for final exam and i have to pass this course :) .","timestamp":"2020-06-01T19:13:45+00:00","score":1},{"role":"answerer","user_id":"anon_9450b8c1025769c9","comment_id":"fsk0wg8","kind":"comment","text":"I don't have nearly enough context for what you're trying to do, but I'm guessing you are trying to solve for the probability that a given word indicates a male author? Look into naive bayes.","timestamp":"2020-06-01T19:20:49+00:00","score":1},{"role":"OP","user_id":"anon_706b66fb6d4eaf6a","comment_id":"fsk3p9w","kind":"comment","text":"From what I understood is this :-\n1. Training set with books that we already know their author gender .(we build a profile for each book)\n2. Testing set with books where the author gender is unknown .\nFor each book in testing set we build a profile and compare it with all profiles in training set using the equation in the PDF I linked . The smaller the number the better and we pick the profile with the smallest number .\n\nThe things I don't understand in this is the role of the n-gram , profiles , what the parameters in the equation supposed to mean :) \n\nI will ask the professor too but so far he is refusing to help anyone sadly .","timestamp":"2020-06-01T19:43:25+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_706b66fb6d4eaf6a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9450b8c1025769c9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fsj60y8","thanks_reply_id":"fsk01hj","post_score":0,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_a167ac64214a4ff5","answerer_user_id":"anon_f08fc067cc1916be","subreddit":"LanguageTechnology","timestamp":"2020-06-02T07:04:12+00:00","post_id":"gv2hbb","question":"Language Models; BERT vs ELMo - Feature-based approach vs Fine-tuning approach\n\nI've been reading up about language models such as BERT and ELMo. If I understand correctly: ELMo seems to be geared more towards feature extraction for each layer (so during training, different layers can have different pre-trained features concatenated to that layer's input).\n\nBERT is geared more towards fine-tuning so the pre-trained features can be assigned different weights for each layer during training.\n\nWould it be correct to say that BERT's fine-tuning approach is basically feature selection?","preferred_answer":"What constitutes feature selection? \nAll neural networks are essentially learning features, so when you are fine-tuning you are just \"learning a bit more\", you are not, for example, removing feature dimension like in RFE or other in conventional feature selection methods","full_conversation":[{"role":"OP","user_id":"anon_a167ac64214a4ff5","comment_id":"gv2hbb","kind":"post","text":"Language Models; BERT vs ELMo - Feature-based approach vs Fine-tuning approach\n\nI've been reading up about language models such as BERT and ELMo. If I understand correctly: ELMo seems to be geared more towards feature extraction for each layer (so during training, different layers can have different pre-trained features concatenated to that layer's input).\n\nBERT is geared more towards fine-tuning so the pre-trained features can be assigned different weights for each layer during training.\n\nWould it be correct to say that BERT's fine-tuning approach is basically feature selection?","timestamp":"2020-06-02T07:04:12+00:00","score":8},{"role":"answerer","user_id":"anon_f08fc067cc1916be","comment_id":"fsm9urs","kind":"comment","text":"What constitutes feature selection? \nAll neural networks are essentially learning features, so when you are fine-tuning you are just \"learning a bit more\", you are not, for example, removing feature dimension like in RFE or other in conventional feature selection methods","timestamp":"2020-06-02T09:03:25+00:00","score":1},{"role":"OP","user_id":"anon_a167ac64214a4ff5","comment_id":"fsma8c3","kind":"comment","text":"Thanks I see. Is the feature extraction part of ELMo akin to traditional feature extraction/dimension reduction? Or is it still just learning features","timestamp":"2020-06-02T09:09:41+00:00","score":1},{"role":"answerer","user_id":"anon_f08fc067cc1916be","comment_id":"fsmmgab","kind":"comment","text":"ELMo is a neural network just as BERT so what applies here for BERT should apply for ELMo. \n ELMo and BERT works differently than ,for let's say, LSA (dimensionality reduction) or TFIDF(feature extraction) as the latter two do not utilize machine learning, and are hence not \"learning\" is the same sense.\n\nShort answer: just learning features i'd say\n\n[Edit]\nI think my answer is based on the interpretation that feature selection is only when you literally chose a number of features and hence training weighting of features would not qualify as feature selection. I am not sure if I am in the right in this interpretation!","timestamp":"2020-06-02T12:15:34+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a167ac64214a4ff5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f08fc067cc1916be","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fsm9urs","thanks_reply_id":"fsma8c3","post_score":8,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_d797d8ef82665522","answerer_user_id":"anon_e9b500d108854941","subreddit":"LanguageTechnology","timestamp":"2020-06-03T07:01:34+00:00","post_id":"gvoypo","question":"Is it a good idea to do a master's in computational linguistics if I want to be a better NLP engineer?\n\nI have been a data scientist for a year now, in my mid 20s. I mostly do NLP at my job, but lot of it is regex, rules, and bit of ML thrown in between. I have been studying deep learning in NLP by myself and I'm aware of the classical techniques as well. I realised that I enjoy NLP much more than computer vision and structured data. So I want to improve myself and get into NLP role at bigger firms by getting a graduate degree ( eg. MS comp ling at University of Washington). However I have zero background in linguistics. I'm a math and coding person. My biggest concern is I'll be studying a lot of linguistics theory stuff and I'll get bored or worse regret my decision. Right now, if you ask me what an \"adverb\" is I wouldn't know. However I've seen a lot of graduates go on to work at Microsoft, Google etc as NLP engineers which is why I think should still do it.","preferred_answer":"Some programs will want a linguistics background, some want a computational background, some want both, and some are open to initiative. It really depends. I know U Washington wants both, but if you make a good case that you can get yourself up to speed on linguistics they'll hopefully give you a chance.\n\nA textbook people I trust use is \"The Study of Language\" by Yule. Isbn is 978-1108499453","full_conversation":[{"role":"OP","user_id":"anon_d797d8ef82665522","comment_id":"gvoypo","kind":"post","text":"Is it a good idea to do a master's in computational linguistics if I want to be a better NLP engineer?\n\nI have been a data scientist for a year now, in my mid 20s. I mostly do NLP at my job, but lot of it is regex, rules, and bit of ML thrown in between. I have been studying deep learning in NLP by myself and I'm aware of the classical techniques as well. I realised that I enjoy NLP much more than computer vision and structured data. So I want to improve myself and get into NLP role at bigger firms by getting a graduate degree ( eg. MS comp ling at University of Washington). However I have zero background in linguistics. I'm a math and coding person. My biggest concern is I'll be studying a lot of linguistics theory stuff and I'll get bored or worse regret my decision. Right now, if you ask me what an \"adverb\" is I wouldn't know. However I've seen a lot of graduates go on to work at Microsoft, Google etc as NLP engineers which is why I think should still do it.","timestamp":"2020-06-03T07:01:34+00:00","score":16},{"role":"answerer","user_id":"anon_e9b500d108854941","comment_id":"fsq3jyf","kind":"comment","text":"Some programs will want a linguistics background, some want a computational background, some want both, and some are open to initiative. It really depends. I know U Washington wants both, but if you make a good case that you can get yourself up to speed on linguistics they'll hopefully give you a chance.\n\nA textbook people I trust use is \"The Study of Language\" by Yule. Isbn is 978-1108499453","timestamp":"2020-06-03T07:31:38+00:00","score":6},{"role":"OP","user_id":"anon_d797d8ef82665522","comment_id":"fsqdayt","kind":"comment","text":"Thank you. The book looks like a good read. I had another question. I know this is probably subjective but do you think a person who is more interested in the computational side of things, will enjoy the courses or find them interesting?","timestamp":"2020-06-03T10:02:04+00:00","score":2},{"role":"answerer","user_id":"anon_e9b500d108854941","comment_id":"fss1wz3","kind":"comment","text":"Well that describes me and I did. My bachelor's was in CS and I love the linguistics side, I specifically chose a comp linguistics program in a linguistics department over a cs program with ling/NLP courses because I already felt comfortable with my cs knowledge. But like you said in the end it's subjective. \n\nMaybe take a look at that book, see how interesting you find it, and inform your decision with that","timestamp":"2020-06-03T19:22:18+00:00","score":2},{"role":"OP","user_id":"anon_d797d8ef82665522","comment_id":"fss2iqg","kind":"comment","text":"Thank you. That helps.","timestamp":"2020-06-03T19:26:53+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_d797d8ef82665522","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e9b500d108854941","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fsq3jyf","thanks_reply_id":"fsqdayt","post_score":16,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_8399ff60f36004f0","answerer_user_id":"anon_b216de3af3be7ee9","subreddit":"LanguageTechnology","timestamp":"2020-06-03T17:42:44+00:00","post_id":"gvyjpe","question":"Need Help with NER from a URL\n\nI am fairly new with making scripts primarily for NLP/NER/BERT and every other acronym out there. My background is in linked data engineering. \n\nI am trying to find a resource (at this point I don't care if its a Colab notebook or instructions written in crayon) on running NER for a URL and not a block of text. I had something going and its just not working. \n\nI have checked here [https://notebooks.quantumstat.com/](https://notebooks.quantumstat.com/) searched Medium, viewed research publications and anything I did find was not hitting the nail on the head. Any help here would be greatly appreciated.","preferred_answer":"If we're being pedantic, any operation on a URL wouldn't technically be NLP because URLs are not natural language. They do, however, have a very specific structure that you can take advantage of to map a URL into something resembling natural language. If you feed a URL into python's `urllib.parse` it returns `(scheme, netloc, path, params, query, fragment, username, password, hostname, port)`. As a suggestion, you could simply discard the last 4, as well as the scheme. Then consider the netloc as a single token, split the path using slashes as a separator, potentially do another tokenization step using underscores, and discard any file extension, split the query using `parse_qs`, and probably consider the fragment as a single token as well.\n\nThe resulting string of tokens can be used with the NER method of your choice. Will it work flawlessly? Absolutely not. URLs are meant to be non-introspectable *by design*. For many websites, the components in their URLs are actually directly linked to the site's security. But it sounds like you're just trying to figure out a baseline to start from.","full_conversation":[{"role":"OP","user_id":"anon_8399ff60f36004f0","comment_id":"gvyjpe","kind":"post","text":"Need Help with NER from a URL\n\nI am fairly new with making scripts primarily for NLP/NER/BERT and every other acronym out there. My background is in linked data engineering. \n\nI am trying to find a resource (at this point I don't care if its a Colab notebook or instructions written in crayon) on running NER for a URL and not a block of text. I had something going and its just not working. \n\nI have checked here [https://notebooks.quantumstat.com/](https://notebooks.quantumstat.com/) searched Medium, viewed research publications and anything I did find was not hitting the nail on the head. Any help here would be greatly appreciated.","timestamp":"2020-06-03T17:42:44+00:00","score":1},{"role":"answerer","user_id":"anon_b216de3af3be7ee9","comment_id":"fssb7gh","kind":"comment","text":"If we're being pedantic, any operation on a URL wouldn't technically be NLP because URLs are not natural language. They do, however, have a very specific structure that you can take advantage of to map a URL into something resembling natural language. If you feed a URL into python's `urllib.parse` it returns `(scheme, netloc, path, params, query, fragment, username, password, hostname, port)`. As a suggestion, you could simply discard the last 4, as well as the scheme. Then consider the netloc as a single token, split the path using slashes as a separator, potentially do another tokenization step using underscores, and discard any file extension, split the query using `parse_qs`, and probably consider the fragment as a single token as well.\n\nThe resulting string of tokens can be used with the NER method of your choice. Will it work flawlessly? Absolutely not. URLs are meant to be non-introspectable *by design*. For many websites, the components in their URLs are actually directly linked to the site's security. But it sounds like you're just trying to figure out a baseline to start from.","timestamp":"2020-06-03T20:34:25+00:00","score":2},{"role":"OP","user_id":"anon_8399ff60f36004f0","comment_id":"fssc0ba","kind":"comment","text":"Thanks, and yes you're right so let me ask (and excuse the ignorance if it's stupid) could I use a URI then? Assuming the URL's I'm looking at using have one?","timestamp":"2020-06-03T20:40:46+00:00","score":1},{"role":"answerer","user_id":"anon_b216de3af3be7ee9","comment_id":"fssech1","kind":"comment","text":"I'm not sure what you mean by that. Technically, URLs are a subset of URIs, but the distinction is basically nonexistent these days. Can you give an example of what you're referring to?","timestamp":"2020-06-03T20:59:07+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8399ff60f36004f0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b216de3af3be7ee9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fssb7gh","thanks_reply_id":"fssc0ba","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_f730fe99c9388f46","answerer_user_id":"anon_17294bccde9df834","subreddit":"LanguageTechnology","timestamp":"2020-06-08T16:56:06+00:00","post_id":"gz32st","question":"What are some recent paradigm shifts in NLP?\n\nI'm aware of some of the major milestones in NLP in the past decade:\n\n- Word embeddings\n- RNNs\n- Attention\n- Transformers\n\nCan someone who is familiar with NLP research please elaborate and perhaps attempt to explain some paradigm shifts in the field? Even better if you can relate to specific language tasks and applications.\n\nAlso, references for posts/papers are much appreciated!","preferred_answer":"This video may be useful to you [https://www.youtube.com/watch?v=G5lmya6eKtc&t=1507s](https://www.youtube.com/watch?v=G5lmya6eKtc&t=1507s) \n\n A walk through interesting papers and research directions in late 2019/early-2020 on: - model size and computational efficiency, - out-of-domain generalization and model evaluation, - fine-tuning and sample efficiency, - common sense and inductive biases. by Thomas Wolf (Science lead at HuggingFace)","full_conversation":[{"role":"OP","user_id":"anon_f730fe99c9388f46","comment_id":"gz32st","kind":"post","text":"What are some recent paradigm shifts in NLP?\n\nI'm aware of some of the major milestones in NLP in the past decade:\n\n- Word embeddings\n- RNNs\n- Attention\n- Transformers\n\nCan someone who is familiar with NLP research please elaborate and perhaps attempt to explain some paradigm shifts in the field? Even better if you can relate to specific language tasks and applications.\n\nAlso, references for posts/papers are much appreciated!","timestamp":"2020-06-08T16:56:06+00:00","score":21},{"role":"answerer","user_id":"anon_17294bccde9df834","comment_id":"ftdx7ql","kind":"comment","text":"This video may be useful to you [https://www.youtube.com/watch?v=G5lmya6eKtc&t=1507s](https://www.youtube.com/watch?v=G5lmya6eKtc&t=1507s) \n\n A walk through interesting papers and research directions in late 2019/early-2020 on: - model size and computational efficiency, - out-of-domain generalization and model evaluation, - fine-tuning and sample efficiency, - common sense and inductive biases. by Thomas Wolf (Science lead at HuggingFace)","timestamp":"2020-06-08T17:07:37+00:00","score":22},{"role":"OP","user_id":"anon_f730fe99c9388f46","comment_id":"fte6omz","kind":"comment","text":"This sounds like the kind of summary I'm looking for, will go over it, thank you for sharing this!","timestamp":"2020-06-08T18:25:27+00:00","score":1},{"role":"answerer","user_id":"anon_17294bccde9df834","comment_id":"ftfzgrt","kind":"comment","text":"You can also refer these two recently published survey papers on pre-trained language models\n\n\\[1\\] Pre-trained Models for Natural Language Processing: A Survey\n\n\\[2\\] A Survey on Neural Network Language Models","timestamp":"2020-06-09T04:12:41+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_f730fe99c9388f46","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_17294bccde9df834","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ftdx7ql","thanks_reply_id":"fte6omz","post_score":21,"answer_score":22,"preferred_answer_is_top_level":true}} {"user_id":"anon_06d179354a2056f0","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2020-06-09T21:17:55+00:00","post_id":"gzwg7b","question":"How realistic is publishing a corpus in the ACL conference?\n\nI do not specifically work in the field of NLP, but rather an interdisciplinary field of NLP and healthcare.\n\nMost of the conferences that we publish are healthcare-related.\n\nCurrently, we plan to develop a corpus that we would like to publish in a good conference. ACL came to my mind. However, I am not sure if publishing a corpus in ACL is a thing nowadays.\n\nSo I did a bit of research and found that ACL in 2018 published 2 papers about corpora, in 2017 published 2 papers about corpora again. The trend from 2015-2018 sees a reduction in corpora related papers. Is it still wise to submit a corpus-related paper to ACL2021?\n\nDoes ACL publish a corpus?\n\n1. A corpus of non-native written English annotated for Metaphor 2018\n2. An annotated corpus for Machine reading of instructions in wet lab protocols 2018\n3. A Corpus of Compositional Language for Visual Reasoning. 2017\n4. A corpus of annotated revisions for studying argumentative writing 2017\n5. About 7 papers with corpus published 2016\n6. About 9 papers with corpus published 2015","preferred_answer":"Yes absolutely. We have a paper in LREC 2020 that describes a very small dataset. It took a lot of work to get this very small dataset though, and that's what's described in the paper, but we've not done anything with the dataset yet -- but the dataset in itself opens many new avenues for our subfield.","full_conversation":[{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"gzwg7b","kind":"post","text":"How realistic is publishing a corpus in the ACL conference?\n\nI do not specifically work in the field of NLP, but rather an interdisciplinary field of NLP and healthcare.\n\nMost of the conferences that we publish are healthcare-related.\n\nCurrently, we plan to develop a corpus that we would like to publish in a good conference. ACL came to my mind. However, I am not sure if publishing a corpus in ACL is a thing nowadays.\n\nSo I did a bit of research and found that ACL in 2018 published 2 papers about corpora, in 2017 published 2 papers about corpora again. The trend from 2015-2018 sees a reduction in corpora related papers. Is it still wise to submit a corpus-related paper to ACL2021?\n\nDoes ACL publish a corpus?\n\n1. A corpus of non-native written English annotated for Metaphor 2018\n2. An annotated corpus for Machine reading of instructions in wet lab protocols 2018\n3. A Corpus of Compositional Language for Visual Reasoning. 2017\n4. A corpus of annotated revisions for studying argumentative writing 2017\n5. About 7 papers with corpus published 2016\n6. About 9 papers with corpus published 2015","timestamp":"2020-06-09T21:17:55+00:00","score":2},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"fulwmxk","kind":"comment","text":"Yes absolutely. We have a paper in LREC 2020 that describes a very small dataset. It took a lot of work to get this very small dataset though, and that's what's described in the paper, but we've not done anything with the dataset yet -- but the dataset in itself opens many new avenues for our subfield.","timestamp":"2020-06-12T15:47:27+00:00","score":2},{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"fvblv4k","kind":"comment","text":"Thank you for this information. I had one more question. Is this dataset open-access once you publish it in LREC?","timestamp":"2020-06-19T09:28:25+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"fvbzhm9","kind":"comment","text":"You decide :-) \n\n\nYou can write a paper that describes the dataset, and the paper is either OA or non-OA depending on the journal/venue. Most NLP venues are OA by default (see [https://www.aclweb.org/anthology/](https://www.aclweb.org/anthology/)), LREC is no exception.\n\nWhere you publish your dataset description paper is different from where you host/make available the dataset itself. Some people host the dataset on their university websites (and links often get broken). I would advise to put it on Zenodo -- it is hosted by CERN, and guarantees that it won't go down anytime soon. On Zenodo, you can upload the data and then ask people on the README to cite your paper, and even provide a bibtex. Additionally, since you can \"pre-create\" Zenodo repositories, you can even put the link to Zenodo in your paper PDF. This way, it's there forever.\n\nAn example I like is this: [https://zenodo.org/record/3585027](https://zenodo.org/record/3585027)\n\nSome people even go as far as putting the paper PDF in the Zenodo repository itself, if the paper is OA.","timestamp":"2020-06-19T12:47:17+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_06d179354a2056f0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fulwmxk","thanks_reply_id":"fvblv4k","post_score":2,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_555a006a9e2da59a","answerer_user_id":"anon_c256dadebe6a385c","subreddit":"LanguageTechnology","timestamp":"2020-06-16T18:05:13+00:00","post_id":"ha97ia","question":"Where to begin with developing an AI Chatbot teacher assistant.\n\nFinal year CS student who wants to develop a chatbot or virtual assistant system that is able to teach students or holds expertise in a certain subject domain, this will be for a final project, where do I begin? \n\nI have 0 experience in developing Chatbots, NLP and my knowledge in Machine Learning is rudimentary to say the least. The idea is that a student can ask a question about C++ or Educational material on a Lecture i.e. (What is Linked List? give me example of a Linked List?), the bot should be able to give a reasonable response or be able to highlight and educate to the student the prerequisites he needs to understand the subject. Also I don't have much training data to go with apart from my Lecture notes and online PDF Books, will this hold me back? \n\nMore importantly, Is this a very difficult task for someone with no experience in NLP to undertake for 2-3months? Is my vision too big?","preferred_answer":"You might wanna look into some libraries like RASA or Dialogflow. You can learn & implement the bot on the time and you dont need a lot of data too.","full_conversation":[{"role":"OP","user_id":"anon_555a006a9e2da59a","comment_id":"ha97ia","kind":"post","text":"Where to begin with developing an AI Chatbot teacher assistant.\n\nFinal year CS student who wants to develop a chatbot or virtual assistant system that is able to teach students or holds expertise in a certain subject domain, this will be for a final project, where do I begin? \n\nI have 0 experience in developing Chatbots, NLP and my knowledge in Machine Learning is rudimentary to say the least. The idea is that a student can ask a question about C++ or Educational material on a Lecture i.e. (What is Linked List? give me example of a Linked List?), the bot should be able to give a reasonable response or be able to highlight and educate to the student the prerequisites he needs to understand the subject. Also I don't have much training data to go with apart from my Lecture notes and online PDF Books, will this hold me back? \n\nMore importantly, Is this a very difficult task for someone with no experience in NLP to undertake for 2-3months? Is my vision too big?","timestamp":"2020-06-16T18:05:13+00:00","score":1},{"role":"answerer","user_id":"anon_c256dadebe6a385c","comment_id":"fv1g3hl","kind":"comment","text":"You might wanna look into some libraries like RASA or Dialogflow. You can learn & implement the bot on the time and you dont need a lot of data too.","timestamp":"2020-06-16T18:37:30+00:00","score":3},{"role":"OP","user_id":"anon_555a006a9e2da59a","comment_id":"fv4cseb","kind":"comment","text":"Hi, Thanks for the suggestions.\n\nWould you say diagflow or Rasa are able to handle student queries about a educational domain, for example Biological questions? Would I have to code all possible questions? So far I only see business/management usage of Rasa/Diagflow, where the solutions/intents are quite small compared to a chatbot that answers questions about high school or college level Physics or educational Book, since the questions and knowledge domain is vast.\n\nSorry if this is a basic question, I have very little experience in NLP or conversational agents currently.","timestamp":"2020-06-17T13:31:09+00:00","score":1},{"role":"answerer","user_id":"anon_c256dadebe6a385c","comment_id":"fv4inh3","kind":"comment","text":"Yeah you have to code all possible questions as intent, building training data for that might not be feasible. I have worked in Rasa and it is very powerful but encoding entire physics book in a conversational agent might not be very good idea. You have to outline every question(as intent) you want to ask the bot. How many intent are you planning to do?","timestamp":"2020-06-17T14:26:06+00:00","score":2},{"role":"OP","user_id":"anon_555a006a9e2da59a","comment_id":"fv512ck","kind":"comment","text":"Hey, so I will be doing quite a lot of intents, the amount would be roughly equivalent to the amount of possible questions that for example a beginner programmer may ask during introductory python course for example, so this is something I will have to think about, I initially thought if I used some question-answering or Deep Learning that would cut the job down since i presumed that the chatbot would simply just look it up in a book or lecture notes for the solution, but If I understand correctly this is very advanced for a lone beginner especially with the time and resources I have (?) .\n\nThe current vision I have is that the bot should be able to respond to questions such as definitions or\"give example\". I would also like for it to engage with the users by asking them if they need to know any prerequisites and be able to point students to the right material if it can't answer in depth.","timestamp":"2020-06-17T16:59:26+00:00","score":1},{"role":"answerer","user_id":"anon_c256dadebe6a385c","comment_id":"fv559yo","kind":"comment","text":"Yes, you'll need a lot of intents.\n\nQuestion answering based deep learning models like memory networks, seq2seq models don't work as you expect it to work. There is no looking up in books for a solution. Also, training data would be significantly difficult to prepare when we use a deep learning model (rather than rasa).\n\nAnd pointing students to the right material can be done theoretically. But again this will increase the complexity of the project.\n\nI will be honest with you, you won't learn much from this project (apart from using library). More than 90% of your time would be spent on preparing the dataset. A student of mine completed this type of project a few months back and was complaining. So ...","timestamp":"2020-06-17T17:33:29+00:00","score":2},{"role":"OP","user_id":"anon_555a006a9e2da59a","comment_id":"fv5fwv5","kind":"comment","text":"Hi, Thanks for the outlook, I really needed that other perspective, I've had my fair share of doubts about this chatbot project as well, Luckily I am not tied to this project just yet, so there is still options for me to explore other type of projects. There is also option of combining the chatbot with some sort of Web or Mobile dev project, that is if i really wanted to work on chatbots. \n\nIf you don't mind me asking what did your student find tedious? If relevant, did he use Rasa/DiagFlow or did he go for Deep Learning Model type of projects where you may need a large amount of datasets?","timestamp":"2020-06-17T18:55:21+00:00","score":1},{"role":"answerer","user_id":"anon_c256dadebe6a385c","comment_id":"fv726lg","kind":"comment","text":"First he was planning to implement a chatbot using seq2seq model. I suppose he couldn't find domain specific data, he then came up with another idea to use rasa based nlp system and developed bot for healthcare system.","timestamp":"2020-06-18T03:17:10+00:00","score":2},{"role":"OP","user_id":"anon_555a006a9e2da59a","comment_id":"fvdkxb7","kind":"comment","text":"Thanks, and thank you for sharing your insight on this whole matter, your help was deeply appreciated.","timestamp":"2020-06-19T21:02:59+00:00","score":1},{"role":"answerer","user_id":"anon_c256dadebe6a385c","comment_id":"fvenwbq","kind":"comment","text":"Best of luck to you too.","timestamp":"2020-06-20T03:30:43+00:00","score":1}],"n_turns":10,"n_turns_after_thanks":7,"op_metadata":{"user_id":"anon_555a006a9e2da59a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c256dadebe6a385c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fv1g3hl","thanks_reply_id":"fv4cseb","post_score":1,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_984bef45504ef49d","answerer_user_id":"anon_a7632ed6341064f8","subreddit":"LanguageTechnology","timestamp":"2020-06-18T13:19:21+00:00","post_id":"hbefuo","question":"Does anybody know about work regarding the \"answerability\" of interrogative sentences vs. queries?\n\nHi. The title is a little ambiguous, so let me provide a bit of background. I'm currently an MSCS student who's working on natural language processing. Right now my team and I are trying to build a question answering system, and I became curious if there was any work that highlighted how answerable questions are depending on their form.\n\nFor example, it's not hard to notice that interrogative sentences are much easier to answer than the same question being in a short, keyword-based query format (as the definition of something being \"interrogative\" itself means it's a question). Something like \"What are the symptoms of COVID-19?\" is much easier (or at least more natural) to answer than \"COVID-19 symptoms.\"\n\nIs there any work either in the field of linguistics, computational linguistics, or natural language processing that someone may be aware of? Sorry if it sounds like I'm dumping the work, but I've been trying to find something and have been struggling. Any tips are appreciated. Thanks!","preferred_answer":"I'm not entire sure the premise is true, that \"What are the symptoms of COVID-19?\" is easier to answer.","full_conversation":[{"role":"OP","user_id":"anon_984bef45504ef49d","comment_id":"hbefuo","kind":"post","text":"Does anybody know about work regarding the \"answerability\" of interrogative sentences vs. queries?\n\nHi. The title is a little ambiguous, so let me provide a bit of background. I'm currently an MSCS student who's working on natural language processing. Right now my team and I are trying to build a question answering system, and I became curious if there was any work that highlighted how answerable questions are depending on their form.\n\nFor example, it's not hard to notice that interrogative sentences are much easier to answer than the same question being in a short, keyword-based query format (as the definition of something being \"interrogative\" itself means it's a question). Something like \"What are the symptoms of COVID-19?\" is much easier (or at least more natural) to answer than \"COVID-19 symptoms.\"\n\nIs there any work either in the field of linguistics, computational linguistics, or natural language processing that someone may be aware of? Sorry if it sounds like I'm dumping the work, but I've been trying to find something and have been struggling. Any tips are appreciated. Thanks!","timestamp":"2020-06-18T13:19:21+00:00","score":1},{"role":"answerer","user_id":"anon_a7632ed6341064f8","comment_id":"fvc77a4","kind":"comment","text":"I'm not entire sure the premise is true, that \"What are the symptoms of COVID-19?\" is easier to answer.","timestamp":"2020-06-19T14:06:04+00:00","score":1},{"role":"OP","user_id":"anon_984bef45504ef49d","comment_id":"fvdrt6j","kind":"comment","text":"Thanks for the feedback! What makes you say that? I'm curious because it is an entirely heuristic premise and would like to find some more theoretical justification.","timestamp":"2020-06-19T22:06:17+00:00","score":1},{"role":"answerer","user_id":"anon_a7632ed6341064f8","comment_id":"fveg52t","kind":"comment","text":"I think it's hard to prove, just intuitively to me it doesn't seem to. One way of testing it would be this: lets pick a sample of N people (say 100, but could be more limited depending on budget, you could even do this exercise with friends and family) . Now give them a document and both forms of the question, and ask them to specify the answer. Before doing this, do show them some examples with both kinds of queries and correct answers, so they know what they are looking for. Then analyze the quality of the answers as a proxy for whether the question is easier to answer or not. I agree complete word salad is definitely different and harder to answer (https://arxiv.org/abs/1808.09419), but there will be some middle ground which is probably prety understandable to humans.\n\nIncidentally, the linked paper is the closest work I can think of that matches your requirement. Hope it's helpful!","timestamp":"2020-06-20T02:07:06+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_984bef45504ef49d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a7632ed6341064f8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fvc77a4","thanks_reply_id":"fvdrt6j","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_e903838b95c95eca","answerer_user_id":"anon_f8b44f1f0ff1bc32","subreddit":"LanguageTechnology","timestamp":"2020-06-18T17:38:54+00:00","post_id":"hbja98","question":"I Need Preprocessing Recommendations: Translator/Spellcheck (Python)\n\nI know nothing about translating text, especially text that's potentially misspelled. What's your go method of processing text from:\n\n* Bulgarian\n* Chinese (Simplified)\n* Chinese (Traditional)\n* Czech\n* Danish\n* Dutch\n* Finnish\n* French\n* German\n* Greek\n* Hungarian\n* Italian\n* Japanese\n* Korean\n* Norwegian\n* Polish\n* Portuguese\n* Portuguese-Brazil\n* Romanian\n* Russian\n* Spanish-Spain\n* Spanish-Latin America\n* Swedish\n* Thai\n* Turkish\n* Ukrainian\n* Vietnamese\n\ninto English?","preferred_answer":"That's why I was kinda harsh on my first comment. I don't feel like you've done enough research/know enough to be asking these questions. \n\nTake a read through this it will teach you a ton and how to ask good questions [https://web.stanford.edu/\\~jurafsky/slp3/ed3book.pdf](https://web.stanford.edu/~jurafsky/slp3/ed3book.pdf)","full_conversation":[{"role":"OP","user_id":"anon_e903838b95c95eca","comment_id":"hbja98","kind":"post","text":"I Need Preprocessing Recommendations: Translator/Spellcheck (Python)\n\nI know nothing about translating text, especially text that's potentially misspelled. What's your go method of processing text from:\n\n* Bulgarian\n* Chinese (Simplified)\n* Chinese (Traditional)\n* Czech\n* Danish\n* Dutch\n* Finnish\n* French\n* German\n* Greek\n* Hungarian\n* Italian\n* Japanese\n* Korean\n* Norwegian\n* Polish\n* Portuguese\n* Portuguese-Brazil\n* Romanian\n* Russian\n* Spanish-Spain\n* Spanish-Latin America\n* Swedish\n* Thai\n* Turkish\n* Ukrainian\n* Vietnamese\n\ninto English?","timestamp":"2020-06-18T17:38:54+00:00","score":2},{"role":"answerer","user_id":"anon_f8b44f1f0ff1bc32","comment_id":"fvedseu","kind":"comment","text":"That's why I was kinda harsh on my first comment. I don't feel like you've done enough research/know enough to be asking these questions. \n\nTake a read through this it will teach you a ton and how to ask good questions [https://web.stanford.edu/\\~jurafsky/slp3/ed3book.pdf](https://web.stanford.edu/~jurafsky/slp3/ed3book.pdf)","timestamp":"2020-06-20T01:42:28+00:00","score":1},{"role":"OP","user_id":"anon_e903838b95c95eca","comment_id":"fverx7u","kind":"comment","text":"Thank you. Both for the book, and the comments.","timestamp":"2020-06-20T04:17:20+00:00","score":1},{"role":"answerer","user_id":"anon_f8b44f1f0ff1bc32","comment_id":"fvge4m9","kind":"comment","text":"As for spelling issues, gotta fix them. In that book their is an exercise for making a spell checker.","timestamp":"2020-06-20T17:00:08+00:00","score":2},{"role":"OP","user_id":"anon_e903838b95c95eca","comment_id":"fvgyrop","kind":"comment","text":"Awesome thank you.","timestamp":"2020-06-20T20:10:45+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e903838b95c95eca","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f8b44f1f0ff1bc32","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fvedseu","thanks_reply_id":"fverx7u","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_45126f956564b9a6","answerer_user_id":"anon_666cba10211afe55","subreddit":"LanguageTechnology","timestamp":"2020-06-24T14:13:54+00:00","post_id":"hf1q6z","question":"Named Entity Linking (NEL) from Word embeddings (Word2Vec), is it possible?\n\nHello, most NEL algorithms take a text document as input to extract and link entities. What if have the n most similar words of an input term retrieved from a word2vec model? How can I link those words to wikidata or google knowledge graph for example?\n\nExample: If I search \"Microsoft\" and I get \"Apple\" in list of the most similar words form word2vec, it is clear that Apple refers to a famous technology company and it does not refer to a fruit. \n\n\nIs there any library or model out there to be used for this task?\n\nMany many thanks","preferred_answer":"> If I get n most similar words, and all of them are unique names of IT companies\n\nThis is a big \"if\" tbh... it could happen or not, it depends where you are getting your embeddings.\n\n>it would be possible to compute distance between two entities of a knowledge base (what about document-embedding (Google Sentence Encoder) over wikipedia pages???\n\nThis is roughly a more advanced version of the Lesk disambiguation algorithm, where the comparison of ~~glosses~~definitions is based on embeddings. There have been some works on this kind of approaches. (this for instance: http://compling.hss.ntu.edu.sg/events/2018-gwc/pdfs/GWC2018_paper_12.pdf )\n\nOn the other hand, instead of looking for entities that may fall in the same category, you may want to look the IN-OUT embeddings to search for the categories themselves. It is explained here: https://arxiv.org/pdf/1602.01137.pdf\n\nBut the problem is always that one word = one embedding, at least if you stick to word2vec-like ones.","full_conversation":[{"role":"OP","user_id":"anon_45126f956564b9a6","comment_id":"hf1q6z","kind":"post","text":"Named Entity Linking (NEL) from Word embeddings (Word2Vec), is it possible?\n\nHello, most NEL algorithms take a text document as input to extract and link entities. What if have the n most similar words of an input term retrieved from a word2vec model? How can I link those words to wikidata or google knowledge graph for example?\n\nExample: If I search \"Microsoft\" and I get \"Apple\" in list of the most similar words form word2vec, it is clear that Apple refers to a famous technology company and it does not refer to a fruit. \n\n\nIs there any library or model out there to be used for this task?\n\nMany many thanks","timestamp":"2020-06-24T14:13:54+00:00","score":20},{"role":"answerer","user_id":"anon_666cba10211afe55","comment_id":"fvxtgl9","kind":"comment","text":"> If I get n most similar words, and all of them are unique names of IT companies\n\nThis is a big \"if\" tbh... it could happen or not, it depends where you are getting your embeddings.\n\n>it would be possible to compute distance between two entities of a knowledge base (what about document-embedding (Google Sentence Encoder) over wikipedia pages???\n\nThis is roughly a more advanced version of the Lesk disambiguation algorithm, where the comparison of ~~glosses~~definitions is based on embeddings. There have been some works on this kind of approaches. (this for instance: http://compling.hss.ntu.edu.sg/events/2018-gwc/pdfs/GWC2018_paper_12.pdf )\n\nOn the other hand, instead of looking for entities that may fall in the same category, you may want to look the IN-OUT embeddings to search for the categories themselves. It is explained here: https://arxiv.org/pdf/1602.01137.pdf\n\nBut the problem is always that one word = one embedding, at least if you stick to word2vec-like ones.","timestamp":"2020-06-25T09:35:55+00:00","score":2},{"role":"OP","user_id":"anon_45126f956564b9a6","comment_id":"fvxzcvs","kind":"comment","text":"Thank you, I will give a look at the papers you cited. In the meanwhile, i found this:[https://github.com/oracle/pgx-samples/tree/master/entity-linking](https://github.com/oracle/pgx-samples/tree/master/entity-linking) the paper cited there seems to be very close to my idea....\n\nPs: which kind of embedding do you suggest as an alternative to word2vec? To the best of my knowledge, only non-contextual embeddings are able to return a list of n most similar words given an input one","timestamp":"2020-06-25T11:11:36+00:00","score":1},{"role":"answerer","user_id":"anon_666cba10211afe55","comment_id":"fvy3sop","kind":"comment","text":"> only non-contextual embeddings are able to return a list of n most similar words given an input one\n\nNo, you are right, but nothing stops you, given a set of words, to extract their embeddings from a contextual model and then calculate similarities on this \"dictionary\". Eventually you can force a context on the words (like using the definition from wikipedia or a similar resource).","timestamp":"2020-06-25T12:12:24+00:00","score":1},{"role":"OP","user_id":"anon_45126f956564b9a6","comment_id":"fw1j1ek","kind":"comment","text":"In that case I think I would have more than one embedding for every word (one per meaning)","timestamp":"2020-06-26T07:56:34+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_45126f956564b9a6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_666cba10211afe55","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fvxtgl9","thanks_reply_id":"fvxzcvs","post_score":20,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_38ab5d6fb1f9628c","answerer_user_id":"anon_e903838b95c95eca","subreddit":"LanguageTechnology","timestamp":"2020-06-29T19:54:54+00:00","post_id":"hi7bvk","question":"Where do I start with NLP?\n\nI know basics of ML and deep learning. Could you please show me some pointers on how I can master NLP","preferred_answer":"Use the same approach you used for ML and DL? :P\n\n​\n\nBefore diving deep I personally enjoy reading review papers.","full_conversation":[{"role":"OP","user_id":"anon_38ab5d6fb1f9628c","comment_id":"hi7bvk","kind":"post","text":"Where do I start with NLP?\n\nI know basics of ML and deep learning. Could you please show me some pointers on how I can master NLP","timestamp":"2020-06-29T19:54:54+00:00","score":1},{"role":"answerer","user_id":"anon_e903838b95c95eca","comment_id":"fweh10p","kind":"comment","text":"Use the same approach you used for ML and DL? :P\n\n​\n\nBefore diving deep I personally enjoy reading review papers.","timestamp":"2020-06-29T20:04:44+00:00","score":1},{"role":"OP","user_id":"anon_38ab5d6fb1f9628c","comment_id":"fwej1jf","kind":"comment","text":"Thank you! Any learning path/ book you would suggest?","timestamp":"2020-06-29T20:20:51+00:00","score":1},{"role":"answerer","user_id":"anon_e903838b95c95eca","comment_id":"fwejtzp","kind":"comment","text":"I personally enjoy studying the field of Sentiment Analysis.\n\nIf I were you, I'd spend some time surveying NLP in general before selecting a specific sub-field. Below is the most-recent general review paper I could find. :) But anything published in 2019/2020, keyword(s) 'Review Paper' is a gooooood place to start.\n\n[https://www.sciencedirect.com/science/article/pii/S2095809919304928](https://www.sciencedirect.com/science/article/pii/S2095809919304928)","timestamp":"2020-06-29T20:27:12+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_38ab5d6fb1f9628c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e903838b95c95eca","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fweh10p","thanks_reply_id":"fwej1jf","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_50fab9da20adcdc7","answerer_user_id":"anon_0dbbf0a9f144c0ec","subreddit":"LanguageTechnology","timestamp":"2020-06-30T23:44:55+00:00","post_id":"hiz498","question":"How to make a fully-grammatical predictive text system?\n\nI would like to find or make a system which provides a list of suggested words and allows you to select one by clicking on them. The system constructs grammatical sentences. It is ok if it is not as good as a native speaker, committing either an occasional error or being restricted in the sentences it can produce.\n\nHow would I make this? Is there a common library available now which can suggest common and grammatically correct next words, in a sentence?\n\nOr, does such a tool already exist, somewhere?","preferred_answer":"That code's not terribly presentable (and it's in Matlab, which could be an obstacle), but I've put in on github for you, along with the article: [https://github.com/davidwbulger/limerix](https://github.com/davidwbulger/limerix).\n\nActually the pseudocode in the article might suffice anyway, since of course this really isn't quite what you're trying to do, making the fine details less relevant.\n\nIn Backus Naur form, yeah, that's exactly right. So in practice I think it's more useful for things like compilers, where the rules should always be followed. I'm no linguist, but it seems to me that compiling an exhaustive list of the syntactical rules of English would not be feasible. Even if you were content to stick to formal-register \"correct\" English, you'd still have weird one-off constructions such as \"the more we learn, the more questions we have\" that don't obey any general rule.\n\nBut just off the top of my head, based on no expertise whatsoever, I imagine that a B-N style generative model of English could take a partial sentence such as \"It was the best of times, it was the X of times,\" and tell you that X had to be either a noun or an adjective, and suggest some options on that basis.","full_conversation":[{"role":"OP","user_id":"anon_50fab9da20adcdc7","comment_id":"hiz498","kind":"post","text":"How to make a fully-grammatical predictive text system?\n\nI would like to find or make a system which provides a list of suggested words and allows you to select one by clicking on them. The system constructs grammatical sentences. It is ok if it is not as good as a native speaker, committing either an occasional error or being restricted in the sentences it can produce.\n\nHow would I make this? Is there a common library available now which can suggest common and grammatically correct next words, in a sentence?\n\nOr, does such a tool already exist, somewhere?","timestamp":"2020-06-30T23:44:55+00:00","score":4},{"role":"answerer","user_id":"anon_0dbbf0a9f144c0ec","comment_id":"fwy9go9","kind":"comment","text":"That code's not terribly presentable (and it's in Matlab, which could be an obstacle), but I've put in on github for you, along with the article: [https://github.com/davidwbulger/limerix](https://github.com/davidwbulger/limerix).\n\nActually the pseudocode in the article might suffice anyway, since of course this really isn't quite what you're trying to do, making the fine details less relevant.\n\nIn Backus Naur form, yeah, that's exactly right. So in practice I think it's more useful for things like compilers, where the rules should always be followed. I'm no linguist, but it seems to me that compiling an exhaustive list of the syntactical rules of English would not be feasible. Even if you were content to stick to formal-register \"correct\" English, you'd still have weird one-off constructions such as \"the more we learn, the more questions we have\" that don't obey any general rule.\n\nBut just off the top of my head, based on no expertise whatsoever, I imagine that a B-N style generative model of English could take a partial sentence such as \"It was the best of times, it was the X of times,\" and tell you that X had to be either a noun or an adjective, and suggest some options on that basis.","timestamp":"2020-07-04T23:47:47+00:00","score":1},{"role":"OP","user_id":"anon_50fab9da20adcdc7","comment_id":"fx1luys","kind":"comment","text":"Thanks. It will take me a while to drink that in. My cursory understanding was that you had a dictionary of words, and the algorithm selects one at a time based on certain criteria (scansion and rhyme), with a degree of randomness. If I took the time to understand the algorithm better, it would be directly applicable to my own project idea, I just need to use Backus Naur as a way of specifying the grammar rules to be checked, as a selection criterion.\n\nAt least I know what my next step is. I’ll mull this over and get back to you.\n\nThanks very much.","timestamp":"2020-07-05T23:00:14+00:00","score":2},{"role":"answerer","user_id":"anon_0dbbf0a9f144c0ec","comment_id":"fx1mng8","kind":"comment","text":"Yeah don't hesitate to get in touch. You've got my email, and if time allows I'd be happy to get involved.","timestamp":"2020-07-05T23:07:39+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_50fab9da20adcdc7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0dbbf0a9f144c0ec","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fwy9go9","thanks_reply_id":"fx1luys","post_score":4,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_06d179354a2056f0","answerer_user_id":"anon_691d996a306cc0aa","subreddit":"LanguageTechnology","timestamp":"2020-07-01T11:23:07+00:00","post_id":"hj8d0y","question":"Using BERT embedding vectors for Language modeling with multitask learning?\n\nI am considering multitask learning with the main task being the NER combined with an auxiliary language modeling task that might help improve the NER task. The setup will still require using some vector representation of the words for input and I was thinking about using BERT. However, BERT is deeply bidirectional, so the word vectors will encode this contextual information. This means that an auxiliary language modeling task might actually not have an incentive to learn (because the bidirectional contextual information is already stored in BERT vectors). If this assumption (or intuition) stands true, then I should be using some not-so-contextual embeddings like GloVe or Word2Vec. However, using word2vec/GloVe will be so counter-intuitive here since they could be really useful for the NER task at hand.\n\nAm I right there that using BERT vectors might not make any sense if an auxiliary language modeling task is considered for multitasking learning?\n\nI will be grateful for any hints or suggestions.","preferred_answer":"If my understanding is correct, the auxiliary task will only serve as a regularizer for the NER task. So the way I would approach it would be to fit BERT > NER, make sure it overfits, then add any additional tasks. I too work in a low resource domain, and have found some success with additional self-supervised auxiliary tasks for data augmentation/regularization.","full_conversation":[{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"hj8d0y","kind":"post","text":"Using BERT embedding vectors for Language modeling with multitask learning?\n\nI am considering multitask learning with the main task being the NER combined with an auxiliary language modeling task that might help improve the NER task. The setup will still require using some vector representation of the words for input and I was thinking about using BERT. However, BERT is deeply bidirectional, so the word vectors will encode this contextual information. This means that an auxiliary language modeling task might actually not have an incentive to learn (because the bidirectional contextual information is already stored in BERT vectors). If this assumption (or intuition) stands true, then I should be using some not-so-contextual embeddings like GloVe or Word2Vec. However, using word2vec/GloVe will be so counter-intuitive here since they could be really useful for the NER task at hand.\n\nAm I right there that using BERT vectors might not make any sense if an auxiliary language modeling task is considered for multitasking learning?\n\nI will be grateful for any hints or suggestions.","timestamp":"2020-07-01T11:23:07+00:00","score":6},{"role":"answerer","user_id":"anon_691d996a306cc0aa","comment_id":"fwm3ehs","kind":"comment","text":"If my understanding is correct, the auxiliary task will only serve as a regularizer for the NER task. So the way I would approach it would be to fit BERT > NER, make sure it overfits, then add any additional tasks. I too work in a low resource domain, and have found some success with additional self-supervised auxiliary tasks for data augmentation/regularization.","timestamp":"2020-07-01T19:07:32+00:00","score":3},{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"fwm6skt","kind":"comment","text":"Thank you very much for your answer. It was also a recommendation from NAACL19 tutorials from Sebastian Ruder. \n\nI have seen the regularization effect of multitask learning, but not the data augmentation part which is really necessary for low resource datasets.\n\nSince you work in with similar task, how do you exactly approach it? (You may have answered it in your comment, but I am still confused)\n\n​\n\nApproach 1: fine-tune BERT with LM task (unannotated data) > extract BERT vectors > NER > loss\\_NER\n\nApproach 2: BERT > Multi-task (NER + uni or bi LM) > (loss-1\\_NER + loss-2\\_LM)","timestamp":"2020-07-01T19:32:55+00:00","score":3},{"role":"answerer","user_id":"anon_691d996a306cc0aa","comment_id":"fwn6wtn","kind":"comment","text":"Your first approach seems ideal to me. Use self-supervised learning (masked-LM, next sentence prediction) to fine-tune BERT embeddings on your data set; and then freeze the BERT weights and use a RNN+CRF (or some other architecture) for NER.\n\nI would be tempted to give a simpler 'proof-of-concept' a shot too (to get a sense of baseline performance on your dataset). Just take pretrained-BERT and stack a RNN or CRF on top of it, and train the entire model on NER. Backprop will adjust the BERT vectors to fit the NER task here. For small datasets, it should overfit the training data and generalize poorly. This exercise should help you understand what (if any) value the self-supervised embedding learning is adding with your dataset.","timestamp":"2020-07-02T00:20:37+00:00","score":2},{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"fwoc2kv","kind":"comment","text":"Thank you for the clear explanation. \n\nI have the baseline performance metrics for pre-trained-BERT with RNN > CRF on top already. They are good for some entities and not so good for others.\n\nI should try the approach with fine-tuning BERT using masked-LM, freeze the weights and then use RNN > CRF on the top it. \n\nThank you once again.","timestamp":"2020-07-02T08:24:39+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_06d179354a2056f0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_691d996a306cc0aa","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fwm3ehs","thanks_reply_id":"fwm6skt","post_score":6,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_4d67497b30abce5e","answerer_user_id":"anon_3dfc612f2bbd7886","subreddit":"LanguageTechnology","timestamp":"2020-07-14T22:56:58+00:00","post_id":"hrc07y","question":"How to parse a paragraph sentence by sentence\n\nI have a relatively complicated paragraph which I am trying to parse sentence by sentence using a specific rule set. I've tried using the Stanford Parser but I haven't really been able to figure it out. I have a basic level of coding skill and could implement anything if I was told how but I really have no idea how to approach this one my own.\n\nAny chance anyone might be able to help out?\n\nThanks!","preferred_answer":"Yep, don't worry, NLTK documentation isn't the most user friendly.\n\nTo just break your paragraph into a list of sentences, you could simply:\n\n`from nltk import sent_tokenize`\n\n`list_sents = sent_tokenize(\"This is sentence one. The paragraph continues. And on and on.\")`\n\nNow you need the parser part for the trees, to use the Stanford parser you need to download the jars, have java installed etc .... [this blog](https://bbengfort.github.io/snippets/2018/06/22/corenlp-nltk-parses.html) could be a real nice spot to start from. I just tried it out there (code below, with only difference to blog is I changed .draw() to .pretty\\_print() to have it write to my terminal) and it worked!\n\n`from nltk.parse.corenlp import CoreNLPServer, CoreNLPParser`\n\n`jars = ( \"path/to/jar.jar\", \"path/to/models.jar\")`\n\n`with CoreNLPServer(*jars): # context manager handling server start and stop`\n\n`parser = CoreNLPParser()`\n\n`text = \"The runner scored from second on a base hit\"`\n\n`# next(generator) take first item of returned generator`\n\n`parse = next(parser.parse_text(text))`\n\n`parse.pretty_print()`\n\nAlso, are you tied to Stanford NLP? Have you considered SpaCy? Documentation is a bit more user friendly, looks straightforward to load a model and visualise/save a dependency in html [https://spacy.io/usage/visualizers](https://spacy.io/usage/visualizers)\n\nAnyway, hope this helps.\n\n(Post-edit: please excuse the poor formatting of in-line code, total noob to posting on Reddit. I've been a passive redditor for years now and this is my first post!)","full_conversation":[{"role":"OP","user_id":"anon_4d67497b30abce5e","comment_id":"hrc07y","kind":"post","text":"How to parse a paragraph sentence by sentence\n\nI have a relatively complicated paragraph which I am trying to parse sentence by sentence using a specific rule set. I've tried using the Stanford Parser but I haven't really been able to figure it out. I have a basic level of coding skill and could implement anything if I was told how but I really have no idea how to approach this one my own.\n\nAny chance anyone might be able to help out?\n\nThanks!","timestamp":"2020-07-14T22:56:58+00:00","score":1},{"role":"answerer","user_id":"anon_3dfc612f2bbd7886","comment_id":"fy4gpch","kind":"comment","text":"Yep, don't worry, NLTK documentation isn't the most user friendly.\n\nTo just break your paragraph into a list of sentences, you could simply:\n\n`from nltk import sent_tokenize`\n\n`list_sents = sent_tokenize(\"This is sentence one. The paragraph continues. And on and on.\")`\n\nNow you need the parser part for the trees, to use the Stanford parser you need to download the jars, have java installed etc .... [this blog](https://bbengfort.github.io/snippets/2018/06/22/corenlp-nltk-parses.html) could be a real nice spot to start from. I just tried it out there (code below, with only difference to blog is I changed .draw() to .pretty\\_print() to have it write to my terminal) and it worked!\n\n`from nltk.parse.corenlp import CoreNLPServer, CoreNLPParser`\n\n`jars = ( \"path/to/jar.jar\", \"path/to/models.jar\")`\n\n`with CoreNLPServer(*jars): # context manager handling server start and stop`\n\n`parser = CoreNLPParser()`\n\n`text = \"The runner scored from second on a base hit\"`\n\n`# next(generator) take first item of returned generator`\n\n`parse = next(parser.parse_text(text))`\n\n`parse.pretty_print()`\n\nAlso, are you tied to Stanford NLP? Have you considered SpaCy? Documentation is a bit more user friendly, looks straightforward to load a model and visualise/save a dependency in html [https://spacy.io/usage/visualizers](https://spacy.io/usage/visualizers)\n\nAnyway, hope this helps.\n\n(Post-edit: please excuse the poor formatting of in-line code, total noob to posting on Reddit. I've been a passive redditor for years now and this is my first post!)","timestamp":"2020-07-15T07:46:33+00:00","score":2},{"role":"OP","user_id":"anon_4d67497b30abce5e","comment_id":"fy4hetd","kind":"comment","text":"That’s super helpful. Thanks so much. Not at all tired to Stanford parser. I actually had looked into SpaCy but then started down the Stanford rabbit hole. But I’ll definitely take another look at it. But this definitely gives me enough to try and at least get started on this. Thanks again","timestamp":"2020-07-15T07:58:18+00:00","score":1},{"role":"answerer","user_id":"anon_3dfc612f2bbd7886","comment_id":"fy4itbl","kind":"comment","text":"Not at all, glad to help. \nAh it's nice to give Stanford a go. It's an old stalwart of NLP. Spacy is the young kid on the block, hihi. \nBest of luck!","timestamp":"2020-07-15T08:21:41+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4d67497b30abce5e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3dfc612f2bbd7886","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fy4gpch","thanks_reply_id":"fy4hetd","post_score":1,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_2ced49a50982294e","answerer_user_id":"anon_5584bb5782b39e6c","subreddit":"LanguageTechnology","timestamp":"2020-07-19T08:45:11+00:00","post_id":"htxexb","question":"How to include metadata information on sentence embeddings?\n\nSo I have a bunch of sentence level embeddings after processing my sentences through sentence bert.\nNow the issue is I have tags like location , number of people as meta data corresponding to each sentence. Can you suggest me a way to embed these information also as embeddings and hence get a combined embedding.","preferred_answer":"Oh yes you didn’t say that. Here you could use binning technique to convert continuous variables into categorical variables (in this case tokens) and prepend. Btw location , source of doc and rating except for rating others sound categorical. Ratings can be binned easily.","full_conversation":[{"role":"OP","user_id":"anon_2ced49a50982294e","comment_id":"htxexb","kind":"post","text":"How to include metadata information on sentence embeddings?\n\nSo I have a bunch of sentence level embeddings after processing my sentences through sentence bert.\nNow the issue is I have tags like location , number of people as meta data corresponding to each sentence. Can you suggest me a way to embed these information also as embeddings and hence get a combined embedding.","timestamp":"2020-07-19T08:45:11+00:00","score":7},{"role":"answerer","user_id":"anon_5584bb5782b39e6c","comment_id":"fykocth","kind":"comment","text":"Oh yes you didn’t say that. Here you could use binning technique to convert continuous variables into categorical variables (in this case tokens) and prepend. Btw location , source of doc and rating except for rating others sound categorical. Ratings can be binned easily.","timestamp":"2020-07-19T17:09:30+00:00","score":2},{"role":"OP","user_id":"anon_2ced49a50982294e","comment_id":"fykp7vl","kind":"comment","text":"Thanks a lot, That seem to be a way but that would require pretraining the model again and again , in case I keep on getting a new information.\n\nWhat would you suggest if I have tonnes of documents and I need to cluster them into different buckets in unsupervised fashion , keeping these meta data into consideration as well.","timestamp":"2020-07-19T17:17:08+00:00","score":1},{"role":"answerer","user_id":"anon_5584bb5782b39e6c","comment_id":"fykqps2","kind":"comment","text":"1. Why you will have to redo pertaining ? Say You will use a pre-trained version for BERT fine tuned for STS tasks like sentence transformer. Irrespective of how your metadata changes you don’t need to train anything. It generalises nicely. Native categorical feature use them as-is and continuous variables bin them and get embeddings.\n\n2. But If you still want unsupervised bucketing we have two options: \nA. use topic modelling techniques like LSA. \nB. Use LSH to hash NNs.","timestamp":"2020-07-19T17:30:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2ced49a50982294e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5584bb5782b39e6c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fykocth","thanks_reply_id":"fykp7vl","post_score":7,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_06d179354a2056f0","answerer_user_id":"anon_9d1c33bd761bd1e9","subreddit":"LanguageTechnology","timestamp":"2020-07-19T13:23:48+00:00","post_id":"hu0fbt","question":"Is it mandatory that a corpus is separately annotated by two different annotators to measure IAA (Inter Annotator Agreement)?\n\nMedical text corpus annotation is a tough task because it requires expert annotations. Oftentimes, it is really expensive and time-consuming. It is also important that the corpus is annotated by more than one expert and Inter Annotator Agreement is measured (IAA). (IAA = inter-annotator agreement is a measure of how well two (or more) annotators can make the same annotation decision for a certain category.) IAA measures how trustworthy the annotations are and how easy was it to delineate the categories being annotated.\n\nSince annotation is really time-consuming, is it really necessary that an entire corpus is annotated by two separate annotators? Could a midway scenario like this be actually possible? The midway scenario - About 20% of the corpus documents are annotated by two experts and IAA is measured. If IAA is above a certain threshold, the rest of the corpus (80%) is only annotated by one expert annotator.\n\nSource: [https://corpuslinguisticmethods.wordpress.com/2014/01/15/what-is-inter-annotator-agreement/](https://www.researchgate.net/deref/https%3A%2F%2Fcorpuslinguisticmethods.wordpress.com%2F2014%2F01%2F15%2Fwhat-is-inter-annotator-agreement%2F)","preferred_answer":"Unless you have a lot of funding, it's very much customary that only a fraction of the data set is annotated by multiple experts to determine IAA. Also, oftentimes IAA goes up when the annotators are allowed to discuss problematic cases, so in your scenario I would have them do 10%, then work out their differences, and then do another 10% to see what the final IAA looks like.","full_conversation":[{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"hu0fbt","kind":"post","text":"Is it mandatory that a corpus is separately annotated by two different annotators to measure IAA (Inter Annotator Agreement)?\n\nMedical text corpus annotation is a tough task because it requires expert annotations. Oftentimes, it is really expensive and time-consuming. It is also important that the corpus is annotated by more than one expert and Inter Annotator Agreement is measured (IAA). (IAA = inter-annotator agreement is a measure of how well two (or more) annotators can make the same annotation decision for a certain category.) IAA measures how trustworthy the annotations are and how easy was it to delineate the categories being annotated.\n\nSince annotation is really time-consuming, is it really necessary that an entire corpus is annotated by two separate annotators? Could a midway scenario like this be actually possible? The midway scenario - About 20% of the corpus documents are annotated by two experts and IAA is measured. If IAA is above a certain threshold, the rest of the corpus (80%) is only annotated by one expert annotator.\n\nSource: [https://corpuslinguisticmethods.wordpress.com/2014/01/15/what-is-inter-annotator-agreement/](https://www.researchgate.net/deref/https%3A%2F%2Fcorpuslinguisticmethods.wordpress.com%2F2014%2F01%2F15%2Fwhat-is-inter-annotator-agreement%2F)","timestamp":"2020-07-19T13:23:48+00:00","score":1},{"role":"answerer","user_id":"anon_9d1c33bd761bd1e9","comment_id":"fyk1qu5","kind":"comment","text":"Unless you have a lot of funding, it's very much customary that only a fraction of the data set is annotated by multiple experts to determine IAA. Also, oftentimes IAA goes up when the annotators are allowed to discuss problematic cases, so in your scenario I would have them do 10%, then work out their differences, and then do another 10% to see what the final IAA looks like.","timestamp":"2020-07-19T13:31:16+00:00","score":5},{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"fyk728f","kind":"comment","text":"Thank you very much for your answer. It gave me a new perspective about the annotation task where experts re required. \n\nI read a book (Corpus Linguistics and Linguistically Annotated Corpora) by Sandra Kuebler but it does not delve into this topic. So, I will also be grateful if you could share some papers that follow this kind of annotation step. :)","timestamp":"2020-07-19T14:29:03+00:00","score":1},{"role":"answerer","user_id":"anon_9d1c33bd761bd1e9","comment_id":"fylqqt7","kind":"comment","text":"I'm afraid not - I'd have to look for such references myself, as I have done very little reading on this. I'm just reporting on practice. Most of the corpora for which I've actually read the accompanying papers are large-scale and don't involve hand-annotation.\n\nAlso, however, you're free to build your corpus in any way you want. Without an a priori reason why your double-annotated sample does not translate to the rest of the corpus (like insufficient size or balance), this is a perfectly valid approach and if you have a use case you can validate that if you get the results you expect.","timestamp":"2020-07-19T22:52:39+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_06d179354a2056f0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9d1c33bd761bd1e9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fyk1qu5","thanks_reply_id":"fyk728f","post_score":1,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_2e176145b4b8ef1a","answerer_user_id":"anon_ecf71dc2df199832","subreddit":"LanguageTechnology","timestamp":"2020-07-21T10:24:17+00:00","post_id":"hv4z7i","question":"Manually tune tf-idf features in document classification\n\nHello good NLP people, \n\nI am working on a multi-label document classification task with a very small data set (180 labeled documents) and a fairly large number of labels (20).\n\nI found that - ignoring label correlations and turning the problem into 20 binary decision problems - tf-idf features fed into a logistic regression work reasonable well.\n\nSince I have domain knowledge I would like to add manual weighs to some features to increase the prediction accuracy. For instance, assume I train a model to recognise the category \"Gender\", I am thinking about something like this:\n\n '''extract features using tfidf vecorization:''' \n \n vectorizer = TfidfVectorizer(ngram_range = (1,2),min_df = 0.01, max_df = 0.95) \n vect = vectorizer.fit(X_train) \n X_train = vect.transform(X_train) \n X_test = vect.transform(X_test) \n \n '''add additional feature weight''' \n \n weight = 10 \n position = vect.vocabulary_['woman'] \n X_train[:, position] *= weight \n X_test[:, position] *= weight \n position = vect.vocabulary_['gender'] \n X_train[:, position] *= weight \n X_test[:, position] *= weight\n\nThe same weighting is then applied to the vectorised unseen data that I want to predict.\n\nThis indeed gives me a better accuracy on the test set and also leads to better predictions on the unseen data, however, I feel quite uncomfortable to \"manually\" change the data.\n\nI have not found any information about such manual feature tuning. Is this something that can be justified? Or is it generally a bad idea?","preferred_answer":"Instead of tinkering with the TF-IDF weights, another approach lies in engineering features to reflect your domain knowledge. This is often useful when you have high precision rules like \"is\\_gender\\_word\". By splitting this up, your learning algorithm can learn to weigh the general language detection of TF-IDF against your domain knowledge.","full_conversation":[{"role":"OP","user_id":"anon_2e176145b4b8ef1a","comment_id":"hv4z7i","kind":"post","text":"Manually tune tf-idf features in document classification\n\nHello good NLP people, \n\nI am working on a multi-label document classification task with a very small data set (180 labeled documents) and a fairly large number of labels (20).\n\nI found that - ignoring label correlations and turning the problem into 20 binary decision problems - tf-idf features fed into a logistic regression work reasonable well.\n\nSince I have domain knowledge I would like to add manual weighs to some features to increase the prediction accuracy. For instance, assume I train a model to recognise the category \"Gender\", I am thinking about something like this:\n\n '''extract features using tfidf vecorization:''' \n \n vectorizer = TfidfVectorizer(ngram_range = (1,2),min_df = 0.01, max_df = 0.95) \n vect = vectorizer.fit(X_train) \n X_train = vect.transform(X_train) \n X_test = vect.transform(X_test) \n \n '''add additional feature weight''' \n \n weight = 10 \n position = vect.vocabulary_['woman'] \n X_train[:, position] *= weight \n X_test[:, position] *= weight \n position = vect.vocabulary_['gender'] \n X_train[:, position] *= weight \n X_test[:, position] *= weight\n\nThe same weighting is then applied to the vectorised unseen data that I want to predict.\n\nThis indeed gives me a better accuracy on the test set and also leads to better predictions on the unseen data, however, I feel quite uncomfortable to \"manually\" change the data.\n\nI have not found any information about such manual feature tuning. Is this something that can be justified? Or is it generally a bad idea?","timestamp":"2020-07-21T10:24:17+00:00","score":10},{"role":"answerer","user_id":"anon_ecf71dc2df199832","comment_id":"fyrh41u","kind":"comment","text":"Instead of tinkering with the TF-IDF weights, another approach lies in engineering features to reflect your domain knowledge. This is often useful when you have high precision rules like \"is\\_gender\\_word\". By splitting this up, your learning algorithm can learn to weigh the general language detection of TF-IDF against your domain knowledge.","timestamp":"2020-07-21T13:21:57+00:00","score":2},{"role":"OP","user_id":"anon_2e176145b4b8ef1a","comment_id":"g13685m","kind":"comment","text":"Hi u/hapagolucky thanks for your suggestion and please excuse the late reply.\n\nWould you mind elaborating on this a little - or can you give a specific example of how such an engineered feature would look like? \nThank you!","timestamp":"2020-08-11T10:06:55+00:00","score":1},{"role":"answerer","user_id":"anon_ecf71dc2df199832","comment_id":"g17kig9","kind":"comment","text":"I don't know your domain, so I'm just making things up based on the original post. I'm suggesting that you keep your TF-IDF vectors, but you can also add other features that are essentially rules to help identify common or well understood cases. Suppose you think that the presence of \\[\"she\", \"woman\", \"her\"\\] are very indicative. You might make a feature called female\\_word\\_count and set it to the number of times you see those words in the document. Another way to look at this might be something like female\\_word\\_rate where you compute a metric like how often these words come up per 100 words.","timestamp":"2020-08-12T13:02:54+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2e176145b4b8ef1a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ecf71dc2df199832","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fyrh41u","thanks_reply_id":"g13685m","post_score":10,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_51807d26d488276e","answerer_user_id":"anon_2e7d560438e6ad22","subreddit":"LanguageTechnology","timestamp":"2020-07-30T06:30:19+00:00","post_id":"i0h49u","question":"What are the important blogs/magazine/subscription that I need to follow for NLP?\n\nAre there any GOOD magazine or blog that I can follow for latest tutorials and breakthroughs related to NLP & NLU? I already subscribed to “Towards Data Science”, which is under medium.com.","preferred_answer":"The one from Sebastian Ruder is quite famous: http://newsletter.ruder.io. You can sign up for it [here](https://ruder.io/nlp-news/)","full_conversation":[{"role":"OP","user_id":"anon_51807d26d488276e","comment_id":"i0h49u","kind":"post","text":"What are the important blogs/magazine/subscription that I need to follow for NLP?\n\nAre there any GOOD magazine or blog that I can follow for latest tutorials and breakthroughs related to NLP & NLU? I already subscribed to “Towards Data Science”, which is under medium.com.","timestamp":"2020-07-30T06:30:19+00:00","score":41},{"role":"answerer","user_id":"anon_2e7d560438e6ad22","comment_id":"fzpibhn","kind":"comment","text":"The one from Sebastian Ruder is quite famous: http://newsletter.ruder.io. You can sign up for it [here](https://ruder.io/nlp-news/)","timestamp":"2020-07-30T07:38:50+00:00","score":13},{"role":"OP","user_id":"anon_51807d26d488276e","comment_id":"fzpmvrl","kind":"comment","text":"Subscribed it today. Thank you 😊","timestamp":"2020-07-30T08:55:00+00:00","score":2},{"role":"answerer","user_id":"anon_2e7d560438e6ad22","comment_id":"fzpz4cc","kind":"comment","text":"You're welcome :)","timestamp":"2020-07-30T12:07:44+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_51807d26d488276e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2e7d560438e6ad22","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"fzpibhn","thanks_reply_id":"fzpmvrl","post_score":41,"answer_score":13,"preferred_answer_is_top_level":true}} {"user_id":"anon_f9b2de5bd5150b2b","answerer_user_id":"anon_8c1f98a56f37d7e6","subreddit":"LanguageTechnology","timestamp":"2020-08-04T20:29:42+00:00","post_id":"i3r53z","question":"Determining Semantic Equivalence\n\nI am new to NLP, and I am curious whether there is an efficient way, using NLP, to determine the semantic equivalence between words. For instance, in news articles, we may look for articles about the 'United States'. But 'USA', 'US', 'America', 'Trump', etc. may all be seen as relevant and semantically equivalent in the context of the search.\n\nIf a user was searching 'US', but we wanted to show them all articles pertaining to the United States, how would we take 'US' and then determine those semantically equivalent words using NLP?\n\nIs there a known application of NLP that accomplishes this?","preferred_answer":"Your should take a look at Named Entity Recognition (NER) to be able to recognize entities such as US, United States, etc, and then, with Entity Linking (EL or NEL), you can use a knowledge base (e.g. Wikipedia/DBpedia) to group the related entities together.","full_conversation":[{"role":"OP","user_id":"anon_f9b2de5bd5150b2b","comment_id":"i3r53z","kind":"post","text":"Determining Semantic Equivalence\n\nI am new to NLP, and I am curious whether there is an efficient way, using NLP, to determine the semantic equivalence between words. For instance, in news articles, we may look for articles about the 'United States'. But 'USA', 'US', 'America', 'Trump', etc. may all be seen as relevant and semantically equivalent in the context of the search.\n\nIf a user was searching 'US', but we wanted to show them all articles pertaining to the United States, how would we take 'US' and then determine those semantically equivalent words using NLP?\n\nIs there a known application of NLP that accomplishes this?","timestamp":"2020-08-04T20:29:42+00:00","score":1},{"role":"answerer","user_id":"anon_8c1f98a56f37d7e6","comment_id":"g0ex2of","kind":"comment","text":"Your should take a look at Named Entity Recognition (NER) to be able to recognize entities such as US, United States, etc, and then, with Entity Linking (EL or NEL), you can use a knowledge base (e.g. Wikipedia/DBpedia) to group the related entities together.","timestamp":"2020-08-05T05:01:25+00:00","score":2},{"role":"OP","user_id":"anon_f9b2de5bd5150b2b","comment_id":"g0hvlvx","kind":"comment","text":"Thank you for your reply. This is interesting. I will look into this.","timestamp":"2020-08-05T22:31:07+00:00","score":2},{"role":"answerer","user_id":"anon_8c1f98a56f37d7e6","comment_id":"g0it89p","kind":"comment","text":"You're welcome. Have fun!","timestamp":"2020-08-06T03:34:52+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_f9b2de5bd5150b2b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8c1f98a56f37d7e6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g0ex2of","thanks_reply_id":"g0hvlvx","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_2ced49a50982294e","answerer_user_id":"anon_fe79bcfee2cbfeb9","subreddit":"LanguageTechnology","timestamp":"2020-08-06T14:06:02+00:00","post_id":"i4sejc","question":"Text Classification with Meta Tags\n\nCan anyone let me know how can I build a classifier model that takes in sentences and few categorical tags and outputs a class?","preferred_answer":"If you're going to train, say, an LSTM from scratch then in addition to the standard LSTM model that takes words as inputs you could have an encoder for the categorical tags (could be anything, the simplest would be a one-hot vector with 1s at the tags respective indices, but it might be better to feed such a one-hot vector through a small FFN first) and append the encoded vector to the final LSTM hidden state before passing the entire vector into the softmax layer.\n\nIf you're training a transformer from scratch then just putting those tags at the beginning of each input should suffice (I think Grover from UW does this).\n\nHowever, my intuition is that the second method would perform poorly unless you have a lot of data (which is where transformer models shine afaik).\n\nSo maybe the best approach would be to use an encoder for the tags (like I mentioned in the first method), append that to a BERT variant's \\[cls\\] representation and feed that final vector into a softmax layer, and fine-tune the whole network.\n\n(Feel free to let me know if any of this doesn't make sense, I myself am a beginner).","full_conversation":[{"role":"OP","user_id":"anon_2ced49a50982294e","comment_id":"i4sejc","kind":"post","text":"Text Classification with Meta Tags\n\nCan anyone let me know how can I build a classifier model that takes in sentences and few categorical tags and outputs a class?","timestamp":"2020-08-06T14:06:02+00:00","score":2},{"role":"answerer","user_id":"anon_fe79bcfee2cbfeb9","comment_id":"g0karqq","kind":"comment","text":"If you're going to train, say, an LSTM from scratch then in addition to the standard LSTM model that takes words as inputs you could have an encoder for the categorical tags (could be anything, the simplest would be a one-hot vector with 1s at the tags respective indices, but it might be better to feed such a one-hot vector through a small FFN first) and append the encoded vector to the final LSTM hidden state before passing the entire vector into the softmax layer.\n\nIf you're training a transformer from scratch then just putting those tags at the beginning of each input should suffice (I think Grover from UW does this).\n\nHowever, my intuition is that the second method would perform poorly unless you have a lot of data (which is where transformer models shine afaik).\n\nSo maybe the best approach would be to use an encoder for the tags (like I mentioned in the first method), append that to a BERT variant's \\[cls\\] representation and feed that final vector into a softmax layer, and fine-tune the whole network.\n\n(Feel free to let me know if any of this doesn't make sense, I myself am a beginner).","timestamp":"2020-08-06T14:19:19+00:00","score":3},{"role":"OP","user_id":"anon_2ced49a50982294e","comment_id":"g0kbjcl","kind":"comment","text":"Also thanks a lot man for the early reply, it's the people like you who keep this community alive :)","timestamp":"2020-08-06T14:24:34+00:00","score":1},{"role":"answerer","user_id":"anon_fe79bcfee2cbfeb9","comment_id":"g0kee3s","kind":"comment","text":"No problem, be sure to upvote any comments/posts you like!","timestamp":"2020-08-06T14:44:59+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2ced49a50982294e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fe79bcfee2cbfeb9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g0karqq","thanks_reply_id":"g0kbjcl","post_score":2,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_51afa0ee11ea9301","answerer_user_id":"anon_ab2f14f10832011e","subreddit":"LanguageTechnology","timestamp":"2020-08-06T17:44:43+00:00","post_id":"i4wecp","question":"Why researchers are working on POS tagging and NER? In which systems they are being used? Any examples of how can they be useful?","preferred_answer":"**Part-of-Speech tagging** in itself doesn't have direct applications unless you're developing software that improve your writing style (see [Grammarly.com](https://www.grammarly.com) for an application example). Having said that, POS tagging is nowadays a unavoidable pre-processing component in plenty of NLP-based pipelines: summarization, co-reference resolution, chatbots, machine translation, and NER.\n\n**Named Entity Recognition** is used in hundreds of different applications:\n\n* skills in curriculum vitae,\n* amounts and names on bank cheques (with the help of computer vision),\n* name of drugs, tests, doctors, hospitals in clinical notes,\n* name of people in documents that need to be anonymised,\n* name of airports in chatbots that assist you in buying flight tickets,\n* and many many more...","full_conversation":[{"role":"OP","user_id":"anon_51afa0ee11ea9301","comment_id":"i4wecp","kind":"post","text":"Why researchers are working on POS tagging and NER? In which systems they are being used? Any examples of how can they be useful?","timestamp":"2020-08-06T17:44:43+00:00","score":0},{"role":"answerer","user_id":"anon_ab2f14f10832011e","comment_id":"g0n9wqi","kind":"comment","text":"**Part-of-Speech tagging** in itself doesn't have direct applications unless you're developing software that improve your writing style (see [Grammarly.com](https://www.grammarly.com) for an application example). Having said that, POS tagging is nowadays a unavoidable pre-processing component in plenty of NLP-based pipelines: summarization, co-reference resolution, chatbots, machine translation, and NER.\n\n**Named Entity Recognition** is used in hundreds of different applications:\n\n* skills in curriculum vitae,\n* amounts and names on bank cheques (with the help of computer vision),\n* name of drugs, tests, doctors, hospitals in clinical notes,\n* name of people in documents that need to be anonymised,\n* name of airports in chatbots that assist you in buying flight tickets,\n* and many many more...","timestamp":"2020-08-07T05:23:16+00:00","score":2},{"role":"OP","user_id":"anon_51afa0ee11ea9301","comment_id":"g0npeaj","kind":"comment","text":"Thank youu. For the POS, i am still wondering how it can be used to improve the writing style?","timestamp":"2020-08-07T09:16:26+00:00","score":1},{"role":"answerer","user_id":"anon_ab2f14f10832011e","comment_id":"g0ojd8h","kind":"comment","text":"That’s easy. There are several books on the topic, the one I prefer most is “The Sense of Style” by Steven Pinker. In there you will find lots of simple but effective rules, some of which include POS. For example, if you’re a technical writer try to avoid passive forms or manner adverbs.\n\nThe only way you can do that in a computer is by computing the POS of each token written.","timestamp":"2020-08-07T14:16:02+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_51afa0ee11ea9301","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ab2f14f10832011e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g0n9wqi","thanks_reply_id":"g0npeaj","post_score":0,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_cf6c688831ecdbe8","answerer_user_id":"anon_9b3f8d39e358297d","subreddit":"LanguageTechnology","timestamp":"2020-08-07T11:27:43+00:00","post_id":"i5c3p3","question":"A question about the transformer model\n\nHi,\nRecently I've been getting into the aiayn paper and I think I understand the idea behind multi headed self attention except for one thing.\n\n\nThe way I understand it, we have a batch of sequences of embeddings: **[batch, seq_len, emb_size]** and then we apply the multi headed self attention mechanism and we get back a tensor with the almowt the same exact dimensions: **[batch, seq_len, v_size * n_heads]** . And then we apply self attention again on this resulting vector and on the next one etc,\n\n\nBut eventually we end up with the same: [b_s, seq, emb_size]. But the way I understand it a transformer looks at a sequence and outputs a **single** prediction. We need to somehow get rid of the **seq_len** middle dim. \n\n\n\n[b_s, seq_len, emb] > some op I don't understand > [b_s, emb] > [b_s, vocab]\n\n\nDo we just take the: [b_s, -1, emb] and put it through a linear level?","preferred_answer":"In the pure Transformer Paper, we have an Encoder and a Decoder.\n\nThe Encoder just applies the Multihead Attention over and over (with some other layers of course) and you get \\[b\\_s, seq\\_len, emb\\] out of it.\n\nIn the Decoder we do next word prediction. The vector we use for that is \\[b\\_s, -1, emb\\] of the last Transformer Decoder Layer. \n\n\nIn BERT, the vector for the special \\[CLS\\] token is used for some tasks, not the \"last\" vector. \nLet me know if that helped you.","full_conversation":[{"role":"OP","user_id":"anon_cf6c688831ecdbe8","comment_id":"i5c3p3","kind":"post","text":"A question about the transformer model\n\nHi,\nRecently I've been getting into the aiayn paper and I think I understand the idea behind multi headed self attention except for one thing.\n\n\nThe way I understand it, we have a batch of sequences of embeddings: **[batch, seq_len, emb_size]** and then we apply the multi headed self attention mechanism and we get back a tensor with the almowt the same exact dimensions: **[batch, seq_len, v_size * n_heads]** . And then we apply self attention again on this resulting vector and on the next one etc,\n\n\nBut eventually we end up with the same: [b_s, seq, emb_size]. But the way I understand it a transformer looks at a sequence and outputs a **single** prediction. We need to somehow get rid of the **seq_len** middle dim. \n\n\n\n[b_s, seq_len, emb] > some op I don't understand > [b_s, emb] > [b_s, vocab]\n\n\nDo we just take the: [b_s, -1, emb] and put it through a linear level?","timestamp":"2020-08-07T11:27:43+00:00","score":2},{"role":"answerer","user_id":"anon_9b3f8d39e358297d","comment_id":"g0q2j7v","kind":"comment","text":"In the pure Transformer Paper, we have an Encoder and a Decoder.\n\nThe Encoder just applies the Multihead Attention over and over (with some other layers of course) and you get \\[b\\_s, seq\\_len, emb\\] out of it.\n\nIn the Decoder we do next word prediction. The vector we use for that is \\[b\\_s, -1, emb\\] of the last Transformer Decoder Layer. \n\n\nIn BERT, the vector for the special \\[CLS\\] token is used for some tasks, not the \"last\" vector. \nLet me know if that helped you.","timestamp":"2020-08-07T21:18:54+00:00","score":2},{"role":"OP","user_id":"anon_cf6c688831ecdbe8","comment_id":"g0q3dcd","kind":"comment","text":"Thanks! That's exactly what I needed. So we just take the -1.","timestamp":"2020-08-07T21:25:48+00:00","score":1},{"role":"answerer","user_id":"anon_9b3f8d39e358297d","comment_id":"g0q3ngo","kind":"comment","text":"If you need a \"proof\", in the Annotated Transformer Blogpost ([https://nlp.seas.harvard.edu/2018/04/03/attention.html](https://nlp.seas.harvard.edu/2018/04/03/attention.html)) there is this line in the greedy decoding:\n\n prob = model.generator(out[:, -1])","timestamp":"2020-08-07T21:28:09+00:00","score":2},{"role":"OP","user_id":"anon_cf6c688831ecdbe8","comment_id":"g0q41mw","kind":"comment","text":"that's the line I couldn't find! Thank you so much","timestamp":"2020-08-07T21:31:21+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_cf6c688831ecdbe8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9b3f8d39e358297d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g0q2j7v","thanks_reply_id":"g0q3dcd","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_cd9354514552b805","answerer_user_id":"anon_f3e6d35959b6b728","subreddit":"LanguageTechnology","timestamp":"2020-08-12T06:57:10+00:00","post_id":"i8923y","question":"What dictionary to use for OOV (out of vocabulary)?\n\nI'm in the pre-processing stage of a project and I think that the corpus will have a lot of OOV words. I'm reading a lot about using a dictionary to find the OOV words, but what dictionary do I use? Is it domain specific (generating it yourself) or is there a standard dictionary for every language?\n\nThe corpus consists of computer-mediated communication in English.","preferred_answer":"You can generate your own Ontology using a related or portion of the target corpus. Word distribution can be used to gain context on intended meaning. Here is a paper that does that \n\n[https://link.springer.com/chapter/10.1007%2F978-3-030-15640-4\\_4](https://link.springer.com/chapter/10.1007%2F978-3-030-15640-4_4)","full_conversation":[{"role":"OP","user_id":"anon_cd9354514552b805","comment_id":"i8923y","kind":"post","text":"What dictionary to use for OOV (out of vocabulary)?\n\nI'm in the pre-processing stage of a project and I think that the corpus will have a lot of OOV words. I'm reading a lot about using a dictionary to find the OOV words, but what dictionary do I use? Is it domain specific (generating it yourself) or is there a standard dictionary for every language?\n\nThe corpus consists of computer-mediated communication in English.","timestamp":"2020-08-12T06:57:10+00:00","score":2},{"role":"answerer","user_id":"anon_f3e6d35959b6b728","comment_id":"g17dp7u","kind":"comment","text":"You can generate your own Ontology using a related or portion of the target corpus. Word distribution can be used to gain context on intended meaning. Here is a paper that does that \n\n[https://link.springer.com/chapter/10.1007%2F978-3-030-15640-4\\_4](https://link.springer.com/chapter/10.1007%2F978-3-030-15640-4_4)","timestamp":"2020-08-12T11:40:51+00:00","score":1},{"role":"OP","user_id":"anon_cd9354514552b805","comment_id":"g17ekm0","kind":"comment","text":"Sounds good, I will take a closer look. Thanks.\n\nThey used Reddit :)","timestamp":"2020-08-12T11:52:38+00:00","score":2},{"role":"answerer","user_id":"anon_f3e6d35959b6b728","comment_id":"g17pt3f","kind":"comment","text":"Sign of a quality reviewer :D","timestamp":"2020-08-12T13:55:51+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_cd9354514552b805","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f3e6d35959b6b728","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g17dp7u","thanks_reply_id":"g17ekm0","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_86278d1a0fce563f","answerer_user_id":"anon_e0fa98549bf3eac6","subreddit":"LanguageTechnology","timestamp":"2020-08-17T18:40:12+00:00","post_id":"ibk1w4","question":"How to apply for research internship in DL/NLP?\n\nI am a CSE Junior year undergrad from , Mumbai. I am very much interested in NLP/DL and want to try my hands around with a research based projects/research internship . I have done few projects which are over here : [www.github.com/talha1503](https://www.github.com/talha1503) and I am currently working on a Nerual Question Generation project. I have worked previously as a Data Science intern at a risk management company and also have a paper in pre-print. Can anyone please suggest me where to apply and how to reach out to professors/labs?","preferred_answer":"getting internships in Mumbai is always a difficult thing, i feel the colleges don't support internship culture, KJ somaiya for one, does not allow internships extending more than a month, anyway it a BIG plus to have a contact in a company, all MNCs have an academics department, they handle the hiring and internships stuff, contact them, their contact would probably be available with the TPO in your college if this doesn't work then contact people over LinkedIn, send messages there, maybe some someone will reach back, some companies give out mass internships, as I remember in my 3rd year JIO was giving a lot of internships, keep track of such companies, keep talking to your friends, ask them where they are doing their internship, be in contact with pass-outs, maybe they can get you something at their company, check if your college has an internship cell, also try contacting startup incubators, check them on LinkedIn, RIIDL is one such place in KJ, try contacting them.","full_conversation":[{"role":"OP","user_id":"anon_86278d1a0fce563f","comment_id":"ibk1w4","kind":"post","text":"How to apply for research internship in DL/NLP?\n\nI am a CSE Junior year undergrad from , Mumbai. I am very much interested in NLP/DL and want to try my hands around with a research based projects/research internship . I have done few projects which are over here : [www.github.com/talha1503](https://www.github.com/talha1503) and I am currently working on a Nerual Question Generation project. I have worked previously as a Data Science intern at a risk management company and also have a paper in pre-print. Can anyone please suggest me where to apply and how to reach out to professors/labs?","timestamp":"2020-08-17T18:40:12+00:00","score":9},{"role":"answerer","user_id":"anon_e0fa98549bf3eac6","comment_id":"g1wxn91","kind":"comment","text":"getting internships in Mumbai is always a difficult thing, i feel the colleges don't support internship culture, KJ somaiya for one, does not allow internships extending more than a month, anyway it a BIG plus to have a contact in a company, all MNCs have an academics department, they handle the hiring and internships stuff, contact them, their contact would probably be available with the TPO in your college if this doesn't work then contact people over LinkedIn, send messages there, maybe some someone will reach back, some companies give out mass internships, as I remember in my 3rd year JIO was giving a lot of internships, keep track of such companies, keep talking to your friends, ask them where they are doing their internship, be in contact with pass-outs, maybe they can get you something at their company, check if your college has an internship cell, also try contacting startup incubators, check them on LinkedIn, RIIDL is one such place in KJ, try contacting them.","timestamp":"2020-08-17T21:29:21+00:00","score":2},{"role":"OP","user_id":"anon_86278d1a0fce563f","comment_id":"g1y4qlb","kind":"comment","text":"Thank you very much for your reply. I was actually looking for research internships. The methods which you mentioned would be good for getting one in a company, but I am confused as to how should we get q research one.","timestamp":"2020-08-18T03:55:34+00:00","score":2},{"role":"answerer","user_id":"anon_e0fa98549bf3eac6","comment_id":"g20n8rf","kind":"comment","text":"Then you should contact profs at IIT B , get their emails from the iit website, read their papers , select a prof and email him , tell him you are interested in the kind of work he is doing and would like to work with him and ask him about your options ( research internship or research assistant )\nYou can always do in-house internship with your college profs and write a paper on what you work on \nIn case you want to do research internship with companies you need to look at companies with a strong RnD like Arya.ai or any of the giants , but they'll probably entertain you if you have already proved yourself to know your stuff","timestamp":"2020-08-18T18:50:46+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_86278d1a0fce563f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e0fa98549bf3eac6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g1wxn91","thanks_reply_id":"g1y4qlb","post_score":9,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ed9bacecfe3bf167","answerer_user_id":"anon_66c54c3a6c6d9124","subreddit":"LanguageTechnology","timestamp":"2020-08-18T21:14:46+00:00","post_id":"ic9wuu","question":"Trying to build a knowledge graph for Data Science\n\nHi there. I am new to this task but I am trying to build a knowledge graph on some fields (e.g. Data Science, Machine Learning, Statistics).\n\nI know the nodes that I want to have for each one. For instance, for Data Science those would be supervised learning, unsupervised learning, linear regression, data collection, and that kind of terminology (you get the point).\n\nI don't know, however, how to build the edges between these nodes. \n\nSome ideas on how to approach this could be:\n\n\\- Use a pre-existing dataset (does anyone have a link?)\n\n\\- Running some information extraction algorithm on a large corpus treating the topic (maybe a book?)\n\nI'd really appreciate any ideas from more experienced NLP fellows.","preferred_answer":">Use a pre-existing dataset (does anyone have a link?)\n\nWikidata. \nLinear regression (Q10861030) is a subclass of regression analysis (Q208042). Decision tree learning (Q16766476) is a subclass of machine learning (Q2539). \n\n\n>Running some information extraction algorithm on a large corpus treating the topic (maybe a book?)\n\nYes, this works too. Read up about Hearst patterns. If you combine that with a pattern match for {subject} {verb to be} {indefinite article} {predicate} you will hit a lot of concepts very quickly. \n\n\nAnd if you do get some good data out of this that's not already in wikidata, remember to contribute back by adding new entities or relationships so that someone else can build on top of what you did.","full_conversation":[{"role":"OP","user_id":"anon_ed9bacecfe3bf167","comment_id":"ic9wuu","kind":"post","text":"Trying to build a knowledge graph for Data Science\n\nHi there. I am new to this task but I am trying to build a knowledge graph on some fields (e.g. Data Science, Machine Learning, Statistics).\n\nI know the nodes that I want to have for each one. For instance, for Data Science those would be supervised learning, unsupervised learning, linear regression, data collection, and that kind of terminology (you get the point).\n\nI don't know, however, how to build the edges between these nodes. \n\nSome ideas on how to approach this could be:\n\n\\- Use a pre-existing dataset (does anyone have a link?)\n\n\\- Running some information extraction algorithm on a large corpus treating the topic (maybe a book?)\n\nI'd really appreciate any ideas from more experienced NLP fellows.","timestamp":"2020-08-18T21:14:46+00:00","score":6},{"role":"answerer","user_id":"anon_66c54c3a6c6d9124","comment_id":"g21zhiy","kind":"comment","text":">Use a pre-existing dataset (does anyone have a link?)\n\nWikidata. \nLinear regression (Q10861030) is a subclass of regression analysis (Q208042). Decision tree learning (Q16766476) is a subclass of machine learning (Q2539). \n\n\n>Running some information extraction algorithm on a large corpus treating the topic (maybe a book?)\n\nYes, this works too. Read up about Hearst patterns. If you combine that with a pattern match for {subject} {verb to be} {indefinite article} {predicate} you will hit a lot of concepts very quickly. \n\n\nAnd if you do get some good data out of this that's not already in wikidata, remember to contribute back by adding new entities or relationships so that someone else can build on top of what you did.","timestamp":"2020-08-19T01:25:40+00:00","score":5},{"role":"OP","user_id":"anon_ed9bacecfe3bf167","comment_id":"g233emc","kind":"comment","text":"I just checked Wikidata. Thanks a lot for the info!\n\nThe first approach that comes to my mind is to recursively query the entities until you hit another one of your nodes. For example, linear regression is a subclass of regression analysis, which is a facet of machine learning. What do you think? u/solresol\n\nConcerning the second approach, I'll make sure to contribute if anything interest comes out of it!","timestamp":"2020-08-19T09:44:06+00:00","score":1},{"role":"answerer","user_id":"anon_66c54c3a6c6d9124","comment_id":"g23cjxa","kind":"comment","text":"\\> The first approach that comes to my mind is to recursively query the entities \nYou don't need to write this recursion (unless you feel like it). There are query languages for this sort of thing.\n\nCheck out the SparQL query interface -- [query.wikidata.org](https://query.wikidata.org)\n\nYou might want to read a tutorial or two to make sense out of this next sentence, but here goes.\n\nIf you have a clause like \n ?machine\\_learning\\_technique wdt:P31 wd:Q2539 \n(which means, \"find me all the things that are instances of Q2539\") then you can also write \n ?machine\\_learning\\_technique wdt:P31/wdt:P279\\* wd:Q2539 \nwhich means \"find me all the things that are instances of Q2539 or any of its subclasses\".","timestamp":"2020-08-19T12:08:29+00:00","score":2},{"role":"OP","user_id":"anon_ed9bacecfe3bf167","comment_id":"g2452xr","kind":"comment","text":"Ohh that’s wonderful. Thank you so much for your guidance! \n\nI will have a look at the language at the website. \n\nThanks again","timestamp":"2020-08-19T16:07:35+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_ed9bacecfe3bf167","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_66c54c3a6c6d9124","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g21zhiy","thanks_reply_id":"g233emc","post_score":6,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_d2e87c05cec48283","answerer_user_id":"anon_c3a89226b678f87d","subreddit":"LanguageTechnology","timestamp":"2020-08-19T16:24:33+00:00","post_id":"icqvly","question":"Is NLP Looking in the Wrong Direction?\n\nHello all,\n\nLately, I have been doing a lot of reading and research on language development and NLP. I have been endlessly fascinated by it and it has consumed my life. I have no regrets so far!\n\nAs I started to really dive into NLP and languages (mostly just English and programming languages) I was surprised at how little grammar supports semantic understanding and yet it seems to make up the vast majority of how we use NLP tools (If I am wrong here please let me know!).\n\nI am still new to all of this but I was hoping to get some feedback on an article I wrote on Medium. The link below should get you through any paywalls. Let me know if there is any trouble with it. Thanks!\n\n[Why NLP is Looking in the Wrong Direction](https://medium.com/@TypicalHuman/why-nlp-is-looking-in-the-wrong-direction-4e244a9e1a76?source=friends_link&sk=ec57b766f695deb20820a3ffa672fbf3)\n\n​\n\n>**TLDR**: In the article, I explore the challenges with NLU and English as well as the weaknesses of our current tools to achieve understanding. I also outline and introduce a rough method for how we might approach the problem analytically.","preferred_answer":"As a philosophy and psycholinguistics student I found Fodor’s work to be a very interesting nativist take on concepts. https://en.m.wikipedia.org/wiki/Jerry_Fodor\n\nHis book concepts is really good","full_conversation":[{"role":"OP","user_id":"anon_d2e87c05cec48283","comment_id":"icqvly","kind":"post","text":"Is NLP Looking in the Wrong Direction?\n\nHello all,\n\nLately, I have been doing a lot of reading and research on language development and NLP. I have been endlessly fascinated by it and it has consumed my life. I have no regrets so far!\n\nAs I started to really dive into NLP and languages (mostly just English and programming languages) I was surprised at how little grammar supports semantic understanding and yet it seems to make up the vast majority of how we use NLP tools (If I am wrong here please let me know!).\n\nI am still new to all of this but I was hoping to get some feedback on an article I wrote on Medium. The link below should get you through any paywalls. Let me know if there is any trouble with it. Thanks!\n\n[Why NLP is Looking in the Wrong Direction](https://medium.com/@TypicalHuman/why-nlp-is-looking-in-the-wrong-direction-4e244a9e1a76?source=friends_link&sk=ec57b766f695deb20820a3ffa672fbf3)\n\n​\n\n>**TLDR**: In the article, I explore the challenges with NLU and English as well as the weaknesses of our current tools to achieve understanding. I also outline and introduce a rough method for how we might approach the problem analytically.","timestamp":"2020-08-19T16:24:33+00:00","score":19},{"role":"answerer","user_id":"anon_c3a89226b678f87d","comment_id":"g24npgm","kind":"comment","text":"As a philosophy and psycholinguistics student I found Fodor’s work to be a very interesting nativist take on concepts. https://en.m.wikipedia.org/wiki/Jerry_Fodor\n\nHis book concepts is really good","timestamp":"2020-08-19T18:33:35+00:00","score":3},{"role":"OP","user_id":"anon_d2e87c05cec48283","comment_id":"g2530a3","kind":"comment","text":"Thanks for that link! I just read the intro but it sounds like this guy thinks a lot of the same way I do! \n\nHave you ever heard of ideasthesia by Dr. Danko Nickolic?","timestamp":"2020-08-19T20:29:24+00:00","score":1},{"role":"answerer","user_id":"anon_c3a89226b678f87d","comment_id":"g281kab","kind":"comment","text":"I have not. Lemme know if you have reading recs","timestamp":"2020-08-20T15:43:11+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d2e87c05cec48283","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c3a89226b678f87d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g24npgm","thanks_reply_id":"g2530a3","post_score":19,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_fdd57f8ad40abbd1","answerer_user_id":"anon_8d8c3c999bd13f93","subreddit":"LanguageTechnology","timestamp":"2020-08-25T00:13:01+00:00","post_id":"ig19za","question":"Bootstrapping custom Spacy model for NER, Could you give me advice on my approach to label my data? Possible to automate annotation step?\n\nI'm trying to improve NER for parsing resumes, I'm currently building on a training set from a forked resume parsing repo. I have 2500 resumes that have been scraped from a student website, the data is well-formatted as it was accessed through an online API, in reality, the resumes I will be receiving will not be this well-formatted, most likely pdf. \n\nBecause the 2500 resumes are so well formatted I was contemplating converting the JSON data into plain text to simulate a real resume, and then mapping the entities from the JSON, finding the associated span of the entity. Finally resulting in a another JSON containing:\n\nresume_txt : plain txt\nentities: list of entities, span, text of entity\n\nIs this a logical approach?","preferred_answer":"Here’s the workflow I used:\n\n1.\tConvert PDF to image using pdf2image\n2.\tConvert image to raw text using PyTesseract\n3.\tUse Explosion’s prodigy (paid) software to create annotation dataset. \n4.\tTrain and export spaCy NER model using prodigy. \n5.\tUse custom NER model on new PDFs.","full_conversation":[{"role":"OP","user_id":"anon_fdd57f8ad40abbd1","comment_id":"ig19za","kind":"post","text":"Bootstrapping custom Spacy model for NER, Could you give me advice on my approach to label my data? Possible to automate annotation step?\n\nI'm trying to improve NER for parsing resumes, I'm currently building on a training set from a forked resume parsing repo. I have 2500 resumes that have been scraped from a student website, the data is well-formatted as it was accessed through an online API, in reality, the resumes I will be receiving will not be this well-formatted, most likely pdf. \n\nBecause the 2500 resumes are so well formatted I was contemplating converting the JSON data into plain text to simulate a real resume, and then mapping the entities from the JSON, finding the associated span of the entity. Finally resulting in a another JSON containing:\n\nresume_txt : plain txt\nentities: list of entities, span, text of entity\n\nIs this a logical approach?","timestamp":"2020-08-25T00:13:01+00:00","score":12},{"role":"answerer","user_id":"anon_8d8c3c999bd13f93","comment_id":"g2r66o1","kind":"comment","text":"Here’s the workflow I used:\n\n1.\tConvert PDF to image using pdf2image\n2.\tConvert image to raw text using PyTesseract\n3.\tUse Explosion’s prodigy (paid) software to create annotation dataset. \n4.\tTrain and export spaCy NER model using prodigy. \n5.\tUse custom NER model on new PDFs.","timestamp":"2020-08-25T01:18:23+00:00","score":4},{"role":"OP","user_id":"anon_fdd57f8ad40abbd1","comment_id":"g2rddcd","kind":"comment","text":"Thanks, I'm aware of prodigy and the software looks great however, I think because I already have structured data I may be able to use the Spacy Matcher to find the start and end indexes and put in a label and skip (hopefully) the annotation step.\n\nIf you don't mind me asking how many different entity labels were you annotating and how many documents did you annotate?","timestamp":"2020-08-25T02:23:02+00:00","score":1},{"role":"answerer","user_id":"anon_8d8c3c999bd13f93","comment_id":"g2rkno6","kind":"comment","text":"Oh yeah, check out spaczz as well. It adds some fuzzy matching features to help you create labeled data. \n\nI annotated hundreds of files looking mainly for names and addresses in legal text. Prodigy made it go by really fast.","timestamp":"2020-08-25T03:33:07+00:00","score":4}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fdd57f8ad40abbd1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8d8c3c999bd13f93","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g2r66o1","thanks_reply_id":"g2rddcd","post_score":12,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_4fc67d0957ab27a0","answerer_user_id":"anon_2026856e5141e28f","subreddit":"LanguageTechnology","timestamp":"2020-08-28T22:39:43+00:00","post_id":"iih7l1","question":"Is no one working on document similarity these days?\n\nI have a peronal website that gives people similar artilcle recommendation. At the time of implementation, Jaccard similarity seems to be the quickest to write and the math was easy to follow for a software engineer like me.\n\nNow I wanted to uprade to something more modern. As I looked around the internet, I saw some say tf-id still works the best while others insist on the almithiness of BERT. I couldn't tell which one was right, so I ended up running an experiment myelf with 5 algorithms: jaccard, tf-idf, doc2vec, use, and bert, based on the article data I had (I made a formal [blog post](https://link.medium.com/XqPivdAvk9)). It seemed tf-idf indeed did better than any other out of the box. I used the official pretrained models except doc2vec and I know they could be refined. But still I was quite disappointed. I was expecting the deep learning to deliver mindmblowing result.\n\nEvery time I look around for the latest, most discusions happen on q&a, tranlation, summarization, sentiment analysis and text generation. Is document similarity cconsidered like an already solved problem?","preferred_answer":"I'm not super knowledgeable about this, but I have done a little bit of document similarity stuff at work. My understanding is that:\n\n\\- TF-IDF is going to be pretty strong if you have a significant amount of data.\n\n\\- The average of all the word2vec vectors for a document is going to perform better than the doc2vec vector.\n\n\\- TF-IDF and word2vec require some preprocessing like removing stop words and punctuation to function better, but in the case of BERT you generally want to leave it in, so if you are using the same preprocessing steps that might have an effect.\n\n\\- If you are doing embedding similarity like a cosine similarity or something then BERT out of the box probably won't work. There are some methods for fine tuning it for embedding similarity. Maybe something like this guy's work ([https://github.com/UKPLab/sentence-transformers](https://github.com/UKPLab/sentence-transformers))\n\n\\- In general, word2vec and BERT-based models will both perform much better if you fine tune them.\n\nHope something in there is useful haha.","full_conversation":[{"role":"OP","user_id":"anon_4fc67d0957ab27a0","comment_id":"iih7l1","kind":"post","text":"Is no one working on document similarity these days?\n\nI have a peronal website that gives people similar artilcle recommendation. At the time of implementation, Jaccard similarity seems to be the quickest to write and the math was easy to follow for a software engineer like me.\n\nNow I wanted to uprade to something more modern. As I looked around the internet, I saw some say tf-id still works the best while others insist on the almithiness of BERT. I couldn't tell which one was right, so I ended up running an experiment myelf with 5 algorithms: jaccard, tf-idf, doc2vec, use, and bert, based on the article data I had (I made a formal [blog post](https://link.medium.com/XqPivdAvk9)). It seemed tf-idf indeed did better than any other out of the box. I used the official pretrained models except doc2vec and I know they could be refined. But still I was quite disappointed. I was expecting the deep learning to deliver mindmblowing result.\n\nEvery time I look around for the latest, most discusions happen on q&a, tranlation, summarization, sentiment analysis and text generation. Is document similarity cconsidered like an already solved problem?","timestamp":"2020-08-28T22:39:43+00:00","score":26},{"role":"answerer","user_id":"anon_2026856e5141e28f","comment_id":"g36qcxd","kind":"comment","text":"I'm not super knowledgeable about this, but I have done a little bit of document similarity stuff at work. My understanding is that:\n\n\\- TF-IDF is going to be pretty strong if you have a significant amount of data.\n\n\\- The average of all the word2vec vectors for a document is going to perform better than the doc2vec vector.\n\n\\- TF-IDF and word2vec require some preprocessing like removing stop words and punctuation to function better, but in the case of BERT you generally want to leave it in, so if you are using the same preprocessing steps that might have an effect.\n\n\\- If you are doing embedding similarity like a cosine similarity or something then BERT out of the box probably won't work. There are some methods for fine tuning it for embedding similarity. Maybe something like this guy's work ([https://github.com/UKPLab/sentence-transformers](https://github.com/UKPLab/sentence-transformers))\n\n\\- In general, word2vec and BERT-based models will both perform much better if you fine tune them.\n\nHope something in there is useful haha.","timestamp":"2020-08-28T23:06:05+00:00","score":19},{"role":"OP","user_id":"anon_4fc67d0957ab27a0","comment_id":"g36t2mo","kind":"comment","text":"Cool! Thanks for the insight! Roger that on the stop words. It was out of +30,000 articles so maybe that was big enough for tf-idf to do well.\n\nI didn't know the averaged word2vec performed better than doc2vec. I tried word2vec first. I think it was taking a really long time to process the entire document one word at a time.. But it's good to know the speed-quality trade off is there.\n\nYa, I used bert sentence. It was averaging of all sentence vectors in the document. Again, processing took so long like 4 days (cpu).. Sigh.","timestamp":"2020-08-28T23:31:20+00:00","score":2},{"role":"answerer","user_id":"anon_2026856e5141e28f","comment_id":"g36ui2l","kind":"comment","text":"Yeah I have had that problem with BERT and word2vec before too. Fortunately once you generate the embedding once you shouldn't have to do it again unless you retrain the model.","timestamp":"2020-08-28T23:44:43+00:00","score":2},{"role":"OP","user_id":"anon_4fc67d0957ab27a0","comment_id":"g36w508","kind":"comment","text":"That's true. Patient one time investment.","timestamp":"2020-08-29T00:00:03+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4fc67d0957ab27a0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2026856e5141e28f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g36qcxd","thanks_reply_id":"g36t2mo","post_score":26,"answer_score":19,"preferred_answer_is_top_level":true}} {"user_id":"anon_06d7cc2157cdabd1","answerer_user_id":"anon_f97b39bdee3da9e9","subreddit":"LanguageTechnology","timestamp":"2020-08-31T18:43:34+00:00","post_id":"ik3vdj","question":"Are there any good modern POStaggers available for download?\n\nHi guys! NLP newbie here..\n\nI need a POS tagger for a few languages. Preferably something Open Source, like Apache OpenNLP, which offers a few pre-trained models for download.\n\nI have some issues with Apache OpenNLP: It seems a bit dated, and I'm not sure how actively it is still used and developed. Given the huge progress in the field of Neural Networks during the last decade, it seems a bit strange that OpenNLP seems to not use anything from that progress. Or am I wrong?\n\nFor some languages like Italian, which I need, there are not much pre-trained models available. I found a 7-years-old model for Italian POStagging, haven't yet tried it out. Not sure if it still works with the latest OpenNLP version. For other languages, I could not find any models.\n\nSo my questions:\n\n* Is OpenNLP still an actively used and developed platform?\n* Are there newer projects (like something with a Keras/TF backend), where people offer pre-trained models for download?\n* How would you go about finding pre-trained models? Googling them? Or are there mailing lists where people share their models? Or do people train their models themselves, using some corpus they somehow obtained?\n* Is there a free or paid POS tagging service, where I can post sentences to an API and get back the POS tags?\n\nThank you!","preferred_answer":"I've just played with Stanza and Spacy a bit. Just one observation, but Stanza was able to get the right dependency relationships for the garden path sentence \"After the student moved the chair broke\" while spacy running its largest model did not.","full_conversation":[{"role":"OP","user_id":"anon_06d7cc2157cdabd1","comment_id":"ik3vdj","kind":"post","text":"Are there any good modern POStaggers available for download?\n\nHi guys! NLP newbie here..\n\nI need a POS tagger for a few languages. Preferably something Open Source, like Apache OpenNLP, which offers a few pre-trained models for download.\n\nI have some issues with Apache OpenNLP: It seems a bit dated, and I'm not sure how actively it is still used and developed. Given the huge progress in the field of Neural Networks during the last decade, it seems a bit strange that OpenNLP seems to not use anything from that progress. Or am I wrong?\n\nFor some languages like Italian, which I need, there are not much pre-trained models available. I found a 7-years-old model for Italian POStagging, haven't yet tried it out. Not sure if it still works with the latest OpenNLP version. For other languages, I could not find any models.\n\nSo my questions:\n\n* Is OpenNLP still an actively used and developed platform?\n* Are there newer projects (like something with a Keras/TF backend), where people offer pre-trained models for download?\n* How would you go about finding pre-trained models? Googling them? Or are there mailing lists where people share their models? Or do people train their models themselves, using some corpus they somehow obtained?\n* Is there a free or paid POS tagging service, where I can post sentences to an API and get back the POS tags?\n\nThank you!","timestamp":"2020-08-31T18:43:34+00:00","score":7},{"role":"answerer","user_id":"anon_f97b39bdee3da9e9","comment_id":"g3jcs0y","kind":"comment","text":"I've just played with Stanza and Spacy a bit. Just one observation, but Stanza was able to get the right dependency relationships for the garden path sentence \"After the student moved the chair broke\" while spacy running its largest model did not.","timestamp":"2020-09-01T00:55:32+00:00","score":3},{"role":"OP","user_id":"anon_06d7cc2157cdabd1","comment_id":"g3ktdhm","kind":"comment","text":"Do you know such hard-to-parse sentences in other languages as well?\n\nThanks for suggesting Stanza, gonna try it.","timestamp":"2020-09-01T12:13:06+00:00","score":2},{"role":"answerer","user_id":"anon_f97b39bdee3da9e9","comment_id":"g3lepae","kind":"comment","text":"I just googled \"garden-path sentence\" and took the first example I found, you could find more examples similarly. Spacy is designed to meet certain performance goals so the difference could be due to the intentional tradeoffs they make.","timestamp":"2020-09-01T14:47:58+00:00","score":2},{"role":"OP","user_id":"anon_06d7cc2157cdabd1","comment_id":"g3m9as0","kind":"comment","text":"Then I would need to know what \"garden-path sentence\" means in Italian :-)\n\nDid not find much so far.","timestamp":"2020-09-01T17:53:33+00:00","score":1},{"role":"answerer","user_id":"anon_f97b39bdee3da9e9","comment_id":"g3mciai","kind":"comment","text":"Syntactic ambiguity might work as a search term as well, perhaps translating to Italian better than garden-path.","timestamp":"2020-09-01T18:12:57+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_06d7cc2157cdabd1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f97b39bdee3da9e9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g3jcs0y","thanks_reply_id":"g3ktdhm","post_score":7,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_a6ba3cc445e87160","answerer_user_id":"anon_c9810fdf02016341","subreddit":"LanguageTechnology","timestamp":"2020-09-06T14:01:30+00:00","post_id":"inmhg7","question":"Resources on neural network transfer learning?\n\nHi, I am reading about neural network transfer learning for NLP. Particularly RNNs, CNNs and attention models.\n\nIt looks like a lot of \"fine tuning\" transfer learning resources are heavily focused on computer vision and the area is not that well explored. Does anyone have any pointers as to what resources to look at?","preferred_answer":"Sebastian ruder gives a really great overview here IMO: \nhttps://ruder.io/transfer-learning/\n\nThis one's good too (more focused on specific model archs): \nhttp://jalammar.github.io/illustrated-bert/.","full_conversation":[{"role":"OP","user_id":"anon_a6ba3cc445e87160","comment_id":"inmhg7","kind":"post","text":"Resources on neural network transfer learning?\n\nHi, I am reading about neural network transfer learning for NLP. Particularly RNNs, CNNs and attention models.\n\nIt looks like a lot of \"fine tuning\" transfer learning resources are heavily focused on computer vision and the area is not that well explored. Does anyone have any pointers as to what resources to look at?","timestamp":"2020-09-06T14:01:30+00:00","score":2},{"role":"answerer","user_id":"anon_c9810fdf02016341","comment_id":"g48dzrh","kind":"comment","text":"Sebastian ruder gives a really great overview here IMO: \nhttps://ruder.io/transfer-learning/\n\nThis one's good too (more focused on specific model archs): \nhttp://jalammar.github.io/illustrated-bert/.","timestamp":"2020-09-06T14:20:32+00:00","score":3},{"role":"OP","user_id":"anon_a6ba3cc445e87160","comment_id":"g48gv59","kind":"comment","text":"Thank you for the links. \n\nIt looks like the Ruder article says that there is no current \"state of the art\" for such transfer learning, and is mostly theoretical based on computer vision advances. \n\nOn the other hand, the BERT model is not a traditional neural network.\n\nIn the last 3 years, it seems like the NLP field jumped from DNN -> Transformers -> Transformer-based Transfer Learning, skipping DNN-based Transfer learning. Am I correct? \n\nI am looking for resources specifically on DNN-based Transfer Learning in NLP.","timestamp":"2020-09-06T14:49:13+00:00","score":2},{"role":"answerer","user_id":"anon_c9810fdf02016341","comment_id":"g48jgwj","kind":"comment","text":"Ah, apologies if I didn't understand the post correctly - I'll see if I can find anything for that.","timestamp":"2020-09-06T15:10:58+00:00","score":2},{"role":"OP","user_id":"anon_a6ba3cc445e87160","comment_id":"g48kbxu","kind":"comment","text":"No need to apologize, but would be very interested if you find something.","timestamp":"2020-09-06T15:17:21+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a6ba3cc445e87160","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c9810fdf02016341","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g48dzrh","thanks_reply_id":"g48gv59","post_score":2,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_13ed7a91e2f9bc85","answerer_user_id":"anon_da0a3189077ccc03","subreddit":"LanguageTechnology","timestamp":"2020-09-09T05:04:48+00:00","post_id":"ip9tgn","question":"Is there a way to edit models in huggingface library?\n\nSo I'm looking at this [blogspot](http://jalammar.github.io/illustrated-transformer/) explaining transformers and I was wondering if there was a way to open up the core pretrained model itself (or the way it's used) during fine tuning. For instance, say I want to tweak the way attention is calculated in, say, BERT. Do you know anyway I can go about this?","preferred_answer":"Yeah, first fork the repo, then create a personal dev branch, and then edit the code in that branch. \n\nThen, instead of pip installing transformers, you install that specific branch from your fork.","full_conversation":[{"role":"OP","user_id":"anon_13ed7a91e2f9bc85","comment_id":"ip9tgn","kind":"post","text":"Is there a way to edit models in huggingface library?\n\nSo I'm looking at this [blogspot](http://jalammar.github.io/illustrated-transformer/) explaining transformers and I was wondering if there was a way to open up the core pretrained model itself (or the way it's used) during fine tuning. For instance, say I want to tweak the way attention is calculated in, say, BERT. Do you know anyway I can go about this?","timestamp":"2020-09-09T05:04:48+00:00","score":4},{"role":"answerer","user_id":"anon_da0a3189077ccc03","comment_id":"g4iv7xr","kind":"comment","text":"Yeah, first fork the repo, then create a personal dev branch, and then edit the code in that branch. \n\nThen, instead of pip installing transformers, you install that specific branch from your fork.","timestamp":"2020-09-09T06:24:41+00:00","score":4},{"role":"OP","user_id":"anon_13ed7a91e2f9bc85","comment_id":"g4ivzm3","kind":"comment","text":"Oh Thanks! I'm not really familiar with software dev so these things are kinda new to me hehe \n\n\nEDIT: Also thanks I finally found the module that contains the part I want to edit in.","timestamp":"2020-09-09T06:36:54+00:00","score":1},{"role":"answerer","user_id":"anon_da0a3189077ccc03","comment_id":"g4v049a","kind":"comment","text":"No prob. What are you going to create?","timestamp":"2020-09-11T20:24:03+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_13ed7a91e2f9bc85","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_da0a3189077ccc03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g4iv7xr","thanks_reply_id":"g4ivzm3","post_score":4,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_daf4f608699fac66","answerer_user_id":"anon_b4ebf001097548c9","subreddit":"LanguageTechnology","timestamp":"2020-09-13T11:30:59+00:00","post_id":"irwnhf","question":"How to find how much one sentence depends on previous sentence?\n\nI am doing a task where I have paragraph. And I want to find out how much a sentence depends on the previous sentence?\n\n \n\n\nFor example, if I have a paragraph like this:\n\n \n\n\n\"Sentence 1. Sentence 2. Sentence 3. Sentence 4. Sentence 5.\"\n\n \n\n\nWhat I want is to have a score of dependence of sentence 3 on sentence 2 and sentence 4 on sentence 3 and so on.\n\n(Dependence as in for eg. \"I hate Tom. He won't let me do my work.\" Here sentence 2 depends on sentence 1 but for another example, \"I hate Tom. I like bananas.\" there is no dependence of sentence number 2 on sentence 1.)\n\n \n\n\nIs this possible to be done easily? Are there any tools that can do this or what algorithm should I look for. I am looking for peice of code that does this. I am not an NLP expert.\n\n \n\n\nAny help would be appreciated. Thank you!","preferred_answer":"Following that, it seems to me that it outputs lots of things, you are looking specifically for the sequence score or whatever. It has the shape of (batch, 2), i.e. the score for True and False. Applying soft max, you are getting probabilities if True and False, if you are looking for probabilities per se.","full_conversation":[{"role":"OP","user_id":"anon_daf4f608699fac66","comment_id":"irwnhf","kind":"post","text":"How to find how much one sentence depends on previous sentence?\n\nI am doing a task where I have paragraph. And I want to find out how much a sentence depends on the previous sentence?\n\n \n\n\nFor example, if I have a paragraph like this:\n\n \n\n\n\"Sentence 1. Sentence 2. Sentence 3. Sentence 4. Sentence 5.\"\n\n \n\n\nWhat I want is to have a score of dependence of sentence 3 on sentence 2 and sentence 4 on sentence 3 and so on.\n\n(Dependence as in for eg. \"I hate Tom. He won't let me do my work.\" Here sentence 2 depends on sentence 1 but for another example, \"I hate Tom. I like bananas.\" there is no dependence of sentence number 2 on sentence 1.)\n\n \n\n\nIs this possible to be done easily? Are there any tools that can do this or what algorithm should I look for. I am looking for peice of code that does this. I am not an NLP expert.\n\n \n\n\nAny help would be appreciated. Thank you!","timestamp":"2020-09-13T11:30:59+00:00","score":11},{"role":"answerer","user_id":"anon_b4ebf001097548c9","comment_id":"g53kf2x","kind":"comment","text":"Following that, it seems to me that it outputs lots of things, you are looking specifically for the sequence score or whatever. It has the shape of (batch, 2), i.e. the score for True and False. Applying soft max, you are getting probabilities if True and False, if you are looking for probabilities per se.","timestamp":"2020-09-13T12:29:21+00:00","score":1},{"role":"OP","user_id":"anon_daf4f608699fac66","comment_id":"g53myzr","kind":"comment","text":"Yes thank you, applying softmax to it would get me some sort of 'probability score' that I am looking for.\nI know I am asking a lot but can you refer me to some links or resources that would help me in doing this i.e apply soft max layer to output.","timestamp":"2020-09-13T12:42:26+00:00","score":1},{"role":"answerer","user_id":"anon_b4ebf001097548c9","comment_id":"g53rbw6","kind":"comment","text":"So, I assume you figured out how to get the model to do the output (if not, I suggest looking at hugginface’s tutorials, but basically you just call a model providing the input in arguments). The output is a tuple, I think, one of which is the sequence scores. You can simply extract them by indexing the tuple, and that’ll give you a tensor , which you can give to the soft max function of, say, pytorch","timestamp":"2020-09-13T13:07:01+00:00","score":1},{"role":"OP","user_id":"anon_daf4f608699fac66","comment_id":"g5amr2l","kind":"comment","text":"Just can't emphasize enough how much this comment helped me. Thank you!","timestamp":"2020-09-14T22:28:03+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_daf4f608699fac66","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b4ebf001097548c9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g53kf2x","thanks_reply_id":"g53myzr","post_score":11,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_e41759016481057b","answerer_user_id":"anon_4dd8f7e039bff594","subreddit":"LanguageTechnology","timestamp":"2020-09-15T01:06:01+00:00","post_id":"isygd2","question":"What happens if the fine-tuning is done twice?\n\nApologies in advance if the question is silly, I’m trying to learn nlp in general.\n\nMy doubt is the following: let’s suppose that I want to do text-generation and I will work with gtp2 aspre-trained model. First of all I do finetuning with an astronomy dataset. I save the model as gtp2-astronomy. Then, I finetuned gtp2-astronomy with a physics dataset and saved it as a final-model.\n\n**My question is**: will this final-model be good for text generation of astronomy and also for physics? Or by fine-tuning the second time, do I “eliminate” the ability of the model with astronomy subjects?\n\nI ask this question because, as I understand it, when finetuning you are basically working with the last layer of the network, so, I don’t know if fine-tuning the second time will reset the last layer, which the first time learned about astronomy.","preferred_answer":"You will likely be rewriting the parameters you learned for the first set to some degree. I'd think the easy solution would be to concatenate the two datasets and then use the combined dataset for 1 stage of training. Could also be worth trying the datasets individually followed by the combined dataset (so 3 total stages).\n\nAnd a word about fine-tuning, you of course won't be fully rewriting the parameters when fine-tuning; if you did, there'd be no point in using a pre-trained model. Fine-tuning also can refer to further training of a whole model - it doesn't necessarily mean just the last layer, though I believe that's the general practice for the large pre-trained models because they are so cumbersome.","full_conversation":[{"role":"OP","user_id":"anon_e41759016481057b","comment_id":"isygd2","kind":"post","text":"What happens if the fine-tuning is done twice?\n\nApologies in advance if the question is silly, I’m trying to learn nlp in general.\n\nMy doubt is the following: let’s suppose that I want to do text-generation and I will work with gtp2 aspre-trained model. First of all I do finetuning with an astronomy dataset. I save the model as gtp2-astronomy. Then, I finetuned gtp2-astronomy with a physics dataset and saved it as a final-model.\n\n**My question is**: will this final-model be good for text generation of astronomy and also for physics? Or by fine-tuning the second time, do I “eliminate” the ability of the model with astronomy subjects?\n\nI ask this question because, as I understand it, when finetuning you are basically working with the last layer of the network, so, I don’t know if fine-tuning the second time will reset the last layer, which the first time learned about astronomy.","timestamp":"2020-09-15T01:06:01+00:00","score":7},{"role":"answerer","user_id":"anon_4dd8f7e039bff594","comment_id":"g5b7ruc","kind":"comment","text":"You will likely be rewriting the parameters you learned for the first set to some degree. I'd think the easy solution would be to concatenate the two datasets and then use the combined dataset for 1 stage of training. Could also be worth trying the datasets individually followed by the combined dataset (so 3 total stages).\n\nAnd a word about fine-tuning, you of course won't be fully rewriting the parameters when fine-tuning; if you did, there'd be no point in using a pre-trained model. Fine-tuning also can refer to further training of a whole model - it doesn't necessarily mean just the last layer, though I believe that's the general practice for the large pre-trained models because they are so cumbersome.","timestamp":"2020-09-15T01:26:44+00:00","score":8},{"role":"OP","user_id":"anon_e41759016481057b","comment_id":"g5hoibh","kind":"comment","text":"awesome answer. Thanks a lot for help me.","timestamp":"2020-09-16T17:30:48+00:00","score":2},{"role":"answerer","user_id":"anon_4dd8f7e039bff594","comment_id":"g5ip93r","kind":"comment","text":"Sure thing, glad it helped","timestamp":"2020-09-16T22:04:39+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e41759016481057b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4dd8f7e039bff594","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g5b7ruc","thanks_reply_id":"g5hoibh","post_score":7,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_066185b6cc9db6d3","answerer_user_id":"anon_0c8bd3cc04acc2a6","subreddit":"LanguageTechnology","timestamp":"2020-09-18T19:38:10+00:00","post_id":"ivcyrj","question":"Noun -> Noun, Verb -> Verb after translating a sentence/text. Is this a solved problem?\n\nWe can translate a sentence from one language to another.\n\nBut what if I want to know which nouns and verbs from the original sentence correspond to which nouns and verbs from the translated sentence? Is this a solved problem? Or maybe is there some library that gives a good approximation?","preferred_answer":"Programs like Giza++ offer word level alignment of parallel sentences. There are some other projects and papers that do the same","full_conversation":[{"role":"OP","user_id":"anon_066185b6cc9db6d3","comment_id":"ivcyrj","kind":"post","text":"Noun -> Noun, Verb -> Verb after translating a sentence/text. Is this a solved problem?\n\nWe can translate a sentence from one language to another.\n\nBut what if I want to know which nouns and verbs from the original sentence correspond to which nouns and verbs from the translated sentence? Is this a solved problem? Or maybe is there some library that gives a good approximation?","timestamp":"2020-09-18T19:38:10+00:00","score":4},{"role":"answerer","user_id":"anon_0c8bd3cc04acc2a6","comment_id":"g5t3f4w","kind":"comment","text":"Programs like Giza++ offer word level alignment of parallel sentences. There are some other projects and papers that do the same","timestamp":"2020-09-19T12:41:20+00:00","score":1},{"role":"OP","user_id":"anon_066185b6cc9db6d3","comment_id":"g5uzurd","kind":"comment","text":"Thanks, will give it a look, much appreciated.","timestamp":"2020-09-19T20:44:08+00:00","score":1},{"role":"answerer","user_id":"anon_0c8bd3cc04acc2a6","comment_id":"g5yiwzs","kind":"comment","text":"https://www.researchgate.net/publication/315478223_A_survey_on_parallel_corpora_alignment","timestamp":"2020-09-20T10:15:39+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_066185b6cc9db6d3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0c8bd3cc04acc2a6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g5t3f4w","thanks_reply_id":"g5uzurd","post_score":4,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_d09d758970a3b5e9","answerer_user_id":"anon_c81409731af30a6a","subreddit":"LanguageTechnology","timestamp":"2020-09-21T22:12:22+00:00","post_id":"ixamfj","question":"Text Summarization for shorter text ie paragraph instead of full documents.\n\nI've been looking into text summarization and have found lots of solutions for longer documents and websites. I'm looking for a solution for summarizing a paragraph into a sentence or two (python).\n\nI've tried quite a few different ways with nltk -- tf-idf, word frequency summarization and gensim. They seem to have a minimum requirement for string length. In my testing they just return an empty string.\n\nIs this realistic?","preferred_answer":"The way t5 generates summaries is probably through beam search, so it may have happened that it generated a sentence that turned out to be exactly the same as your middle sentence.","full_conversation":[{"role":"OP","user_id":"anon_d09d758970a3b5e9","comment_id":"ixamfj","kind":"post","text":"Text Summarization for shorter text ie paragraph instead of full documents.\n\nI've been looking into text summarization and have found lots of solutions for longer documents and websites. I'm looking for a solution for summarizing a paragraph into a sentence or two (python).\n\nI've tried quite a few different ways with nltk -- tf-idf, word frequency summarization and gensim. They seem to have a minimum requirement for string length. In my testing they just return an empty string.\n\nIs this realistic?","timestamp":"2020-09-21T22:12:22+00:00","score":7},{"role":"answerer","user_id":"anon_c81409731af30a6a","comment_id":"g65oh47","kind":"comment","text":"The way t5 generates summaries is probably through beam search, so it may have happened that it generated a sentence that turned out to be exactly the same as your middle sentence.","timestamp":"2020-09-21T22:36:58+00:00","score":1},{"role":"OP","user_id":"anon_d09d758970a3b5e9","comment_id":"g65oykt","kind":"comment","text":"Gotcha. I'll do some more testing on that then. Thanks for the info, much appreciated!","timestamp":"2020-09-21T22:41:33+00:00","score":1},{"role":"answerer","user_id":"anon_c81409731af30a6a","comment_id":"g65qhwz","kind":"comment","text":"You can try all of these out too: [https://huggingface.co/models?filter=summarization](https://huggingface.co/models?filter=summarization)\n\nNot all of those will work with the pipeline class from huggingface, so you will need to generate encodings for text yourself first using the respective tokenizers.","timestamp":"2020-09-21T22:56:01+00:00","score":2},{"role":"OP","user_id":"anon_d09d758970a3b5e9","comment_id":"g65u4pg","kind":"comment","text":">Not all of those will work with the pipeline class from huggingface, so you will need to generate encodings for text yourself first using the respective tokenizers.\n\nexcellent, will do","timestamp":"2020-09-21T23:31:06+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_d09d758970a3b5e9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c81409731af30a6a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g65oh47","thanks_reply_id":"g65oykt","post_score":7,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_c4da93b8d02128ce","answerer_user_id":"anon_6543b402b58f284d","subreddit":"LanguageTechnology","timestamp":"2020-09-23T16:42:28+00:00","post_id":"iydqls","question":"Prepping a grant with an NLP component. Could you recommend a book??\n\nI'm completely new to NLP analysis but I'm creating a grant to compare a few different survey measures in an attempt to draw conclusions about their different outcomes. NLP sounds like the best tool to do this with. Sentiment analysis and topic modeling look useful. NLP redditors, can you suggest other methods or a book that's not focused on text generation?","preferred_answer":"I think the answer will come more naturally if you examine what you're using the NLP *for*; that is, what exactly does the language data you're putting in look like, and how do you plan on drawing the comparison between measures. If you're comparing literal word differences between abstracts, a tf-idf might work, or some vectorization method plus a distance measure. If you're examining the \\_meaning\\_ behind those words, something with a mask may be appropriate, say a fine-tuned BERT model. If you need a way to determine if the abstracts are meaningfully different, you can prepare the corpus into a series of probability distributions and use something like Jensen-Shannon divergence.","full_conversation":[{"role":"OP","user_id":"anon_c4da93b8d02128ce","comment_id":"iydqls","kind":"post","text":"Prepping a grant with an NLP component. Could you recommend a book??\n\nI'm completely new to NLP analysis but I'm creating a grant to compare a few different survey measures in an attempt to draw conclusions about their different outcomes. NLP sounds like the best tool to do this with. Sentiment analysis and topic modeling look useful. NLP redditors, can you suggest other methods or a book that's not focused on text generation?","timestamp":"2020-09-23T16:42:28+00:00","score":2},{"role":"answerer","user_id":"anon_6543b402b58f284d","comment_id":"g6c1mia","kind":"comment","text":"I think the answer will come more naturally if you examine what you're using the NLP *for*; that is, what exactly does the language data you're putting in look like, and how do you plan on drawing the comparison between measures. If you're comparing literal word differences between abstracts, a tf-idf might work, or some vectorization method plus a distance measure. If you're examining the \\_meaning\\_ behind those words, something with a mask may be appropriate, say a fine-tuned BERT model. If you need a way to determine if the abstracts are meaningfully different, you can prepare the corpus into a series of probability distributions and use something like Jensen-Shannon divergence.","timestamp":"2020-09-23T16:57:27+00:00","score":2},{"role":"OP","user_id":"anon_c4da93b8d02128ce","comment_id":"g6c3ts9","kind":"comment","text":"Thanks a ton for the reply. I’m looking at survey item questions and was hoping to draw out comparisons with semantic information, so “meaning”. Anything else you can add would be appreciated.","timestamp":"2020-09-23T17:15:16+00:00","score":1},{"role":"answerer","user_id":"anon_6543b402b58f284d","comment_id":"g6c7zmy","kind":"comment","text":"Sure! So correct me if I'm wrong: these questions are all coming from the same survey, and not a comparison of surveys that are supposed to be equivalent. Also, you think that the way that the questions are asked may impact the way respondents answer on some sort of numeric scale, and you want to test that.\n\nThis is an inherently tricky problem because the way that any two individuals interpret a question will be different based on their experiences -- so, first determine if the respondents are just a bunch of random people, and if not, what sort of background they come with. Using reddit data, [this](https://nlp.stanford.edu/projects/socialsent/) is an interesting way to use NLP to see different sentiment values in different contexts, for example.\n\nBarring this prior knowledge and assuming your sample is large enough, you can do a general sentiment score on the question (the infamous Bag of Words, for example), or use a pretrained model to generate vectors (ELMo should be approachable), but be warned the further down that rabbit hole you go the more you'll need to familiarize yourself with the current deep learning APIs. I'd suggest just a standard sentiment score to start, there are a million tutorials on how to get it done, and if that isn't suitable to look up particulars about context and morphological representation (maybe Subword). Big note, though, is that how well it works _for you_ will vary substantially depending on how you train the model beforehand, so try to find an existing repo of sentiment-scored-questions, if that makes sense.","timestamp":"2020-09-23T17:48:55+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c4da93b8d02128ce","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6543b402b58f284d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g6c1mia","thanks_reply_id":"g6c3ts9","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_96ae35da8521c3e0","answerer_user_id":"anon_ac2dcdf454de5679","subreddit":"LanguageTechnology","timestamp":"2020-09-28T18:57:28+00:00","post_id":"j1iaxq","question":"How to train GPT-2 to Create JSOn?\n\nI want to train a model to generate JSON based on a natural language description for data modeling.\n\nInput = A student resgisters for a class.\nA class has many students.\nA class has one teacher.\n\nOutput = Some JSON string like {“class”: \n “Students”: [\n\n\nEtc \n\n\nI have found examples that translate from one language to another.\n\nOthers that read scientific papers and then generate random or fake paragraphs.\n\nHow can I harness this to actually translate the comprehension into codifying it?","preferred_answer":"Hey so I've some experience in this space. I've built several program induction (nl to iftt recipes and nl to sql) models using this approach. It's doable though as caveat you'll need a significant amount of the data to train the models.\n\nSo you're describing a sequence to sequence (seq2seq) task, which is a bit tricky with GPT-2 in huggingface. Most seq2seq tasks use a encoder-decoder setup where the encoder takes your inputs and encodes it into an intermediate representation and a decoder decodes into a target language. I don't think there's a straightforward way (e.g. using existing training scripts) in huggingface but I could be wrong. The combiners api ([https://medium.com/huggingface/encoder-decoders-in-transformers-a-hybrid-pre-trained-architecture-for-seq2seq-af4d7bf14bb8](https://medium.com/huggingface/encoder-decoders-in-transformers-a-hybrid-pre-trained-architecture-for-seq2seq-af4d7bf14bb8)) in hugging face should support this but you'd probably need to train your own decoder. \n\n\nIf you don't mind using other approaches, here's a couple of resource that can get you up and running quickly. The first is OpentNMT ( [https://opennmt.net/](https://opennmt.net/)) which has a super easy interface. You can provide it two parallel files for training (one with the inputs and one with outputs) and it'll automatically train the model for you. It's a great baseline and is pretty powerful. The downside is the customizing the underlying model is involved. \n\n\nThe second library I'd recommend checking out it is JoeyNMT ([https://joeynmt.readthedocs.io/en/latest/tutorial.html](https://joeynmt.readthedocs.io/en/latest/tutorial.html)) which is both a pedagogical library and also offer great implementations. The documentation does a great job of not only teaching you how to use their library but also provides an informative introduction to seq2seq modelling. They employ a configuration first approach where you can customize the models using a json file without having to worry about writing model code. All the base classes can be extended, so you want to use gpt-2 as the encoder, its possible. Quick tip if you're using JoeyNMT, make sure you set share vocabulary to false as your decoder will include symbols that will likely not occur in your input. \n\nif you have specific questions feel free to dm me.","full_conversation":[{"role":"OP","user_id":"anon_96ae35da8521c3e0","comment_id":"j1iaxq","kind":"post","text":"How to train GPT-2 to Create JSOn?\n\nI want to train a model to generate JSON based on a natural language description for data modeling.\n\nInput = A student resgisters for a class.\nA class has many students.\nA class has one teacher.\n\nOutput = Some JSON string like {“class”: \n “Students”: [\n\n\nEtc \n\n\nI have found examples that translate from one language to another.\n\nOthers that read scientific papers and then generate random or fake paragraphs.\n\nHow can I harness this to actually translate the comprehension into codifying it?","timestamp":"2020-09-28T18:57:28+00:00","score":3},{"role":"answerer","user_id":"anon_ac2dcdf454de5679","comment_id":"g70b52c","kind":"comment","text":"Hey so I've some experience in this space. I've built several program induction (nl to iftt recipes and nl to sql) models using this approach. It's doable though as caveat you'll need a significant amount of the data to train the models.\n\nSo you're describing a sequence to sequence (seq2seq) task, which is a bit tricky with GPT-2 in huggingface. Most seq2seq tasks use a encoder-decoder setup where the encoder takes your inputs and encodes it into an intermediate representation and a decoder decodes into a target language. I don't think there's a straightforward way (e.g. using existing training scripts) in huggingface but I could be wrong. The combiners api ([https://medium.com/huggingface/encoder-decoders-in-transformers-a-hybrid-pre-trained-architecture-for-seq2seq-af4d7bf14bb8](https://medium.com/huggingface/encoder-decoders-in-transformers-a-hybrid-pre-trained-architecture-for-seq2seq-af4d7bf14bb8)) in hugging face should support this but you'd probably need to train your own decoder. \n\n\nIf you don't mind using other approaches, here's a couple of resource that can get you up and running quickly. The first is OpentNMT ( [https://opennmt.net/](https://opennmt.net/)) which has a super easy interface. You can provide it two parallel files for training (one with the inputs and one with outputs) and it'll automatically train the model for you. It's a great baseline and is pretty powerful. The downside is the customizing the underlying model is involved. \n\n\nThe second library I'd recommend checking out it is JoeyNMT ([https://joeynmt.readthedocs.io/en/latest/tutorial.html](https://joeynmt.readthedocs.io/en/latest/tutorial.html)) which is both a pedagogical library and also offer great implementations. The documentation does a great job of not only teaching you how to use their library but also provides an informative introduction to seq2seq modelling. They employ a configuration first approach where you can customize the models using a json file without having to worry about writing model code. All the base classes can be extended, so you want to use gpt-2 as the encoder, its possible. Quick tip if you're using JoeyNMT, make sure you set share vocabulary to false as your decoder will include symbols that will likely not occur in your input. \n\nif you have specific questions feel free to dm me.","timestamp":"2020-09-28T23:49:05+00:00","score":3},{"role":"OP","user_id":"anon_96ae35da8521c3e0","comment_id":"g70bsu7","kind":"comment","text":"Thanks so much for this!\n\nGPT-2 is not necessarily a requirement, it was simply something I thought was the best approach given that I am brand new to the space.\n\nI will definitely read-up on the seq2seq stuff.\n\nSo let me ask you this : how would you approach this task if I were to completely remove the GPT-2 requirement?","timestamp":"2020-09-28T23:55:41+00:00","score":1},{"role":"answerer","user_id":"anon_ac2dcdf454de5679","comment_id":"g70i9qf","kind":"comment","text":"both joeynmt and openmt make this pretty straight forward. For training you need two parallel files containing the input and output sequences. So the source file and target file might be some thing like:\n\n input.src\n I like cats \n I hate dogs \n That cat is cool\n \n output.trg\n {'entity': 'cats'} \n {'entity':'dogs'} \n {'entity': 'cat'}\n\nYou'll need to flatten the json or json lines format so that each json example fits on line. That's about it. Both libraries are super easy to use. OpenNMT works out of the box. It's a command line call where you provide the source, target, prediction inputs files paths.\n\nFor JoeyNMT start with the one of example config files (like the eng-de translation model). I'd suggest keeping the encoder and decoder symmetrical. Use bhandanu attention, the transformers architecture and default word tokenizer (i believe joeynmt requires you provide alternative tokenezer implementations like sent piece). Start with a single layer and add layers until you see some performance. Hidden size of 256-512 is usually appropriate, anything wider and your training time and resource needs start to get expensive. You can set training to 100 epochs and early stopping will stop training if your perplexity stagnates after three epochs. See where that gets you. As mentioned before your results will likely depend on the number of training examples you have.\n\nAgain the JoeyNMT documentation is fantastic and walk you through all the parameters and intuition needed to setup a basic encoder-decoder model. Feel free to reach out to me offline for specific advice.","timestamp":"2020-09-29T00:58:04+00:00","score":2},{"role":"OP","user_id":"anon_96ae35da8521c3e0","comment_id":"g70u7qp","kind":"comment","text":"Wow!! Thanks!! I will definitely check this out!","timestamp":"2020-09-29T02:47:53+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_96ae35da8521c3e0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ac2dcdf454de5679","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g70b52c","thanks_reply_id":"g70bsu7","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_024335c0f9036b3d","answerer_user_id":"anon_625e83640143dfd8","subreddit":"LanguageTechnology","timestamp":"2020-10-04T10:10:45+00:00","post_id":"j4wnbb","question":"Free and easy German text resources?\n\nHello everyone,\n\nin the hope that this is one of the right places to post this (cross-posted it on [r/languagelearning](https://www.reddit.com/r/languagelearning/) and r/German as well), I'd like to ask:\n\nDo any of you have ideas on where to find freely available (licence-free or creative commons) texts or books that are on an easy German level? I'm thinking something graded (up to A2/B1 CEFR preferably, but B2 would also still work) or equivalent of the level of the Simple English Wikipedia (which sadly, there is none in German).It's for a Natural Language Processing project planned to be used in language learning - it's not mine, just asking for someone who isn't on Reddit, I have no clue about any of the stuff. :D It's to be used to train the system.\n\nI'd be glad for any advice, hints or pointers! \n\n\nEdit: [Hurraki](https://hurraki.de/wiki/Hauptseite) has been mentioned, which is Wikipedia-like and looks promising, but if anyone knows other (possibly curated) resources, feel free to still comment!","preferred_answer":"https://www.projekt-gutenberg.org/info/texte/the-nat.html#Reise\n\nAlso you can read boulevard news paper - they are quite simple...","full_conversation":[{"role":"OP","user_id":"anon_024335c0f9036b3d","comment_id":"j4wnbb","kind":"post","text":"Free and easy German text resources?\n\nHello everyone,\n\nin the hope that this is one of the right places to post this (cross-posted it on [r/languagelearning](https://www.reddit.com/r/languagelearning/) and r/German as well), I'd like to ask:\n\nDo any of you have ideas on where to find freely available (licence-free or creative commons) texts or books that are on an easy German level? I'm thinking something graded (up to A2/B1 CEFR preferably, but B2 would also still work) or equivalent of the level of the Simple English Wikipedia (which sadly, there is none in German).It's for a Natural Language Processing project planned to be used in language learning - it's not mine, just asking for someone who isn't on Reddit, I have no clue about any of the stuff. :D It's to be used to train the system.\n\nI'd be glad for any advice, hints or pointers! \n\n\nEdit: [Hurraki](https://hurraki.de/wiki/Hauptseite) has been mentioned, which is Wikipedia-like and looks promising, but if anyone knows other (possibly curated) resources, feel free to still comment!","timestamp":"2020-10-04T10:10:45+00:00","score":6},{"role":"answerer","user_id":"anon_625e83640143dfd8","comment_id":"g7o5oxs","kind":"comment","text":"https://www.projekt-gutenberg.org/info/texte/the-nat.html#Reise\n\nAlso you can read boulevard news paper - they are quite simple...","timestamp":"2020-10-04T12:20:45+00:00","score":1},{"role":"OP","user_id":"anon_024335c0f9036b3d","comment_id":"g7o9gio","kind":"comment","text":"Thanks, we actually already considered Projekt Gutenberg, but it felt a bit overwhelming. Might be worth another try though!\nRegarding the Boulevard papers: That's also a good info. In the wiki it mentioned various resources for German news in easy language, but those might still be comparably \"artificial\"","timestamp":"2020-10-04T12:51:48+00:00","score":1},{"role":"answerer","user_id":"anon_625e83640143dfd8","comment_id":"g7ohdhp","kind":"comment","text":"That's not text but news for children \n\nhttps://www.kika.de/logo/sendung-mit-ut/index.html thats great for Language learning.","timestamp":"2020-10-04T13:48:30+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_024335c0f9036b3d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_625e83640143dfd8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g7o5oxs","thanks_reply_id":"g7o9gio","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_7d3b137fbbf82367","answerer_user_id":"anon_24cf86729a43aeb7","subreddit":"LanguageTechnology","timestamp":"2020-10-07T16:21:11+00:00","post_id":"j6twe6","question":"GPT-2 Dataset Preparation:\n\nI wish to train GPT-2 the following way:\n\nMiddle:\nStart:\nEnd:\n\nSentence: At the core of the United States’ mismanagement of the Coronavirus lies its distrust of science.\n\nMiddle: the United States’ mismanagement of the Coronavirus \nStart: At the core of\nEnd: lies its distrust of science. \n\nIn other words, I input the middle part of a sentence and it generates the start and the end. Does anyone have a dataset for this or know how I can make one quickly?","preferred_answer":"Do start and end have a defined length for start and end? In this example it looks to be closer to chunks. But that might be because you did it by hand. So you need to define that.\n\nBased on your answer you simply manipulate your dataset in that way. If you wish to use chunks, you need to run a chunker over you dataset. You could also look into dependency parsing. But based on the information you have given that might be overkill.\n\nObviously your dataset needs to be split into sentences in advance. If you can’t find one, that is, you could use a nlp library like nltk or spacy on any kind of text. They behave quite differently, so you need to test what works best for you and your use case. \n\nI would also advise against using the words as “middle:” “start:”, and “end:” as plain text. Based on your data source those could be surprisingly common. So rather indicate that they are special tokens. Brackets work fine in my experience, e.g. [start]. Just make sure to add it to the gpt2 vocabulary","full_conversation":[{"role":"OP","user_id":"anon_7d3b137fbbf82367","comment_id":"j6twe6","kind":"post","text":"GPT-2 Dataset Preparation:\n\nI wish to train GPT-2 the following way:\n\nMiddle:\nStart:\nEnd:\n\nSentence: At the core of the United States’ mismanagement of the Coronavirus lies its distrust of science.\n\nMiddle: the United States’ mismanagement of the Coronavirus \nStart: At the core of\nEnd: lies its distrust of science. \n\nIn other words, I input the middle part of a sentence and it generates the start and the end. Does anyone have a dataset for this or know how I can make one quickly?","timestamp":"2020-10-07T16:21:11+00:00","score":4},{"role":"answerer","user_id":"anon_24cf86729a43aeb7","comment_id":"g82tl6m","kind":"comment","text":"Do start and end have a defined length for start and end? In this example it looks to be closer to chunks. But that might be because you did it by hand. So you need to define that.\n\nBased on your answer you simply manipulate your dataset in that way. If you wish to use chunks, you need to run a chunker over you dataset. You could also look into dependency parsing. But based on the information you have given that might be overkill.\n\nObviously your dataset needs to be split into sentences in advance. If you can’t find one, that is, you could use a nlp library like nltk or spacy on any kind of text. They behave quite differently, so you need to test what works best for you and your use case. \n\nI would also advise against using the words as “middle:” “start:”, and “end:” as plain text. Based on your data source those could be surprisingly common. So rather indicate that they are special tokens. Brackets work fine in my experience, e.g. [start]. Just make sure to add it to the gpt2 vocabulary","timestamp":"2020-10-08T04:04:15+00:00","score":2},{"role":"OP","user_id":"anon_7d3b137fbbf82367","comment_id":"g844nm2","kind":"comment","text":"Thank you. All of that is really helpful to know. \n\nJust curious, do you believe GPT-2 will be capable of coherent starts and ends given a middle? This will be the oddest experiment I have ever done.","timestamp":"2020-10-08T15:04:29+00:00","score":1},{"role":"answerer","user_id":"anon_24cf86729a43aeb7","comment_id":"g84ggbt","kind":"comment","text":"Im glad that was helpful to you. \n\nI have no idea if that will work. I have never worked on a sentence basis with gpt2. \n\nHowever I have tried generating entire texts where I provided beginning and ending as contexts. And that worked so-so, because there was often a clear shift where gpt2 “realized” it needs to get to the ending somehow.\n\nSo trying this sentence-based is super interesting in my opinion, it’s definitely worth a shot.","timestamp":"2020-10-08T16:43:10+00:00","score":2},{"role":"OP","user_id":"anon_7d3b137fbbf82367","comment_id":"g84jwig","kind":"comment","text":"I’ll let you know how it goes. \n\nOn another note, do you still have that dataset where you provided the beginning and end? If so, I would really appreciate the chance to use it. It may not apply exactly to my case, but I’d love to test it out for myself.","timestamp":"2020-10-08T17:11:24+00:00","score":1},{"role":"answerer","user_id":"anon_24cf86729a43aeb7","comment_id":"g84lor9","kind":"comment","text":"Thanks. I would love to hear how it goes.\n\nUnfortunately I cannot provide you with my dataset, since that is research I did at work, so that’s a proprietary dataset. \n\nBut basic corpus manipulation is really easy and usually done quickly. \n\nSo if you don’t have a corpus already you can probably choose one of the many datasets that are commonly used in nlp. If you have no idea where to start, I recommend looking at quantumstats nlp database (just google that, it’ll come up) and see if they have something available, that works for you.","timestamp":"2020-10-08T17:25:58+00:00","score":2},{"role":"OP","user_id":"anon_7d3b137fbbf82367","comment_id":"g84ltab","kind":"comment","text":"No worries. That’s completely understandable! Thank you again for your help, and I’ll be sure to implement your suggestions.","timestamp":"2020-10-08T17:26:59+00:00","score":2},{"role":"answerer","user_id":"anon_24cf86729a43aeb7","comment_id":"g84lxsv","kind":"comment","text":"You’re welcome and good luck","timestamp":"2020-10-08T17:28:00+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_7d3b137fbbf82367","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_24cf86729a43aeb7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g82tl6m","thanks_reply_id":"g844nm2","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_3f681dbf8bd45b3a","answerer_user_id":"anon_674ec908ed581ec5","subreddit":"LanguageTechnology","timestamp":"2020-10-08T23:16:58+00:00","post_id":"j7nulk","question":"Preprocessing before stemming but after lemmatization, right?\n\nApologies in advance but I'm new to NLP, and I've not found any detailed examples of lemmatization.\n\n​\n\nI am working on a project in which I would like to do some basic analysis of scholarly German texts. I would like to perform lemmatization rather than stemming on the corpus. It occurred to me that preprocessing destroys the contextual information that a lemmatizer needs to find the correct lemma. I'm looking for confirmation or correction of this assumption.","preferred_answer":"I'm sad to say that there needs to be more of this level of advice out there. I learned more in this thread than in weeks of reading about NLP through tutorials and intro articles/guides etc.","full_conversation":[{"role":"OP","user_id":"anon_3f681dbf8bd45b3a","comment_id":"j7nulk","kind":"post","text":"Preprocessing before stemming but after lemmatization, right?\n\nApologies in advance but I'm new to NLP, and I've not found any detailed examples of lemmatization.\n\n​\n\nI am working on a project in which I would like to do some basic analysis of scholarly German texts. I would like to perform lemmatization rather than stemming on the corpus. It occurred to me that preprocessing destroys the contextual information that a lemmatizer needs to find the correct lemma. I'm looking for confirmation or correction of this assumption.","timestamp":"2020-10-08T23:16:58+00:00","score":4},{"role":"answerer","user_id":"anon_674ec908ed581ec5","comment_id":"g86b6n9","kind":"comment","text":"I'm sad to say that there needs to be more of this level of advice out there. I learned more in this thread than in weeks of reading about NLP through tutorials and intro articles/guides etc.","timestamp":"2020-10-09T01:45:12+00:00","score":5},{"role":"OP","user_id":"anon_3f681dbf8bd45b3a","comment_id":"g885xhp","kind":"comment","text":"I appreciate you saying this. I thought I was just missing something obvious.","timestamp":"2020-10-09T15:50:14+00:00","score":1},{"role":"answerer","user_id":"anon_674ec908ed581ec5","comment_id":"g89ayu4","kind":"comment","text":"Back in the day, ML etc used to have people coming into it from a diverse range of fields. It's kind of been funneled by comp-sci and a few related fields now, from what I've read. A lot of the older experts are lamenting the lack of diversity of domain knowledge. \n\nI'm coming into it from news media and I've never studied for something so heavily in my life. What I've found is that the documentation skips parts from a simple lack of awareness among those writing it. I can understand the difference between a LSTM unit and a GMU, but it's nice to know the context for lemmatising and stemming too - nobody explains it - they just show you how to do it and expect you to know why you need to do it.\n\nIt's an enormous domain, I think you and I are going to have gaps like this all over the place. Feel free to add me as a friend and we can start a study group or something if you'd like. I might make my study notes (MD files from Obsidian) GitHub repo public (and probably have a million gatekeepers 'wull akshully' me to death) :( so you can at least see where I've been and maybe fork them for your own use?","timestamp":"2020-10-09T21:55:14+00:00","score":2},{"role":"OP","user_id":"anon_3f681dbf8bd45b3a","comment_id":"g8cugou","kind":"comment","text":"Thank you. This was very helpful. Maybe I just haven't found the right sources, but it seems like there's a big gap when it comes to intermediate beginners without programming backgrounds, so I think you might have a broad audience. I agree with you on the lack of explanations about why one does particular things, which is making this more difficult on me as I learn best when I know the why (yeah, I was that annoying kid in class).","timestamp":"2020-10-10T19:23:06+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_3f681dbf8bd45b3a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_674ec908ed581ec5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g86b6n9","thanks_reply_id":"g885xhp","post_score":4,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_8bf74b6dad54b241","answerer_user_id":"anon_b7a5d8cbed2518c6","subreddit":"LanguageTechnology","timestamp":"2020-10-10T21:52:32+00:00","post_id":"j8t4aw","question":"How do you measure translation quality with a NUMBER?\n\nI've tried looking this up everywhere and nobody gives a satisfactory answer.\n\nMy company gets a lot of work for translation projects. We have to hire external contractors who are native speakers. Our client gives us thousands of words and phrases (mainly intended as dictionary entries) that they want translated and their definitions fully translated, so that every word, phrase and definition fully reflects the meaning of the source text. We send these thousands of peices of text to our external contractors and get them to translate.\n\nThere is NO WAY for us to check their work, or if they've actually done a good job. We don't speak these languages and even if we did, we cannot reasonably read all the text to make sure the translation accurately captures all the original meaning. They also need to annotate some finer points of it, like whether something is vulgar, or derogatory, or formal or informal, which they don't always do and that we have no way to check.\n\nSo what we end up doing is sending the translation to a second native speaker contractor, who just gives us a yes/no answer to \"is this a good translation, is the meaning fully captured, are all the extra annotations correct\" and if they say no it's re-done, if they say yes it's passed onto the big delivery for the client.\n\nBut this process doesn't work. The client still found a shit ton of errors, like a bunch of things not being marked as derogatory when they should've been, and a bunch of things being marked formal when they're not. This client expects less than 5% of everything to be marked \"formal\" and our translators were marking 25-30% oif the data as formal and our 2nd verifiers were saying this was ok. So this process doesn't work.\n\nWe have NO NUMBERS to quantify the quality of what we're doing, and everything I've looked up on this topic pretty much says to verify translation quality doing the exact thing we've been doing. It clearly doesn't work. The only \"statistic\" or number we get out of this is 100%, obviously, because we don't pass anything to client delivery if it received a \"no\" answer in the second step; we re-do that until it receives a \"yes\" answer. So all we can show them is \"our data was translated by a human and 100% verified by a 2nd human reviewer\".\n\nWell, that's not adequate. We clearly don't have 100% translation quality just because 2nd human reviewers said \"yes\" to every translation we delivered. So how do we actually get a NUMBER, a STAT, to actually measure the quality of all the translations, and also all the meta-annotations required like formal or derogatory (ie. what you'd see in dictionary entries)? I need a number to measure quality other than just the % of \";yes\" from our 2nd reviewers, which is always going to be 100% of what we deliver.\n\nHow can this be done? Does anyone know?","preferred_answer":"Use multiple translators and use a metric like BLEU. https://en.m.wikipedia.org/wiki/BLEU\n\nYou don’t need to pay for multiple translations for everything. You just need enough for a statistical test.","full_conversation":[{"role":"OP","user_id":"anon_8bf74b6dad54b241","comment_id":"j8t4aw","kind":"post","text":"How do you measure translation quality with a NUMBER?\n\nI've tried looking this up everywhere and nobody gives a satisfactory answer.\n\nMy company gets a lot of work for translation projects. We have to hire external contractors who are native speakers. Our client gives us thousands of words and phrases (mainly intended as dictionary entries) that they want translated and their definitions fully translated, so that every word, phrase and definition fully reflects the meaning of the source text. We send these thousands of peices of text to our external contractors and get them to translate.\n\nThere is NO WAY for us to check their work, or if they've actually done a good job. We don't speak these languages and even if we did, we cannot reasonably read all the text to make sure the translation accurately captures all the original meaning. They also need to annotate some finer points of it, like whether something is vulgar, or derogatory, or formal or informal, which they don't always do and that we have no way to check.\n\nSo what we end up doing is sending the translation to a second native speaker contractor, who just gives us a yes/no answer to \"is this a good translation, is the meaning fully captured, are all the extra annotations correct\" and if they say no it's re-done, if they say yes it's passed onto the big delivery for the client.\n\nBut this process doesn't work. The client still found a shit ton of errors, like a bunch of things not being marked as derogatory when they should've been, and a bunch of things being marked formal when they're not. This client expects less than 5% of everything to be marked \"formal\" and our translators were marking 25-30% oif the data as formal and our 2nd verifiers were saying this was ok. So this process doesn't work.\n\nWe have NO NUMBERS to quantify the quality of what we're doing, and everything I've looked up on this topic pretty much says to verify translation quality doing the exact thing we've been doing. It clearly doesn't work. The only \"statistic\" or number we get out of this is 100%, obviously, because we don't pass anything to client delivery if it received a \"no\" answer in the second step; we re-do that until it receives a \"yes\" answer. So all we can show them is \"our data was translated by a human and 100% verified by a 2nd human reviewer\".\n\nWell, that's not adequate. We clearly don't have 100% translation quality just because 2nd human reviewers said \"yes\" to every translation we delivered. So how do we actually get a NUMBER, a STAT, to actually measure the quality of all the translations, and also all the meta-annotations required like formal or derogatory (ie. what you'd see in dictionary entries)? I need a number to measure quality other than just the % of \";yes\" from our 2nd reviewers, which is always going to be 100% of what we deliver.\n\nHow can this be done? Does anyone know?","timestamp":"2020-10-10T21:52:32+00:00","score":6},{"role":"answerer","user_id":"anon_b7a5d8cbed2518c6","comment_id":"g8i0fft","kind":"comment","text":"Use multiple translators and use a metric like BLEU. https://en.m.wikipedia.org/wiki/BLEU\n\nYou don’t need to pay for multiple translations for everything. You just need enough for a statistical test.","timestamp":"2020-10-11T16:33:03+00:00","score":0},{"role":"OP","user_id":"anon_8bf74b6dad54b241","comment_id":"g8i5qz0","kind":"comment","text":"But for BLEU I'd need a perfect human translation to use as a gold standard. And this isn't measuring machine translations against a perfect human one, this is trying to measure the human translations themselves. The problem is I don't HAVE a perfect human translation for all of these, so I have nothing to compare it to.","timestamp":"2020-10-11T17:20:40+00:00","score":2},{"role":"answerer","user_id":"anon_b7a5d8cbed2518c6","comment_id":"g8yg6hj","kind":"comment","text":"There is no such thing as a perfect translation. Different translators may have different opinions. There may be multiple valid translations for the same source.\n\nBLEU is designed to handle this. It is commonly used in machine translation, but it should also be useful for human translators. There are no special assumptions in BLEU about translators being machines.\n\nIt isn't perfect, but it correlates well with subjective human evaluations of translation quality. \n\nThe gold standard is a subjective human evaluation using a panel of human experts. You could also do that. \n\nIn particular, you could pick standard translations from an existing corpus such as WMT ( https://www.statmt.org/wmt15/translation-task.html ) and give them to translators. Compute BLEU against the references and use that to rank your translators.\n\nIn your task you care about additional information such as derogatory or formal language. You can follow a similar principal here. Build a small test set of examples, and have a panel of experts tag them. You can then compute accuracy on each class for each of your translators.","timestamp":"2020-10-16T00:50:26+00:00","score":1},{"role":"OP","user_id":"anon_8bf74b6dad54b241","comment_id":"g9cti3j","kind":"comment","text":"> Build a small test set of examples, and have a panel of experts tag them.\n\nOur hired translators are SUPPOSED to be our \"panel of experts\". They're still making mistakes. Unless I have a human expert who is guaranteed to annotate perfectly and not make any mistakes, then I can't do this, can I? I can't do an evaluation without some sort of gold standard. I need a trusted human expert to make that 100% perfect gold standard. The humans we're hiring are the ones that are supposed to be doing this, and they're making mistakes everywhere.","timestamp":"2020-10-19T19:04:14+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_8bf74b6dad54b241","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b7a5d8cbed2518c6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g8i0fft","thanks_reply_id":"g8i5qz0","post_score":6,"answer_score":0,"preferred_answer_is_top_level":false}} {"user_id":"anon_984bef45504ef49d","answerer_user_id":"anon_20127d9448fe3506","subreddit":"LanguageTechnology","timestamp":"2020-10-14T10:43:25+00:00","post_id":"jaybdn","question":"Is there any specific terminology in NLP/CompLing regarding the phenomenon where entities are linked via commas or \"and\"/\"or?\" And is there a way to extract such cases?\n\nHi. The title is basically the question, but let me elaborate. I'm currently working on an NLP project and have noticed that there are cases where models behave in unexpected ways when entities are connected by commas or conjunctions like \"and\" or \"or.\" One example I can think of off the bat is:\n\n> *COVID-19* is said to cause *coughing*, *fever*, and *loss of smell*.\n\nIn this particular case, it's not hard to see that the symptoms of COVID-19 are listed and connected via commas and the conjunction \"and,\" and I'm wondering if there's any specific terminology to refer to this.\n\nThe reason why I'm asking is because I've noticed that in a lot of NLP literature, authors have pointed out that models behave in unexpected or unwanted ways when entities are \"grouped\" like this. However, I haven't seen any definitive approach to formalize that.\n\nRegarding the second question (i.e., extracting such cases from text), has there been any work w.r.t. finding such cases? I suppose you could use a rule-based template, but that seems too limited and not very useful. I was hoping someone more knowledgeable here could perhaps suggest an automatic tool for the job.\n\nAny feedback or tips are appreciated. Thanks!","preferred_answer":"In linguistics this is called coordinated conjunction. Identifying and extracting coordinated conjunctions could be done using syntactic parsing. Depending on the grammatical framework of the parser you could write rules or patterns to identify examples like the one you mentioned. I think in the real world you’ll find that coordinations aren’t always so clean, though, so a high recall method might require gathering a representative corpus and using supervised learning. If all you care about is precision, though, rules may serve just fine. You might even be able to get away with a pattern query language like that of SketchEngine.","full_conversation":[{"role":"OP","user_id":"anon_984bef45504ef49d","comment_id":"jaybdn","kind":"post","text":"Is there any specific terminology in NLP/CompLing regarding the phenomenon where entities are linked via commas or \"and\"/\"or?\" And is there a way to extract such cases?\n\nHi. The title is basically the question, but let me elaborate. I'm currently working on an NLP project and have noticed that there are cases where models behave in unexpected ways when entities are connected by commas or conjunctions like \"and\" or \"or.\" One example I can think of off the bat is:\n\n> *COVID-19* is said to cause *coughing*, *fever*, and *loss of smell*.\n\nIn this particular case, it's not hard to see that the symptoms of COVID-19 are listed and connected via commas and the conjunction \"and,\" and I'm wondering if there's any specific terminology to refer to this.\n\nThe reason why I'm asking is because I've noticed that in a lot of NLP literature, authors have pointed out that models behave in unexpected or unwanted ways when entities are \"grouped\" like this. However, I haven't seen any definitive approach to formalize that.\n\nRegarding the second question (i.e., extracting such cases from text), has there been any work w.r.t. finding such cases? I suppose you could use a rule-based template, but that seems too limited and not very useful. I was hoping someone more knowledgeable here could perhaps suggest an automatic tool for the job.\n\nAny feedback or tips are appreciated. Thanks!","timestamp":"2020-10-14T10:43:25+00:00","score":16},{"role":"answerer","user_id":"anon_20127d9448fe3506","comment_id":"g8scah8","kind":"comment","text":"In linguistics this is called coordinated conjunction. Identifying and extracting coordinated conjunctions could be done using syntactic parsing. Depending on the grammatical framework of the parser you could write rules or patterns to identify examples like the one you mentioned. I think in the real world you’ll find that coordinations aren’t always so clean, though, so a high recall method might require gathering a representative corpus and using supervised learning. If all you care about is precision, though, rules may serve just fine. You might even be able to get away with a pattern query language like that of SketchEngine.","timestamp":"2020-10-14T11:40:35+00:00","score":14},{"role":"OP","user_id":"anon_984bef45504ef49d","comment_id":"g8scqwx","kind":"comment","text":"Hi, thanks for the feedback! I actually have never heard of SketchEngine before, I'll take a look.\n\nThis may be a long shot, but have you ever come across work in CompLing or NLP that addresses this particular issue? I'm beginning to think that this issue itself may perhaps warrant an entire research project of its own.","timestamp":"2020-10-14T11:47:17+00:00","score":1},{"role":"answerer","user_id":"anon_20127d9448fe3506","comment_id":"g8t5pmx","kind":"comment","text":"I haven’t looked into it thoroughly, but my sense is that since this isn’t a useful task in and of itself, it’s likely discussed in the literature as a method for doing some intermediate step in some other IE task.","timestamp":"2020-10-14T16:29:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_984bef45504ef49d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_20127d9448fe3506","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"g8scah8","thanks_reply_id":"g8scqwx","post_score":16,"answer_score":14,"preferred_answer_is_top_level":true}} {"user_id":"anon_ba41539d5856fcd9","answerer_user_id":"anon_e0d34ca9f20b8611","subreddit":"LanguageTechnology","timestamp":"2020-11-03T15:52:33+00:00","post_id":"jncozc","question":"How to get group/parents of a word using NLP\n\nI’m just getting started in reading about NLP and was wondering how I can find the group a certain word is a part of. For example if I input the word “carrot” I want the output to be “vegetable”. Is there any way to go about doing this with pre-trained models or do I have to create my own dataset with the connections between words? \n\nThanks for any help!","preferred_answer":"You should look at using WordNet. You can access it using the nltk interface. It consists of a big corpus of words that are connected based on the hierarchy. You can get more implementation details here: https://www.nltk.org/howto/wordnet.html","full_conversation":[{"role":"OP","user_id":"anon_ba41539d5856fcd9","comment_id":"jncozc","kind":"post","text":"How to get group/parents of a word using NLP\n\nI’m just getting started in reading about NLP and was wondering how I can find the group a certain word is a part of. For example if I input the word “carrot” I want the output to be “vegetable”. Is there any way to go about doing this with pre-trained models or do I have to create my own dataset with the connections between words? \n\nThanks for any help!","timestamp":"2020-11-03T15:52:33+00:00","score":3},{"role":"answerer","user_id":"anon_e0d34ca9f20b8611","comment_id":"gb0klhr","kind":"comment","text":"You should look at using WordNet. You can access it using the nltk interface. It consists of a big corpus of words that are connected based on the hierarchy. You can get more implementation details here: https://www.nltk.org/howto/wordnet.html","timestamp":"2020-11-03T16:06:08+00:00","score":13},{"role":"OP","user_id":"anon_ba41539d5856fcd9","comment_id":"gb3issv","kind":"comment","text":"Looks great! Thanks!!","timestamp":"2020-11-04T08:15:53+00:00","score":2},{"role":"answerer","user_id":"anon_e0d34ca9f20b8611","comment_id":"gb4x96z","kind":"comment","text":"Happy to help :)","timestamp":"2020-11-04T17:37:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ba41539d5856fcd9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e0d34ca9f20b8611","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gb0klhr","thanks_reply_id":"gb3issv","post_score":3,"answer_score":13,"preferred_answer_is_top_level":true}} {"user_id":"anon_b5916f5bf0bd9a25","answerer_user_id":"anon_aa43c00a7b7adcf9","subreddit":"LanguageTechnology","timestamp":"2020-11-17T16:18:52+00:00","post_id":"jvvu8c","question":"What kind of reputation does Edinburgh have for NLP?\n\nSpecifically, would a master's in NLP from Edinburgh be well regarded for PhD applications to top US universities and pre-doc industry research programs?","preferred_answer":"Best in Europe, but during PhD admits, I very rarely see MS from Edinburgh even though we're a top 10 program (I suspect people don't want to leave). You'll certainly do fine if you want to do PhD in the US.","full_conversation":[{"role":"OP","user_id":"anon_b5916f5bf0bd9a25","comment_id":"jvvu8c","kind":"post","text":"What kind of reputation does Edinburgh have for NLP?\n\nSpecifically, would a master's in NLP from Edinburgh be well regarded for PhD applications to top US universities and pre-doc industry research programs?","timestamp":"2020-11-17T16:18:52+00:00","score":7},{"role":"answerer","user_id":"anon_aa43c00a7b7adcf9","comment_id":"gcmlv6s","kind":"comment","text":"Best in Europe, but during PhD admits, I very rarely see MS from Edinburgh even though we're a top 10 program (I suspect people don't want to leave). You'll certainly do fine if you want to do PhD in the US.","timestamp":"2020-11-17T17:16:11+00:00","score":8},{"role":"OP","user_id":"anon_b5916f5bf0bd9a25","comment_id":"gcn261p","kind":"comment","text":"Thank you! Along the same lines - what would you think of an application from someone with a professional masters degree from an ischool such as data science/info systems?","timestamp":"2020-11-17T19:20:19+00:00","score":1},{"role":"answerer","user_id":"anon_aa43c00a7b7adcf9","comment_id":"gcxsnax","kind":"comment","text":"As far as I know, Edinburgh doesn't have professional MS iSchool (unless you mean Informatics, which is just the same as CS in the US as far as I'm concerned).","timestamp":"2020-11-20T13:25:11+00:00","score":1},{"role":"OP","user_id":"anon_b5916f5bf0bd9a25","comment_id":"gcxti49","kind":"comment","text":"Apologies, I should have been more clear, I meant something like Berkeley, CMU etc with interdisciplinary structures.","timestamp":"2020-11-20T13:35:00+00:00","score":1},{"role":"answerer","user_id":"anon_aa43c00a7b7adcf9","comment_id":"gdpekkw","kind":"comment","text":"Then it really depends. I know UMD better, so I'll answer as if you came from the MIM or MCHI from UMD. Then it really depends on whether you worked with a faculty on a research project and if it went well. If you just did coursework, a MS in CS is usually viewed more positively.","timestamp":"2020-11-26T21:36:49+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_b5916f5bf0bd9a25","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_aa43c00a7b7adcf9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gcmlv6s","thanks_reply_id":"gcn261p","post_score":7,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_4fbdd850ac05cb0b","answerer_user_id":"anon_eb7833f14c043af8","subreddit":"LanguageTechnology","timestamp":"2020-11-20T14:53:15+00:00","post_id":"jxqedj","question":"How are token embeddings for BERT initialized?\n\nThis may be a simple question, but I'm having trouble finding the answer online. The input representation described in the paper is the sum of token, segment, and positional embeddings. I understand the segment and positional embeddings are learned. And in order to be summed, token, segment, and positional embeddings should have the same dimensions.\n\nAre token embeddings just a one-hot vector over the wordpiece vocab? Or is it something else? And what are the dimensions of the final summed input representation?","preferred_answer":"Typically they’re random. Position embeddings aren’t learned.","full_conversation":[{"role":"OP","user_id":"anon_4fbdd850ac05cb0b","comment_id":"jxqedj","kind":"post","text":"How are token embeddings for BERT initialized?\n\nThis may be a simple question, but I'm having trouble finding the answer online. The input representation described in the paper is the sum of token, segment, and positional embeddings. I understand the segment and positional embeddings are learned. And in order to be summed, token, segment, and positional embeddings should have the same dimensions.\n\nAre token embeddings just a one-hot vector over the wordpiece vocab? Or is it something else? And what are the dimensions of the final summed input representation?","timestamp":"2020-11-20T14:53:15+00:00","score":3},{"role":"answerer","user_id":"anon_eb7833f14c043af8","comment_id":"gcyex03","kind":"comment","text":"Typically they’re random. Position embeddings aren’t learned.","timestamp":"2020-11-20T16:47:12+00:00","score":2},{"role":"OP","user_id":"anon_4fbdd850ac05cb0b","comment_id":"gcypega","kind":"comment","text":"Got it, thanks! Would you happen to know the dimensions of the final input? And is that dimensionality arbitrary/a hyperparameter or based on the vocab size?","timestamp":"2020-11-20T18:10:25+00:00","score":1},{"role":"answerer","user_id":"anon_eb7833f14c043af8","comment_id":"gcyrupe","kind":"comment","text":"That is, of course, adjustable. You should consult the paper or source code of the implementation you are using to determine what best practices are.","timestamp":"2020-11-20T18:29:55+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4fbdd850ac05cb0b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_eb7833f14c043af8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gcyex03","thanks_reply_id":"gcypega","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_e5d2866d21b555f7","answerer_user_id":"anon_e2856e4dc523174d","subreddit":"LanguageTechnology","timestamp":"2020-11-20T22:06:31+00:00","post_id":"jxylt7","question":"Chat bot, or text generation of a friends messages\n\nI made a pretty basic random quote generator from my friends messages (with their permission of course), using the gpt2-simple python package.\n\nNow I want to improve this model, so it can actually respond to any prompt. I have thousands of responses from my friend as a dataset, and I've mixed in some Reddit comments of subreddits/hobbies he frequents. \n\nMy questions are these:\n\n - How would you approach this problem?\n - In a GPT-2/GPT-3 setting, where I am fine-tuning a pre-trained model, how should the data be formatted? Should it just be raw text where e.g. one line is someone else's prompt, and the next line is my friends response?\n - Are there any existing softwares or pre trained models that can be easily implemented?","preferred_answer":"The GPT-2 model with gpt-2-simple fine tuning should suffice for this use case.\n\nI am using HTML/XML-like tags, one to provide an overall context and then others for individual messages within that context. For example, in the training data I set it up like this:\n\nWanna get pizza?If you're paying\n\nThen when generating text, I include just up to the end of the tag and GPT-2 will generate fresh text after that (edit: and it will generate too).\n\nI think that the context is quite important, because the nature of chat bot language is very conversational and quite different to bodies of text (news, journals, essays etc) which GPT-2 is pre-trained on.\n\nGPT-2 loves the structure and order of the tags and will reliably output 'XML' with which you can then use lxml or bs4 to easily parse the response back into a Python object.\n\nYou can use more than 2 or 3 XML tags to give greater context, for example if you were training with a TV show script, the XML tag would be the character's name and you could generate text in that character by prefixing with that tag. But don't create too many tags or you'll dilute the effectiveness IMO.\n\nAlso don't overtrain it if you don't have much training data which is probably the case given that it's just your friends messages you're working with!\n\nI and a few others are running GPT-2 chat bots over on r/SubSimGPT2Interactive using this technique and you're welcome to create a bot to join us and also check out our source code.","full_conversation":[{"role":"OP","user_id":"anon_e5d2866d21b555f7","comment_id":"jxylt7","kind":"post","text":"Chat bot, or text generation of a friends messages\n\nI made a pretty basic random quote generator from my friends messages (with their permission of course), using the gpt2-simple python package.\n\nNow I want to improve this model, so it can actually respond to any prompt. I have thousands of responses from my friend as a dataset, and I've mixed in some Reddit comments of subreddits/hobbies he frequents. \n\nMy questions are these:\n\n - How would you approach this problem?\n - In a GPT-2/GPT-3 setting, where I am fine-tuning a pre-trained model, how should the data be formatted? Should it just be raw text where e.g. one line is someone else's prompt, and the next line is my friends response?\n - Are there any existing softwares or pre trained models that can be easily implemented?","timestamp":"2020-11-20T22:06:31+00:00","score":12},{"role":"answerer","user_id":"anon_e2856e4dc523174d","comment_id":"gd084dv","kind":"comment","text":"The GPT-2 model with gpt-2-simple fine tuning should suffice for this use case.\n\nI am using HTML/XML-like tags, one to provide an overall context and then others for individual messages within that context. For example, in the training data I set it up like this:\n\nWanna get pizza?If you're paying\n\nThen when generating text, I include just up to the end of the tag and GPT-2 will generate fresh text after that (edit: and it will generate too).\n\nI think that the context is quite important, because the nature of chat bot language is very conversational and quite different to bodies of text (news, journals, essays etc) which GPT-2 is pre-trained on.\n\nGPT-2 loves the structure and order of the tags and will reliably output 'XML' with which you can then use lxml or bs4 to easily parse the response back into a Python object.\n\nYou can use more than 2 or 3 XML tags to give greater context, for example if you were training with a TV show script, the XML tag would be the character's name and you could generate text in that character by prefixing with that tag. But don't create too many tags or you'll dilute the effectiveness IMO.\n\nAlso don't overtrain it if you don't have much training data which is probably the case given that it's just your friends messages you're working with!\n\nI and a few others are running GPT-2 chat bots over on r/SubSimGPT2Interactive using this technique and you're welcome to create a bot to join us and also check out our source code.","timestamp":"2020-11-21T02:08:14+00:00","score":5},{"role":"OP","user_id":"anon_e5d2866d21b555f7","comment_id":"gd1x2ro","kind":"comment","text":"Wow! Sounds a lot more simple than I thought. Thank you very much for the help, I just need to re-format the data then and pass it into the same sort of model that I had done before.\n\nI have been watching those GPT2 subs for a while actually! I'll have a think about it, thank you again for the help.","timestamp":"2020-11-21T12:48:01+00:00","score":1},{"role":"answerer","user_id":"anon_e2856e4dc523174d","comment_id":"gd1ypuy","kind":"comment","text":"If you've already worked out how to get a trained model, you've done half the task already! And I would say the project is more about connecting APIs with Python than machine learning. You can go deeper in the latter if you choose.","timestamp":"2020-11-21T13:01:44+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e5d2866d21b555f7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e2856e4dc523174d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gd084dv","thanks_reply_id":"gd1x2ro","post_score":12,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_53b21dba4be27ad4","answerer_user_id":"anon_804ce1b6d46276fe","subreddit":"LanguageTechnology","timestamp":"2020-11-25T23:43:36+00:00","post_id":"k13wyy","question":"What’s the best way to learn more NLP for the initiate/beginner?\n\nBeen seeing a lot of great quality responses and posts in the channel. Would appreciate your thoughts or signposting: \n\nI have done a personal project on text classification recently and enjoyed it. Only have a vague idea of several other branches like machine translation, or text generation. I’m using DataCamp as my main learning source for now. \nI’m looking to focus more on the applied side of things, ie implementation and real life problem sets. \n\n>> What would be your top recommendation for a next project / book / area to get into at this stage? I realize this is pretty broad, so maybe I can put it like this: what are some fun personal projects that you have done as a beginner that helped?","preferred_answer":"[The NLTK book](https://www.nltk.org/book/) and [Jurafsky and Martin's Speech and Language Processing](https://web.stanford.edu/~jurafsky/slp3/) are going to put you at the level of a beginner/intermediate. Advanced is usually after getting work or research. Learn [python](https://automatetheboringstuff.com/2e/chapter1/) and I implore you to learn [R](https://r4ds.had.co.nz/). The Python link is very... eh, like it's a great book and is always rec'd but you should look up YouTube videos for things like a part-of-speech tagger and a web-scraper (which should really be the only projects you start as a beginner). I give you R so that you learn to do data analysis, which is important in research (and to be honest, everywhere at this point in high level work, which NLP is; it's incredibly interdisciplinary). YouTube is your best friend, Medium, reddit and StackExchange are your friend group. If you want to get into machine translation these are absolutely the beginning of your work, and these are the foundations of what you need to do to get into NLP.\n\nThe next level would be to have a good (but basic) understanding of syntax, phonology, and semantics. These are very difficult to link as they aren't usually open sourced (linguistics is pretty far behind technologically lmao), and while you can make do without these, I implore having an understanding as it would make your work a lot easier without having to reinvent the wheel (which computer scientists do often when they do linguistic work hahaha). \n\nMaybe I can scrap some more together, but these are essentials. There was a guy who posted some great papers and other resources he's put together over his career, I think, so if you'd like you can keep scrolling through this sub, or maybe I can help you look for some good quality threads. Hope this helps!","full_conversation":[{"role":"OP","user_id":"anon_53b21dba4be27ad4","comment_id":"k13wyy","kind":"post","text":"What’s the best way to learn more NLP for the initiate/beginner?\n\nBeen seeing a lot of great quality responses and posts in the channel. Would appreciate your thoughts or signposting: \n\nI have done a personal project on text classification recently and enjoyed it. Only have a vague idea of several other branches like machine translation, or text generation. I’m using DataCamp as my main learning source for now. \nI’m looking to focus more on the applied side of things, ie implementation and real life problem sets. \n\n>> What would be your top recommendation for a next project / book / area to get into at this stage? I realize this is pretty broad, so maybe I can put it like this: what are some fun personal projects that you have done as a beginner that helped?","timestamp":"2020-11-25T23:43:36+00:00","score":22},{"role":"answerer","user_id":"anon_804ce1b6d46276fe","comment_id":"gdmjfr5","kind":"comment","text":"[The NLTK book](https://www.nltk.org/book/) and [Jurafsky and Martin's Speech and Language Processing](https://web.stanford.edu/~jurafsky/slp3/) are going to put you at the level of a beginner/intermediate. Advanced is usually after getting work or research. Learn [python](https://automatetheboringstuff.com/2e/chapter1/) and I implore you to learn [R](https://r4ds.had.co.nz/). The Python link is very... eh, like it's a great book and is always rec'd but you should look up YouTube videos for things like a part-of-speech tagger and a web-scraper (which should really be the only projects you start as a beginner). I give you R so that you learn to do data analysis, which is important in research (and to be honest, everywhere at this point in high level work, which NLP is; it's incredibly interdisciplinary). YouTube is your best friend, Medium, reddit and StackExchange are your friend group. If you want to get into machine translation these are absolutely the beginning of your work, and these are the foundations of what you need to do to get into NLP.\n\nThe next level would be to have a good (but basic) understanding of syntax, phonology, and semantics. These are very difficult to link as they aren't usually open sourced (linguistics is pretty far behind technologically lmao), and while you can make do without these, I implore having an understanding as it would make your work a lot easier without having to reinvent the wheel (which computer scientists do often when they do linguistic work hahaha). \n\nMaybe I can scrap some more together, but these are essentials. There was a guy who posted some great papers and other resources he's put together over his career, I think, so if you'd like you can keep scrolling through this sub, or maybe I can help you look for some good quality threads. Hope this helps!","timestamp":"2020-11-26T04:07:19+00:00","score":6},{"role":"OP","user_id":"anon_53b21dba4be27ad4","comment_id":"gdn2sss","kind":"comment","text":"Thank you for the incredibly detailed reply, and even taking the time to link the resources. \n\nGood point about the linguistics concepts, somehow I had glossed over them. \n\nAppreciate this and it is more than enough to jumpstart my journey.","timestamp":"2020-11-26T08:17:22+00:00","score":2},{"role":"answerer","user_id":"anon_804ce1b6d46276fe","comment_id":"gdnw7ht","kind":"comment","text":"Of course; I appreciate the gold, that was very nice and you didn’t have to do that. Happy thanksgiving!","timestamp":"2020-11-26T14:09:12+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_53b21dba4be27ad4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_804ce1b6d46276fe","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gdmjfr5","thanks_reply_id":"gdn2sss","post_score":22,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_ae4c04236c232e6f","answerer_user_id":"anon_08394a2913907c3e","subreddit":"LanguageTechnology","timestamp":"2020-11-26T08:40:51+00:00","post_id":"k1boba","question":"How can I solely get the BERT word embeddings without running the model?\n\nI want to modify the BM25 algorithm to also take into consideration similar words so that the top sentences will be more relavent to my second sentence. So is it possible to encode my sentence into integer tokens and then embed it using some transformer model like GPT-2 or BERT? And would I be able to do this with Huggingface Transformers?\n\nEdit: \nWill I also be able to only run the embedding part so that I can save some inference time?","preferred_answer":"BERT is, in essence, a big fucking machine for contextualized embeddings. The \"embeddings\" part you clearly already know, but the \"contextualized\" means that the same word can get different embeddings, depending on the sentence (or the two sentences, if you're feeding it two). So it's definitely possible to embed the query, the document, or both of them together using BERT (and pretty easy with huggingface transformers, you basically just shove things into a pretrained BertTokenizer and then into the model). What this will do is actually run the tokenized sentence (with positional embeddings and such) through the model and you end up with an embedding for each position in the sentence. In addition, in case you're putting in two sentences as an input, the output corresponding to the \\[CLS\\] token will contain information about the relation between the two sentences.\n\n​\n\nIf you want to get an embedding for a single sentence, my advice is to average the outputs you got over all of the words (be mindful of the padding - use the attention mask to ignore it) instead of just using the \\[CLS\\] output.\n\n​\n\nFor your edit question: \"running the embedding part\" on BERT is literally using the entire model. If you want to, you could pre-embed your texts while indexing and then for inference time embed the query separately and use these two embeddings for BM25.","full_conversation":[{"role":"OP","user_id":"anon_ae4c04236c232e6f","comment_id":"k1boba","kind":"post","text":"How can I solely get the BERT word embeddings without running the model?\n\nI want to modify the BM25 algorithm to also take into consideration similar words so that the top sentences will be more relavent to my second sentence. So is it possible to encode my sentence into integer tokens and then embed it using some transformer model like GPT-2 or BERT? And would I be able to do this with Huggingface Transformers?\n\nEdit: \nWill I also be able to only run the embedding part so that I can save some inference time?","timestamp":"2020-11-26T08:40:51+00:00","score":9},{"role":"answerer","user_id":"anon_08394a2913907c3e","comment_id":"gdn6c3o","kind":"comment","text":"BERT is, in essence, a big fucking machine for contextualized embeddings. The \"embeddings\" part you clearly already know, but the \"contextualized\" means that the same word can get different embeddings, depending on the sentence (or the two sentences, if you're feeding it two). So it's definitely possible to embed the query, the document, or both of them together using BERT (and pretty easy with huggingface transformers, you basically just shove things into a pretrained BertTokenizer and then into the model). What this will do is actually run the tokenized sentence (with positional embeddings and such) through the model and you end up with an embedding for each position in the sentence. In addition, in case you're putting in two sentences as an input, the output corresponding to the \\[CLS\\] token will contain information about the relation between the two sentences.\n\n​\n\nIf you want to get an embedding for a single sentence, my advice is to average the outputs you got over all of the words (be mindful of the padding - use the attention mask to ignore it) instead of just using the \\[CLS\\] output.\n\n​\n\nFor your edit question: \"running the embedding part\" on BERT is literally using the entire model. If you want to, you could pre-embed your texts while indexing and then for inference time embed the query separately and use these two embeddings for BM25.","timestamp":"2020-11-26T08:58:44+00:00","score":10},{"role":"OP","user_id":"anon_ae4c04236c232e6f","comment_id":"gdo0zlv","kind":"comment","text":"Thanks for such a detailed answer!\n\nThis is a stupid question, but does the amount of layers improve the contextuality? \nI don't need the bery best word embeddings, I care more about speed, so if I only use the first two or the last two transformer layers, would that still make a difference. And also, can I choose to just use the embedding layer?","timestamp":"2020-11-26T14:55:59+00:00","score":1},{"role":"answerer","user_id":"anon_08394a2913907c3e","comment_id":"gdo3b7v","kind":"comment","text":"I don't believe taking some intermediate layer would work out of the box, you might need to finetune it somehow before inference or pass it through some kind of FC layer to get something that's meaningful to you instead of the BERT's next layer. Like people said in other comments, you can use a smaller version or a distilled version of BERT. You can look at [DistilBERT](https://huggingface.co/transformers/model_doc/distilbert.html) for a distilled version, or some implementation of stuff like tinyBERT (there are some on huggingface's model hub, like [this one](https://huggingface.co/prajjwal1/bert-tiny). Note that these are not published by huggingface, only hosted by them, so make sure whoever uploaded it seems convincing enough). \n\n\nIf you mean the embedding layer at the entrance of the model, then you'd just be better off averaging Word2Vec or Glove vectors for the whole sentence. BERT (and all other contextualized embeddings, from ELMo to GPT3) draws its power from the multiple layers of self attention or just attention making the embedding of each word aware of the other words and their interactions.","timestamp":"2020-11-26T15:16:18+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ae4c04236c232e6f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_08394a2913907c3e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gdn6c3o","thanks_reply_id":"gdo0zlv","post_score":9,"answer_score":10,"preferred_answer_is_top_level":true}} {"user_id":"anon_cbd859b9d6ddc39c","answerer_user_id":"anon_ca639ffefeeb1990","subreddit":"LanguageTechnology","timestamp":"2020-12-01T20:32:13+00:00","post_id":"k4tf72","question":"How can I extract NOUN and ADJ together in spacy?\n\nFor example: \n\n\nThe teacher is calm and intelligent, but the material is bad. \n\n\nI want an output that is like: \n\n \n{teacher calm}, {teacher intelligent} and {material bad} \n\n​\n\nCan anyone help me? Thanks!","preferred_answer":"nlp = spacy.load(\"en\\_core\\_web\\_sm\")\n\ndoc = nlp(\"The dog is cute\")\n\nfor token in doc:\n\nprint(token.text, token.lemma\\_, token.pos\\_, token.tag\\_, token.dep\\_,\n\ntoken.shape\\_, token.is\\_alpha, token.is\\_stop)\n\nThis will return:\n\n The the DET DT det \n\n dog dog NOUN NN nsubj \n\n is be AUX VBZ ROOT \n\n cute cute ADJ JJ acomp \n\nSee \"acomp\"? This means the adjective is a complement to the noun, so you preserve the noun, which is also the nsubj, and preserve the ADJ given it is \"acomp\". If the adjective and noun are next to each-other (\"the cute dog\"), you just use noun-chunking via the dependency parser.","full_conversation":[{"role":"OP","user_id":"anon_cbd859b9d6ddc39c","comment_id":"k4tf72","kind":"post","text":"How can I extract NOUN and ADJ together in spacy?\n\nFor example: \n\n\nThe teacher is calm and intelligent, but the material is bad. \n\n\nI want an output that is like: \n\n \n{teacher calm}, {teacher intelligent} and {material bad} \n\n​\n\nCan anyone help me? Thanks!","timestamp":"2020-12-01T20:32:13+00:00","score":6},{"role":"answerer","user_id":"anon_ca639ffefeeb1990","comment_id":"geatxvz","kind":"comment","text":"nlp = spacy.load(\"en\\_core\\_web\\_sm\")\n\ndoc = nlp(\"The dog is cute\")\n\nfor token in doc:\n\nprint(token.text, token.lemma\\_, token.pos\\_, token.tag\\_, token.dep\\_,\n\ntoken.shape\\_, token.is\\_alpha, token.is\\_stop)\n\nThis will return:\n\n The the DET DT det \n\n dog dog NOUN NN nsubj \n\n is be AUX VBZ ROOT \n\n cute cute ADJ JJ acomp \n\nSee \"acomp\"? This means the adjective is a complement to the noun, so you preserve the noun, which is also the nsubj, and preserve the ADJ given it is \"acomp\". If the adjective and noun are next to each-other (\"the cute dog\"), you just use noun-chunking via the dependency parser.","timestamp":"2020-12-01T21:22:32+00:00","score":2},{"role":"OP","user_id":"anon_cbd859b9d6ddc39c","comment_id":"geaxcui","kind":"comment","text":"Thank you so much for you help! \nDo you have any code that can already do this? I'm a bit new to Python and I'm trying my best!","timestamp":"2020-12-01T21:49:17+00:00","score":1},{"role":"answerer","user_id":"anon_ca639ffefeeb1990","comment_id":"geb0kq0","kind":"comment","text":"Besides the code I just sent? It's just string-matching, I would recommend trying to figure it out yourself as it is pretty much a bread and butter skill. All the strings are there already: if token.dep\\_ ==\"acomp\" and token.pos\\_ == \"ADJ\", you know it belongs with the noun.","timestamp":"2020-12-01T22:14:56+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_cbd859b9d6ddc39c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ca639ffefeeb1990","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"geatxvz","thanks_reply_id":"geaxcui","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_c9c0e682b57e8fca","answerer_user_id":"anon_8261e83ba3c02f6d","subreddit":"LanguageTechnology","timestamp":"2020-12-02T23:39:46+00:00","post_id":"k5lerb","question":"How do you measure a models' creativity?\n\nIs there any established metric for creativity or is perplexity treated as creativity? \n\nRelated to that, is perplexity inherently undesirable?","preferred_answer":"You might have a look at metaphor generation task where the balance between novelty and understandability is required. This might be the closest topic to creativity in NLP.","full_conversation":[{"role":"OP","user_id":"anon_c9c0e682b57e8fca","comment_id":"k5lerb","kind":"post","text":"How do you measure a models' creativity?\n\nIs there any established metric for creativity or is perplexity treated as creativity? \n\nRelated to that, is perplexity inherently undesirable?","timestamp":"2020-12-02T23:39:46+00:00","score":4},{"role":"answerer","user_id":"anon_8261e83ba3c02f6d","comment_id":"gefun8c","kind":"comment","text":"You might have a look at metaphor generation task where the balance between novelty and understandability is required. This might be the closest topic to creativity in NLP.","timestamp":"2020-12-03T01:19:52+00:00","score":3},{"role":"OP","user_id":"anon_c9c0e682b57e8fca","comment_id":"geh4mz3","kind":"comment","text":"> metaphor generation task \n\nthanks. can you recommend a source?","timestamp":"2020-12-03T10:53:50+00:00","score":1},{"role":"answerer","user_id":"anon_8261e83ba3c02f6d","comment_id":"gs5b4gy","kind":"comment","text":"I am so sory for missing your reply!\n\nIt's probably too late, but have a look at this [paper](https://www.jstage.jst.go.jp/article/jnlp/26/2/26_277/_article), for example.","timestamp":"2021-03-25T07:47:53+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c9c0e682b57e8fca","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8261e83ba3c02f6d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gefun8c","thanks_reply_id":"geh4mz3","post_score":4,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_5a0e2fa377309c7d","answerer_user_id":"anon_4dd8f7e039bff594","subreddit":"LanguageTechnology","timestamp":"2020-12-05T01:01:37+00:00","post_id":"k6xug0","question":"Need help thinking of project\n\nLong story short I need help thinking of a feasible nlp project for my school class. I had a plan that has sadly crumbled so I need to whip something together in the next two weeks. My dataset from my failed project is thousands of news articles from two separate news source apis for the last few weeks. I have article titles, publication dates, and the first full paragraph of the news articles themselves. Does anyone here have any ideas of a project I could complete with this data set? I’m desperate and appreciative of any help. Thanks!","preferred_answer":"If you're set on using this data, I think it's helpful to think about what kind of supervisory signal you can obtain from it. \n\nYou have dates, can you monitor ongoing stories over time and somehow connect related articles? You have titles, can you draw connections between titles and first paragraphs? There's a lot you can do with paragraphs of grammatical plain text (can use it for one of a billion tasks that benefit from unsupervised training). What about looking into the structure of these paragraphs? Maybe patterns of sentences are used. Maybe you can predict whether a sentence belongs to/is relevant to a given paragraph. \n\nMy initial thought about paragraphs from new sources is that these paragraphs are likely well-written, and you can extract information about effective writing from them.","full_conversation":[{"role":"OP","user_id":"anon_5a0e2fa377309c7d","comment_id":"k6xug0","kind":"post","text":"Need help thinking of project\n\nLong story short I need help thinking of a feasible nlp project for my school class. I had a plan that has sadly crumbled so I need to whip something together in the next two weeks. My dataset from my failed project is thousands of news articles from two separate news source apis for the last few weeks. I have article titles, publication dates, and the first full paragraph of the news articles themselves. Does anyone here have any ideas of a project I could complete with this data set? I’m desperate and appreciative of any help. Thanks!","timestamp":"2020-12-05T01:01:37+00:00","score":5},{"role":"answerer","user_id":"anon_4dd8f7e039bff594","comment_id":"geno95i","kind":"comment","text":"If you're set on using this data, I think it's helpful to think about what kind of supervisory signal you can obtain from it. \n\nYou have dates, can you monitor ongoing stories over time and somehow connect related articles? You have titles, can you draw connections between titles and first paragraphs? There's a lot you can do with paragraphs of grammatical plain text (can use it for one of a billion tasks that benefit from unsupervised training). What about looking into the structure of these paragraphs? Maybe patterns of sentences are used. Maybe you can predict whether a sentence belongs to/is relevant to a given paragraph. \n\nMy initial thought about paragraphs from new sources is that these paragraphs are likely well-written, and you can extract information about effective writing from them.","timestamp":"2020-12-05T01:29:32+00:00","score":5},{"role":"OP","user_id":"anon_5a0e2fa377309c7d","comment_id":"genp8qa","kind":"comment","text":"This is really helpful thank you! If I was going to monitor how articles about the same event change over time, how would I go about connecting them? Do you mean use some form of clustering? I’m fairly new to nlp so apologies if I am asking an obvious question.","timestamp":"2020-12-05T01:39:16+00:00","score":3},{"role":"answerer","user_id":"anon_4dd8f7e039bff594","comment_id":"genq2k3","kind":"comment","text":"Glad it could be helpful. Definitely was in your shoes a couple years ago. \n\nSo yeah, the tricky thing is you really don't have much in the way of labeled data, so that means you will likely have to rely on unsupervised techniques like clustering. \n\nTo group articles by story, some sort of topic modeling (and then clustering after topics have been modeled) is probably the answer. Then, you can of course order them chronologically since you have the dates. From there (and of course this doesn't really need to be in order), you can use sentiment analysis if you want to see how the sort of reaction to the topic changes over time (maybe you see hope ebb and flow in covid articles (oof)). \n\nMaybe you don't want to do sentiment analysis or two levels of modeling though, so you generate a summary for each article, cluster these summaries, and then just combine these summaries, so you have a short timeline summary of each topic. \n\nKey search terms you probably want for grouping the articles (by whatever fashion; sentiment, topic, etc.) are probably \"similarity measure,\" \"document comparison.\" and \"clustering.\"","timestamp":"2020-12-05T01:47:32+00:00","score":3},{"role":"OP","user_id":"anon_5a0e2fa377309c7d","comment_id":"genw72d","kind":"comment","text":"Thank you so much! I’m gonna see what I can come up with and report back!","timestamp":"2020-12-05T02:49:46+00:00","score":3},{"role":"answerer","user_id":"anon_4dd8f7e039bff594","comment_id":"geo08is","kind":"comment","text":"Sure thing, hope it works out for you.","timestamp":"2020-12-05T03:32:48+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_5a0e2fa377309c7d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4dd8f7e039bff594","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"geno95i","thanks_reply_id":"genp8qa","post_score":5,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_771c9efa78108fbc","answerer_user_id":"anon_30251bc871729c35","subreddit":"LanguageTechnology","timestamp":"2020-12-05T21:22:34+00:00","post_id":"k7g1hv","question":"If I offer a text processing/NLP service through a webapp, how can I assure confidentiality?\n\nI am developing a python webapp the helps translators create glossaries from their bilingual documents. \n\nMost translators sign NDAs and their documents can be very confidential. I want to respect that. So, I need to make sure I implement a secure way of processing the user's documents. What would you recommend? \n\nIs it possible to do text processing ON the browser, so that the user does not even have to do any uploading? I'm honestly not interested in harvesting any data, I just want to offer my glossary creation service and respect the user's privacy and confidentiality.\n\nMaybe a webapp is not the right choice? Should I rather make a windows program that runs locally?","preferred_answer":"r/Cybersecurity101","full_conversation":[{"role":"OP","user_id":"anon_771c9efa78108fbc","comment_id":"k7g1hv","kind":"post","text":"If I offer a text processing/NLP service through a webapp, how can I assure confidentiality?\n\nI am developing a python webapp the helps translators create glossaries from their bilingual documents. \n\nMost translators sign NDAs and their documents can be very confidential. I want to respect that. So, I need to make sure I implement a secure way of processing the user's documents. What would you recommend? \n\nIs it possible to do text processing ON the browser, so that the user does not even have to do any uploading? I'm honestly not interested in harvesting any data, I just want to offer my glossary creation service and respect the user's privacy and confidentiality.\n\nMaybe a webapp is not the right choice? Should I rather make a windows program that runs locally?","timestamp":"2020-12-05T21:22:34+00:00","score":5},{"role":"answerer","user_id":"anon_30251bc871729c35","comment_id":"geqzgm2","kind":"comment","text":"r/Cybersecurity101","timestamp":"2020-12-05T23:16:51+00:00","score":5},{"role":"OP","user_id":"anon_771c9efa78108fbc","comment_id":"ger0jxy","kind":"comment","text":"Thanks, I guess I should post the question over there. My subject is language, but this is more pertinent to the security domain. Thank you.","timestamp":"2020-12-05T23:25:36+00:00","score":1},{"role":"answerer","user_id":"anon_30251bc871729c35","comment_id":"ger0v6b","kind":"comment","text":"No problem. I didn't actually know about that sub until this question, hopefully it gets you answers. \n\nGood luck!","timestamp":"2020-12-05T23:27:58+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_771c9efa78108fbc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_30251bc871729c35","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"geqzgm2","thanks_reply_id":"ger0jxy","post_score":5,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_086802ad4942cdd8","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2020-12-09T15:38:09+00:00","post_id":"k9u0gy","question":"Models for Text Augmentation with OCR and Structured Texts?\n\nDoes anyone have any experience / insights / success stories using a framework for text augmentation where the text is sourced from OCR? I have looked into nlpaug but the OCR Augmenter seems lacking. \n\nWe have models for multi class classification and NER for field extraction. The problem I am trying to resolve is: when a new type of form is released, how can we retrain the model quickly and successfully?\n\nI would prefer a character based model that can add in deletions, insertions, and replacements with a parameter for noisiness. Something that goes beyond a dictionary model. Not sure how useful word based approaches would be but we have a solution for that already with respect to the fields.\n\nThe holy grail would be a “reversible” error correcting algorithm with a strictness or noise parameter that can correct errors or augment the data respectively.\n\nSome routes I am exploring are LSTM-CRF architectures, CNNs for text, and Bayesian models. Maybe a transformer but that might be overkill and I don’t want to wait weeks for pretraining. Wanted to get others thoughts on how to approach this problem and any insights they have.","preferred_answer":"There is some research about generating noise artificially. The trick is to transform clean text into images where the text is the same font as the images you usually get, then apply some image noise to it, then OCR it. You then have \"genuine\" OCR errors, the artificial noise was on the image side and earlier on the pipeline. Since it's 100% artificial you can generate as much as you want. \n\nIIRC this was done mostly for historical texts by researchers of the Université de La Rochelle, eg https://www.semanticscholar.org/paper/An-Analysis-of-the-Performance-of-Named-Entity-over-Hamdi-Jean-Caurant/c39645edca9f27d358f4a6e60f00fc7d86782f5b\n\nAhmed Hamdi has other papers with this technique too ( https://www.semanticscholar.org/paper/Assessing-and-Minimizing-the-Impact-of-OCR-Quality-Hamdi-Jean-Caurant/bf61cd54d087075f792f8ae7b0a9697af12d5f5f )\n\nPS: I'm not Ahmed Hamdi nor someone from Uni La Rochelle","full_conversation":[{"role":"OP","user_id":"anon_086802ad4942cdd8","comment_id":"k9u0gy","kind":"post","text":"Models for Text Augmentation with OCR and Structured Texts?\n\nDoes anyone have any experience / insights / success stories using a framework for text augmentation where the text is sourced from OCR? I have looked into nlpaug but the OCR Augmenter seems lacking. \n\nWe have models for multi class classification and NER for field extraction. The problem I am trying to resolve is: when a new type of form is released, how can we retrain the model quickly and successfully?\n\nI would prefer a character based model that can add in deletions, insertions, and replacements with a parameter for noisiness. Something that goes beyond a dictionary model. Not sure how useful word based approaches would be but we have a solution for that already with respect to the fields.\n\nThe holy grail would be a “reversible” error correcting algorithm with a strictness or noise parameter that can correct errors or augment the data respectively.\n\nSome routes I am exploring are LSTM-CRF architectures, CNNs for text, and Bayesian models. Maybe a transformer but that might be overkill and I don’t want to wait weeks for pretraining. Wanted to get others thoughts on how to approach this problem and any insights they have.","timestamp":"2020-12-09T15:38:09+00:00","score":3},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"gf81jla","kind":"comment","text":"There is some research about generating noise artificially. The trick is to transform clean text into images where the text is the same font as the images you usually get, then apply some image noise to it, then OCR it. You then have \"genuine\" OCR errors, the artificial noise was on the image side and earlier on the pipeline. Since it's 100% artificial you can generate as much as you want. \n\nIIRC this was done mostly for historical texts by researchers of the Université de La Rochelle, eg https://www.semanticscholar.org/paper/An-Analysis-of-the-Performance-of-Named-Entity-over-Hamdi-Jean-Caurant/c39645edca9f27d358f4a6e60f00fc7d86782f5b\n\nAhmed Hamdi has other papers with this technique too ( https://www.semanticscholar.org/paper/Assessing-and-Minimizing-the-Impact-of-OCR-Quality-Hamdi-Jean-Caurant/bf61cd54d087075f792f8ae7b0a9697af12d5f5f )\n\nPS: I'm not Ahmed Hamdi nor someone from Uni La Rochelle","timestamp":"2020-12-09T23:44:16+00:00","score":2},{"role":"OP","user_id":"anon_086802ad4942cdd8","comment_id":"gfafztb","kind":"comment","text":"Thank you for this! I will look into this route and bring it up to the team. Right now we use a service for OCR so I would have to get approval. :(","timestamp":"2020-12-10T15:44:21+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"gfanx17","kind":"comment","text":"Glad it's useful! I thought it was a stupidly smart and effective method for generating ground truth when I first read about this. \n\n I hope it works out for you!","timestamp":"2020-12-10T16:31:29+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_086802ad4942cdd8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gf81jla","thanks_reply_id":"gfafztb","post_score":3,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_c4bff5dcf25dc842","answerer_user_id":"anon_2981700ed0aa3a11","subreddit":"LanguageTechnology","timestamp":"2020-12-09T23:28:49+00:00","post_id":"ka3dia","question":"SOTA methods for clause extraction / long sentence segmentation\n\nI'm currently working on a project involving sentence vectors (from a RoBERTa pretrained model). These vectors are lower quality when sentences are long, and my corpus contains many long sentences with subclauses.\n\nI've been looking for methods for clause extraction / long sentence segmentation, but I was surprised to see that none of the major NLP packages (spacy, stanza) offer this. I know it should be possible to implement from dependency parsing, but I'd rather not have to do this by hand, especially since there are all sort of edges cases that I'm unlikely to get right.\n\nSurely there must be modern packages/methods for this?","preferred_answer":"The dependnecy parser might be the way to go on this. Why not just use each independent root node as the base of a separate clause. This might cause more splitting than you want but it might be easier to merge from there than split from scratch.","full_conversation":[{"role":"OP","user_id":"anon_c4bff5dcf25dc842","comment_id":"ka3dia","kind":"post","text":"SOTA methods for clause extraction / long sentence segmentation\n\nI'm currently working on a project involving sentence vectors (from a RoBERTa pretrained model). These vectors are lower quality when sentences are long, and my corpus contains many long sentences with subclauses.\n\nI've been looking for methods for clause extraction / long sentence segmentation, but I was surprised to see that none of the major NLP packages (spacy, stanza) offer this. I know it should be possible to implement from dependency parsing, but I'd rather not have to do this by hand, especially since there are all sort of edges cases that I'm unlikely to get right.\n\nSurely there must be modern packages/methods for this?","timestamp":"2020-12-09T23:28:49+00:00","score":7},{"role":"answerer","user_id":"anon_2981700ed0aa3a11","comment_id":"gf81zor","kind":"comment","text":"The dependnecy parser might be the way to go on this. Why not just use each independent root node as the base of a separate clause. This might cause more splitting than you want but it might be easier to merge from there than split from scratch.","timestamp":"2020-12-09T23:48:22+00:00","score":3},{"role":"OP","user_id":"anon_c4bff5dcf25dc842","comment_id":"gf85ir9","kind":"comment","text":"Thanks, the rules for merging might get quite complicated to handle a bunch of different cases though. I was hoping for something that works out of the box. Also, I'd want something that can take a sentence like \"He thought that she had given her the file and that she was already gone.\" and extract/reconstitute two clauses: \"He thought that she had given her the file.\" and \"He thought that she was already gone.\"","timestamp":"2020-12-10T00:19:43+00:00","score":1},{"role":"answerer","user_id":"anon_2981700ed0aa3a11","comment_id":"gf87mr9","kind":"comment","text":"Well you could always train a supervised learning model for determining if two phrases should be merged and essentially do a hierarchical clustering approach. \n\nHowever on the example you gave, that is far more complex than just clause detection. That's actually restating the original sentence as two different clauses. Dependency parsing is probably not accurate enough in something like spacy to help you there. You have to consider building some kind of sequence to sequences transformer model to pull that off AFAIK.","timestamp":"2020-12-10T00:38:39+00:00","score":1},{"role":"OP","user_id":"anon_c4bff5dcf25dc842","comment_id":"gfalc34","kind":"comment","text":"Thanks. I think I'll try do to something simpler with dependency parsing then. I'm still not sure how to proceed by starting from root nodes and merging phrases though - any pointer would be much appreciated.","timestamp":"2020-12-10T16:16:17+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_c4bff5dcf25dc842","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2981700ed0aa3a11","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gf81zor","thanks_reply_id":"gf85ir9","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_9a81d3ca007c7df8","answerer_user_id":"anon_9d85d8ef920de3df","subreddit":"LanguageTechnology","timestamp":"2020-12-09T23:56:57+00:00","post_id":"ka3vft","question":"How can I test the performance of a model for semantic search?\n\nI was asked, a bit in a hurry, to test how good a model was for semantic search.\n\nThis isn't in English, so it makes things harder. Still, I already found a STS (Semantic Textual Similarity) dataset in my language, containing 2500 pairs of sentences with respective similarity scores.\n\nHowever I'm not sure about the correct way to use it, nor if this is the appropriate dataset to evaluate a model in the Semantic Search task.\n\nMy first idea was: for each sentence pair, to test if I could retrieve the paired sentence somewhere in the top 3 search (using the model embeddings + KNN).","preferred_answer":"What are the model inputs and outputs? Given your idea, I assume the modes produces some kind of embeddings. Do the output embeddings have some kind of semantic meaning? Since your dataset has a triplet of two sentences and a corresponding score, a system retrieving most similar sentences should not retrieve the paired sentence if they have low similarity score (e.g. are annotated to be dissimilar).\n\nIf your model outputs an embedding for a given sentence input, and the model is trained to measure semantic similarity, I'd compute the [Spearman's correlation](https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient). It essentially measures how correct is the order of the predictions. That is, if you sort the test set by the gold scores and by the model predicted scores, the correlation rank will be 1 if the samples are exactly in the same order. This will obviously not be the case unless the test set is a toy. You will get a score between 0 and 1, and to know if it's \"good\" you'll need a baseline to compare the score to, because the results heavily depend on difficulty of the prediction task i.e. the composition of the test set.\n\nAnd one more thing. Assuming you want to use the model for a real life task, you probably want to assemble a test set which corresponds as closely as possible to the real data the model will be used for, preferably using the real data. It is quite possible that a model doing very well on an artificial test set will fail in production if the real data somehow differs from the test data.\n\nI hope this helps.","full_conversation":[{"role":"OP","user_id":"anon_9a81d3ca007c7df8","comment_id":"ka3vft","kind":"post","text":"How can I test the performance of a model for semantic search?\n\nI was asked, a bit in a hurry, to test how good a model was for semantic search.\n\nThis isn't in English, so it makes things harder. Still, I already found a STS (Semantic Textual Similarity) dataset in my language, containing 2500 pairs of sentences with respective similarity scores.\n\nHowever I'm not sure about the correct way to use it, nor if this is the appropriate dataset to evaluate a model in the Semantic Search task.\n\nMy first idea was: for each sentence pair, to test if I could retrieve the paired sentence somewhere in the top 3 search (using the model embeddings + KNN).","timestamp":"2020-12-09T23:56:57+00:00","score":1},{"role":"answerer","user_id":"anon_9d85d8ef920de3df","comment_id":"gfbqcw4","kind":"comment","text":"What are the model inputs and outputs? Given your idea, I assume the modes produces some kind of embeddings. Do the output embeddings have some kind of semantic meaning? Since your dataset has a triplet of two sentences and a corresponding score, a system retrieving most similar sentences should not retrieve the paired sentence if they have low similarity score (e.g. are annotated to be dissimilar).\n\nIf your model outputs an embedding for a given sentence input, and the model is trained to measure semantic similarity, I'd compute the [Spearman's correlation](https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient). It essentially measures how correct is the order of the predictions. That is, if you sort the test set by the gold scores and by the model predicted scores, the correlation rank will be 1 if the samples are exactly in the same order. This will obviously not be the case unless the test set is a toy. You will get a score between 0 and 1, and to know if it's \"good\" you'll need a baseline to compare the score to, because the results heavily depend on difficulty of the prediction task i.e. the composition of the test set.\n\nAnd one more thing. Assuming you want to use the model for a real life task, you probably want to assemble a test set which corresponds as closely as possible to the real data the model will be used for, preferably using the real data. It is quite possible that a model doing very well on an artificial test set will fail in production if the real data somehow differs from the test data.\n\nI hope this helps.","timestamp":"2020-12-10T21:34:16+00:00","score":2},{"role":"OP","user_id":"anon_9a81d3ca007c7df8","comment_id":"gfdghmf","kind":"comment","text":"Thanks.\n\n​\n\n>What are the model inputs and outputs?\n\nIN: List of strings (sentences) | OUT: Sentence Embeddings\n\nThe models are USE and LaBSE (Language Agnostic BERT Sentence Embeddings), and then the average embeddings of word2vec, GloVe and FastText (which expectedly underperform)\n\nThe annotated similarity scores range from 1.0 to 5.0, but even the low valued ones still have somewhat releated terms.","timestamp":"2020-12-11T08:08:02+00:00","score":1},{"role":"answerer","user_id":"anon_9d85d8ef920de3df","comment_id":"gfdvaot","kind":"comment","text":"In that case Spearman's should be suitable. Obtain predictions with all models, compute Spearman's p against the test set and see if LaBSE gets higher score than your baselines.\n\nEven though out-of-the-box LaBSE embeddings will likely outperform most other methods, you should still keep in mind how real-use differs from the test setting","timestamp":"2020-12-11T12:14:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9a81d3ca007c7df8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9d85d8ef920de3df","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gfbqcw4","thanks_reply_id":"gfdghmf","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_1c97e0b035b6ea67","answerer_user_id":"anon_320bacc21479c8e6","subreddit":"LanguageTechnology","timestamp":"2020-12-23T14:44:23+00:00","post_id":"kiub6p","question":"Any API for multilingual dictionary definitions?\n\nHi, I wanted to know if anyone knows of a service (free or paid) that I can use as a source for word definitions. An API that I can send (for example) the word \"maison\" and the language \"fr\" and it returns a bunch of definitions (and if additional linguistic related content, much better).\n\nI've been searching around but couldn't find anything but hoped that maybe I was missing something relatively new that is still under the radar.\n\nI'd be very grateful for any hint, thanks.","preferred_answer":"Like this? [https://www.lexicala.com/resources](https://www.lexicala.com/resources)\n\nDisclaimer: I've never used it.","full_conversation":[{"role":"OP","user_id":"anon_1c97e0b035b6ea67","comment_id":"kiub6p","kind":"post","text":"Any API for multilingual dictionary definitions?\n\nHi, I wanted to know if anyone knows of a service (free or paid) that I can use as a source for word definitions. An API that I can send (for example) the word \"maison\" and the language \"fr\" and it returns a bunch of definitions (and if additional linguistic related content, much better).\n\nI've been searching around but couldn't find anything but hoped that maybe I was missing something relatively new that is still under the radar.\n\nI'd be very grateful for any hint, thanks.","timestamp":"2020-12-23T14:44:23+00:00","score":5},{"role":"answerer","user_id":"anon_320bacc21479c8e6","comment_id":"ggstqkl","kind":"comment","text":"Like this? [https://www.lexicala.com/resources](https://www.lexicala.com/resources)\n\nDisclaimer: I've never used it.","timestamp":"2020-12-23T14:46:31+00:00","score":7},{"role":"OP","user_id":"anon_1c97e0b035b6ea67","comment_id":"ggt64ft","kind":"comment","text":"Yay, I've been playing around with this one and it looks promising.\n\nThanks!","timestamp":"2020-12-23T16:41:18+00:00","score":3},{"role":"answerer","user_id":"anon_320bacc21479c8e6","comment_id":"ggt9vdf","kind":"comment","text":"You are welcome!","timestamp":"2020-12-23T17:13:46+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1c97e0b035b6ea67","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_320bacc21479c8e6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ggstqkl","thanks_reply_id":"ggt64ft","post_score":5,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_984bef45504ef49d","answerer_user_id":"anon_e04dc84b0af42458","subreddit":"LanguageTechnology","timestamp":"2020-12-26T04:09:42+00:00","post_id":"kkc91c","question":"How do you download the ACE 2005 dataset?\n\nHi everyone. I'm not sure how many people here would be familiar with it, but the ACE 2005 dataset is a dataset that is often used for tasks like named entity recognition and information extraction. I've been trying to find a way to download it from [its website](https://catalog.ldc.upenn.edu/LDC2006T06) but haven't been able to. Does anybody know how I can do this?","preferred_answer":"https://www.ldc.upenn.edu/language-resources/data/obtaining\n\nLDC datasets are licensed. So reviewing that process might be a good starting point!","full_conversation":[{"role":"OP","user_id":"anon_984bef45504ef49d","comment_id":"kkc91c","kind":"post","text":"How do you download the ACE 2005 dataset?\n\nHi everyone. I'm not sure how many people here would be familiar with it, but the ACE 2005 dataset is a dataset that is often used for tasks like named entity recognition and information extraction. I've been trying to find a way to download it from [its website](https://catalog.ldc.upenn.edu/LDC2006T06) but haven't been able to. Does anybody know how I can do this?","timestamp":"2020-12-26T04:09:42+00:00","score":2},{"role":"answerer","user_id":"anon_e04dc84b0af42458","comment_id":"gh1och5","kind":"comment","text":"https://www.ldc.upenn.edu/language-resources/data/obtaining\n\nLDC datasets are licensed. So reviewing that process might be a good starting point!","timestamp":"2020-12-26T04:14:50+00:00","score":1},{"role":"OP","user_id":"anon_984bef45504ef49d","comment_id":"gh1ofms","kind":"comment","text":"Thanks for the tip. Every single paper that I've read so far (around 10-12) from venues like ACL and EMNLP use the ACE 2005 benchmark. You're basically saying that all of these researchers underwent the licensing process, right?","timestamp":"2020-12-26T04:15:54+00:00","score":2},{"role":"answerer","user_id":"anon_e04dc84b0af42458","comment_id":"gh1omo0","kind":"comment","text":"Or those researchers are affiliated with licensed organizations, yes.","timestamp":"2020-12-26T04:18:20+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_984bef45504ef49d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e04dc84b0af42458","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gh1och5","thanks_reply_id":"gh1ofms","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_233dc304229ba6db","answerer_user_id":"anon_2e4db06f3244b164","subreddit":"LanguageTechnology","timestamp":"2020-12-27T02:43:32+00:00","post_id":"kkvkig","question":"Advice for NLP Project\n\nHello guys,\n\nI am a 5th year PhD student in a top 10 US institution. My major is in Electrical Engineering and the topic of my PhD has nothing to do with NLP, even though I have some research experience in Machine Learning/Deep Learning both paper-wise and through internships.\n\nRecently, I have been attracted by the latest advancements in NLP and I decided that I would like to find a job in that field. To get started with the topic, I completed the NLP specialization offered by [deeplearning.ai](https://deeplearning.ai) in Coursera where I got to learn both traditional models as well as more recent models like Transformers and Reformers.\n\nAt this point, I want to start building my own project(s) to dive deeper into the field. I am not interested in projects that can be solved in 1 week. I want something that could challenge me a little bit and would require at least 2 months of work! I am ok if I need to study 15-20 papers before start solving the problem even though I do not feel the need to do something that can be published. If it does, it will be very welcome ofc. Ideally, I am looking for something that would be really attractive for the job market. As I said, I would love to take a position related to NLP or that it will heavily involve NLP.\n\nA few thoughts of mine:\n\n1) Language modeling (very attractive research area but impossible to have something impactful with limited computational resources)\n\n2) Topic modeling (attractive area which in my opinion could be applied in various places in industry)\n\nAny suggestions from you guys? My first priority is to do something that will be attractive in industry. \n\nThank you in advance.","preferred_answer":"Language Modeling would work if you have a specific application in mind and would like to design a pre-training method for it.\nOther than this you could look at common-sense reasoning, controlled language generation or even explanability of a model.","full_conversation":[{"role":"OP","user_id":"anon_233dc304229ba6db","comment_id":"kkvkig","kind":"post","text":"Advice for NLP Project\n\nHello guys,\n\nI am a 5th year PhD student in a top 10 US institution. My major is in Electrical Engineering and the topic of my PhD has nothing to do with NLP, even though I have some research experience in Machine Learning/Deep Learning both paper-wise and through internships.\n\nRecently, I have been attracted by the latest advancements in NLP and I decided that I would like to find a job in that field. To get started with the topic, I completed the NLP specialization offered by [deeplearning.ai](https://deeplearning.ai) in Coursera where I got to learn both traditional models as well as more recent models like Transformers and Reformers.\n\nAt this point, I want to start building my own project(s) to dive deeper into the field. I am not interested in projects that can be solved in 1 week. I want something that could challenge me a little bit and would require at least 2 months of work! I am ok if I need to study 15-20 papers before start solving the problem even though I do not feel the need to do something that can be published. If it does, it will be very welcome ofc. Ideally, I am looking for something that would be really attractive for the job market. As I said, I would love to take a position related to NLP or that it will heavily involve NLP.\n\nA few thoughts of mine:\n\n1) Language modeling (very attractive research area but impossible to have something impactful with limited computational resources)\n\n2) Topic modeling (attractive area which in my opinion could be applied in various places in industry)\n\nAny suggestions from you guys? My first priority is to do something that will be attractive in industry. \n\nThank you in advance.","timestamp":"2020-12-27T02:43:32+00:00","score":10},{"role":"answerer","user_id":"anon_2e4db06f3244b164","comment_id":"gh4xy6d","kind":"comment","text":"Language Modeling would work if you have a specific application in mind and would like to design a pre-training method for it.\nOther than this you could look at common-sense reasoning, controlled language generation or even explanability of a model.","timestamp":"2020-12-27T04:15:05+00:00","score":7},{"role":"OP","user_id":"anon_233dc304229ba6db","comment_id":"gh521qr","kind":"comment","text":"Thank you very much for your suggestion. Tbh, I had never thought about common sense reasoning and controlled language generation as potential directions. Since I am not yet deep into the field, based on your experience, are these used in industry?","timestamp":"2020-12-27T04:46:33+00:00","score":3},{"role":"answerer","user_id":"anon_2e4db06f3244b164","comment_id":"gh55rl1","kind":"comment","text":"Common sense reasoning I guess could be considered as an add on to improve whatever model you would be using, as in a model should be able to distinguish between simple implicit constructs such as an 'internship' would be temporary and a 'job' would be permanent. You could probably read some papers to get a better idea.\nLanguage generation though is used a lot-summarization, translation, creative writing are a few examples.","timestamp":"2020-12-27T05:15:30+00:00","score":2},{"role":"OP","user_id":"anon_233dc304229ba6db","comment_id":"gh56n2w","kind":"comment","text":"Thank you for the examples. Both sound really interesting and I will definitely check them out.","timestamp":"2020-12-27T05:22:44+00:00","score":1},{"role":"answerer","user_id":"anon_2e4db06f3244b164","comment_id":"gh5jgrq","kind":"comment","text":"No wrries... Let me know if you come across something interesting or looking someone to collaborate with :)","timestamp":"2020-12-27T07:09:20+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_233dc304229ba6db","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2e4db06f3244b164","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gh4xy6d","thanks_reply_id":"gh521qr","post_score":10,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_531529866493b6dc","answerer_user_id":"anon_e7fa7f3ead7655f2","subreddit":"LanguageTechnology","timestamp":"2020-12-28T19:47:41+00:00","post_id":"klxhmc","question":"Recommendations for a TAL(NLP) Master in France for someone with a first degree in Modern Languages?\n\nI'm looking to start an M1 in September 2021, by which time I will have 2 years' experience in data analysis.\n\nI've been browsing courses in France and realise that often they have different names, or the same name but very different content and requirements. For example, I've noticed that 'Sciences du Langage' can be anything from a political discourse analysis course for Lettres grads to a machine learning course only for mathematicians and computer scientists.\n\nI'd like to find a course that has the right balance of being accessible to someone of my background and being technically challenging/ preparing me for a competitive jobs market. I'm looking to escape from the world of humanities and theoretical essay-writing and get back to using my logic and maths skills, as far as possible. For the last couple of years, I've been teaching myself Python for Data Analysis (after hitting the limits of Excel in my last job...), brushing up on stats and calculus (I have an A at A level Maths but that was a while ago....).\n\nI also wondered whether doing a master in NLP would allow me to apply to data scientist jobs as well, or whether it would be too specific?\n\nFinally - I have the option of applying to a Data Science master in the UK, which would likely be more highly ranked than the offers I'm likely to get in France. Would doing this and then looking for a job in France after graduation be a better idea? (I know France isn't the best place for NLP but I'm very keen to try and move there permanently - if it's not a completely impossible goal! I do speak French fluently and would prefer to do a course in French if possible)","preferred_answer":"In Paris there is:\n\n- https://www.linguist.univ-paris-diderot.fr/cursusli\n\n- http://odf.univ-paris13.fr/fr/offre-de-formation/feuilleter-le-catalogue-1/sciences-humaines-et-sociales-SHS/master-lmd-XB/master-mention-traitement-automatique-des-langues-specialite-traitement-informatique-et-linguistique-des-documents-ecrits-tilde-program-master-mention-traitement-automatique-des-langues-specialite-traitement-informatique-et-linguistique-des-documents-ecrits-tilde-2-2.html\n\nThe first one looks better for you.\n\nOtherwise there is also https://www.atala.org/accueil\n\nHTH","full_conversation":[{"role":"OP","user_id":"anon_531529866493b6dc","comment_id":"klxhmc","kind":"post","text":"Recommendations for a TAL(NLP) Master in France for someone with a first degree in Modern Languages?\n\nI'm looking to start an M1 in September 2021, by which time I will have 2 years' experience in data analysis.\n\nI've been browsing courses in France and realise that often they have different names, or the same name but very different content and requirements. For example, I've noticed that 'Sciences du Langage' can be anything from a political discourse analysis course for Lettres grads to a machine learning course only for mathematicians and computer scientists.\n\nI'd like to find a course that has the right balance of being accessible to someone of my background and being technically challenging/ preparing me for a competitive jobs market. I'm looking to escape from the world of humanities and theoretical essay-writing and get back to using my logic and maths skills, as far as possible. For the last couple of years, I've been teaching myself Python for Data Analysis (after hitting the limits of Excel in my last job...), brushing up on stats and calculus (I have an A at A level Maths but that was a while ago....).\n\nI also wondered whether doing a master in NLP would allow me to apply to data scientist jobs as well, or whether it would be too specific?\n\nFinally - I have the option of applying to a Data Science master in the UK, which would likely be more highly ranked than the offers I'm likely to get in France. Would doing this and then looking for a job in France after graduation be a better idea? (I know France isn't the best place for NLP but I'm very keen to try and move there permanently - if it's not a completely impossible goal! I do speak French fluently and would prefer to do a course in French if possible)","timestamp":"2020-12-28T19:47:41+00:00","score":4},{"role":"answerer","user_id":"anon_e7fa7f3ead7655f2","comment_id":"ghbhd9z","kind":"comment","text":"In Paris there is:\n\n- https://www.linguist.univ-paris-diderot.fr/cursusli\n\n- http://odf.univ-paris13.fr/fr/offre-de-formation/feuilleter-le-catalogue-1/sciences-humaines-et-sociales-SHS/master-lmd-XB/master-mention-traitement-automatique-des-langues-specialite-traitement-informatique-et-linguistique-des-documents-ecrits-tilde-program-master-mention-traitement-automatique-des-langues-specialite-traitement-informatique-et-linguistique-des-documents-ecrits-tilde-2-2.html\n\nThe first one looks better for you.\n\nOtherwise there is also https://www.atala.org/accueil\n\nHTH","timestamp":"2020-12-28T19:58:30+00:00","score":2},{"role":"OP","user_id":"anon_531529866493b6dc","comment_id":"ghbimj6","kind":"comment","text":"Hi! Thanks for the comment. Do you have any experience of these courses/ know anyone who has done them and gone on to find work? The first one looks great but the admissions criteria seem a little less transparent, I guess I should contact them and ask!","timestamp":"2020-12-28T20:08:56+00:00","score":1},{"role":"answerer","user_id":"anon_e7fa7f3ead7655f2","comment_id":"ghbkzoa","kind":"comment","text":"No, I do not have experience with the courses, but they have a bibliography somewhere. IIRC they accept students from humanities or math background.\n\nAsk directly people on linkedin with a direct message (e.g. [search](https://www.linkedin.com/search/results/people/?keywords=paris%20diderot%20Linguistique%20Informatique&origin=SWITCH_SEARCH_VERTICAL))\n\nOtherwise in Lille and Avignon I know there is LI / NLP courses.\n\nFor some companies doing NLP in France, check out:\n\n\\- [lili.ai](https://lili.ai) <3\n\n\\- Proxem\n\n\\- [http://w3.erss.univ-tlse2.fr/membre/tanguy/offres.html](http://w3.erss.univ-tlse2.fr/membre/tanguy/offres.html)\n\nCheck out [https://www.meetup.com/Paris-NLP/events/](https://www.meetup.com/Paris-NLP/events/)\n\nSubscribe to the mailing list at [https://www.atala.org/liste\\_ln](https://www.atala.org/liste_ln)\n\nOtherwise try [https://www.lewagon.com/fr/web-development-course/full-time](https://www.lewagon.com/fr/web-development-course/full-time#)","timestamp":"2020-12-28T20:29:00+00:00","score":2},{"role":"OP","user_id":"anon_531529866493b6dc","comment_id":"ghbsutj","kind":"comment","text":"Thank you, that's super helpful! Are you working in NLP in France now?","timestamp":"2020-12-28T21:37:24+00:00","score":1},{"role":"answerer","user_id":"anon_e7fa7f3ead7655f2","comment_id":"ghdsotn","kind":"comment","text":"More links:\n\n- https://stackoverflow.com/jobs\n- https://careers.google.com/jobs/results/?q=linguist (They used to be entry level positions)\n\nNo, I do not work as a NLP engineer or with NLP tools in my day job. The most NLP-ish thing we do is \"search\".\n\nMost data science jobs require a PhD (and they only allow you to do Master level work). In fact, this is the same for Software Engineering: Ten years ago, Bac+3 related to programming meant that you had \"knowledge of computers\" and you could only reach Quality Assurance (manual testing) or level 3 support (hotline). That is to say, you get a job one level below your diploma (please downvote me if it is wrong). Now things are changing because of the buzz, and lack of so called qualified labor. For instance, you can find code for food starting at Bac+3. The question is what Bac+3 level work in the NLP field?\n\nNowadays, you can even code for food with wagon.com or openclassroom. We recruited very recently a person from wagon.com but she has a couple of years of experience and diploma in our business domain.\n\nMy advice if you want to code for food soon, with job security in the long term:\n\nA) Get a master degree with Paris Diderot or Paris XIII, that will serve as credentials.\n\nB) Learn and build a portfolio using JavaScript for frontend dev, that will be the missing piece in you resume to be able find a job outside NLP / CL field. Frontend development is very strong, you will always find a job.\n\nNLP / CL is a great field, but sadly too much focused on the ML side of things (personal opinion). The companies that can invest is the tools provided by the research are very few. There is couple of popular and successful companies that are focused on NLP (luminoso, explosion.ai, monkeylearn, rare technologies), but none in France.\n\nPS: Forget about data analysis that is a \"small\" task as part of a bigger job. Even the cleansing / wrangling part is automated (look at dataiku). Job security wise, it is better to have frontend development skills.","timestamp":"2020-12-29T11:01:30+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_531529866493b6dc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e7fa7f3ead7655f2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ghbhd9z","thanks_reply_id":"ghbimj6","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_9fbd0ddff4085a59","answerer_user_id":"anon_cde7c9478fda0cee","subreddit":"LanguageTechnology","timestamp":"2020-12-28T20:16:41+00:00","post_id":"kly1wq","question":"Advice if I can use SpaCY for this project\n\nHi,\n\nI’m new here. I need to separate positive and negative reviews of an app, due to the volume of the reviews it is impossible to do it manually.\n\nWould spaCY help me for this? Or do I need to use a different tool?","preferred_answer":"So what you are talking about is doing a sentiment analysis, then splitting the reviews based on what the sentiment is. I think you could probably do it in SpaCY, but its gonna be a hell of a lot easier with NLTK Vader's SentimentIntensityAnalyzer","full_conversation":[{"role":"OP","user_id":"anon_9fbd0ddff4085a59","comment_id":"kly1wq","kind":"post","text":"Advice if I can use SpaCY for this project\n\nHi,\n\nI’m new here. I need to separate positive and negative reviews of an app, due to the volume of the reviews it is impossible to do it manually.\n\nWould spaCY help me for this? Or do I need to use a different tool?","timestamp":"2020-12-28T20:16:41+00:00","score":6},{"role":"answerer","user_id":"anon_cde7c9478fda0cee","comment_id":"ghbl8r6","kind":"comment","text":"So what you are talking about is doing a sentiment analysis, then splitting the reviews based on what the sentiment is. I think you could probably do it in SpaCY, but its gonna be a hell of a lot easier with NLTK Vader's SentimentIntensityAnalyzer","timestamp":"2020-12-28T20:31:11+00:00","score":0},{"role":"OP","user_id":"anon_9fbd0ddff4085a59","comment_id":"ghbljxs","kind":"comment","text":"Thanks for your reply and explaining the process. Would NLTK look good in a resume?","timestamp":"2020-12-28T20:33:51+00:00","score":1},{"role":"answerer","user_id":"anon_cde7c9478fda0cee","comment_id":"ghbnv0d","kind":"comment","text":"Yeah I mean it’s one of the big NLP tools out there, along with SpaCY and GenSim, I certainly use it quite a bit in my job","timestamp":"2020-12-28T20:53:49+00:00","score":-1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9fbd0ddff4085a59","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cde7c9478fda0cee","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ghbl8r6","thanks_reply_id":"ghbljxs","post_score":6,"answer_score":0,"preferred_answer_is_top_level":true}} {"user_id":"anon_fa308f80e5011e7e","answerer_user_id":"anon_354566c938410524","subreddit":"LanguageTechnology","timestamp":"2021-01-07T15:55:45+00:00","post_id":"ksg1ey","question":"Rank text by structural similarity?\n\nI’m trying to solve a problem where I have 10 sentences that all mean the same thing (semantically very similar). \n\nGiven a different, somewhat semantically similar sentence, how can I find the most structurally similar sentence out of the 10?\n\nFirst thoughts are searching for occurrences of punctuation, words like “the”, etc., but is there a better way (or better yet, an API) to do this?","preferred_answer":"https://pypi.org/project/fuzzywuzzy/","full_conversation":[{"role":"OP","user_id":"anon_fa308f80e5011e7e","comment_id":"ksg1ey","kind":"post","text":"Rank text by structural similarity?\n\nI’m trying to solve a problem where I have 10 sentences that all mean the same thing (semantically very similar). \n\nGiven a different, somewhat semantically similar sentence, how can I find the most structurally similar sentence out of the 10?\n\nFirst thoughts are searching for occurrences of punctuation, words like “the”, etc., but is there a better way (or better yet, an API) to do this?","timestamp":"2021-01-07T15:55:45+00:00","score":2},{"role":"answerer","user_id":"anon_354566c938410524","comment_id":"gifpred","kind":"comment","text":"https://pypi.org/project/fuzzywuzzy/","timestamp":"2021-01-07T16:05:18+00:00","score":1},{"role":"OP","user_id":"anon_fa308f80e5011e7e","comment_id":"gifqtwq","kind":"comment","text":"Thanks! Would this be helpful even if the sentence I’m ranking the 10 sentences against has a different meaning?","timestamp":"2021-01-07T16:13:32+00:00","score":2},{"role":"answerer","user_id":"anon_354566c938410524","comment_id":"gio8ot2","kind":"comment","text":"different meaning.. then no? the best bet is cosine similarity.","timestamp":"2021-01-09T17:36:04+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fa308f80e5011e7e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_354566c938410524","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gifpred","thanks_reply_id":"gifqtwq","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_14c4ab164aeb6205","answerer_user_id":"anon_fcfb67bed98b3a61","subreddit":"LanguageTechnology","timestamp":"2021-01-09T21:55:36+00:00","post_id":"ku0d7b","question":"Making a natural language bot.. that sounds like its having a stroke. What data sets to use?\n\nGot sent here from r/learnprogramming! \n\n​\n\nHi, for a long time I've \"collected\" and made up sentences that \\*almost\\* make sense, but don't. It's similar to the kinds of things you might see on [r/ihadastroke](https://www.reddit.com/r/ihadastroke/). Such as:\n\n***Appreciate what you what, be are the make you appreciate what you dad.***\n\nor\n\n***Why do they call it oven when you of in the cold food of out hot eat the food?***\n\nor\n\n***Don't think that carrot big because carrot big leaf because small leaf carrot not big leaf sizes.***\n\nAs a fun quarantine side project, I wanted to train an AI to generate these almost-sensical sentences for my own amusement. Since I typically only program games, I wanted something simple and I'm currently using Max Woolfe's [GPT-2 simple](https://minimaxir.com/2019/09/howto-gpt2/) since its extremely easy to input data sets and quickly train a model right from a google collab project. I've considered that perhaps using a \"worse\" platform to create a model might be better for my goals though.\n\nAnyway, I'm considering from where I should pull input sets to train the model. Some ideas I have right now are English as second language forums, mass-translating sentences through a bunch of different languages then back to english, bad sentences generated by other bots like on [r/SubredditSimulator](https://www.reddit.com/r/SubredditSimulator/), or mixing proper english sentences with a smattering of ones that are nonsensical. The nuance to this is that I'd want sentences that ***almost*** make sense, but don't. Oftentimes they'll have a proper grammatic opening or ending, but then will start to deviate or repeat verbs when the clause should end. It might also be possible to not use ML but just take fully formed sentences and start swapping around and subbing out words algorithmically. Any and all suggestions are welcome! This is my first time trying any type of model training so I appreciate any tips, but would probably need to keep it simple.","preferred_answer":"There’s a list of papers I referenced here: https://twitter.com/mervenoyann/status/1347452459321597953?s=21\nAlso this project sponsored by CIFAR and Samsung has bunch of datasets: https://breakend.github.io/DialogDatasets/","full_conversation":[{"role":"OP","user_id":"anon_14c4ab164aeb6205","comment_id":"ku0d7b","kind":"post","text":"Making a natural language bot.. that sounds like its having a stroke. What data sets to use?\n\nGot sent here from r/learnprogramming! \n\n​\n\nHi, for a long time I've \"collected\" and made up sentences that \\*almost\\* make sense, but don't. It's similar to the kinds of things you might see on [r/ihadastroke](https://www.reddit.com/r/ihadastroke/). Such as:\n\n***Appreciate what you what, be are the make you appreciate what you dad.***\n\nor\n\n***Why do they call it oven when you of in the cold food of out hot eat the food?***\n\nor\n\n***Don't think that carrot big because carrot big leaf because small leaf carrot not big leaf sizes.***\n\nAs a fun quarantine side project, I wanted to train an AI to generate these almost-sensical sentences for my own amusement. Since I typically only program games, I wanted something simple and I'm currently using Max Woolfe's [GPT-2 simple](https://minimaxir.com/2019/09/howto-gpt2/) since its extremely easy to input data sets and quickly train a model right from a google collab project. I've considered that perhaps using a \"worse\" platform to create a model might be better for my goals though.\n\nAnyway, I'm considering from where I should pull input sets to train the model. Some ideas I have right now are English as second language forums, mass-translating sentences through a bunch of different languages then back to english, bad sentences generated by other bots like on [r/SubredditSimulator](https://www.reddit.com/r/SubredditSimulator/), or mixing proper english sentences with a smattering of ones that are nonsensical. The nuance to this is that I'd want sentences that ***almost*** make sense, but don't. Oftentimes they'll have a proper grammatic opening or ending, but then will start to deviate or repeat verbs when the clause should end. It might also be possible to not use ML but just take fully formed sentences and start swapping around and subbing out words algorithmically. Any and all suggestions are welcome! This is my first time trying any type of model training so I appreciate any tips, but would probably need to keep it simple.","timestamp":"2021-01-09T21:55:36+00:00","score":3},{"role":"answerer","user_id":"anon_fcfb67bed98b3a61","comment_id":"gipm9ae","kind":"comment","text":"There’s a list of papers I referenced here: https://twitter.com/mervenoyann/status/1347452459321597953?s=21\nAlso this project sponsored by CIFAR and Samsung has bunch of datasets: https://breakend.github.io/DialogDatasets/","timestamp":"2021-01-10T00:24:05+00:00","score":2},{"role":"OP","user_id":"anon_14c4ab164aeb6205","comment_id":"gipmf0z","kind":"comment","text":"Thanks so much! This is super helpful","timestamp":"2021-01-10T00:25:26+00:00","score":2},{"role":"answerer","user_id":"anon_fcfb67bed98b3a61","comment_id":"gipmvd1","kind":"comment","text":"I’d love to see the final version if you put it on github.","timestamp":"2021-01-10T00:29:23+00:00","score":1},{"role":"OP","user_id":"anon_14c4ab164aeb6205","comment_id":"gipn4un","kind":"comment","text":"For sure! Hopefully it pans out well.","timestamp":"2021-01-10T00:31:41+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_14c4ab164aeb6205","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fcfb67bed98b3a61","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gipm9ae","thanks_reply_id":"gipmf0z","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_fa308f80e5011e7e","answerer_user_id":"anon_c0e84c6644b59a5f","subreddit":"LanguageTechnology","timestamp":"2021-01-11T20:05:09+00:00","post_id":"kvas7j","question":"Is there a method for restyling a sentence given another sentence?\n\nI’m working on a problem where I need to take two sentences:\n\n1. Input sentence (this needs to be restyled)\n2. Reference sentence (we match the style of this sentence)\n\nI need to rephrase the input sentence to be more similar to the reference sentence.\n\nVery simple example — if the reference sentence is needlessly verbose, has misspellings and lots of commas, we rephrase the input sentence to have commas and misspellings, and add words to make it more verbose.\n\nHow should I approach this problem?","preferred_answer":"I think what you're looking for is Style Transfer. Here are some useful links: https://github.com/jiangqn/Text-Style-Transfer/blob/master/README.md","full_conversation":[{"role":"OP","user_id":"anon_fa308f80e5011e7e","comment_id":"kvas7j","kind":"post","text":"Is there a method for restyling a sentence given another sentence?\n\nI’m working on a problem where I need to take two sentences:\n\n1. Input sentence (this needs to be restyled)\n2. Reference sentence (we match the style of this sentence)\n\nI need to rephrase the input sentence to be more similar to the reference sentence.\n\nVery simple example — if the reference sentence is needlessly verbose, has misspellings and lots of commas, we rephrase the input sentence to have commas and misspellings, and add words to make it more verbose.\n\nHow should I approach this problem?","timestamp":"2021-01-11T20:05:09+00:00","score":10},{"role":"answerer","user_id":"anon_c0e84c6644b59a5f","comment_id":"gixc55j","kind":"comment","text":"I think what you're looking for is Style Transfer. Here are some useful links: https://github.com/jiangqn/Text-Style-Transfer/blob/master/README.md","timestamp":"2021-01-11T20:56:18+00:00","score":6},{"role":"OP","user_id":"anon_fa308f80e5011e7e","comment_id":"gixlln1","kind":"comment","text":"Thank you! Any specific recommendations? Needs to be on a case by case basis (i.e. no pre-defined styles)","timestamp":"2021-01-11T22:09:25+00:00","score":3},{"role":"answerer","user_id":"anon_c0e84c6644b59a5f","comment_id":"gj0q1q6","kind":"comment","text":"No, I will have to defer to someone else. My experience with style transfer has been narrowly focused on operational aspects of integrating style transfer into writing software.\n\nApologies. I wish I could be more helpful!","timestamp":"2021-01-12T17:36:00+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fa308f80e5011e7e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c0e84c6644b59a5f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gixc55j","thanks_reply_id":"gixlln1","post_score":10,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_e059e03541819694","answerer_user_id":"anon_e99f4093e44a195e","subreddit":"LanguageTechnology","timestamp":"2021-01-13T08:33:17+00:00","post_id":"kwcfip","question":"Recommendations for Semantic Search\n\nI'm looking for recommendations for a semantic search system that can score thousands of text snippets based on their relevance to a user's question.\n\n`INPUT:` \n`- A question, in natural language English.` \n`- A corpus of thousands of text snippets.`\n\n`OUTPUT:` \n`A score for each of the text snippets based on how relevant it is to the question.`\n\nIt should not just be keyword based, but based on meaning / closeness of concept. For example...\n\n`QUESTION: \"Why is LIDAR unneccesary for self driving cars?\"` \n`SNIPPET: \"SpaceX uses LIDAR for docking to the ISS\".`\n\n\\-> The snippet should get a lower relevance score, because the snippet is about the same subject (LIDAR), but in a different context (space vs. automotive).\n\nIt should also be smart enough to rank snippets that use different words for the same concept.\n\n`QUESTION: \"Why is LIDAR unneccesary for self driving cars?\"` \n`SNIPPET: \"Tesla's FSD uses cameras to create a 3D vector space representation of the surroundings, which makes costly sensors such as LIDAR unnecessary.\"`\n\n\\-> The snippet should get a higher relevance score, because the words \"Tesla\" and \"FSD\" in the snippet are semantically linked to the words \"self driving cars\" in the question.\n\nWhat would you say is the best tool to accomplish this today?","preferred_answer":"Can recommend www.jina.ai","full_conversation":[{"role":"OP","user_id":"anon_e059e03541819694","comment_id":"kwcfip","kind":"post","text":"Recommendations for Semantic Search\n\nI'm looking for recommendations for a semantic search system that can score thousands of text snippets based on their relevance to a user's question.\n\n`INPUT:` \n`- A question, in natural language English.` \n`- A corpus of thousands of text snippets.`\n\n`OUTPUT:` \n`A score for each of the text snippets based on how relevant it is to the question.`\n\nIt should not just be keyword based, but based on meaning / closeness of concept. For example...\n\n`QUESTION: \"Why is LIDAR unneccesary for self driving cars?\"` \n`SNIPPET: \"SpaceX uses LIDAR for docking to the ISS\".`\n\n\\-> The snippet should get a lower relevance score, because the snippet is about the same subject (LIDAR), but in a different context (space vs. automotive).\n\nIt should also be smart enough to rank snippets that use different words for the same concept.\n\n`QUESTION: \"Why is LIDAR unneccesary for self driving cars?\"` \n`SNIPPET: \"Tesla's FSD uses cameras to create a 3D vector space representation of the surroundings, which makes costly sensors such as LIDAR unnecessary.\"`\n\n\\-> The snippet should get a higher relevance score, because the words \"Tesla\" and \"FSD\" in the snippet are semantically linked to the words \"self driving cars\" in the question.\n\nWhat would you say is the best tool to accomplish this today?","timestamp":"2021-01-13T08:33:17+00:00","score":4},{"role":"answerer","user_id":"anon_e99f4093e44a195e","comment_id":"gj5zksr","kind":"comment","text":"Can recommend www.jina.ai","timestamp":"2021-01-13T22:52:17+00:00","score":1},{"role":"OP","user_id":"anon_e059e03541819694","comment_id":"gj8m6fc","kind":"comment","text":"Looks very interesting! Thank you for sharing.\nHave you worked with it? How have you used it?\nThanks again, very helpful!","timestamp":"2021-01-14T16:03:16+00:00","score":2},{"role":"answerer","user_id":"anon_e99f4093e44a195e","comment_id":"gj8smfg","kind":"comment","text":"Yes, we're currently using it in a plagiarism detection style system. I think it is a great framework with huge potential and an amazing team. They also offer haystack integration, so you can build the question answering system you described.","timestamp":"2021-01-14T16:51:38+00:00","score":2},{"role":"OP","user_id":"anon_e059e03541819694","comment_id":"gja676n","kind":"comment","text":"What is the difference between haystack and Jina? Why would I need both?","timestamp":"2021-01-14T22:54:37+00:00","score":1},{"role":"answerer","user_id":"anon_e99f4093e44a195e","comment_id":"gjaazke","kind":"comment","text":"Han Xiao from jina and Malte Pietsch from deepset gave a co-webinar on neural search back in july. During the Q&A these questions came up as well. Im linking some relevant timestamps below.\nhttps://youtu.be/VeE1e_TQQHY?t=4811\n\nhttps://youtu.be/VeE1e_TQQHY?t=4586","timestamp":"2021-01-14T23:35:13+00:00","score":1},{"role":"OP","user_id":"anon_e059e03541819694","comment_id":"gjbtvfz","kind":"comment","text":"Oh, wonderful. Thanks for the timestamps. Super helpful!","timestamp":"2021-01-15T09:23:07+00:00","score":2}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_e059e03541819694","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e99f4093e44a195e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gj5zksr","thanks_reply_id":"gj8m6fc","post_score":4,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_b65145da3282a6aa","answerer_user_id":"anon_c81409731af30a6a","subreddit":"LanguageTechnology","timestamp":"2021-01-19T18:45:02+00:00","post_id":"l0q8gk","question":"GPT-2\n\nHow can I use GPT-2 to teach a model how to summarize a piece of random text?","preferred_answer":"Check out how to use Huggingface Transformers for summarization: [https://huggingface.co/transformers/task\\_summary.html#summarization](https://huggingface.co/transformers/task_summary.html#summarization) \n\n\nYou can pass in the GPT-2 model instead of T5 as they do in the example. I would not recommend using their pipeline class. Encode and decode directly so you can better control input lengths and outputs.","full_conversation":[{"role":"OP","user_id":"anon_b65145da3282a6aa","comment_id":"l0q8gk","kind":"post","text":"GPT-2\n\nHow can I use GPT-2 to teach a model how to summarize a piece of random text?","timestamp":"2021-01-19T18:45:02+00:00","score":3},{"role":"answerer","user_id":"anon_c81409731af30a6a","comment_id":"gjv47j2","kind":"comment","text":"Check out how to use Huggingface Transformers for summarization: [https://huggingface.co/transformers/task\\_summary.html#summarization](https://huggingface.co/transformers/task_summary.html#summarization) \n\n\nYou can pass in the GPT-2 model instead of T5 as they do in the example. I would not recommend using their pipeline class. Encode and decode directly so you can better control input lengths and outputs.","timestamp":"2021-01-19T19:46:35+00:00","score":2},{"role":"OP","user_id":"anon_b65145da3282a6aa","comment_id":"gjv4q9s","kind":"comment","text":"Thank you. I'll learn about this and try it and report back on the updates.","timestamp":"2021-01-19T19:50:30+00:00","score":2},{"role":"answerer","user_id":"anon_c81409731af30a6a","comment_id":"gjv56wv","kind":"comment","text":"Good luck. Feel free to reach out on messages if you run into any hiccups.","timestamp":"2021-01-19T19:54:00+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b65145da3282a6aa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c81409731af30a6a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gjv47j2","thanks_reply_id":"gjv4q9s","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_33250e41411ce42a","answerer_user_id":"anon_e04dc84b0af42458","subreddit":"LanguageTechnology","timestamp":"2021-01-26T15:00:19+00:00","post_id":"l5fodl","question":"NLP Specialization course on coursera worth it?\n\nDear Reddit-Fam\n\nCan anyone tell me whether the NLP Specialization track on coursera is a good starting point for someone who is studying Data Science (Master's) and want's to go deeper into NLP?\n\nGreeets","preferred_answer":"Just to confirm - you're referring to the NLP specialization from deeplearning.ai, right? If so, I can recommend them. I have completed both the NLP specialization and the Deep Learning specialization taught by Andrew Ng.\n\nDon't expect to come away from the course prepared to do industry work, at least on the course materials alone. But you'll be introduced to real industry problem statements and specific examples of tackling them using a variety of models (bag of words up through RNNs and Transformers).\n\nMy biggest complaint is the quality of the homework assignments, especially in the NLP sequence. You mostly just have to copy code snippets to prove you were paying attention. But there are tiny gotchas at several points that force a very specific solution needlessly.\n\nAlso - the assignment code structure is horrific. Dear God, please do not expect to organize your code as modelled by these courses when you get a real job.","full_conversation":[{"role":"OP","user_id":"anon_33250e41411ce42a","comment_id":"l5fodl","kind":"post","text":"NLP Specialization course on coursera worth it?\n\nDear Reddit-Fam\n\nCan anyone tell me whether the NLP Specialization track on coursera is a good starting point for someone who is studying Data Science (Master's) and want's to go deeper into NLP?\n\nGreeets","timestamp":"2021-01-26T15:00:19+00:00","score":20},{"role":"answerer","user_id":"anon_e04dc84b0af42458","comment_id":"gkugwwq","kind":"comment","text":"Just to confirm - you're referring to the NLP specialization from deeplearning.ai, right? If so, I can recommend them. I have completed both the NLP specialization and the Deep Learning specialization taught by Andrew Ng.\n\nDon't expect to come away from the course prepared to do industry work, at least on the course materials alone. But you'll be introduced to real industry problem statements and specific examples of tackling them using a variety of models (bag of words up through RNNs and Transformers).\n\nMy biggest complaint is the quality of the homework assignments, especially in the NLP sequence. You mostly just have to copy code snippets to prove you were paying attention. But there are tiny gotchas at several points that force a very specific solution needlessly.\n\nAlso - the assignment code structure is horrific. Dear God, please do not expect to organize your code as modelled by these courses when you get a real job.","timestamp":"2021-01-26T17:43:59+00:00","score":4},{"role":"OP","user_id":"anon_33250e41411ce42a","comment_id":"gkv20fy","kind":"comment","text":"Yes, i mean the NLP course. Haha, thanks, good to know. How is the) general) Deep Learning course from them?","timestamp":"2021-01-26T20:07:08+00:00","score":2},{"role":"answerer","user_id":"anon_e04dc84b0af42458","comment_id":"gkwvfjj","kind":"comment","text":"I love Andrew Ng's teaching style so I would recommend it (even if you have some familiarity with the topics). The homework is generally easier than the NLP specialization but it is also less buggy.","timestamp":"2021-01-27T04:37:57+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_33250e41411ce42a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e04dc84b0af42458","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gkugwwq","thanks_reply_id":"gkv20fy","post_score":20,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_7a0a6ce9405ea6d5","answerer_user_id":"anon_0c8bd3cc04acc2a6","subreddit":"LanguageTechnology","timestamp":"2021-01-30T16:25:16+00:00","post_id":"l8p62a","question":"How to break a word into syllables?\n\nI am new to ML and starting off with what I think is an easy project. My first foray into ML was to predict the number of syllables in a word given its pronunciation, or phonetic transcription. That was pretty straightforward using graph convolutional networks to solve a classification problem. Having succeeded at that, my next goal is to predict the the location of syllable breaks in a word. I have written code to enumerate all possible combinations of *N* syllables for a word, but I don't know which is correct. The core of my problem seems to me to be how to accurately break a graph into subgraphs. This is where I'm running up against my own ignorance about ML approaches. How would I go about doing that? My first thought was link prediction, but I'm open to other ideas. Thanks.","preferred_answer":"People often use typographical rules to do syllabification, eg [Python](https://pyphen.org/) and [R](https://cran.r-project.org/web/packages/sylly/index.html).\n\n> predict the number of syllables in a word given its pronunciation, or phonetic transcription\n\nPeople usually simplify this to simply counting the number of vowels.\n\n> predict the the location of syllable breaks in a word\n\nI bet most would probably just use a BLSTM (or some other BRNN), but you can also look into [FSTs](http://www.openfst.org/) maybe?","full_conversation":[{"role":"OP","user_id":"anon_7a0a6ce9405ea6d5","comment_id":"l8p62a","kind":"post","text":"How to break a word into syllables?\n\nI am new to ML and starting off with what I think is an easy project. My first foray into ML was to predict the number of syllables in a word given its pronunciation, or phonetic transcription. That was pretty straightforward using graph convolutional networks to solve a classification problem. Having succeeded at that, my next goal is to predict the the location of syllable breaks in a word. I have written code to enumerate all possible combinations of *N* syllables for a word, but I don't know which is correct. The core of my problem seems to me to be how to accurately break a graph into subgraphs. This is where I'm running up against my own ignorance about ML approaches. How would I go about doing that? My first thought was link prediction, but I'm open to other ideas. Thanks.","timestamp":"2021-01-30T16:25:16+00:00","score":3},{"role":"answerer","user_id":"anon_0c8bd3cc04acc2a6","comment_id":"gldtxtg","kind":"comment","text":"People often use typographical rules to do syllabification, eg [Python](https://pyphen.org/) and [R](https://cran.r-project.org/web/packages/sylly/index.html).\n\n> predict the number of syllables in a word given its pronunciation, or phonetic transcription\n\nPeople usually simplify this to simply counting the number of vowels.\n\n> predict the the location of syllable breaks in a word\n\nI bet most would probably just use a BLSTM (or some other BRNN), but you can also look into [FSTs](http://www.openfst.org/) maybe?","timestamp":"2021-01-30T17:06:53+00:00","score":3},{"role":"OP","user_id":"anon_7a0a6ce9405ea6d5","comment_id":"gldz6w1","kind":"comment","text":"Thanks for sharing! I'll look into those approaches.\n\n> typographical rules to do syllabification\n\nThat is what made me interested in trying to apply ML to this scenario. I thought these rules might be able to be learned. Plus, the underlying problem I'm trying to solve has implications to more complex problems beyond syllabification.\n\n\n> simply counting the number of vowels.\n\nYes. I wanted to start off my first solo ML project with something easy like that. So far so good.","timestamp":"2021-01-30T17:46:31+00:00","score":1},{"role":"answerer","user_id":"anon_0c8bd3cc04acc2a6","comment_id":"glekw1g","kind":"comment","text":"The rules aren't perfect and you can use these systems to train your own. If you figure out how to make it fully multilingual, you may even have an interesting paper ready.","timestamp":"2021-01-30T20:34:16+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7a0a6ce9405ea6d5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0c8bd3cc04acc2a6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gldtxtg","thanks_reply_id":"gldz6w1","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_688b04702f8d4c0f","answerer_user_id":"anon_6b20c78e71388b14","subreddit":"LanguageTechnology","timestamp":"2021-02-01T05:53:18+00:00","post_id":"l9w7du","question":"Metrics to analyze the quality of generated text?\n\nIf I have a set of synthetic text/articles generated by language models, what metrics can I use to measure the text's quality, in terms of how coherent the context is and how close to human writing? Thank you!","preferred_answer":"Good Question!\n\nAre you training a seq2seq model? \n\nIf you are, my approach using T5 is to use a number of metrics:\n\n1. ROUGE: I compute the ROUGE for the generated sample against the training sample \n2. SentenceTransformers Embedding Similarity: Using sentence transformers, compute the embedding for both the training sample and the generated sample. Then compute the semantic similarity between the 2 using cosine similarity. This should hopefully ensure that even if the model gets creative and writes something different, if it encapsulates the same meaning then the cosine similarity should still be high.\n\nBest of luck","full_conversation":[{"role":"OP","user_id":"anon_688b04702f8d4c0f","comment_id":"l9w7du","kind":"post","text":"Metrics to analyze the quality of generated text?\n\nIf I have a set of synthetic text/articles generated by language models, what metrics can I use to measure the text's quality, in terms of how coherent the context is and how close to human writing? Thank you!","timestamp":"2021-02-01T05:53:18+00:00","score":1},{"role":"answerer","user_id":"anon_6b20c78e71388b14","comment_id":"gll845z","kind":"comment","text":"Good Question!\n\nAre you training a seq2seq model? \n\nIf you are, my approach using T5 is to use a number of metrics:\n\n1. ROUGE: I compute the ROUGE for the generated sample against the training sample \n2. SentenceTransformers Embedding Similarity: Using sentence transformers, compute the embedding for both the training sample and the generated sample. Then compute the semantic similarity between the 2 using cosine similarity. This should hopefully ensure that even if the model gets creative and writes something different, if it encapsulates the same meaning then the cosine similarity should still be high.\n\nBest of luck","timestamp":"2021-02-01T11:55:14+00:00","score":5},{"role":"OP","user_id":"anon_688b04702f8d4c0f","comment_id":"glvzz99","kind":"comment","text":"Many thanks for these pointers!! \n\n\nSorry for the belated reply. I'm actually using transformer-based models but I think the metrics you mentioned also apply to this case. \n\n\nIt makes a lot of sense when I fine-tune or re-train models, or even with few-shot learning. But what if I use zero-shot learning? For example, with zero-shot GPT3, there is no reference to measure the generated text's quality. I was thinking of building a reference dataset, but the blocker is how to define this reference dataset, how to make sure its coverage large enough to be the \"gold\" standard.","timestamp":"2021-02-03T18:08:23+00:00","score":1},{"role":"answerer","user_id":"anon_6b20c78e71388b14","comment_id":"glwaqy3","kind":"comment","text":"If you have no gold standard, then I think the only metrics you can use are things like ROUGE. Here's a list of all the metrics included in HuggingFace which may provide some inspiration: [https://huggingface.co/metrics](https://huggingface.co/metrics)\n\nThis paper was also released just yesterday discussing the problem of measuring the quality of generated text: [https://arxiv.org/abs/2102.01672](https://arxiv.org/abs/2102.01672)","timestamp":"2021-02-03T19:19:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_688b04702f8d4c0f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6b20c78e71388b14","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gll845z","thanks_reply_id":"glvzz99","post_score":1,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_08e9ef8ffe086596","answerer_user_id":"anon_8ba9c26ea10c1074","subreddit":"LanguageTechnology","timestamp":"2021-02-01T11:45:13+00:00","post_id":"la1b4m","question":"What is the latest research on NLU and decision making?\n\nI would be really interested if anyone a list of links/reading resources in this area as it of particular interest for a project i am working on.","preferred_answer":"NLU is a very fragmented area of research including many subfields like Reading Comprehension, Semantic Role Labeling, Question Answering just to name few. There is no common notion of what understanding is. Rather, there are many tasks that are considered to require understanding of text. The key notion is context - that defines the scope over which the understanding is desired, such as sentence or paragraph or document or entire domain. The problem is that context in general is unlimited and requires the common sense reasoning which can not be learned over any limited context. This problem is also known as \"knowledge acquisition bottleneck\" because the background knowledge is a bottle neck for learning.","full_conversation":[{"role":"OP","user_id":"anon_08e9ef8ffe086596","comment_id":"la1b4m","kind":"post","text":"What is the latest research on NLU and decision making?\n\nI would be really interested if anyone a list of links/reading resources in this area as it of particular interest for a project i am working on.","timestamp":"2021-02-01T11:45:13+00:00","score":10},{"role":"answerer","user_id":"anon_8ba9c26ea10c1074","comment_id":"glnqmt9","kind":"comment","text":"NLU is a very fragmented area of research including many subfields like Reading Comprehension, Semantic Role Labeling, Question Answering just to name few. There is no common notion of what understanding is. Rather, there are many tasks that are considered to require understanding of text. The key notion is context - that defines the scope over which the understanding is desired, such as sentence or paragraph or document or entire domain. The problem is that context in general is unlimited and requires the common sense reasoning which can not be learned over any limited context. This problem is also known as \"knowledge acquisition bottleneck\" because the background knowledge is a bottle neck for learning.","timestamp":"2021-02-01T22:30:35+00:00","score":3},{"role":"OP","user_id":"anon_08e9ef8ffe086596","comment_id":"glnxggg","kind":"comment","text":"Thanks, that's really helpful. WRT 'common sense' reasoning, has there been any strides in this area? i.e having context inferred from limited information about the world?\n\nI had an interesting thought about this, if there is logic that applies to one context, a system can automatically apply that logic to a different context, to test and validate. Perhaps something that can improved iteratively over time.","timestamp":"2021-02-01T23:18:42+00:00","score":1},{"role":"answerer","user_id":"anon_8ba9c26ea10c1074","comment_id":"glo5bjo","kind":"comment","text":"Yes, this a general idea of transfer learning when models learned for one task are re-used (after fine-tuning) for another similar task. But the notion of similarity is very fuzzy. It gets more complicated if what you learn is not just differentiable objective function (in that case gradient-based optimization can be used) but a set of logical rules (aka Inductive Logic Programming). The logical expressions are not generally differentiable so you have to use combinatory optimization instead to learn it - which in most cases is intractable. In addition, for logic to be transferable you need some notion of generalization (ie. abstraction, analogy etc).","timestamp":"2021-02-02T00:18:35+00:00","score":1},{"role":"OP","user_id":"anon_08e9ef8ffe086596","comment_id":"glps85p","kind":"comment","text":"Am i being naive to think there are certain domains of logical experessions that can be optimised and transferable if they are restricted to say a single perspective?","timestamp":"2021-02-02T10:33:08+00:00","score":1},{"role":"answerer","user_id":"anon_8ba9c26ea10c1074","comment_id":"glq3n9r","kind":"comment","text":"Not at all. If you restrict \"logical domain\" to only simple logical expressions like modus ponens (aka sylogism), it can be \"easily\" learned and transfered. Like famous \"all humans are mortal\" - so \"if Socrates is human\" ---> \"Socrates is mortal\". The problem is that even simple logic operates with abstractions like \"human\".","timestamp":"2021-02-02T12:58:29+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_08e9ef8ffe086596","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8ba9c26ea10c1074","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"glnqmt9","thanks_reply_id":"glnxggg","post_score":10,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_84ab46195f555547","answerer_user_id":"anon_20127d9448fe3506","subreddit":"LanguageTechnology","timestamp":"2021-02-03T11:03:15+00:00","post_id":"lbl7wk","question":"How to get an accurate text similarity score between very large documents (dozens or even hundreds of pages of text), when token order matters?\n\nLevenshtein woud be ideal, but it's not computationally feasible to compare hundreds of pages long documents with it. Hamming and other edit-based metrics look good but are also way too time consuming.\n\nCosine similarity is very fast, but it doesn't take into account the order of appearance of tokens, which matters to me. Same goes for Jaccard and other token-based similarity metrics I've ran across.\n\nIs there a fast algorithm out there which takes into account the order of the sequence?\n\nI don't care about semantic stuff btw, I need to compare texts superficially.","preferred_answer":"If you compute a Jaccard coefficient over word token or character token n-grams, with a sufficiently large value of n, it should have the effect of ignoring out of order tokens matching across documents. It’s possible if there are long sequences that are repeated verbatim both within and across documents in your corpus, you could get false positives. What do you plan to do with your similarity metric?","full_conversation":[{"role":"OP","user_id":"anon_84ab46195f555547","comment_id":"lbl7wk","kind":"post","text":"How to get an accurate text similarity score between very large documents (dozens or even hundreds of pages of text), when token order matters?\n\nLevenshtein woud be ideal, but it's not computationally feasible to compare hundreds of pages long documents with it. Hamming and other edit-based metrics look good but are also way too time consuming.\n\nCosine similarity is very fast, but it doesn't take into account the order of appearance of tokens, which matters to me. Same goes for Jaccard and other token-based similarity metrics I've ran across.\n\nIs there a fast algorithm out there which takes into account the order of the sequence?\n\nI don't care about semantic stuff btw, I need to compare texts superficially.","timestamp":"2021-02-03T11:03:15+00:00","score":19},{"role":"answerer","user_id":"anon_20127d9448fe3506","comment_id":"gluwacb","kind":"comment","text":"If you compute a Jaccard coefficient over word token or character token n-grams, with a sufficiently large value of n, it should have the effect of ignoring out of order tokens matching across documents. It’s possible if there are long sequences that are repeated verbatim both within and across documents in your corpus, you could get false positives. What do you plan to do with your similarity metric?","timestamp":"2021-02-03T13:24:00+00:00","score":8},{"role":"OP","user_id":"anon_84ab46195f555547","comment_id":"gm3iklg","kind":"comment","text":"Thanks for the tip, I'll try it. But yes there will be false positives.\n\nThe metric is meant to evaluate CRF models I use to extract relevant text from documents.","timestamp":"2021-02-05T09:03:48+00:00","score":1},{"role":"answerer","user_id":"anon_20127d9448fe3506","comment_id":"gm3qkyi","kind":"comment","text":"Without understanding more about your extraction task, I’m not sure I can offer more help, but assuming you have manually marked up test extractions with their offsets, then I’d look into token-level or character-level MUC scoring. If you don’t have such test data, then you ought to find/annotate some.","timestamp":"2021-02-05T11:07:21+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_84ab46195f555547","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_20127d9448fe3506","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gluwacb","thanks_reply_id":"gm3iklg","post_score":19,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_4635bf5aa148da9a","answerer_user_id":"anon_c07876815fcdf883","subreddit":"LanguageTechnology","timestamp":"2021-02-18T14:41:05+00:00","post_id":"lmo8d2","question":"Europe Boot camp/Courses on Natural Language Processing?\n\nHi,\n\nDoes somebody have first-hand experience from bootcamps/short courses (strongly preferred in-person) to get into the NLP space?","preferred_answer":"The Stanford NLP lectures are all on YouTube.","full_conversation":[{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"lmo8d2","kind":"post","text":"Europe Boot camp/Courses on Natural Language Processing?\n\nHi,\n\nDoes somebody have first-hand experience from bootcamps/short courses (strongly preferred in-person) to get into the NLP space?","timestamp":"2021-02-18T14:41:05+00:00","score":1},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"go8rwf7","kind":"comment","text":"The Stanford NLP lectures are all on YouTube.","timestamp":"2021-02-21T17:18:45+00:00","score":1},{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"gobplpp","kind":"comment","text":"Hi, thank you for answering and for the resource.\n\nThat's great, but I am searching for a \"condensed\" live experience rather than an online course. I know that the former is more costly (and lectures maybe not as good!) but I think that learning in person is valuable.","timestamp":"2021-02-22T09:43:58+00:00","score":1},{"role":"answerer","user_id":"anon_c07876815fcdf883","comment_id":"gobq4rf","kind":"comment","text":"https://mlevn.org/education/#summer-schools\n\nWhile none is explicitly NLP only, some like the Lisbon one are in fact focussed on NLP.\n\n> Our target audience is:\n>\n > Researchers and graduate students in the fields of NLP and Computational Linguistics;","timestamp":"2021-02-22T09:52:24+00:00","score":1},{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"gokojmc","kind":"comment","text":"Thank you!","timestamp":"2021-02-24T12:07:26+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4635bf5aa148da9a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c07876815fcdf883","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"go8rwf7","thanks_reply_id":"gobplpp","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_4fbdd850ac05cb0b","answerer_user_id":"anon_74e848285cf4a648","subreddit":"LanguageTechnology","timestamp":"2021-02-23T16:17:23+00:00","post_id":"lqm5kp","question":"Should you standardize/normalize embeddings when using them with a classifier?\n\nStandardizing/normalizing is known to help learning when fitting a model using gradient descent.\n\nWhen using a mix of embeddings and non-text features, how should you approach standardization/normalization? \n\na) Standardize/normalize everything per usual.\n\nb) Standardize/normalize non-text features, but leave the word embeddings alone.\n\nc) Don't standardize/normalize anything.\n\nSo far I'm leaning towards option c. My reasoning:\n\n\\- For embeddings extracted from transformers-based models, there's no sensible notion of mean and standard deviation (in the case of standardization) or maximum or minimum (in the case of normalization).\n\n\\- For a fixed vocabulary of word vectors (such as from word2vec), gensim supports norming all the vectors, but I worry that this procedure would lose useful information contained in the embeddings.\n\n\\- If you standardize/normalize non-text features only, the model would likely update weights associated with the word embeddings faster due to them likely being on a larger scale, which would hurt learning.","preferred_answer":"Depending on how your embeddings were trained, you shouldn't really have to normalize your embeddings since you the magnitude of each embedding shouldn't matter. Although, one way you could normalize is to use SIF embeddings https://openreview.net/pdf?id=SyK00v5xx and remove the first principal component.) \n\nMixing embeddings and non-text features is tricky depending on what model you are using. Using a tree based model should be able to split on the vector space of embedding and also split on the nontext features","full_conversation":[{"role":"OP","user_id":"anon_4fbdd850ac05cb0b","comment_id":"lqm5kp","kind":"post","text":"Should you standardize/normalize embeddings when using them with a classifier?\n\nStandardizing/normalizing is known to help learning when fitting a model using gradient descent.\n\nWhen using a mix of embeddings and non-text features, how should you approach standardization/normalization? \n\na) Standardize/normalize everything per usual.\n\nb) Standardize/normalize non-text features, but leave the word embeddings alone.\n\nc) Don't standardize/normalize anything.\n\nSo far I'm leaning towards option c. My reasoning:\n\n\\- For embeddings extracted from transformers-based models, there's no sensible notion of mean and standard deviation (in the case of standardization) or maximum or minimum (in the case of normalization).\n\n\\- For a fixed vocabulary of word vectors (such as from word2vec), gensim supports norming all the vectors, but I worry that this procedure would lose useful information contained in the embeddings.\n\n\\- If you standardize/normalize non-text features only, the model would likely update weights associated with the word embeddings faster due to them likely being on a larger scale, which would hurt learning.","timestamp":"2021-02-23T16:17:23+00:00","score":7},{"role":"answerer","user_id":"anon_74e848285cf4a648","comment_id":"gokelbj","kind":"comment","text":"Depending on how your embeddings were trained, you shouldn't really have to normalize your embeddings since you the magnitude of each embedding shouldn't matter. Although, one way you could normalize is to use SIF embeddings https://openreview.net/pdf?id=SyK00v5xx and remove the first principal component.) \n\nMixing embeddings and non-text features is tricky depending on what model you are using. Using a tree based model should be able to split on the vector space of embedding and also split on the nontext features","timestamp":"2021-02-24T09:36:21+00:00","score":1},{"role":"OP","user_id":"anon_4fbdd850ac05cb0b","comment_id":"goktpzx","kind":"comment","text":"Thanks!\n\nWhy do you say the magnitude of the embeddings are not important? For dot-product attention or anything using cosine similarity the magnitude of the vectors involved do matter.\n\nAlso, what makes mixing text and non-text features tricky? I’ve heard this opinion before, but I haven’t yet come across a good elaboration of why. For example, is it wrong to just feed both text and non-text features into a logistic regression? Or into a dense feed forward network? And just let the model figure out how to utilize them together. If so, why - what goes wrong?","timestamp":"2021-02-24T13:07:38+00:00","score":1},{"role":"answerer","user_id":"anon_74e848285cf4a648","comment_id":"goqubmg","kind":"comment","text":"I suppose it depends on how you use the embedding. The magnitude of an embedding doesn't matter for cossim relative to the other embedding since you are just measuring the angle between the embeddings. \n\nThe problem was mixing is that the embedding might overwhelm the other features in the model. For example, if you have a 500 dimension embedding + 10 numerical features, a logistic regression might overfit on the embedding features. Same with a dense feed forward network. In theory, you could try adding different regularization params per feature but this could be difficult to configure and tune. In my experience tree based models work better because they will take feature with the highest importance first and then basically split on the embedding space.","timestamp":"2021-02-25T19:56:27+00:00","score":2},{"role":"OP","user_id":"anon_4fbdd850ac05cb0b","comment_id":"grtpqrx","kind":"comment","text":"Ah yes – you're right about the cosine similarity not being affected by the magnitude of the vectors. \n\nThat's a good point! I forgot to consider that the model might overfit to the embedding features, simply because there are more of them compared to regular features. Would a potential solution, then, be to map the embeddings to a lower dimension (e.g., with a linear layer) before concatenating with other features? \n\n\nI haven't tried tree-based models for NLP tasks, but maybe I should. Thanks!","timestamp":"2021-03-22T16:11:07+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4fbdd850ac05cb0b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_74e848285cf4a648","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gokelbj","thanks_reply_id":"goktpzx","post_score":7,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_01ddbe74c6e463a8","answerer_user_id":"anon_588220f302bfe814","subreddit":"LanguageTechnology","timestamp":"2021-02-24T23:38:09+00:00","post_id":"lrqhlr","question":"Does anyone know where I could get some tagged pos/neg/neutral restaurant reviews?\n\nI want to create a sentiment analysis for a class using NLTK but not on movie reviews or Twitter data which seem to be the two most popular. Does anyone know where I could find a large set of sentiment tagged restaurant reviews? Thank you","preferred_answer":"Kaggle is always a great starting point. Found this little dataset over there (\\~1000 rows) [https://www.kaggle.com/vigneshwarsofficial/reviews](https://www.kaggle.com/vigneshwarsofficial/reviews)","full_conversation":[{"role":"OP","user_id":"anon_01ddbe74c6e463a8","comment_id":"lrqhlr","kind":"post","text":"Does anyone know where I could get some tagged pos/neg/neutral restaurant reviews?\n\nI want to create a sentiment analysis for a class using NLTK but not on movie reviews or Twitter data which seem to be the two most popular. Does anyone know where I could find a large set of sentiment tagged restaurant reviews? Thank you","timestamp":"2021-02-24T23:38:09+00:00","score":3},{"role":"answerer","user_id":"anon_588220f302bfe814","comment_id":"gon6rzf","kind":"comment","text":"Kaggle is always a great starting point. Found this little dataset over there (\\~1000 rows) [https://www.kaggle.com/vigneshwarsofficial/reviews](https://www.kaggle.com/vigneshwarsofficial/reviews)","timestamp":"2021-02-24T23:48:38+00:00","score":2},{"role":"OP","user_id":"anon_01ddbe74c6e463a8","comment_id":"gon73vt","kind":"comment","text":"Thank you so much!","timestamp":"2021-02-24T23:51:20+00:00","score":1},{"role":"answerer","user_id":"anon_588220f302bfe814","comment_id":"gon7l46","kind":"comment","text":"Hope it'll help. Good luck for your class!","timestamp":"2021-02-24T23:55:14+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_01ddbe74c6e463a8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_588220f302bfe814","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gon6rzf","thanks_reply_id":"gon73vt","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_056c9a1edab24159","answerer_user_id":"anon_01ddbe74c6e463a8","subreddit":"LanguageTechnology","timestamp":"2021-02-25T02:20:22+00:00","post_id":"lrv476","question":"Question: What is the commercial value of NLP?\n\nI am very interested in this topic but learning and getting academic certifications takes time and effort, as topic, is it worth it?","preferred_answer":"Nlp techniques are used for spellchecking, like Levenshtein distance and in predicting text all the time.","full_conversation":[{"role":"OP","user_id":"anon_056c9a1edab24159","comment_id":"lrv476","kind":"post","text":"Question: What is the commercial value of NLP?\n\nI am very interested in this topic but learning and getting academic certifications takes time and effort, as topic, is it worth it?","timestamp":"2021-02-25T02:20:22+00:00","score":0},{"role":"answerer","user_id":"anon_01ddbe74c6e463a8","comment_id":"goo7a3w","kind":"comment","text":"Nlp techniques are used for spellchecking, like Levenshtein distance and in predicting text all the time.","timestamp":"2021-02-25T04:47:38+00:00","score":1},{"role":"OP","user_id":"anon_056c9a1edab24159","comment_id":"goo840j","kind":"comment","text":"thank you.\nI love NLP, languages and words, and I am trying to justify (financially) putting the time and effort into this. to me, data analytics should bring insights, hence value.\nunderstanding of something could foster insights, of course, but not very direct.\nso what you had been suggesting is enhancement of a function, or enabling functionality, for something to be commercially valuable, it would be easier if that something could provide insight, something new.\n\nhope that made it clear, else, thanks for your time, I am closing this thread.","timestamp":"2021-02-25T04:55:52+00:00","score":1},{"role":"answerer","user_id":"anon_01ddbe74c6e463a8","comment_id":"goo8lmf","kind":"comment","text":"Commercial value of nlp isn’t insight though. It’s products people use in their everyday lives, 99% of the time it is automating some boring task we do when we write or we speak. Like spell check, like virtual assistants, machine translation, offering the next most likely word you’re going to use based on what’s been written before, not fostering insights. If you’re looking for insight or “something new” you’re looking to get into research.","timestamp":"2021-02-25T05:00:52+00:00","score":4}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_056c9a1edab24159","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_01ddbe74c6e463a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"goo7a3w","thanks_reply_id":"goo840j","post_score":0,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_d187bada65fe1cd0","answerer_user_id":"anon_37df6ab8f5904665","subreddit":"LanguageTechnology","timestamp":"2021-02-26T19:23:44+00:00","post_id":"lt5k5m","question":"How to extract keywords important to a text classification problem?\n\nHi.\n\nI have a text multi-class text classification problem, in which I'm trying to classify different subreddits' comments using a very simple TFIDF + PCA + SVM pipeline. What I'm really keen to know is that how different keywords in each class contribute to this classification problem. How can I do this? I have around 10 classes each having 5000 comments with 30 words in average.","preferred_answer":"You can utilize the TF-IDF Vectorizer you created for all your documents. After classifying your comments, you could try this:\n\nConcatenate all comments from one class, compute the TF-IDF for this document and extract the top n key-words. You can also visualize these with an approach as this one: https://stackoverflow.com/questions/61916096/word-cloud-built-out-of-tf-idf-vectorizer-function","full_conversation":[{"role":"OP","user_id":"anon_d187bada65fe1cd0","comment_id":"lt5k5m","kind":"post","text":"How to extract keywords important to a text classification problem?\n\nHi.\n\nI have a text multi-class text classification problem, in which I'm trying to classify different subreddits' comments using a very simple TFIDF + PCA + SVM pipeline. What I'm really keen to know is that how different keywords in each class contribute to this classification problem. How can I do this? I have around 10 classes each having 5000 comments with 30 words in average.","timestamp":"2021-02-26T19:23:44+00:00","score":3},{"role":"answerer","user_id":"anon_37df6ab8f5904665","comment_id":"govmr7q","kind":"comment","text":"You can utilize the TF-IDF Vectorizer you created for all your documents. After classifying your comments, you could try this:\n\nConcatenate all comments from one class, compute the TF-IDF for this document and extract the top n key-words. You can also visualize these with an approach as this one: https://stackoverflow.com/questions/61916096/word-cloud-built-out-of-tf-idf-vectorizer-function","timestamp":"2021-02-26T20:12:08+00:00","score":3},{"role":"OP","user_id":"anon_d187bada65fe1cd0","comment_id":"govn42a","kind":"comment","text":"Thanks!","timestamp":"2021-02-26T20:13:50+00:00","score":1},{"role":"answerer","user_id":"anon_37df6ab8f5904665","comment_id":"govneqd","kind":"comment","text":"No Problem. Let me know if it worked :)","timestamp":"2021-02-26T20:15:17+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d187bada65fe1cd0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_37df6ab8f5904665","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"govmr7q","thanks_reply_id":"govn42a","post_score":3,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_8b6ea88b895ea8cd","answerer_user_id":"anon_4e6ce37934f12b85","subreddit":"LanguageTechnology","timestamp":"2021-02-28T08:08:49+00:00","post_id":"luam24","question":"How to generate sentences from a set of keywords?\n\nlike this: \n\n[https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45](https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45) \n\nSample Input: \"Teacher\", \"Great\".\n\nOutput: \"He is a great teacher and everyone needs to learn from him\"\n\n​\n\nI want to do this for a university project and I don't have a lot of time. do you think this is a good idea or should I change the topic. \n\nI have a dataset of sample outputs. I am new to this. Any help is appreciated thanks.","preferred_answer":"Pretty easy with seq to seq / transformers if you have data, I once did this with the Yelp review data set and just fed in some of the keywords of the review on the \"left\" side.","full_conversation":[{"role":"OP","user_id":"anon_8b6ea88b895ea8cd","comment_id":"luam24","kind":"post","text":"How to generate sentences from a set of keywords?\n\nlike this: \n\n[https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45](https://towardsdatascience.com/data-to-text-generation-with-t5-building-a-simple-yet-advanced-nlg-model-b5cce5a6df45) \n\nSample Input: \"Teacher\", \"Great\".\n\nOutput: \"He is a great teacher and everyone needs to learn from him\"\n\n​\n\nI want to do this for a university project and I don't have a lot of time. do you think this is a good idea or should I change the topic. \n\nI have a dataset of sample outputs. I am new to this. Any help is appreciated thanks.","timestamp":"2021-02-28T08:08:49+00:00","score":8},{"role":"answerer","user_id":"anon_4e6ce37934f12b85","comment_id":"gp5hcpq","kind":"comment","text":"Pretty easy with seq to seq / transformers if you have data, I once did this with the Yelp review data set and just fed in some of the keywords of the review on the \"left\" side.","timestamp":"2021-02-28T09:12:01+00:00","score":3},{"role":"OP","user_id":"anon_8b6ea88b895ea8cd","comment_id":"gp5ntp0","kind":"comment","text":"Thank you so much. could you please show me the code? or just tell me what to look for. This has already been more progress than what I have done for the past few days.","timestamp":"2021-02-28T10:16:43+00:00","score":2},{"role":"answerer","user_id":"anon_4e6ce37934f12b85","comment_id":"gp5ot97","kind":"comment","text":"I just checked the blog article, it is already described there, what is your Machine Learning know how?","timestamp":"2021-02-28T10:27:20+00:00","score":2},{"role":"OP","user_id":"anon_8b6ea88b895ea8cd","comment_id":"gp5pawo","kind":"comment","text":"I have only just started learning about machine learning. I am a web developer, I have built a website and now I'm supposed to integrate this into the website somehow. I have no idea where to start and what to do. I'm really confused.","timestamp":"2021-02-28T10:31:50+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_8b6ea88b895ea8cd","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4e6ce37934f12b85","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gp5hcpq","thanks_reply_id":"gp5ntp0","post_score":8,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_265e0bd585fd0dfc","answerer_user_id":"anon_82777c1febdcad85","subreddit":"LanguageTechnology","timestamp":"2021-03-01T15:10:57+00:00","post_id":"lvbkfr","question":"[Need Advice]PhD in NLP @ reputed US institute/Prof. Worth it?\n\nHi, \n\nI recently got admitted to a good PhD program in the US to work on natural language processing. The advisor is great too. A question to this reddit community - do you think going for a PhD in this domain is worth it? \n\nBackground: Im already working at a great organization where my learning curve is increasing for the last two years. Im getting to work on state of the art things, I get to read papers, implement them, come up with my own architectures etc. My peers are very supportive, and Im assuming this is paving path for great industry opportunities in general. \n\nHowever, I applied for a PhD for two reasons: I want to learn more about the domain and stick to an area to get more expertise, understand the theory etc. And eventually I want to be a research lead, for which I think a PhD will provide me with immense credibility. However the idea of starting a PhD at 27, and going back to school and that lifestyle for another five years is very very scary. Im starting to have cold feet. \n\nAny words of wisdom from someone in the process, or someone who has been through this? \n\nThank you so much!","preferred_answer":"I have a PhD in NLP. I'm glad I did it, just felt like I had to get a PhD. You probably should feel like that too b/c it can be a slog. One concrete reason I'm glad I did it is because the PhD opened a lot of doors for me that weren't open after my undergrad, which was in linguistics. I like my career path much better than I think I would have doing academic linguistics or language preservation. \n\nIf you are really set on being a research lead, PhD can be of great value. There are a handful of people high up on NLP projects that don't have PhDs (\"just\" with lots of industry experience), but they are rare. It will open doors. \n\nIf you are really happy with your current trajectory, which frankly sounds really good, then there's nothing wrong with sticking to it. There's a lot of interesting research going on in industry, and you generally get more interesting data than in academia. \n\nRe becoming an expert in a single area: PhD obviously does this, but there's no guarantee you'll stay in that area forever. I did grammatical error detection and parsing for my PhD, did a lot of work in automating fraud detection, and now work in a non-NLP field as an engineer. Most of my colleagues have PhDs, and none in what we work on (since it's really only a problem faced in industry).","full_conversation":[{"role":"OP","user_id":"anon_265e0bd585fd0dfc","comment_id":"lvbkfr","kind":"post","text":"[Need Advice]PhD in NLP @ reputed US institute/Prof. Worth it?\n\nHi, \n\nI recently got admitted to a good PhD program in the US to work on natural language processing. The advisor is great too. A question to this reddit community - do you think going for a PhD in this domain is worth it? \n\nBackground: Im already working at a great organization where my learning curve is increasing for the last two years. Im getting to work on state of the art things, I get to read papers, implement them, come up with my own architectures etc. My peers are very supportive, and Im assuming this is paving path for great industry opportunities in general. \n\nHowever, I applied for a PhD for two reasons: I want to learn more about the domain and stick to an area to get more expertise, understand the theory etc. And eventually I want to be a research lead, for which I think a PhD will provide me with immense credibility. However the idea of starting a PhD at 27, and going back to school and that lifestyle for another five years is very very scary. Im starting to have cold feet. \n\nAny words of wisdom from someone in the process, or someone who has been through this? \n\nThank you so much!","timestamp":"2021-03-01T15:10:57+00:00","score":14},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"gpgnl61","kind":"comment","text":"I have a PhD in NLP. I'm glad I did it, just felt like I had to get a PhD. You probably should feel like that too b/c it can be a slog. One concrete reason I'm glad I did it is because the PhD opened a lot of doors for me that weren't open after my undergrad, which was in linguistics. I like my career path much better than I think I would have doing academic linguistics or language preservation. \n\nIf you are really set on being a research lead, PhD can be of great value. There are a handful of people high up on NLP projects that don't have PhDs (\"just\" with lots of industry experience), but they are rare. It will open doors. \n\nIf you are really happy with your current trajectory, which frankly sounds really good, then there's nothing wrong with sticking to it. There's a lot of interesting research going on in industry, and you generally get more interesting data than in academia. \n\nRe becoming an expert in a single area: PhD obviously does this, but there's no guarantee you'll stay in that area forever. I did grammatical error detection and parsing for my PhD, did a lot of work in automating fraud detection, and now work in a non-NLP field as an engineer. Most of my colleagues have PhDs, and none in what we work on (since it's really only a problem faced in industry).","timestamp":"2021-03-02T21:35:39+00:00","score":3},{"role":"OP","user_id":"anon_265e0bd585fd0dfc","comment_id":"gq63fft","kind":"comment","text":"Thank you so much for the detailed response! Im glad PhD opened doors. \n\nIf you don't mind me asking - how is it that you are in a non-NLP role right now? is it more about not having enough interesting opportunities or because it's a personal choice?","timestamp":"2021-03-08T02:36:37+00:00","score":1},{"role":"answerer","user_id":"anon_82777c1febdcad85","comment_id":"gq87qml","kind":"comment","text":"I went to work at a big tech company. There's basically no academic research on what we work on (sorry don't really want to say what it is just for privacy reasons), so nobody has a background in it. The manager of the team was really enthusiastic and nice, and convinced me to give it a shot. Worst case he said I'd know what it was like working on that problem, and then in 18 months I could transfer to an NLP team. At this point I have no interest in leaving so it's worked out well. NLP is awesome, but there are lots of great problems out there.","timestamp":"2021-03-08T16:53:16+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_265e0bd585fd0dfc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_82777c1febdcad85","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gpgnl61","thanks_reply_id":"gq63fft","post_score":14,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_7e46232bf5297dde","answerer_user_id":"anon_59aae75f9495a729","subreddit":"LanguageTechnology","timestamp":"2021-03-02T11:48:37+00:00","post_id":"lw07f5","question":"[D] Annotation tool for entity sentiment analysis\n\nHi everyone, we are a marketing company and going to start an annotation project for entity sentiment analysis. Can you please share what are best practices for starting an NLP annotation project? What is most efficient approach? What techniques are mostly used to automate the annotation process?","preferred_answer":"Checkout our new tool [https://ubiai.tools](https://ubiai.tools/) , we offer extensive labeling features at very [accessible price](https://ubiai.tools/Package) . The tool has the following features:\n\n* Easy to use UI for NER and entity relation extraction\n* Multi-format document upload: TXT, CSV (each row corresponds to a doc), JSON (allows you to import and modify already annotated JSON files), PDF, DOC, HTML\n* Dictionary/Regex auto-annotation: input a list of words or regex patterns along with their associated entities. The tool will automatically scan the documents and auto-annotate\n* ML auto-annotation: Train an NER model to auto-annotate your documents\n* Collaboration: **Share annotation tasks among team members and evaluate team performance**\n* Annotation format export: JSON, IOB, IOB chatbot, Amazon Comprehend, Stanford CoreNLP\n\nJust send us an email at [admin@ubiai.tools](mailto:admin@ubiai.tools) and we can discuss what plan is most suitable for your use case.\n\nGood luck with your project!","full_conversation":[{"role":"OP","user_id":"anon_7e46232bf5297dde","comment_id":"lw07f5","kind":"post","text":"[D] Annotation tool for entity sentiment analysis\n\nHi everyone, we are a marketing company and going to start an annotation project for entity sentiment analysis. Can you please share what are best practices for starting an NLP annotation project? What is most efficient approach? What techniques are mostly used to automate the annotation process?","timestamp":"2021-03-02T11:48:37+00:00","score":3},{"role":"answerer","user_id":"anon_59aae75f9495a729","comment_id":"gpilr5k","kind":"comment","text":"Checkout our new tool [https://ubiai.tools](https://ubiai.tools/) , we offer extensive labeling features at very [accessible price](https://ubiai.tools/Package) . The tool has the following features:\n\n* Easy to use UI for NER and entity relation extraction\n* Multi-format document upload: TXT, CSV (each row corresponds to a doc), JSON (allows you to import and modify already annotated JSON files), PDF, DOC, HTML\n* Dictionary/Regex auto-annotation: input a list of words or regex patterns along with their associated entities. The tool will automatically scan the documents and auto-annotate\n* ML auto-annotation: Train an NER model to auto-annotate your documents\n* Collaboration: **Share annotation tasks among team members and evaluate team performance**\n* Annotation format export: JSON, IOB, IOB chatbot, Amazon Comprehend, Stanford CoreNLP\n\nJust send us an email at [admin@ubiai.tools](mailto:admin@ubiai.tools) and we can discuss what plan is most suitable for your use case.\n\nGood luck with your project!","timestamp":"2021-03-03T09:06:56+00:00","score":2},{"role":"OP","user_id":"anon_7e46232bf5297dde","comment_id":"gpimieh","kind":"comment","text":"Thank you! I am testing UBIAI's free version and so far i am very impressed! The interface is very easy to use and the pre-annotation features save a lot of time. Do you offer discounts for small startups?","timestamp":"2021-03-03T09:19:07+00:00","score":1},{"role":"answerer","user_id":"anon_59aae75f9495a729","comment_id":"gpk0gb2","kind":"comment","text":"Thank you for your feedback! We do offer discounts. Please send us an email at [admin@ubiai.tools](mailto:admin@ubiai.tools) and we can discuss further. Thank you.","timestamp":"2021-03-03T17:32:11+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7e46232bf5297dde","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_59aae75f9495a729","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gpilr5k","thanks_reply_id":"gpimieh","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_01ddbe74c6e463a8","answerer_user_id":"anon_bf3bbb4c6934bbd8","subreddit":"LanguageTechnology","timestamp":"2021-03-03T21:00:09+00:00","post_id":"lx47ms","question":"Using bag or words, bigrams and tf-idf together\n\nI’m trying to build a model that will decide if a review is positive or negative. I’d like to use the above methods but am unsure if they can all be used together. I think my order of operations would be clean data(case, punctuation, stop words etc) then get bigrams, as a bag of bigrams instead of just words? And then get the tf-idf scores for these bigrams. Use those scores with with something like naive bayes classifier to make my predictions? Is this doable? Or Will I mangle some methods that aren’t really meant to be used together?","preferred_answer":"If you're using sklearn, just use the `ngram_range` argument of `CountVectorizer`, in your case `ngram_range=(1,2)` since you want individual words (1-gramas) as well as bigrams (2-grams), that is, it would be something like this:\n\n from sklearn.feature_extraction.text import CountVectorizer\n ...\n vectorizer = CountVectorizer(analyzer='word', ngram_range=(1, 2))\n x = vectorizer.fit_transform(your_training_docs)\n ...\n\nHope it helps :)","full_conversation":[{"role":"OP","user_id":"anon_01ddbe74c6e463a8","comment_id":"lx47ms","kind":"post","text":"Using bag or words, bigrams and tf-idf together\n\nI’m trying to build a model that will decide if a review is positive or negative. I’d like to use the above methods but am unsure if they can all be used together. I think my order of operations would be clean data(case, punctuation, stop words etc) then get bigrams, as a bag of bigrams instead of just words? And then get the tf-idf scores for these bigrams. Use those scores with with something like naive bayes classifier to make my predictions? Is this doable? Or Will I mangle some methods that aren’t really meant to be used together?","timestamp":"2021-03-03T21:00:09+00:00","score":11},{"role":"answerer","user_id":"anon_bf3bbb4c6934bbd8","comment_id":"gpkvutq","kind":"comment","text":"If you're using sklearn, just use the `ngram_range` argument of `CountVectorizer`, in your case `ngram_range=(1,2)` since you want individual words (1-gramas) as well as bigrams (2-grams), that is, it would be something like this:\n\n from sklearn.feature_extraction.text import CountVectorizer\n ...\n vectorizer = CountVectorizer(analyzer='word', ngram_range=(1, 2))\n x = vectorizer.fit_transform(your_training_docs)\n ...\n\nHope it helps :)","timestamp":"2021-03-03T21:17:50+00:00","score":5},{"role":"OP","user_id":"anon_01ddbe74c6e463a8","comment_id":"gpkwhg2","kind":"comment","text":"Thank you so much! Could you explain just a little bit more for me? Why would I want individual words, 1grams, and not just the bigrams? Also I can create bigrams after I’ve filtered out things like stopwords and names, right?","timestamp":"2021-03-03T21:22:24+00:00","score":2},{"role":"answerer","user_id":"anon_bf3bbb4c6934bbd8","comment_id":"gpky402","kind":"comment","text":"Hi u/edwardsrk. Sure, since you want to \"Use bag of words, bigrams and tf-idf together\", that thing will do the trick for you. Instead of using the \"standard\" `CountVectorizer` to create your document-term matrix, using those arguments will allow you to create a document-term matrix in which terms will be words as well as bigrams, so, when you use `TfidfTransformer()`, it will produce what you want :)\n\n\nAlternatively, you can just use `TfidfVectorizer` to obtain the same result without previously using `CounterVectorizer`, as follows:\n\n```\nfrom sklearn.feature_extraction.text import TfidfVectorizer\n...\nvectorizer = TfidfVectorizer(analyzer='word', ngram_range=(1, 2))\nx = vectorizer.fit_transform(your_training_docs)\n...\n```\n\nAnd that's it! (Y)","timestamp":"2021-03-03T21:34:16+00:00","score":3},{"role":"OP","user_id":"anon_01ddbe74c6e463a8","comment_id":"gpnznef","kind":"comment","text":"Thank you very much for your help!","timestamp":"2021-03-04T16:11:44+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_01ddbe74c6e463a8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bf3bbb4c6934bbd8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gpkvutq","thanks_reply_id":"gpkwhg2","post_score":11,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_1d2aa728f3b14302","answerer_user_id":"anon_acd5f4ccb7914a52","subreddit":"LanguageTechnology","timestamp":"2021-03-05T21:40:02+00:00","post_id":"lyml6j","question":"Help with tf-idf for job description extraction\n\nHi, this isn't really a question asking for help with code syntax, more so on the general theory / workflow side of things. \n\nI'm doing a small Python project where I'm trying to extract relevant job 'requirements' from UX Researcher job listings on Google. I've scraped a load of jobs, cleaned them using NLTK, Spacy etc and I have saved each job description as a text file respectively. I also made one large text file corpus with all the cleaned job descriptions in. \n\nI've heard that tf-idf is a good way to go about extracting just the employers' desired 'requirements' from these job descriptions (i.e., 'PhD in Psychology' or 'Agile and Scrum experience'). \n\nMy problem however is i'm not sure in what format to load the documents in to process using tf-idf. Should I load in all of the documents which each contain one job description, or use the one text file which has all of the documents in itself? My thinking is I need to load each individual document given that tf-idf uses document frequency right? Any help would be appreciated, thanks!","preferred_answer":"Your collection of job descriptions would be your corpus, and each job description would be a single document in that corpus. As long as that separation is made, you can load it however you like. If you load it as one file, just make each job description has some distinct separator (e.g. newline) and separate on that during the reading process.\n\n​\n\nOn a side note, based on your description, I'm not convinced TF-IDF is going to give you what you want. There's overlap and some tangent to your goal, but it's not a clear mapping. TF-IDF will give greater weight to a word (bigrams and trigrams in your case) in a job description if that term seldom appears in the other descriptions, which may or may not be the case here (e.g. desired requirements which are in most of the descriptions). It takes little time to give it a try but just keep that in mind.","full_conversation":[{"role":"OP","user_id":"anon_1d2aa728f3b14302","comment_id":"lyml6j","kind":"post","text":"Help with tf-idf for job description extraction\n\nHi, this isn't really a question asking for help with code syntax, more so on the general theory / workflow side of things. \n\nI'm doing a small Python project where I'm trying to extract relevant job 'requirements' from UX Researcher job listings on Google. I've scraped a load of jobs, cleaned them using NLTK, Spacy etc and I have saved each job description as a text file respectively. I also made one large text file corpus with all the cleaned job descriptions in. \n\nI've heard that tf-idf is a good way to go about extracting just the employers' desired 'requirements' from these job descriptions (i.e., 'PhD in Psychology' or 'Agile and Scrum experience'). \n\nMy problem however is i'm not sure in what format to load the documents in to process using tf-idf. Should I load in all of the documents which each contain one job description, or use the one text file which has all of the documents in itself? My thinking is I need to load each individual document given that tf-idf uses document frequency right? Any help would be appreciated, thanks!","timestamp":"2021-03-05T21:40:02+00:00","score":2},{"role":"answerer","user_id":"anon_acd5f4ccb7914a52","comment_id":"gpttkea","kind":"comment","text":"Your collection of job descriptions would be your corpus, and each job description would be a single document in that corpus. As long as that separation is made, you can load it however you like. If you load it as one file, just make each job description has some distinct separator (e.g. newline) and separate on that during the reading process.\n\n​\n\nOn a side note, based on your description, I'm not convinced TF-IDF is going to give you what you want. There's overlap and some tangent to your goal, but it's not a clear mapping. TF-IDF will give greater weight to a word (bigrams and trigrams in your case) in a job description if that term seldom appears in the other descriptions, which may or may not be the case here (e.g. desired requirements which are in most of the descriptions). It takes little time to give it a try but just keep that in mind.","timestamp":"2021-03-05T23:05:17+00:00","score":2},{"role":"OP","user_id":"anon_1d2aa728f3b14302","comment_id":"gpttzw7","kind":"comment","text":"Brilliant thanks so much! I’ve been confused about the input, just to clarify will whatever I use to actually implement tf-idf (Sci-kit learn for example) be able to distinguish between the ‘documents’ even if they’re in one text file simple if I split them by lines? \n\nAlso thanks, I’ve been dubious about tf-idf it’s just what I had initially heard about. Do you think LDA might be better?","timestamp":"2021-03-05T23:09:04+00:00","score":1},{"role":"answerer","user_id":"anon_acd5f4ccb7914a52","comment_id":"gptxrw8","kind":"comment","text":"With the TfidfVectorizer from scikit-learn, you can simply pass it an array of strings. So you'd load your file in such a manner that each job description is a string, and all of them would be in an array. You can then pass this to TfidfVectorizer's fit\\_transform method. I assume your data will all fit into memory. \n\n\nRegarding your question about using topic modelling instead, I think TF-IDF is a better starting point. From there depending on the results, you can google for different keyword extraction algorithms.","timestamp":"2021-03-05T23:42:27+00:00","score":2},{"role":"OP","user_id":"anon_1d2aa728f3b14302","comment_id":"gptxv4n","kind":"comment","text":"Thanks, this is just what I needed, cheers!","timestamp":"2021-03-05T23:43:16+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_1d2aa728f3b14302","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_acd5f4ccb7914a52","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gpttkea","thanks_reply_id":"gpttzw7","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_9e821477c75c0a95","answerer_user_id":"anon_ccf1ade4530e5285","subreddit":"LanguageTechnology","timestamp":"2021-03-07T00:10:55+00:00","post_id":"lzer14","question":"Is it possible to test whether a tokenizer can losslessly tokenize and detokenize a given corpus solely from its vocabulary?\n\nI am trying to test whether a given vocabulary list contains the tokens necessary to reconstruct a corpus of text losslessly. That is, if a tokenizer trained on a corpus of text were to attempt to tokenize the training corpus according to its associated vocabulary, would it be able to tokenize and detokenize the entire training corpus without losing any text to \\[unk\\] tokens? Are there ways to test this?\n\nSuppose you had a corpus of text - I’ll use a small one for this example\n\n corpus = ‘the cat in the hat’\n\nSuppose you had a trained tokenizer which tokenizes according to its vocab list where each token id is simply the index of the token in the list.\n\n vocab = [‘t’, ‘h’, ‘e’, ‘ ‘, ‘c’, ‘a’, ‘i’, ‘n’]\n print(len(vocab))\n 8\n tokens = tokenize(corpus, vocab))\n print(tokens)\n [0, 1, 2, 3, 4, 5, 0, 3, 6, 7, 3, 0, 1, 2, 3, 2, 5, 0]\n print(“Tokenized length: {}”.format(len(tokens)))\n Tokenized length: 18\n\nIf I then detokenize from here I can obviously reconstruct the corpus as it originally was. However, this process is suboptimal as we can combine tokens to reduce the length of the tokenized representation.\n\n vocab = [‘t’, ‘h’, ‘e’, ‘ ‘, ‘c’, ‘a’, ‘i’, ‘n’, ‘th’]\n print(len(vocab))\n 9\n tokens = tokenize(corpus, vocab))\n print(tokens)\n [8, 2, 3, 4, 5, 0, 3, 6, 7, 3, 8, 2, 3, 2, 5, 0]\n print(“Tokenized length: {}”.format(len(tokens)))\n Tokenized length: 16\n\nThis is obviously still lossless, though it adds an extra token to the vocabulary list, which will increase the possibility space of a model trying to predict the next token in a sequence. But if I remove a necessary token, it becomes lossy. Supppose our tokenizer outputs ‘\\[unk\\]’ for all tokens not in the vocabulary and that the ‘\\[unk\\]’ token is always the last token in the vocabulary regardless of the content of the vocabulary.\n\n vocab = [‘t’, ‘h’, ‘e’, ‘ ‘, ‘c’, ‘a’, ‘i’, ‘th’]\n print(len(vocab))\n 8\n tokens = tokenize(corpus, vocab))\n print(tokens)\n [7, 2, 3, 4, 5, 0, 3, 6, 8, 3, 7, 2, 3, 2, 5, 0]\n print(“Tokenized length: {}”.format(len(tokens)))\n Tokenized length: 16\n\nThe length of the representation does not change but we can tell that it is lossy just from the vocabulary, therefore the compression is not lossless.\n\n print(detokenize(tokens, vocab))\n [‘the cat i[unk] the hat’]\n\nThis example makes it easy to tell the compression is lossy because our vocabulary is small and made of suboptimally combined tokens. We can go further with the combination of the vocabulary and combine ‘t’, ‘h’, ‘e’, and ‘ ‘ to form a single token covering all instances of “the “. Since ‘e’ doesn’t occur outside of its place in ‘the’ we can delete it from the vocabulary list and still maintain the same level of loss in compression, ditto ‘i’ and ‘n’.\n\n vocab = [‘t’, ‘h’, ‘the ‘, ‘ ‘, ‘c’, ‘a’, ‘in’]\n print(len(vocab))\n 7\n tokens = tokenize(corpus, vocab)\n print(tokens)\n [2, 4, 5, 0, 3, 6, 3, 2, 1, 5, 0]\n print(len(tokens)\n 11\n\nThus far this is the most optimally compressed form of the sentence (though I don’t claim for it to be the most optimally compressed) and it has the smallest vocabulary size, making it easier for a model to guess the next token. In all of these examples we have been able to tell unambiguously whether or not the compression is lossless just by eyeballing it.\n\nHowever, there is more than one way to tokenize a sentence. If our tokenizer sees the ‘t’ and ‘h’ without the context of the ‘e ‘, it will run into a problem: \\*\\*there is no ‘e’ in our vocabulary list\\*\\* and, if not properly trained, it will be forced to replace that ‘e’ with an ‘\\[unk\\]’ token, making it lossy while also expanding the length of its representation significantly.\n\nTherefore, even though we have just proven lossless compression is possible given this corpus and the last vocabulary list, if the recognition of the sequence by the tokenizer is poor, it won’t be capable of losslessly tokenizing even though the vocabulary list is suited for it. As corpus size increases, it becomes harder and harder to tell just by looking that the vocabulary list can losslessly reconstruct the corpus.\n\nWith something like SentencePiece, which defaults to a vocabulary size in the thousands, trying to reconstruct the Wiki-sentences corpus, which is millions and millions of sentences long, it becomes untenable to pore over every output vocabulary size and manually check if it can reconstruct the corpus.\n\nThus my question: given a vocabulary list and a corpus, is there an automatic way to tell that that it is \\*possible\\* to reconstruct the given corpus losslessly using the given vocabulary assuming a well trained tokenizer? In other words is there a function to determine if lossless tokenization is possible which returns true or false given an input corpus and vocabulary?","preferred_answer":"Yes, this is equivalent to checking if one finite state transducer describes a superset relation of another. You can make it simpler by transforming it to a problem about DFAs though.\n\nDefine a DFA of `union(spelling(w))` for w in your corpus (that is, it should recognize { [c, a, t], [h, a, t], ...}). Call it `C`. Define another for your tokenization corpus (call it `T`). Now you want to check if `L(C) \\subset L(T*)`, meaning, can every word in `C` be spelled by repeated application of words in `T`. Since you can construct `C` and `T` to be deterministic, this can be solved in polynomial time to the number of states in both (upper bounded by the sum of the lengths of the words in the vocabulary).\n\nIn practice, you can just check that `\\all w \\in corpus_vocab, w \\in L(T*)` with a simple for-loop.\n\n[FAdo](https://pypi.org/project/FAdo/) and [Pynini](https://pypi.org/project/pynini/) should be able to handle this fine.\n\n--------------------------------\n\nOh and you can check if the whole corpus can be tokenized by just checking of `spelling(corpus) \\in L(T*)`, (here, `T` should be closed with a space token as well as an epsilon transition) which takes linear time in the length of the corpus.","full_conversation":[{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"lzer14","kind":"post","text":"Is it possible to test whether a tokenizer can losslessly tokenize and detokenize a given corpus solely from its vocabulary?\n\nI am trying to test whether a given vocabulary list contains the tokens necessary to reconstruct a corpus of text losslessly. That is, if a tokenizer trained on a corpus of text were to attempt to tokenize the training corpus according to its associated vocabulary, would it be able to tokenize and detokenize the entire training corpus without losing any text to \\[unk\\] tokens? Are there ways to test this?\n\nSuppose you had a corpus of text - I’ll use a small one for this example\n\n corpus = ‘the cat in the hat’\n\nSuppose you had a trained tokenizer which tokenizes according to its vocab list where each token id is simply the index of the token in the list.\n\n vocab = [‘t’, ‘h’, ‘e’, ‘ ‘, ‘c’, ‘a’, ‘i’, ‘n’]\n print(len(vocab))\n 8\n tokens = tokenize(corpus, vocab))\n print(tokens)\n [0, 1, 2, 3, 4, 5, 0, 3, 6, 7, 3, 0, 1, 2, 3, 2, 5, 0]\n print(“Tokenized length: {}”.format(len(tokens)))\n Tokenized length: 18\n\nIf I then detokenize from here I can obviously reconstruct the corpus as it originally was. However, this process is suboptimal as we can combine tokens to reduce the length of the tokenized representation.\n\n vocab = [‘t’, ‘h’, ‘e’, ‘ ‘, ‘c’, ‘a’, ‘i’, ‘n’, ‘th’]\n print(len(vocab))\n 9\n tokens = tokenize(corpus, vocab))\n print(tokens)\n [8, 2, 3, 4, 5, 0, 3, 6, 7, 3, 8, 2, 3, 2, 5, 0]\n print(“Tokenized length: {}”.format(len(tokens)))\n Tokenized length: 16\n\nThis is obviously still lossless, though it adds an extra token to the vocabulary list, which will increase the possibility space of a model trying to predict the next token in a sequence. But if I remove a necessary token, it becomes lossy. Supppose our tokenizer outputs ‘\\[unk\\]’ for all tokens not in the vocabulary and that the ‘\\[unk\\]’ token is always the last token in the vocabulary regardless of the content of the vocabulary.\n\n vocab = [‘t’, ‘h’, ‘e’, ‘ ‘, ‘c’, ‘a’, ‘i’, ‘th’]\n print(len(vocab))\n 8\n tokens = tokenize(corpus, vocab))\n print(tokens)\n [7, 2, 3, 4, 5, 0, 3, 6, 8, 3, 7, 2, 3, 2, 5, 0]\n print(“Tokenized length: {}”.format(len(tokens)))\n Tokenized length: 16\n\nThe length of the representation does not change but we can tell that it is lossy just from the vocabulary, therefore the compression is not lossless.\n\n print(detokenize(tokens, vocab))\n [‘the cat i[unk] the hat’]\n\nThis example makes it easy to tell the compression is lossy because our vocabulary is small and made of suboptimally combined tokens. We can go further with the combination of the vocabulary and combine ‘t’, ‘h’, ‘e’, and ‘ ‘ to form a single token covering all instances of “the “. Since ‘e’ doesn’t occur outside of its place in ‘the’ we can delete it from the vocabulary list and still maintain the same level of loss in compression, ditto ‘i’ and ‘n’.\n\n vocab = [‘t’, ‘h’, ‘the ‘, ‘ ‘, ‘c’, ‘a’, ‘in’]\n print(len(vocab))\n 7\n tokens = tokenize(corpus, vocab)\n print(tokens)\n [2, 4, 5, 0, 3, 6, 3, 2, 1, 5, 0]\n print(len(tokens)\n 11\n\nThus far this is the most optimally compressed form of the sentence (though I don’t claim for it to be the most optimally compressed) and it has the smallest vocabulary size, making it easier for a model to guess the next token. In all of these examples we have been able to tell unambiguously whether or not the compression is lossless just by eyeballing it.\n\nHowever, there is more than one way to tokenize a sentence. If our tokenizer sees the ‘t’ and ‘h’ without the context of the ‘e ‘, it will run into a problem: \\*\\*there is no ‘e’ in our vocabulary list\\*\\* and, if not properly trained, it will be forced to replace that ‘e’ with an ‘\\[unk\\]’ token, making it lossy while also expanding the length of its representation significantly.\n\nTherefore, even though we have just proven lossless compression is possible given this corpus and the last vocabulary list, if the recognition of the sequence by the tokenizer is poor, it won’t be capable of losslessly tokenizing even though the vocabulary list is suited for it. As corpus size increases, it becomes harder and harder to tell just by looking that the vocabulary list can losslessly reconstruct the corpus.\n\nWith something like SentencePiece, which defaults to a vocabulary size in the thousands, trying to reconstruct the Wiki-sentences corpus, which is millions and millions of sentences long, it becomes untenable to pore over every output vocabulary size and manually check if it can reconstruct the corpus.\n\nThus my question: given a vocabulary list and a corpus, is there an automatic way to tell that that it is \\*possible\\* to reconstruct the given corpus losslessly using the given vocabulary assuming a well trained tokenizer? In other words is there a function to determine if lossless tokenization is possible which returns true or false given an input corpus and vocabulary?","timestamp":"2021-03-07T00:10:55+00:00","score":8},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gq22176","kind":"comment","text":"Yes, this is equivalent to checking if one finite state transducer describes a superset relation of another. You can make it simpler by transforming it to a problem about DFAs though.\n\nDefine a DFA of `union(spelling(w))` for w in your corpus (that is, it should recognize { [c, a, t], [h, a, t], ...}). Call it `C`. Define another for your tokenization corpus (call it `T`). Now you want to check if `L(C) \\subset L(T*)`, meaning, can every word in `C` be spelled by repeated application of words in `T`. Since you can construct `C` and `T` to be deterministic, this can be solved in polynomial time to the number of states in both (upper bounded by the sum of the lengths of the words in the vocabulary).\n\nIn practice, you can just check that `\\all w \\in corpus_vocab, w \\in L(T*)` with a simple for-loop.\n\n[FAdo](https://pypi.org/project/FAdo/) and [Pynini](https://pypi.org/project/pynini/) should be able to handle this fine.\n\n--------------------------------\n\nOh and you can check if the whole corpus can be tokenized by just checking of `spelling(corpus) \\in L(T*)`, (here, `T` should be closed with a space token as well as an epsilon transition) which takes linear time in the length of the corpus.","timestamp":"2021-03-07T02:22:36+00:00","score":8},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gq248qu","kind":"comment","text":"Thank you! This is going over my head a bit on first pass but it’s given me an avenue to explore. I really appreciate it!","timestamp":"2021-03-07T02:44:32+00:00","score":1},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gq250fh","kind":"comment","text":"Feel free to dm (or continue this comment chain so others can learn) if you need more help. I think FAdo would be easy to use for this project. Pynini is a better library but it has a different usecase that rarely calls for checking containment/set queries.","timestamp":"2021-03-07T02:52:21+00:00","score":2},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gqb3qkx","kind":"comment","text":"I’m very new to set theory so I’ve been trying to understand but I have trouble with the terminology being used. I understand what a DFA is to some extent but I’m not sure how to define one “of `union(spelling(w))` for w in [my corpus]. Would it be asking a lot to explain this like I’m five? Thank you.","timestamp":"2021-03-09T08:26:21+00:00","score":1},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gqd6pzm","kind":"comment","text":"No prob. It is difficult to convey these things without a shared notation (and even harder without latex, since I can't use the standard).\n\nAnyway, what I meant by this was the following. Suppose you have words like \"cat\", \"dog\", etc. We want an automata that accepts the spelling of these words (so like [c][a][t] rather than a singular [cat] token). I called this `spelling(w)` (a function that translates single word tokens into their character spellings `[cat] -> [c][a][t]`.\n\nNow, we want to take the set union of all of these spellings. So if you have `[cat]`, `[dog]`, `[hat]` in your vocab, I want an automaton that accepts `[c][a][t]`, `[d][o][g]`, `[h][a][t]`, etc. This is what I called `union(spelling(w)) for w in vocab`.\n\nThere are a few ways to make an automaton that accepts all of these spellings. One would be to just form a trie that stores all of these words (tries are a type of acyclic automaton, where the root is the start state and the nodes of a trie where a word ends are final states). Another is to just make a single automaton for each word, and call `union` on them all in whatever finite state library you are using. \n\nA single word automaton would look something like a start state `q_0` and a series of `|w|` where `d(q_i, w_{i+1}) -> q_{i+1}`. Pynini implements this as `pynini.acceptor(w)`. FAdo can do this also, see below.\n\nSo pretty much what you want to do is make one automaton accepting the spelling of all the words in your corpus and one automaton accepting the spelling of all the words in your tokenization vocabulary. Then you \"close\" the tokenization one --- that is make it accept the Kleene star of the language. Once you have these, you can check if the corpus one is a subset of the tokenization one. In otherwords, you are checking the spelling of each word in the corpus can be seen as the spelling of one or more tokens in your tokenization vocab stuck together back to back.\n\nHere are the docs for FAdo: https://www.dcc.fc.up.pt/~rvr/FAdo.pdf\n\nIt looks like you can just make a FiniteLanguage object then iterate over your corpus/tokenization words and add them to the language (then you probably want to minimize it to keep the runtime down).\n\nFAdo has a slightly unfortunate underlying representation of automata that basically causes all algorithms to have an extra factor of `n` (number of states). It should still be fine for your use case, but I think it might be best to avoid complicated automata set operations (specifically, determinization + closure + intersection). You can experiment with it to see if your usecase is too large to work, but you can use the other method I mentioned and it will be less likely to cause problems. \n\nBy this I mean, since the corpus vocab is finite, you can just make a single automaton for the spelling of all tokens in the tokenization and then close that one. Then, you can just check if each word in the corpus is accepted by the resulting automaton. This is equivalent to testing if the tokenization automaton one is a superset of the corpus automaton because the corpus automaton describes a finite language so you can just enumerate it. \n\nFAdo has the `evalWordP` method to check if a string is accepted by an automaton. \n\nDoes this clear things up a bit?","timestamp":"2021-03-09T19:55:41+00:00","score":1},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gqd88av","kind":"comment","text":"This does help me understand more though I think I will need to do some hands on playing with FAdo to fully grasp. As it stands I don’t have a list of corpus words, only separated sentences and a tokenizer vocabulary, but if I am understanding correctly, the same principle should apply, right? That is, for every sentence in the corpus I am checking if the spelling of that sentence can be seen as the spelling of one or more tokens in the tokenizer vocabulary. Does that aspect seem like it will sufficiently change things? Thank you for the help.","timestamp":"2021-03-09T20:06:57+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gqde7p6","kind":"comment","text":"By separated sentences, do you mean you have a list of separate sentences (like \"the cat and the dog\", \"the boy and the wolf\") or a list of separated sentences (like [\"the\", \"cat\", \"and\", \"the\", \"dog\"], [\"the\", \"boy\", \"and\", \"the\", \"wolf\"])? In the second case, you are pretty much done since you can just get the set of all words that appear. In the first case, you can extract the word tokens, assuming there is a word separator (idk, maybe you are doing this for Japanese or something where it isn't as easy).\n\nIn the second case, it complicates it a tiny bit, but its not impossible. You will still build a tokenizer automaton, but when you close it, you will do Kleene star (an epsilon transition from each final state to the start state), but you will also need to do a \"word separator\" closure (if there is a word boundary token for the language you are investigating). For English, this would be like having a transition from each final state to the initial state but with a space character rather than an epsilon transition. In effect, you are asking the automaton, \"can this sentence be spelled out by repeatedly concatenating my tokens together, possibly with some spaces in between?\". If it answers yes for every sentence that you have, then your tokenization scheme can \"losslessly\" encode/decode your corpus.","timestamp":"2021-03-09T20:51:36+00:00","score":2},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gqdfpr9","kind":"comment","text":"I should explain a bit further about the overall project I am trying to make happen. I have a text file of 56M sentences from Wikipedia separated by white space, so it’s the former example ([“the cat and the dog”, “the boy and the wolf”]). As mostly a thought experiment I am trying to develop a Q-learning training loop where an agent combines or deletes tokens from a preexisting vocabulary list to iteratively generate a more compact token vocabulary. Part of the restriction is that the resultant vocabulary must be capable of reconstructing the corpus losslessly. So assuming the initial vocabulary is already capable of lossless tokenization,`detokenize(tokenize(corpus, vocab_t0)) == detokenize(tokenize(corpus, vocab_t1))`.\n\nIn other words, the words in the sentences themselves aren’t separated - ideally this would be a domain-insensitive task as with SentencePiece. \n\nIf I induce a separator like a space character, that potentially loses out on a downstream model understanding that the Washington in “George Washington” and “Washington DC” or “George Washington University” is different. Does it still sound like this is doable using what we’ve talked about so far? Or does it sound easier to just detokenize the tokenized corpus and verify the losslessness based on an exact match?","timestamp":"2021-03-09T21:02:13+00:00","score":1},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gqf5425","kind":"comment","text":"First of all, I think this is an interesting project. I always thought there is a lot of waste in common tokenization methods and that they could be slimmed down a lot through various means (though I never considered your method).\n\n> If I induce a separator like a space character, that potentially loses out on a downstream model understanding that the Washington in “George Washington” and “Washington DC” or “George Washington University” is different. Does it still sound like this is doable using what we’ve talked about so far? Or does it sound easier to just detokenize the tokenized corpus and verify the losslessness based on an exact match?\n\nThis reasoning confused me. If your language doesn't have word separators, then you just do the normal thing --- just Kleene star on the resulting tokenization automaton, and then read the corpus in character by character and see if the closed automaton accepts the whole corpus as a string. So in this case you are pretty much done.\n\n If your language does have word separators, you can either use them to split the corpus up into discrete word tokens (which can then be checked against the Kleene closed tokenization vocab as discussed before) or you can add an optional space character to the tokenization vocab when you close it (suppose the DFA described the language `L`, then after closure it would describe `(L( _ | \\epsilon))* = (L ∪ { _ } )*` and use this to check if the corpus is accepted by the DFA. \n\nSince you said \n\n> In other words, the words in the sentences themselves aren’t separated\n\nit seems like your only option is to add a whitespace character to the tokenization vocab, and then treat each sentence as an individual string and check that all of them are accepted by the closed tokenized automaton. \n\nAbout \n\n> If I induce a separator like a space character, that potentially loses out on a downstream model understanding that the Washington in “George Washington” and “Washington DC” or “George Washington University” is different.\n\nThis seems kind of unrelated right? It is up to the model to properly learn semantics. It isn't like you are specially marking each word with the semantic meaning right? Adding the whitespace token is only to make it so that you can read a sentence left to right as characters and properly tokenize it in the event that you don't want to/can't split the words of a sentence up into individual tokens.\n\nSorry, as you know its hard to get a good grasp of the nuances of what is going on with other peoples work (you may be making assumptions that I am not and vice versa) in comments like this! Please let me know if I misunderstood something you said (as I am oft to do).","timestamp":"2021-03-10T06:27:50+00:00","score":1},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gqi70me","kind":"comment","text":"I think you are right; I think I can just use the Kleene star on the tokenization automaton. This should work even if there are multiple ways to tokenize the corpus, right?","timestamp":"2021-03-10T22:59:42+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gqil2db","kind":"comment","text":"Yes, it will determine if there is *any* valid tokenization of the corpus. If it is interesting to you, you can also make it find the number of valid tokenizations (this would be pretty large over a long corpus but if you do it over individual sentences it would be fine) as well as a list of valid tokenizations. In this case, Pynini would be much better than FAdo imo.","timestamp":"2021-03-11T01:01:59+00:00","score":1},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gqisrrt","kind":"comment","text":"That may be helpful! I do want the tokenizer to spit out the shortest possible tokenization (by token count, of course). Now that I actually have a place to go with this I wish I didn’t have to work on my actual NLP projects lol.","timestamp":"2021-03-11T02:08:37+00:00","score":1},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gqiwwp0","kind":"comment","text":"The shortest tokenization one is a slightly different problem. You will have to frame it as a problem on transducers not automata and do a composition and weight the arcs a little differently. This time Pynini is really pretty much the only tool you can use. If you decide to go this route, I'll help you set it up properly if you would like.\n\nAlas, actual work always gets in the way haha.","timestamp":"2021-03-11T02:44:54+00:00","score":1},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gqixo4y","kind":"comment","text":"I have less knowledge of where to go to learn about transducers than I did about automata haha. Any resources you would be willing to share would be extremely appreciated.","timestamp":"2021-03-11T02:51:45+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gqjnhdt","kind":"comment","text":"Transducers are like automata, except the arcs have an input/output symbol and they produce an output string from an input string (so strings -> output string pairs are accepted by transducers if there is a path that leads through the transducer that spells out the input with the input symbols and the output with the output symbols and ends in a final state). Automata are just transducers where the input and output labels are the same (so you just care if there are accepting paths).\n\nPynini is a very nice tool for working with transducers. Here are a few good links:\n\n* http://wellformedness.com/courses/pynini/ (<- creator of pynini's course)\n * https://nbviewer.jupyter.org/gist/kylebgorman/80cc0ae46e3a77a97689568fa23184a3 (<- very useful)\n* http://www.openfst.org/twiki/bin/view/GRM/Pynini\n* https://www.oreilly.com/content/how-to-get-superior-text-processing-in-python-with-pynini/\n* https://storage.googleapis.com/pub-tools-public-publication-data/pdf/45559.pdf\n* https://cs.nyu.edu/~mohri/postscript/csl01.pdf <- really good finite state speech/nlp researchers\n * this is probably more technical/theoretical than you will need but it has explanations of semirings, composition, etc that could be helpful\n\nThe api has changed a little since the paper and oreilly stuff came out but its fundamentally the same. These links all show how things are made into transducers (you can do a string token to a sequence of character tokens easily) and unioned together and then optimized and composed (the actual function you will need to determine if stuff works).\n\nIf you want to do the \"shortest tokenization\" (i.e. tokenize with the fewest tokens possible), what you are looking for is called a lexicon transducer (a transducer that maps character sequences to word sequences). These are typically deterministic and unweighted (cause the outputs are passed to statistical models that weight them --- see https://arxiv.org/pdf/1704.03987.pdf, especially section 3.2 which discusses the space character closure we talked about), but they don't have to be in your case.\n\nIn your case, you should use the min-plus semiring over integers `(N, min, +, +inf, 0)`. Pynini implements this as the Tropical semiring (it is called something like `StdArc` or `Standard`, it should be the default weight semiring) but it is over the reals (which isn't a problem in your case). What you want is for every transition that outputs a token to have weight 1 (the numerical value 1, not the semiring's one). So when you take a path with multiple tokens , the path is weighted with the number of tokens. Then you take the min of them all to find the \"least token path\". Pynini can do all of this with the `shortestpath` function. It will return an automaton that encodes the shortest parse through the transducer and you will be able to read off the sequence of tokens that were used. You can also output `k` shortest paths in a similar way and enumerate the paths accepted by it (it will be a DAG so the language is finite). \n\nSo, in the end you want to make a bunch of transducers of the form `[c][a][t] -> [cat]` with weight `1` for each of your tokens (so like `pynini.transducer(\"cat\", \"[cat]\", weight=1)`. Then you union them all together and close it (using Kleene star and a space token probably). Then for each sentence you want to test, you make an automaton that accepts it (so like `pynini.acceptor(\"the dog and the cat\", weight=1)` and then you `compose` them --- `pynini.compose(sentence, tokenization_transducer)`. This gives the aforementioned DAG of valid parses (you might see it referred to as the *lattice*) which you can call shortest path on to get the best parse. I am not quite sure how ties are broken but I would guess its lexicographically based on the token sequence's symbol index in the transducer symbol table (an implementation detail of pynini).\n\nThe weights here have to be specifically set to `1` because you are in the Tropical semiring, so \"one\" (in the semiring) is actually \"0\" (the actual numerical value 0) and you really want to be adding \"1\" for each token. Kinda confusing, I know.","timestamp":"2021-03-11T07:10:10+00:00","score":2},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gsy1nch","kind":"comment","text":"Hey, so I've been working on getting Pynini installed (it is a bit of a challenge on Windows, haha) and I've been trying to dive into it. I'm working on trying to execute the example you've given as a test:\n\n language = pynini.transducer(\"the\", \"[the]\", weight=1) \n for word in \"the dog and the cat\".split(\" \")[1:]:\n new = pynini.transducer(word, (\"[\"+word+\"]\"), weight=1)\n language = pynini.union(new, language)\n \n language = language.closure()\n \n sentence = pynini.acceptor(\"the dog and the cat\", weight=1) \n out = pynini.shortestpath(pynini.compose(sentence, language))\n out\n\nFor some reason, out is an empty FST. Am I misunderstanding what I'm supposed to be doing?","timestamp":"2021-03-31T18:57:51+00:00","score":1},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gtdyp49","kind":"comment","text":"Sorry for the slow reply. I checked it out (actually the Pynini API has changed a ton in the new release and I had to relearn everything haha) and found the cause. It is because you have spaces in the sentence, but you are closing the language with only epsilon. You can check this by replacing \n`sentence = pynini.acceptor(\"the dog and the cat\", weight=1)` with `sentence = pynini.acceptor(\"thedogandthecat\", weight=1)` and you will get a non-empty automaton. The reason you got an empty one before is that no tokens contained a space so the language could not possibly encode spaces. Obviously you don't want to just remove all spaces, since that could introduce further ambiguity. I am not sure of the most idiomatic way to fix this, but one way to do it would be to add both\n\"word\", \"[word]\" and \"word \", \"[word ]\" to the language. You can replace the literal spaces by some special reserved \"SPACE\" token if it makes it more clear for you.","timestamp":"2021-04-04T21:33:46+00:00","score":1},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gtecxy8","kind":"comment","text":"For testing and learning purposes I think I will use a space - in the final implementation, given that the goal is to discover vocabulary from raw strings, I think the model will discover or retain space tokens on its own","timestamp":"2021-04-04T23:43:21+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gted848","kind":"comment","text":"In that case, it will probably discover that \" \" (space on its own) itself is a character. This should be the case in an open vocab, non-word-boundary-segmented tokenization, as \" \" is a valid character just like \"a\", \"b\", \"c\", etc. In this case, you can just add \" \" to your vocab like you do for any other tokens and then close it. It will automatically be able to tokenize even in the presence of word boundaries.","timestamp":"2021-04-04T23:46:02+00:00","score":2},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gthuk44","kind":"comment","text":"Thanks! I've managed to make it work! It outputs a path. If I wanted to get the actual tokens being used, which I assume are just the output labels on each step of the path, how would I do that?","timestamp":"2021-04-05T20:50:24+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gtia9iy","kind":"comment","text":"Awesome! I believe there is a `.string()` function that should output strings. But yes, in general you can just step through the states and concatenate the arc labels. You may have to convert back and forth from symbols to strings (openfst/Pynini use integer maps to represent arc labels).\n\nSee the code example in the T9 disambiguation section here: http://www.openfst.org/twiki/bin/view/GRM/PyniniDocs (they use .string()).","timestamp":"2021-04-05T22:57:29+00:00","score":2},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"guj7fq4","kind":"comment","text":"Hi again; for the past week or so I've been wrestling trying to get my computer to do what it needs to do for this project. Unfortunately, the only way I've been able to make it work is using a virtual machine and for some reason no matter what I do the WSL I install refuses to find my graphics card, which I need for deep learning. Is there any FST python library that is convenient to install on a windows machine? If not, it seems this journey might have to end here.","timestamp":"2021-04-14T21:09:01+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gujajjb","kind":"comment","text":"FAdo is implemented in pure python. It should be able to handle this problem with some tuning. If you decide to try it I'd be happy to look at your code (it's been ~4 years since I've done anything in FAdo but it's not under active development I think so probably not much has changed).\n\nAre you able to do your work on a Google colab instance or something? That's how I tested all my code and it worked out fine.","timestamp":"2021-04-14T21:33:12+00:00","score":2},{"role":"OP","user_id":"anon_9e821477c75c0a95","comment_id":"gwg3z81","kind":"comment","text":"I’ve been trying to rework the project; I have a genera question about FSTs. I’m not sure this question will make sense but basically I want to construct an FST over a semiring such that its monoids are min() for addition and matrix multiplication for multiplication. Would this be possible to do without building an FST system from scratch in any package?","timestamp":"2021-04-30T17:16:37+00:00","score":2},{"role":"answerer","user_id":"anon_ccf1ade4530e5285","comment_id":"gwhaepq","kind":"comment","text":"Do you mean element wise min over a matrix?\n\nI'm pretty sure that's a semiring right?\n\nAnyway I think you can do it in Pynini but you have to register a new weight type probably in c++ and then link it. I've never done this but let me ask my colleague.","timestamp":"2021-04-30T22:44:05+00:00","score":1}],"n_turns":26,"n_turns_after_thanks":23,"op_metadata":{"user_id":"anon_9e821477c75c0a95","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ccf1ade4530e5285","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gq22176","thanks_reply_id":"gq248qu","post_score":8,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_fa2a185d9dcdda50","answerer_user_id":"anon_90d5e5969d46a546","subreddit":"LanguageTechnology","timestamp":"2021-03-12T17:46:00+00:00","post_id":"m3mva9","question":"State of the Art Spelling Correction\n\nI am trying to build a really good spell corrector for our search engine. We have a lot of domain specific terms so using an off the shelf one is not going to work well. I found the Peter Norvig spelling corrector post but am having trouble finding more sophisticated (and also scalable) spelling correctors. I need a model that can smartly pick between a set of generated corrections, as the most common one with the lowest edit distance is often not the best (it's right about 65% of the time). I switched to using a contextual corrector based on bigrams which made a small improvement (68% accurate), but am looking for something better. The type of error affects the likelihood of a correction being right as some errors are more likely than others. There's also the issue of speed, as doing an edit distance algo is inherently slow. AFAICT this doesn't seem to be actively being researched, unless i am looking in the wrong places. Is this problem seen as 'solved' by the broader NLP community?","preferred_answer":"Can you use some pre-trained masked language models like BERT or RoBERTa ([https://huggingface.co/roberta-large?text=Paris+is+the+%3Cmask%3E+of+France](https://huggingface.co/roberta-large?text=Paris+is+the+%3Cmask%3E+of+France).) to rank words in the given generated corrections set?","full_conversation":[{"role":"OP","user_id":"anon_fa2a185d9dcdda50","comment_id":"m3mva9","kind":"post","text":"State of the Art Spelling Correction\n\nI am trying to build a really good spell corrector for our search engine. We have a lot of domain specific terms so using an off the shelf one is not going to work well. I found the Peter Norvig spelling corrector post but am having trouble finding more sophisticated (and also scalable) spelling correctors. I need a model that can smartly pick between a set of generated corrections, as the most common one with the lowest edit distance is often not the best (it's right about 65% of the time). I switched to using a contextual corrector based on bigrams which made a small improvement (68% accurate), but am looking for something better. The type of error affects the likelihood of a correction being right as some errors are more likely than others. There's also the issue of speed, as doing an edit distance algo is inherently slow. AFAICT this doesn't seem to be actively being researched, unless i am looking in the wrong places. Is this problem seen as 'solved' by the broader NLP community?","timestamp":"2021-03-12T17:46:00+00:00","score":1},{"role":"answerer","user_id":"anon_90d5e5969d46a546","comment_id":"gqq9l4s","kind":"comment","text":"Can you use some pre-trained masked language models like BERT or RoBERTa ([https://huggingface.co/roberta-large?text=Paris+is+the+%3Cmask%3E+of+France](https://huggingface.co/roberta-large?text=Paris+is+the+%3Cmask%3E+of+France).) to rank words in the given generated corrections set?","timestamp":"2021-03-12T20:31:35+00:00","score":1},{"role":"OP","user_id":"anon_fa2a185d9dcdda50","comment_id":"gqqea11","kind":"comment","text":"Thanks. I could, that had occurred to me. It's a little heavy weight for what we need it for. We are essentially using it as a pre-processor for a neural search model. The model is does ok at correcting for typos but it does better if you fix them with a simpler technique first.","timestamp":"2021-03-12T21:08:16+00:00","score":1},{"role":"answerer","user_id":"anon_90d5e5969d46a546","comment_id":"gqqgekg","kind":"comment","text":"To be honest, I am not super familiar with this spelling correction task. How light-weight do you want this model to be? If you feel like BERT is too heavy, you can always downgrade it to LSTM-based model or even word2vec ([https://thomasdecaux.medium.com/build-a-spell-checker-with-word2vec-data-with-python-5438a9343afd](https://thomasdecaux.medium.com/build-a-spell-checker-with-word2vec-data-with-python-5438a9343afd)) as long as it can predict the word in the specified position given the context.","timestamp":"2021-03-12T21:25:25+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fa2a185d9dcdda50","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_90d5e5969d46a546","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gqq9l4s","thanks_reply_id":"gqqea11","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_e900275b766f8cd8","answerer_user_id":"anon_e4bcb2965473aeb1","subreddit":"LanguageTechnology","timestamp":"2021-03-14T19:13:16+00:00","post_id":"m51t0z","question":"Alternate approaches to TF-IDF?\n\nI'm trying to rank words in a corpus of political speeches. TF-IDF seems to work really nice to identify \"important\" words, much better than raw frequency at least.\n\nI'm wondering if there are any alternate or similar techniques to TF-IDF to rank the importance of words in a corpus.\n\nThanks!","preferred_answer":"Check out yake keyphrase extractor, it's based on statistical features so it does not require nlp nn models and gave some good results if you need to experiment fast.","full_conversation":[{"role":"OP","user_id":"anon_e900275b766f8cd8","comment_id":"m51t0z","kind":"post","text":"Alternate approaches to TF-IDF?\n\nI'm trying to rank words in a corpus of political speeches. TF-IDF seems to work really nice to identify \"important\" words, much better than raw frequency at least.\n\nI'm wondering if there are any alternate or similar techniques to TF-IDF to rank the importance of words in a corpus.\n\nThanks!","timestamp":"2021-03-14T19:13:16+00:00","score":16},{"role":"answerer","user_id":"anon_e4bcb2965473aeb1","comment_id":"gqy84k2","kind":"comment","text":"Check out yake keyphrase extractor, it's based on statistical features so it does not require nlp nn models and gave some good results if you need to experiment fast.","timestamp":"2021-03-14T22:03:16+00:00","score":5},{"role":"OP","user_id":"anon_e900275b766f8cd8","comment_id":"gr0mt7z","kind":"comment","text":"Thanks! \n\nDo you know how does it work?","timestamp":"2021-03-15T14:50:40+00:00","score":1},{"role":"answerer","user_id":"anon_e4bcb2965473aeb1","comment_id":"gr0pvps","kind":"comment","text":"You can look for usage here: [https://github.com/LIAAD/yake](https://github.com/LIAAD/yake) and there is also a reference section with publications for more details of how this works. From what I remember, each keyphrase candidate is assigned an aggregated score based on various features: position in the text, casing, frequency, surrounding text frequency...\n\nThis score is used to rank the candidates so you can can select how many top n candidates you want.","timestamp":"2021-03-15T15:14:54+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e900275b766f8cd8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e4bcb2965473aeb1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gqy84k2","thanks_reply_id":"gr0mt7z","post_score":16,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_785b443a8940aba4","answerer_user_id":"anon_01ddbe74c6e463a8","subreddit":"LanguageTechnology","timestamp":"2021-03-15T02:26:52+00:00","post_id":"m5ally","question":"How to parse a sentence by writing grammar rules in NLTK CFG ?\n\nBelow is the original code : \n\n `import nltk`\n\n​\n\n`# flight grammar rules`\n\n`flight_grammar = nltk.CFG.fromstring(\"\"\"`\n\n `S -> NP VP | VP`\n\n `VP -> V NP | V NP PP`\n\n `PP -> P NP`\n\n `NP -> Prop | Det N | Det N PP`\n\n `V -> \"walked\" | \"book\" | \"prefer\" | \"gave\" | \"want\"`\n\n `Prop -> \"Jack\" | \"John\" | \"I\" | \"Houston\"`\n\n `Det -> \"a\" | \"an\" | \"the\" | \"my\" | \"that\"`\n\n `N -> \"dog\" | \"bone\" | \"flight\"`\n\n `P -> \"in\" | \"on\" | \"by\" | \"with\" | \"to\" | \"through\"`\n\n `\"\"\")`\n\n​\n\n`# make a recursive descent parser and parse the sentence`\n\n`rd_parser = nltk.RecursiveDescentParser(flight_grammar)`\n\n​\n\n`#define first sentence`\n\n`senttext = \"I prefer a flight through Houston\"`\n\n`#tokenize sentence by splitting on white space`\n\n`sentlist = senttext.split()`\n\n`# run the parse function on the tokenized sentence and print the tree strucutre`\n\n`for tree in rd_parser.parse(sentlist):`\n\n\t`print (tree)`\n\nIt is able to parse the sentence mentioned in the code, but fails to do parse this sentence : \"\"Jack walked with the dog\"\n\nModifying the rule to : `VP -> V NP | V NP PP | V PP`, can parse that as well. However, I am unable to parse the following sentences : \n\n\"John gave the dog a bone\" , \"I want to book that flight\"","preferred_answer":"I think you should take a look at xbar theory and phrase structure rules to get a better understanding of how linguists manually do this. Try Np —> Prop/det n/ det n pp/ Np","full_conversation":[{"role":"OP","user_id":"anon_785b443a8940aba4","comment_id":"m5ally","kind":"post","text":"How to parse a sentence by writing grammar rules in NLTK CFG ?\n\nBelow is the original code : \n\n `import nltk`\n\n​\n\n`# flight grammar rules`\n\n`flight_grammar = nltk.CFG.fromstring(\"\"\"`\n\n `S -> NP VP | VP`\n\n `VP -> V NP | V NP PP`\n\n `PP -> P NP`\n\n `NP -> Prop | Det N | Det N PP`\n\n `V -> \"walked\" | \"book\" | \"prefer\" | \"gave\" | \"want\"`\n\n `Prop -> \"Jack\" | \"John\" | \"I\" | \"Houston\"`\n\n `Det -> \"a\" | \"an\" | \"the\" | \"my\" | \"that\"`\n\n `N -> \"dog\" | \"bone\" | \"flight\"`\n\n `P -> \"in\" | \"on\" | \"by\" | \"with\" | \"to\" | \"through\"`\n\n `\"\"\")`\n\n​\n\n`# make a recursive descent parser and parse the sentence`\n\n`rd_parser = nltk.RecursiveDescentParser(flight_grammar)`\n\n​\n\n`#define first sentence`\n\n`senttext = \"I prefer a flight through Houston\"`\n\n`#tokenize sentence by splitting on white space`\n\n`sentlist = senttext.split()`\n\n`# run the parse function on the tokenized sentence and print the tree strucutre`\n\n`for tree in rd_parser.parse(sentlist):`\n\n\t`print (tree)`\n\nIt is able to parse the sentence mentioned in the code, but fails to do parse this sentence : \"\"Jack walked with the dog\"\n\nModifying the rule to : `VP -> V NP | V NP PP | V PP`, can parse that as well. However, I am unable to parse the following sentences : \n\n\"John gave the dog a bone\" , \"I want to book that flight\"","timestamp":"2021-03-15T02:26:52+00:00","score":5},{"role":"answerer","user_id":"anon_01ddbe74c6e463a8","comment_id":"gqz3g1s","kind":"comment","text":"I think you should take a look at xbar theory and phrase structure rules to get a better understanding of how linguists manually do this. Try Np —> Prop/det n/ det n pp/ Np","timestamp":"2021-03-15T02:54:05+00:00","score":3},{"role":"OP","user_id":"anon_785b443a8940aba4","comment_id":"gqzddn7","kind":"comment","text":"Using the rules : VP -> V NP NP and PP -> P VP , solved the problem for me. I used tokenization and POS tagging to check the sentences.","timestamp":"2021-03-15T04:43:57+00:00","score":1},{"role":"answerer","user_id":"anon_01ddbe74c6e463a8","comment_id":"gqzdui3","kind":"comment","text":"Is that a syntactically valid parse?","timestamp":"2021-03-15T04:50:02+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_785b443a8940aba4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_01ddbe74c6e463a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gqz3g1s","thanks_reply_id":"gqzddn7","post_score":5,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_cc58715a448e0c25","answerer_user_id":"anon_0b81c0a4ba71cd6f","subreddit":"LanguageTechnology","timestamp":"2021-03-24T14:06:39+00:00","post_id":"mc6k6m","question":"question RoBERTa doc sentances.\n\nHi everyone,\n\nin the Roberta paper ([https://arxiv.org/pdf/1907.11692.pdf](https://arxiv.org/pdf/1907.11692.pdf) page 5) they say they use doc-sentences formatted inputs (512 tokens taken contiguously across multiple documents, documents are separated by a sep token). \n\ne.g. if I understand well: tokenized-doc 1 : 220 tokens tokenized-doc 2: 350 tokens\n\n\\-> corresponding Roberta pre-training inputs: 220 tokens from doc 1 + sep token + 291 first tokens of doc 2 \n\nmy question is as follows:\n\nIs there a way to obtain this format of input from a corpus of documents in a convenient way using pytorch or hugging face and a custom BPE tokenizer?","preferred_answer":"Are you trying to create a roberta model from scratch or fine-tune an existing roberta model? I wouldn't mix documents if you're fine-tuning unless you have a strong reason to do so.","full_conversation":[{"role":"OP","user_id":"anon_cc58715a448e0c25","comment_id":"mc6k6m","kind":"post","text":"question RoBERTa doc sentances.\n\nHi everyone,\n\nin the Roberta paper ([https://arxiv.org/pdf/1907.11692.pdf](https://arxiv.org/pdf/1907.11692.pdf) page 5) they say they use doc-sentences formatted inputs (512 tokens taken contiguously across multiple documents, documents are separated by a sep token). \n\ne.g. if I understand well: tokenized-doc 1 : 220 tokens tokenized-doc 2: 350 tokens\n\n\\-> corresponding Roberta pre-training inputs: 220 tokens from doc 1 + sep token + 291 first tokens of doc 2 \n\nmy question is as follows:\n\nIs there a way to obtain this format of input from a corpus of documents in a convenient way using pytorch or hugging face and a custom BPE tokenizer?","timestamp":"2021-03-24T14:06:39+00:00","score":1},{"role":"answerer","user_id":"anon_0b81c0a4ba71cd6f","comment_id":"gs2x6m4","kind":"comment","text":"Are you trying to create a roberta model from scratch or fine-tune an existing roberta model? I wouldn't mix documents if you're fine-tuning unless you have a strong reason to do so.","timestamp":"2021-03-24T18:53:10+00:00","score":2},{"role":"OP","user_id":"anon_cc58715a448e0c25","comment_id":"gs5cvgz","kind":"comment","text":"Hi, thanks for the reply I train from scratch. I want to train a domain specific model.","timestamp":"2021-03-25T08:15:23+00:00","score":2},{"role":"answerer","user_id":"anon_0b81c0a4ba71cd6f","comment_id":"gs71llx","kind":"comment","text":"Huggingface has classes that handle the training setup- see: [https://huggingface.co/blog/how-to-train](https://huggingface.co/blog/how-to-train)","timestamp":"2021-03-25T17:37:09+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_cc58715a448e0c25","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0b81c0a4ba71cd6f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gs2x6m4","thanks_reply_id":"gs5cvgz","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_490cc0d7981de418","answerer_user_id":"anon_450dee2255349a43","subreddit":"LanguageTechnology","timestamp":"2021-03-26T04:03:43+00:00","post_id":"mdgac2","question":"Current Sota for Multiclass Text Classification?\n\nDoes anyone know where i can find data on the best performing multiclass text classifiers? [This](https://github.com/sebastianruder/NLP-progress/blob/master/english/text_classification.md) is the only info i could find and it seems it hasn't been updated since 2019.\n\nI'm looking to use one of these for 3 class sentiment classification, negative, neutral, positive. Looking for data comparing the likes of: \n\nMpnet\n\nElectra\n\nRoBERTa\n\nBERT\n\nALBERT\n\nOr any other better models i haven't heard of. \n\n​\n\nOn a side note i see a lot of benchmarks such as SQUAD have ensembles of 2 or more models. How is this done? Do they get predictions from both and then take the highest output vector score between the two of them as the prediction?","preferred_answer":"You might want to see this: [https://paperswithcode.com/task/text-classification](https://paperswithcode.com/task/text-classification)","full_conversation":[{"role":"OP","user_id":"anon_490cc0d7981de418","comment_id":"mdgac2","kind":"post","text":"Current Sota for Multiclass Text Classification?\n\nDoes anyone know where i can find data on the best performing multiclass text classifiers? [This](https://github.com/sebastianruder/NLP-progress/blob/master/english/text_classification.md) is the only info i could find and it seems it hasn't been updated since 2019.\n\nI'm looking to use one of these for 3 class sentiment classification, negative, neutral, positive. Looking for data comparing the likes of: \n\nMpnet\n\nElectra\n\nRoBERTa\n\nBERT\n\nALBERT\n\nOr any other better models i haven't heard of. \n\n​\n\nOn a side note i see a lot of benchmarks such as SQUAD have ensembles of 2 or more models. How is this done? Do they get predictions from both and then take the highest output vector score between the two of them as the prediction?","timestamp":"2021-03-26T04:03:43+00:00","score":4},{"role":"answerer","user_id":"anon_450dee2255349a43","comment_id":"gs9d79s","kind":"comment","text":"You might want to see this: [https://paperswithcode.com/task/text-classification](https://paperswithcode.com/task/text-classification)","timestamp":"2021-03-26T05:03:06+00:00","score":3},{"role":"OP","user_id":"anon_490cc0d7981de418","comment_id":"gs9do2f","kind":"comment","text":"Thanks for your reply. I have seen this, but i think it suffers from the same link that i posted in that the more recent model performances don't feature there.","timestamp":"2021-03-26T05:09:02+00:00","score":3},{"role":"answerer","user_id":"anon_450dee2255349a43","comment_id":"gs9fozb","kind":"comment","text":"Well, because there is no free lunch, you should try all of them.\n\nI think you need to grid-search/bayesian-search through all potential models.","timestamp":"2021-03-26T05:35:50+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_490cc0d7981de418","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_450dee2255349a43","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gs9d79s","thanks_reply_id":"gs9do2f","post_score":4,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_23a662aaa23048d4","answerer_user_id":"anon_c903fa90c5351bd7","subreddit":"LanguageTechnology","timestamp":"2021-04-06T11:27:21+00:00","post_id":"ml9g1l","question":"Best practices in NLP\n\nWhat's your experience in NLP and what do you think are the common strategies and best practices to follow as a beginner?","preferred_answer":"This is an incredibly broad question, so much so that I believe intro to NLP textbook would be the best answer to cover all of the aspects of your question.\n\nDo you have something specific in the field of NLP that you're curious about?","full_conversation":[{"role":"OP","user_id":"anon_23a662aaa23048d4","comment_id":"ml9g1l","kind":"post","text":"Best practices in NLP\n\nWhat's your experience in NLP and what do you think are the common strategies and best practices to follow as a beginner?","timestamp":"2021-04-06T11:27:21+00:00","score":3},{"role":"answerer","user_id":"anon_c903fa90c5351bd7","comment_id":"gtl40us","kind":"comment","text":"This is an incredibly broad question, so much so that I believe intro to NLP textbook would be the best answer to cover all of the aspects of your question.\n\nDo you have something specific in the field of NLP that you're curious about?","timestamp":"2021-04-06T16:34:13+00:00","score":5},{"role":"OP","user_id":"anon_23a662aaa23048d4","comment_id":"gtlf510","kind":"comment","text":"Thank you for your answer. Well, I'm interested in text classification and text mining. I'd use NLP to build categories and then analyze diagnosis from patients mto detect some useful information about they're feelings. But I don't know how to do it yet. Actually I'm taking a course on NLP and Spacy with Python to learn more about NLP.\n\nDo you have suggestions or resources to approach this kind of situation?","timestamp":"2021-04-06T17:54:23+00:00","score":2},{"role":"answerer","user_id":"anon_c903fa90c5351bd7","comment_id":"gtmiscc","kind":"comment","text":"Absolutely. :)\n\nYou specifically mentioned interest in the medical domain, but I'll start by breaking the field into two major research areas: Biomedical vs Clinical. **Biomedical NLP** focuses on extracting information from research papers, textbooks, reference guides, etc. You can think about this as extracting knowledge or facts from expert-authored works and peer-reviewed articles. While this is interesting in itself, it's generally one step in a larger project. Some people want to use this structured knowledge to assess global knowledge (e.g. 5 papers report X outcome, but one from a major lab contradicts it -- what is likely the truth?). Researchers can use such knowledge to generate new hypotheses (e.g. Paper1 reports X drug affects Y gene and Paper2 reports Y gene causes Z disease -- should we start a clinical trial for X drug on Z disease?). Companies like Google Scholar and Mendeley use it to suggest newly published papers to relevant researchers. **Clinical NLP** focuses on clinical notes (radiology reports, pathology reports, progress notes, etc.). There are many immediate uses of clinical data. Hospitals use Clinical NLP to determine whether treatments were administered, but not entered into the billing system ([accurate billing appears to be a nightmare for the healthcare industry in general](https://etactics.com/blog/medical-billing-error-statistics)). Research institutions will often try to extract new information about a patient that isn't structured in another field (e.g. doctors often mention how a patient is feeling/behaving in progress notes, so perhaps you could extract patient mental health over the course of chemotherapy treatments). Pharma uses clinical NLP to run real-world experiments that assess the utility and side effects of their own drugs or those of their competitors. Honestly, the list goes on and on for both. People are always coming up with new and interesting ways to use NLP in the medical domain and there's a lot of hope that we're heading into an era of medical research that is powered by both Biomedical and Clinical NLP because doctors and researchers can't possibly read or structure information at the speed of a GPU server farm. These are both young fields that are always catching up with domain-free NLP research, so time will tell.\n\nWhile the use cases of the extracted data are different, the best NLP techniques are almost entirely the same across both fields. Still, there are important things to consider for a new medical NLP researcher. Biomedical data is generally freely available, but you may need to scrape it yourself. Clinical data is hard to get access to primarily because it is full of PHI (Protected Health Information), which is governments and researchers around the world have the utmost respect for keeping safe. The best place to start with clinical text these days is probably [MIMIC-III](https://mimic.physionet.org). It has both notes and structured data for many patients, which will help if you want labels for your NLP tasks (e.g. extracting diagnoses and treatments). The downside of being broadly available is that MIMIC clinical notes are anonymized and collected from a small number of ICUs. Models trained on MIMIC notes will work well on other MIMIC notes, but these models will not perform well on real clinical text (you always want to train your models on text that's as similar to the text you'll evaluate them on). Even training on ICU notes and evaluating on notes from another part of a hospital is ill-advised, so MIMIC's greatest strength is as a benchmark that all researchers can use without needing to share PHI-laden datasets to each other to validate results. For similar reasons, the language used in Biomedical vs Clinical text is different enough that models trained in one subdomain will perform worse in the other (e.g. doctors may use shorthand, such as \"pt dx adhd 2009\" which means \"patient was diagnosed with ADHD in 2009\", while you certainly don't expect a researcher to write this in a paper).\n\nOld school clinical NLP -- These systems had state-of-the-art performance in the past and were initially designed with a ton of NLP techniques that don't have neural network components, such as part-of-speech tagging, dependency/constituency tree parsing, symbolic logic, regex, and finite state machines. Ultimately, these systems treat Clinical NLP as a pipeline of modular tasks such as Named Entity Recognition, Coreference Resolution, Entity Normalization/Linking, and Relation Extraction. These tools can often take a bit of work to set up, so I would only suggest reading about the components and overall intent/architecture to get an idea of what people did 5+ years ago since the components and underlying techniques are still relevant. Some have recently added neural network components, so they could easily become the state of the art again. The biggest hurdle they have to leap is that they're written in Java while neural network NLP tools generally aren't.\n\n* cTAKES ([site](https://ctakes.apache.org); [paper](https://academic.oup.com/jamia/article/17/5/507/830823?login=true); [general diagram](https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+3.0+Component+Use+Guide#cTAKES3.0ComponentUseGuide-ComponentDependencies))\n * Drug NER, Side Effect, Smoking Status, and Relation Extractor could be useful to dig into to learn about non-neural network NLP techniques.\n * [Chen Lin](https://scholar.google.com/citations?user=zhuFkQcAAAAJ&hl=en&oi=sra) and others are doing quite a bit of interesting work to incorporate neural network models into cTAKES.\n* Metamap ([site](https://metamap.nlm.nih.gov); [paper](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2995713/); best diagram I could find was in the paper)\n* CLAMP ([site](https://clamp.uth.edu); [paper](https://academic.oup.com/jamia/article/25/3/331/4657212); [general diagram](https://clamp.uth.edu/manual.php#nlpcomponents))","timestamp":"2021-04-06T22:53:38+00:00","score":3},{"role":"OP","user_id":"anon_23a662aaa23048d4","comment_id":"gugsqkq","kind":"comment","text":"Thank you so much! I got a good understanding of this distinction now. You provided an exhaustive answer with tons of resources to look at. I really couldn't ask more myself!","timestamp":"2021-04-14T08:18:24+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_23a662aaa23048d4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c903fa90c5351bd7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gtl40us","thanks_reply_id":"gtlf510","post_score":3,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_712a1af2ebfcd5ed","answerer_user_id":"anon_984bef45504ef49d","subreddit":"LanguageTechnology","timestamp":"2021-04-10T06:07:13+00:00","post_id":"mnzami","question":"when doing NLP, do you usually augment your data with a \"pre defined corpus\" specific to the field your data comes from?\n\nwhen doing NLP, do you usually augment your data with a \"pre defined corpus\" specific to the field your data comes from?\n\nE.g. if you are working with medical data, do nlp procedures require you to use a predefined corpus from the medical domain?","preferred_answer":"This _really_ depends on what you're trying to do. If you want your model to perform well on tasks in specific domains, then yes you'd usually want to do that.\n\nThis is specifically what domain-specific pretrained language models (e.g., BioBERT, LegalBERT, etc.) aim to accomplish.\n\nThere's no requirement for you to do that though.","full_conversation":[{"role":"OP","user_id":"anon_712a1af2ebfcd5ed","comment_id":"mnzami","kind":"post","text":"when doing NLP, do you usually augment your data with a \"pre defined corpus\" specific to the field your data comes from?\n\nwhen doing NLP, do you usually augment your data with a \"pre defined corpus\" specific to the field your data comes from?\n\nE.g. if you are working with medical data, do nlp procedures require you to use a predefined corpus from the medical domain?","timestamp":"2021-04-10T06:07:13+00:00","score":9},{"role":"answerer","user_id":"anon_984bef45504ef49d","comment_id":"gu0w26t","kind":"comment","text":"This _really_ depends on what you're trying to do. If you want your model to perform well on tasks in specific domains, then yes you'd usually want to do that.\n\nThis is specifically what domain-specific pretrained language models (e.g., BioBERT, LegalBERT, etc.) aim to accomplish.\n\nThere's no requirement for you to do that though.","timestamp":"2021-04-10T08:18:38+00:00","score":10},{"role":"OP","user_id":"anon_712a1af2ebfcd5ed","comment_id":"gu371ti","kind":"comment","text":"Thank you for your reply!\n\nI just looked at LegalBERT: so LegalBERT would prepare your own data for supervised and unsupervised machine learning algorithms?","timestamp":"2021-04-10T22:23:12+00:00","score":1},{"role":"answerer","user_id":"anon_984bef45504ef49d","comment_id":"gubdz8k","kind":"comment","text":"Sorry for the late reply. I'm not sure what you mean by \"LegalBERT would prepare your own data.\" Are you asking if you need to prepare your own data in order to create something like LegalBERT? If so, then yes, you do need to gather corpora and preprocess them accordingly.","timestamp":"2021-04-13T00:11:19+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_712a1af2ebfcd5ed","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_984bef45504ef49d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gu0w26t","thanks_reply_id":"gu371ti","post_score":9,"answer_score":10,"preferred_answer_is_top_level":true}} {"user_id":"anon_085e82d63bc27a4a","answerer_user_id":"anon_16b3ce4dd69cf671","subreddit":"LanguageTechnology","timestamp":"2021-04-12T10:01:05+00:00","post_id":"mpaood","question":"Can you suggest me a Transformer Model for fine-tuning for my thesis?\n\nHello! For my MSc Artificial Intelligence thesis I would like to work on fine-tuning transformers for NLP. I will have 5 months to complete my thesis. I don't have too much experience in NLP because the course was more focused on Computer Vision. I find transformers very interesting and I want to work on fine-tuning for dialogue systems and text classification. I haven't fully decided on the dataset or what classification I want to do. \n\n1. Can you suggest a topic for text classification? I am looking for an interesting subject that is also relevant for employers. \n2. There are so many different transformer models that I can work on. Which ones do you think would be the best? \n\nThank you in advance!","preferred_answer":"Hey I will suggest XLNET , it's pretty much new and outperforms BERT in many occasions","full_conversation":[{"role":"OP","user_id":"anon_085e82d63bc27a4a","comment_id":"mpaood","kind":"post","text":"Can you suggest me a Transformer Model for fine-tuning for my thesis?\n\nHello! For my MSc Artificial Intelligence thesis I would like to work on fine-tuning transformers for NLP. I will have 5 months to complete my thesis. I don't have too much experience in NLP because the course was more focused on Computer Vision. I find transformers very interesting and I want to work on fine-tuning for dialogue systems and text classification. I haven't fully decided on the dataset or what classification I want to do. \n\n1. Can you suggest a topic for text classification? I am looking for an interesting subject that is also relevant for employers. \n2. There are so many different transformer models that I can work on. Which ones do you think would be the best? \n\nThank you in advance!","timestamp":"2021-04-12T10:01:05+00:00","score":0},{"role":"answerer","user_id":"anon_16b3ce4dd69cf671","comment_id":"gu99udw","kind":"comment","text":"Hey I will suggest XLNET , it's pretty much new and outperforms BERT in many occasions","timestamp":"2021-04-12T14:25:45+00:00","score":2},{"role":"OP","user_id":"anon_085e82d63bc27a4a","comment_id":"gu9jd6p","kind":"comment","text":"Thank you very much for the suggestion. How would you say it is compared to RoBERTa? It is said that RoBERTa outperforms XLNET on GLUE benchmarks.","timestamp":"2021-04-12T15:38:07+00:00","score":2},{"role":"answerer","user_id":"anon_16b3ce4dd69cf671","comment_id":"gu9mpd1","kind":"comment","text":"I haven't tried RoBERTa , but you should give it a try and compare the performances","timestamp":"2021-04-12T16:02:40+00:00","score":2},{"role":"OP","user_id":"anon_085e82d63bc27a4a","comment_id":"gu9neuz","kind":"comment","text":"Thank you. I think for my project it would be good idea to compare the performances of different models such as XLNet , RoBERTa, DeBERTa, T5 etc.","timestamp":"2021-04-12T16:07:54+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_085e82d63bc27a4a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_16b3ce4dd69cf671","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gu99udw","thanks_reply_id":"gu9jd6p","post_score":0,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ac260d1233e54673","answerer_user_id":"anon_4f81b323888db3e6","subreddit":"LanguageTechnology","timestamp":"2021-04-15T06:04:42+00:00","post_id":"mr8rsi","question":"Classification problem with text and numerical features\n\nI am working on a classification problem whose data includes both text and numerical features. My first approach to tacke this problem was to convert the text features into embeddings and append those as new features to original dataset. The problem with approach is that since embeddings are usually of high dimensions, they overwhelm the numerical features.\n\nSecond approach I used was append every feature together into a string, convert it into embedding and train the model. This gave me very poor accuracy.\n\nIs there any other way I can handle this problem?","preferred_answer":"Are you trying to do multimodal fusion?","full_conversation":[{"role":"OP","user_id":"anon_ac260d1233e54673","comment_id":"mr8rsi","kind":"post","text":"Classification problem with text and numerical features\n\nI am working on a classification problem whose data includes both text and numerical features. My first approach to tacke this problem was to convert the text features into embeddings and append those as new features to original dataset. The problem with approach is that since embeddings are usually of high dimensions, they overwhelm the numerical features.\n\nSecond approach I used was append every feature together into a string, convert it into embedding and train the model. This gave me very poor accuracy.\n\nIs there any other way I can handle this problem?","timestamp":"2021-04-15T06:04:42+00:00","score":10},{"role":"answerer","user_id":"anon_4f81b323888db3e6","comment_id":"gul7ypq","kind":"comment","text":"Are you trying to do multimodal fusion?","timestamp":"2021-04-15T10:11:49+00:00","score":2},{"role":"OP","user_id":"anon_ac260d1233e54673","comment_id":"gulfjii","kind":"comment","text":"Thanks for comment. I looked up Multimodel fusion and the concept seems to similar to what I am trying to achieve.","timestamp":"2021-04-15T11:56:19+00:00","score":1},{"role":"answerer","user_id":"anon_4f81b323888db3e6","comment_id":"gulk0cg","kind":"comment","text":"If you want to classify samples based on inputs of 2 or more modalities you have to choose a fusion strategy. As you have textual and continuous features you probably want to first see how well a model performes with your data. Use something like RF or XGBoost. You can turn your text into a fixed length vector with tfidf. See how well it classifies there. \n\nIf the multimodal classification can be improved maybe try concatenating the continuous features with embeddings for the word like from glove or w2v. And feed this into a neural network.\n\nYou can also look into late fusion which just aggregates the outputs. Model fusion may give good results (depending on data) where you have 2 pipelines one for numerical and one for text then you use a latent layer to aggregate the latent features together and pass this to the classification layers. \n\nFurthermore there are some newer techniques that use bert/attention to fuse like in the paper ViLBERT. \n\nA quick and dirty way of trying this is using this framework:https://github.com/georgian-io/Multimodal-Toolkit\n\nIts older and you cant use longformer or other newer models but has several fusion techniques available.","timestamp":"2021-04-15T12:43:19+00:00","score":3},{"role":"OP","user_id":"anon_ac260d1233e54673","comment_id":"gulse6v","kind":"comment","text":"> A quick and dirty way of trying this is using this framework:[https://github.com/georgian-io/Multimodal-Toolkit](https://github.com/georgian-io/Multimodal-Toolkit) \n\nThis is a great resource. Thanks a lot for detailed comment. \n\n> You can turn your text into a fixed length vector with tfidf. See how well it classifies there. \n\nWouldn't converting text into fixed length vector by tfidf would yield high dimension vector which will not allow numerical feature to influence the results? \n\nAlso I dont have much data so I prefer traditional machine learning technique over neural nets.","timestamp":"2021-04-15T13:56:57+00:00","score":1},{"role":"answerer","user_id":"anon_4f81b323888db3e6","comment_id":"guluhh1","kind":"comment","text":"I suppose this may happen. Maybe some form of normalization/standardization so the model doesnt focus only on the tfidf. A basic tree should figure out how much a particular variable affects the models and split from there.","timestamp":"2021-04-15T14:13:33+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_ac260d1233e54673","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4f81b323888db3e6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gul7ypq","thanks_reply_id":"gulfjii","post_score":10,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_cb59dbe0985a0e0d","answerer_user_id":"anon_6f3f3c6b6bc35824","subreddit":"LanguageTechnology","timestamp":"2021-04-20T00:55:14+00:00","post_id":"muf1be","question":"WHY DO I KEEP RUNNING OUT OF MEMORY (RAM)\n\nGuys I am trying to develop a BERT model that basically predicts an emotion. (Emotion classifier)\n\nI never got a chance to eventually finish my training because I every time run out of Memory Ram\n\nI tried Google Colab (ran out of memory) then tried Kaggle Kernel (ran out of space as well), both 12 and 16 GB RAM.\n\nI do not know what is wrong with it? how people even train this type of model?\n\n​\n\n ......DATA LOADING AND PREPROCESSING...\n \n !pip install deeppavlov\n from deeppavlov.dataset_readers.basic_classification_reader import BasicClassificationDatasetReader\n data = BasicClassificationDatasetReader().read(\n data_path='./',\n train='../input/pikabucsva/train_pikabu_a.csv',\n valid=\"../input/pikabucsva/validation_pikabu_a.csv\", \n test=\"../input/pikabucsva/test_pikabu_a.csv\",\n x = 'content',\n y = 'emotions'\n )\n \n #ITERATOR\n from deeppavlov.dataset_iterators.basic_classification_iterator import BasicClassificationDatasetIterator\n # initializing an iterator\n iterator = BasicClassificationDatasetIterator(data, seed=42, shuffle=True)\n \n #BERT PREPROCESSOR\n !python -m deeppavlov install squad_bert\n from deeppavlov.models.preprocessors.bert_preprocessor import BertPreprocessor\n bert_preprocessor = BertPreprocessor(vocab_file=\"../input/bertmodel/vocab.txt\",\n do_lower_case=False,\n max_seq_length=64)\n \n #SIMPLE VOCABULARY\n from deeppavlov.core.data.simple_vocab import SimpleVocabulary\n vocab = SimpleVocabulary(save_path=\"./binary_classes.dict\")\n \n \n #ONEHOTTER\n from deeppavlov.models.preprocessors.one_hotter import OneHotter\n one_hotter = OneHotter(depth=vocab.len, \n single_vector=True # means we want to have one vector per sample\n )\n #PROB TO LABELS\n from deeppavlov.models.classifiers.proba2labels import Proba2Labels\n prob2labels = Proba2Labels(max_proba=True)\n vocab(prob2labels([[0.6, 0.4], \n [0.2, 0.8],\n [0.1, 0.9]]))\n \n \n #BERT CLASSIFIER\n from deeppavlov.models.bert.bert_classifier import BertClassifierModel\n from deeppavlov.metrics.accuracy import sets_accuracy\n \n bert_classifier = BertClassifierModel(\n n_classes=vocab.len,\n return_probas=True,\n one_hot_labels=True,\n bert_config_file=\"../input/bertmodel/bert_config.json\",\n pretrained_bert=\"../input/bertmodel/bert_model.ckpt\",\n save_path=\"sst_bert_model/model\",\n load_path=\"sst_bert_model/model\",\n keep_prob=0.5,\n learning_rate=1e-05,\n learning_rate_drop_patience=5,\n learning_rate_drop_div=2.0\n )\n \n #TRAINING\n # Method `get_instances` returns all the samples of particular data field\n x_valid, y_valid = iterator.get_instances(data_type=\"valid\")\n # You need to save model only when validation score is higher than previous one.\n # This variable will contain the highest accuracy score\n best_score = 0.\n patience = 2\n impatience = 0\n \n # let's train for 3 epochs\n for ep in range(3):\n \n nbatches = 0\n for x, y in iterator.gen_batches(batch_size=256, \n data_type=\"train\", shuffle=True):\n x_feat = bert_preprocessor(x)\n y_onehot = one_hotter(vocab(y))\n bert_classifier.train_on_batch(x_feat, y_onehot)\n print(\"Batch done\\n\")\n nbatches += 1\n \n if nbatches % 1 == 0:\n # валидируемся каждые 100 батчей\n y_valid_pred = bert_classifier(bert_preprocessor(x_valid))\n score = sets_accuracy(y_valid, vocab(prob2labels(y_valid_pred)))\n print(\"Batches done: {}. Valid Accuracy: {}\".format(nbatches, score))\n \n y_valid_pred = bert_classifier(bert_preprocessor(x_valid))\n score = sets_accuracy(y_valid, vocab(prob2labels(y_valid_pred)))\n print(\"Epochs done: {}. Valid Accuracy: {}\".format(ep + 1, score))\n if score > best_score:\n bert_classifier.save()\n print(\"New best score. Saving model.\")\n best_score = score \n impatience = 0\n else:\n impatience += 1\n if impatience == patience:\n print(\"Out of patience. Stop training.\")\n break","preferred_answer":"Try reducing batch sizes . Your batch size is 256. Reduce it to 16 or 32","full_conversation":[{"role":"OP","user_id":"anon_cb59dbe0985a0e0d","comment_id":"muf1be","kind":"post","text":"WHY DO I KEEP RUNNING OUT OF MEMORY (RAM)\n\nGuys I am trying to develop a BERT model that basically predicts an emotion. (Emotion classifier)\n\nI never got a chance to eventually finish my training because I every time run out of Memory Ram\n\nI tried Google Colab (ran out of memory) then tried Kaggle Kernel (ran out of space as well), both 12 and 16 GB RAM.\n\nI do not know what is wrong with it? how people even train this type of model?\n\n​\n\n ......DATA LOADING AND PREPROCESSING...\n \n !pip install deeppavlov\n from deeppavlov.dataset_readers.basic_classification_reader import BasicClassificationDatasetReader\n data = BasicClassificationDatasetReader().read(\n data_path='./',\n train='../input/pikabucsva/train_pikabu_a.csv',\n valid=\"../input/pikabucsva/validation_pikabu_a.csv\", \n test=\"../input/pikabucsva/test_pikabu_a.csv\",\n x = 'content',\n y = 'emotions'\n )\n \n #ITERATOR\n from deeppavlov.dataset_iterators.basic_classification_iterator import BasicClassificationDatasetIterator\n # initializing an iterator\n iterator = BasicClassificationDatasetIterator(data, seed=42, shuffle=True)\n \n #BERT PREPROCESSOR\n !python -m deeppavlov install squad_bert\n from deeppavlov.models.preprocessors.bert_preprocessor import BertPreprocessor\n bert_preprocessor = BertPreprocessor(vocab_file=\"../input/bertmodel/vocab.txt\",\n do_lower_case=False,\n max_seq_length=64)\n \n #SIMPLE VOCABULARY\n from deeppavlov.core.data.simple_vocab import SimpleVocabulary\n vocab = SimpleVocabulary(save_path=\"./binary_classes.dict\")\n \n \n #ONEHOTTER\n from deeppavlov.models.preprocessors.one_hotter import OneHotter\n one_hotter = OneHotter(depth=vocab.len, \n single_vector=True # means we want to have one vector per sample\n )\n #PROB TO LABELS\n from deeppavlov.models.classifiers.proba2labels import Proba2Labels\n prob2labels = Proba2Labels(max_proba=True)\n vocab(prob2labels([[0.6, 0.4], \n [0.2, 0.8],\n [0.1, 0.9]]))\n \n \n #BERT CLASSIFIER\n from deeppavlov.models.bert.bert_classifier import BertClassifierModel\n from deeppavlov.metrics.accuracy import sets_accuracy\n \n bert_classifier = BertClassifierModel(\n n_classes=vocab.len,\n return_probas=True,\n one_hot_labels=True,\n bert_config_file=\"../input/bertmodel/bert_config.json\",\n pretrained_bert=\"../input/bertmodel/bert_model.ckpt\",\n save_path=\"sst_bert_model/model\",\n load_path=\"sst_bert_model/model\",\n keep_prob=0.5,\n learning_rate=1e-05,\n learning_rate_drop_patience=5,\n learning_rate_drop_div=2.0\n )\n \n #TRAINING\n # Method `get_instances` returns all the samples of particular data field\n x_valid, y_valid = iterator.get_instances(data_type=\"valid\")\n # You need to save model only when validation score is higher than previous one.\n # This variable will contain the highest accuracy score\n best_score = 0.\n patience = 2\n impatience = 0\n \n # let's train for 3 epochs\n for ep in range(3):\n \n nbatches = 0\n for x, y in iterator.gen_batches(batch_size=256, \n data_type=\"train\", shuffle=True):\n x_feat = bert_preprocessor(x)\n y_onehot = one_hotter(vocab(y))\n bert_classifier.train_on_batch(x_feat, y_onehot)\n print(\"Batch done\\n\")\n nbatches += 1\n \n if nbatches % 1 == 0:\n # валидируемся каждые 100 батчей\n y_valid_pred = bert_classifier(bert_preprocessor(x_valid))\n score = sets_accuracy(y_valid, vocab(prob2labels(y_valid_pred)))\n print(\"Batches done: {}. Valid Accuracy: {}\".format(nbatches, score))\n \n y_valid_pred = bert_classifier(bert_preprocessor(x_valid))\n score = sets_accuracy(y_valid, vocab(prob2labels(y_valid_pred)))\n print(\"Epochs done: {}. Valid Accuracy: {}\".format(ep + 1, score))\n if score > best_score:\n bert_classifier.save()\n print(\"New best score. Saving model.\")\n best_score = score \n impatience = 0\n else:\n impatience += 1\n if impatience == patience:\n print(\"Out of patience. Stop training.\")\n break","timestamp":"2021-04-20T00:55:14+00:00","score":0},{"role":"answerer","user_id":"anon_6f3f3c6b6bc35824","comment_id":"gv5lb5s","kind":"comment","text":"Try reducing batch sizes . Your batch size is 256. Reduce it to 16 or 32","timestamp":"2021-04-20T01:53:34+00:00","score":4},{"role":"OP","user_id":"anon_cb59dbe0985a0e0d","comment_id":"gv83xes","kind":"comment","text":"Thank you, I did but still getting no success","timestamp":"2021-04-20T17:28:34+00:00","score":1},{"role":"answerer","user_id":"anon_6f3f3c6b6bc35824","comment_id":"gvb5y36","kind":"comment","text":"I was able to train Bert with batches of 8 on 16 GB ram machine","timestamp":"2021-04-21T10:51:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_cb59dbe0985a0e0d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6f3f3c6b6bc35824","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gv5lb5s","thanks_reply_id":"gv83xes","post_score":0,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_0eeec44d4cfba0ce","answerer_user_id":"anon_b7de706aacf25ac4","subreddit":"LanguageTechnology","timestamp":"2021-04-24T15:18:59+00:00","post_id":"mxm06o","question":"How to approach finding Similar wording in paragraph\n\nI have data which is basically a group of paragraphs that I know could be related.\n\nInside a group of paragraphs (let’s say 100 paragraphs). There could be a sentence of two that are almost/exactly the same text across 60% of the paragraphs. Another completely different similar text across 20% of the paragraphs while the other 20% might be unrelated. \n\nI have billions of these groups of 100 paragraphs and have no idea where to start! Thanks for any pointers","preferred_answer":"> probably the one that is most like all others\n\nI find it hard to conceptualise that logic. Something about it seems off. Why not run something like [TextRank](https://derwen.ai/docs/ptr/) across the candidate sentences to pick one?","full_conversation":[{"role":"OP","user_id":"anon_0eeec44d4cfba0ce","comment_id":"mxm06o","kind":"post","text":"How to approach finding Similar wording in paragraph\n\nI have data which is basically a group of paragraphs that I know could be related.\n\nInside a group of paragraphs (let’s say 100 paragraphs). There could be a sentence of two that are almost/exactly the same text across 60% of the paragraphs. Another completely different similar text across 20% of the paragraphs while the other 20% might be unrelated. \n\nI have billions of these groups of 100 paragraphs and have no idea where to start! Thanks for any pointers","timestamp":"2021-04-24T15:18:59+00:00","score":14},{"role":"answerer","user_id":"anon_b7de706aacf25ac4","comment_id":"gvrd43v","kind":"comment","text":"> probably the one that is most like all others\n\nI find it hard to conceptualise that logic. Something about it seems off. Why not run something like [TextRank](https://derwen.ai/docs/ptr/) across the candidate sentences to pick one?","timestamp":"2021-04-24T22:59:24+00:00","score":3},{"role":"OP","user_id":"anon_0eeec44d4cfba0ce","comment_id":"gvrdyvf","kind":"comment","text":"I suppose that’s why I am asking. Novice at best in this field. Thanks for the suggestion! I’ll read about it","timestamp":"2021-04-24T23:07:00+00:00","score":1},{"role":"answerer","user_id":"anon_b7de706aacf25ac4","comment_id":"gvrfi6t","kind":"comment","text":"I read your original post as if you had a target sentence in mind that you wanted to match against. But reading it back again, perhaps you don't have an example sentence?\n\nIf not, you will likely have to do some clustering of the sentence vectors rather than doing cosine similarity to find similar sentences.","timestamp":"2021-04-24T23:20:52+00:00","score":2},{"role":"OP","user_id":"anon_0eeec44d4cfba0ce","comment_id":"gvrhej9","kind":"comment","text":"Correct I do not have an example sentence. The goal would be to group similar sentences and then use the most frequent sentence as sort of a label. The expectation is that in a group of similar paragraphs (which I already have). There may be a handful of commonly used sentences.","timestamp":"2021-04-24T23:37:56+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_0eeec44d4cfba0ce","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b7de706aacf25ac4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gvrd43v","thanks_reply_id":"gvrdyvf","post_score":14,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_3fefd543e87fc264","answerer_user_id":"anon_b40ee873df0f07ad","subreddit":"LanguageTechnology","timestamp":"2021-04-27T03:04:15+00:00","post_id":"mzf2ee","question":"Speech Recognition Training Data Tools?\n\nI have an upcoming project that has a speech recognition component, but I'm pretty unfamiliar with the basics of this branch of NLP.\n\nI suspect that I will need to create my own training dataset because the speech will involve a lot of niche terminology. From [what little I've seen on the tooling side](https://prodi.gy/docs/audio-video#transcribe), it looks like people segment audio into rough sentence equivalents, and then just type in a transcript to an input field. \n\nIs this best practice for creating speech recognition models? I would think you would need to provide word-level alignments to the audio, and that the models would be word level sequence models. But the training data tools seem mostly to facilitate capture of whole sentence transcripts.\n\nAny help is appreciated","preferred_answer":"Personally i've been using Mozilla Deepspeech for my STT projects (they recently changed to coqui) and all you meed are (audio, sentence) pairs/allignments. There's no need for a word level allignment. The audio is transformed into MFCC's features (some kind of energy/frequency spectrum using the FFT, but what exactly im not sure) and then a recurrent neural network goes sequentially over these features to predict what sentence is being said (rather, for every frame it tries to predict a character that is being said). \n\nWhat I would recommend: first get a dataset on your target language and train the model on this and then finetune it on your dataset (even better: if there already exists a model for your language). Also, i think it would be better to split your dataset in sentences (eg: split \"hello i am good today. How are you? Into 2 sample).\n\nAnother thing about deepspeech is that the acoustic model and language model (in their case scorer) can be trained seperate if im right. So for example their acoustic model will give you predictions of the audion on a character level for example: \"hewwo how are you\" but might still contain typos/mistakes (like the ww in hello in my example). Then the language model/scorer file comes into play and try to fix these words like it is a spellling corrector. This scorer model is an n-gram language model. Basically a basi model that works on statistics from an input file. So if for some reason for example this model thinks that \"hekko\" has a higher probability than \"hello\" it will actually 'fix' the typo to be 'hekko' and this way you can model the vocabulary that you need.","full_conversation":[{"role":"OP","user_id":"anon_3fefd543e87fc264","comment_id":"mzf2ee","kind":"post","text":"Speech Recognition Training Data Tools?\n\nI have an upcoming project that has a speech recognition component, but I'm pretty unfamiliar with the basics of this branch of NLP.\n\nI suspect that I will need to create my own training dataset because the speech will involve a lot of niche terminology. From [what little I've seen on the tooling side](https://prodi.gy/docs/audio-video#transcribe), it looks like people segment audio into rough sentence equivalents, and then just type in a transcript to an input field. \n\nIs this best practice for creating speech recognition models? I would think you would need to provide word-level alignments to the audio, and that the models would be word level sequence models. But the training data tools seem mostly to facilitate capture of whole sentence transcripts.\n\nAny help is appreciated","timestamp":"2021-04-27T03:04:15+00:00","score":6},{"role":"answerer","user_id":"anon_b40ee873df0f07ad","comment_id":"gw0ptbb","kind":"comment","text":"Personally i've been using Mozilla Deepspeech for my STT projects (they recently changed to coqui) and all you meed are (audio, sentence) pairs/allignments. There's no need for a word level allignment. The audio is transformed into MFCC's features (some kind of energy/frequency spectrum using the FFT, but what exactly im not sure) and then a recurrent neural network goes sequentially over these features to predict what sentence is being said (rather, for every frame it tries to predict a character that is being said). \n\nWhat I would recommend: first get a dataset on your target language and train the model on this and then finetune it on your dataset (even better: if there already exists a model for your language). Also, i think it would be better to split your dataset in sentences (eg: split \"hello i am good today. How are you? Into 2 sample).\n\nAnother thing about deepspeech is that the acoustic model and language model (in their case scorer) can be trained seperate if im right. So for example their acoustic model will give you predictions of the audion on a character level for example: \"hewwo how are you\" but might still contain typos/mistakes (like the ww in hello in my example). Then the language model/scorer file comes into play and try to fix these words like it is a spellling corrector. This scorer model is an n-gram language model. Basically a basi model that works on statistics from an input file. So if for some reason for example this model thinks that \"hekko\" has a higher probability than \"hello\" it will actually 'fix' the typo to be 'hekko' and this way you can model the vocabulary that you need.","timestamp":"2021-04-27T05:33:47+00:00","score":5},{"role":"OP","user_id":"anon_3fefd543e87fc264","comment_id":"gw2k0vw","kind":"comment","text":"Wow this was really helpful, thank you! Do you have recommendations for software to help create the alignments?","timestamp":"2021-04-27T17:03:21+00:00","score":2},{"role":"answerer","user_id":"anon_b40ee873df0f07ad","comment_id":"gw2mzy8","kind":"comment","text":"Basically any tool that can create a csv file. For Mozilla deepspeech you only need [three entries](https://deepspeech.readthedocs.io/en/r0.9/TRAINING.html#common-voice-training-data) in your CSV: wav\\_filename, wav\\_filesize and transcripts. So in case you already have the audio and sentence pairs you can make this csv in python (using the pandas library/tool for example). \n\n\nIn case you have let's say: a 20min entry from an audio book, and the sentences seperatly in a txt file and you want to cut the sentences out of the audio manually you can look at a tool like [aeneas](https://github.com/readbeyond/aeneas). If you still have to annotated all your data yourself i do not really know a tool for this :/ \n\nI'd also recommend to go on [Mozilla Discourse](https://discourse.mozilla.org/c/deepspeech/247) for deepspeech. Basically a little forum with the developers and other STT enthousiasts. Before you open a problem it would be good to go trough the [documentation](https://deepspeech.readthedocs.io/en/r0.9/index.html) first and have a look at their [github](https://github.com/mozilla/DeepSpeech) because sometimes people ask stuff that might be explained in there and in that case the people on the forum will just ask you whether you've read the documentation or not. \nYou can also ask for general advice etc over there.\n\nI hope this helps you on your project :) goodluck","timestamp":"2021-04-27T17:23:51+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3fefd543e87fc264","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b40ee873df0f07ad","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gw0ptbb","thanks_reply_id":"gw2k0vw","post_score":6,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_2471b54745c65e39","answerer_user_id":"anon_e56d26aa105d93a9","subreddit":"LanguageTechnology","timestamp":"2021-05-03T19:39:01+00:00","post_id":"n458pt","question":"Any software that can annotate (grapheme/phonogram) in a word with the matching phoneme?\n\nI am trying to find a software that could tell \n\\-if the letter \"y\" in a word is a vowel or a consonant. \n\\-Or if \"ti\" should be read as \"sh\"\n\nI found multiple tool that return a list of phoneme but none that tell me which letter in the original word match each phoneme (an alignment). \nI assume this is doable because this is essentially what speech-to-text tool are doing. \n\n\nBut I would like a tool that give me a list of matching pair (grapheme/phoneme) so I display the annotation on the the correct range of letter in the original word.","preferred_answer":"Gentle by lowerquality didn't help? (https://github.com/lowerquality/gentle)\n\nIt returns time aligned phoneme sequences for each word, like 'ice' -> 'ai': t0, 's': t1.\nI suppose it doesn't tell you which exact letters are paired, but it matches individual words with phonemes using a set vocabulary, the CMU one. \n(http://www.speech.cs.cmu.edu/tools/lextool.html)\n\nEdit: Maybe you can split up the words to match graphemes?","full_conversation":[{"role":"OP","user_id":"anon_2471b54745c65e39","comment_id":"n458pt","kind":"post","text":"Any software that can annotate (grapheme/phonogram) in a word with the matching phoneme?\n\nI am trying to find a software that could tell \n\\-if the letter \"y\" in a word is a vowel or a consonant. \n\\-Or if \"ti\" should be read as \"sh\"\n\nI found multiple tool that return a list of phoneme but none that tell me which letter in the original word match each phoneme (an alignment). \nI assume this is doable because this is essentially what speech-to-text tool are doing. \n\n\nBut I would like a tool that give me a list of matching pair (grapheme/phoneme) so I display the annotation on the the correct range of letter in the original word.","timestamp":"2021-05-03T19:39:01+00:00","score":2},{"role":"answerer","user_id":"anon_e56d26aa105d93a9","comment_id":"gwv87l7","kind":"comment","text":"Gentle by lowerquality didn't help? (https://github.com/lowerquality/gentle)\n\nIt returns time aligned phoneme sequences for each word, like 'ice' -> 'ai': t0, 's': t1.\nI suppose it doesn't tell you which exact letters are paired, but it matches individual words with phonemes using a set vocabulary, the CMU one. \n(http://www.speech.cs.cmu.edu/tools/lextool.html)\n\nEdit: Maybe you can split up the words to match graphemes?","timestamp":"2021-05-04T03:39:58+00:00","score":1},{"role":"OP","user_id":"anon_2471b54745c65e39","comment_id":"gwv9z7b","kind":"comment","text":">Gentle\n\nthis seem useful thanks a lot. I have way to accurately split syllable but if I split grapheme of a syllable and try to align it have a lot of issues. \n\n\nMaybe this need its own machine learning training :-)","timestamp":"2021-05-04T03:57:34+00:00","score":1},{"role":"answerer","user_id":"anon_e56d26aa105d93a9","comment_id":"gwvfcq2","kind":"comment","text":"Yeah if you're trying to match separate syllables, it might be a problem, since I haven't tried to alter the default vocabulary. I am just working to reconstruct a transcript of a mute speech video.\nAlso note that this tool also requires a transcript of the speech.","timestamp":"2021-05-04T04:54:43+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2471b54745c65e39","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e56d26aa105d93a9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gwv87l7","thanks_reply_id":"gwv9z7b","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_ace10bfe3ec79cd0","answerer_user_id":"anon_06aaaf990c10cbb2","subreddit":"LanguageTechnology","timestamp":"2021-05-06T11:58:06+00:00","post_id":"n65ktg","question":"KNN performs better on Word2Vec pretrained embedding than on TF-IDF vector representation\n\nHi All.\n\nI am doing a project on multi-class text classification and could do with some advice.\n\nI have a dataset of reviews which are classified into 7 product categories.\n\nFirstly, I create a term document matrix using TF-IDF (tfidfvectorizer from sklearn). This generates a matrix of n x m where n in the number of reviews in my dataset and m is the number of features.\n\nThen after splitting term document matrix into 80:20 train:test, I pass it through the K-Nearest Neighbours (KNN) algorithm and achieve an accuracy of 53%.\n\n​\n\nIn another experiment, I used the Google News Word2Vec pretrained embedding (300 dimensional) and averaged all the word vectors for each review. So, each review consists of x words and each of the words has a 300 dimensional vector. Each of the vectors are averaged to produce one 300 dimensional vector per review.\n\n​\n\nThen I pass this matrix through KNN. I get an accuracy of 72%.\n\n​\n\nAs for other classifiers that I tested on the same dataset, all of them performed better on the TF-IDF method of vectorization. However, KNN performed better on word2vec.\n\nCan anyone help me understand why there is a jump in accuracy for KNN in using the word2vec method as compared to when using the tfidf method?","preferred_answer":"Two remarks:\n- Word2Vec is already a family of KNN. Instead of nearest neighbors, it uses cosine similarity, which is also a type of distance-based metric. It is no surprise that it performs well.\n- KNN is extremely sensitive to K, and the data you use. If you split the dataset using a different seed, you will notice a significant change in performance. I can't say it is better or worse, but in short, don't fully trust KNN.","full_conversation":[{"role":"OP","user_id":"anon_ace10bfe3ec79cd0","comment_id":"n65ktg","kind":"post","text":"KNN performs better on Word2Vec pretrained embedding than on TF-IDF vector representation\n\nHi All.\n\nI am doing a project on multi-class text classification and could do with some advice.\n\nI have a dataset of reviews which are classified into 7 product categories.\n\nFirstly, I create a term document matrix using TF-IDF (tfidfvectorizer from sklearn). This generates a matrix of n x m where n in the number of reviews in my dataset and m is the number of features.\n\nThen after splitting term document matrix into 80:20 train:test, I pass it through the K-Nearest Neighbours (KNN) algorithm and achieve an accuracy of 53%.\n\n​\n\nIn another experiment, I used the Google News Word2Vec pretrained embedding (300 dimensional) and averaged all the word vectors for each review. So, each review consists of x words and each of the words has a 300 dimensional vector. Each of the vectors are averaged to produce one 300 dimensional vector per review.\n\n​\n\nThen I pass this matrix through KNN. I get an accuracy of 72%.\n\n​\n\nAs for other classifiers that I tested on the same dataset, all of them performed better on the TF-IDF method of vectorization. However, KNN performed better on word2vec.\n\nCan anyone help me understand why there is a jump in accuracy for KNN in using the word2vec method as compared to when using the tfidf method?","timestamp":"2021-05-06T11:58:06+00:00","score":7},{"role":"answerer","user_id":"anon_06aaaf990c10cbb2","comment_id":"gx5qrrk","kind":"comment","text":"Two remarks:\n- Word2Vec is already a family of KNN. Instead of nearest neighbors, it uses cosine similarity, which is also a type of distance-based metric. It is no surprise that it performs well.\n- KNN is extremely sensitive to K, and the data you use. If you split the dataset using a different seed, you will notice a significant change in performance. I can't say it is better or worse, but in short, don't fully trust KNN.","timestamp":"2021-05-06T15:20:09+00:00","score":0},{"role":"OP","user_id":"anon_ace10bfe3ec79cd0","comment_id":"gx5wq8p","kind":"comment","text":"Thank you so much, makes sense. \nFor TF-IDF vectorization, I specified max\\_features (number of features) as 300 instead of using the whole vocabulary, so KNN is only getting a matrix with 300 of the most frequently occurring words. In Word2Vec, the entire vocabulary is being fed into the KNN. I think that is also a reason as to why it works so well with Word2Vec and not so well with TF-IDF. Would you say that makes sense?","timestamp":"2021-05-06T16:01:44+00:00","score":1},{"role":"answerer","user_id":"anon_06aaaf990c10cbb2","comment_id":"gx5zqtt","kind":"comment","text":"That I think could also be the case. Normally, we use 20k-30k as vocabulary size.","timestamp":"2021-05-06T16:22:55+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ace10bfe3ec79cd0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_06aaaf990c10cbb2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gx5qrrk","thanks_reply_id":"gx5wq8p","post_score":7,"answer_score":0,"preferred_answer_is_top_level":true}} {"user_id":"anon_13fa208718c0f98d","answerer_user_id":"anon_8c6cfab1772779f7","subreddit":"LanguageTechnology","timestamp":"2021-05-09T23:44:05+00:00","post_id":"n8qpvb","question":"Is there a python library or API that is able to check the grammar of a sentence?","preferred_answer":"spaCy https://spacy.io/ has a feature called Parts of Speech recognition, but it isn't \"checking\" in the ordinary sense, because correctness of the grammar depends on language","full_conversation":[{"role":"OP","user_id":"anon_13fa208718c0f98d","comment_id":"n8qpvb","kind":"post","text":"Is there a python library or API that is able to check the grammar of a sentence?","timestamp":"2021-05-09T23:44:05+00:00","score":1},{"role":"answerer","user_id":"anon_8c6cfab1772779f7","comment_id":"gxkq58z","kind":"comment","text":"spaCy https://spacy.io/ has a feature called Parts of Speech recognition, but it isn't \"checking\" in the ordinary sense, because correctness of the grammar depends on language","timestamp":"2021-05-10T04:53:17+00:00","score":1},{"role":"OP","user_id":"anon_13fa208718c0f98d","comment_id":"gxlrp8p","kind":"comment","text":"Appreciate it. What is the difference between this and the NLTK library where it breaks words into POS. I’m trying to make a Twitter bot that learns to tweet on its own. I’m wondering if there’s a library that the bot can assess sentence structure against or if I would need to make a python dictionary that contains sample sentence structures for the bot to pull from","timestamp":"2021-05-10T13:15:56+00:00","score":1},{"role":"answerer","user_id":"anon_8c6cfab1772779f7","comment_id":"gxm4i9e","kind":"comment","text":"one of the big advantage is that spaCy visualizes the whole sentence structure (see the doc), and generally - its language models are quite elaborate. but i haven't worked much w/NLTK, so cannot judge..","timestamp":"2021-05-10T14:56:15+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_13fa208718c0f98d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8c6cfab1772779f7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gxkq58z","thanks_reply_id":"gxlrp8p","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_853e228ce9d88531","answerer_user_id":"anon_cacc53677c14af08","subreddit":"LanguageTechnology","timestamp":"2021-05-14T03:02:58+00:00","post_id":"nbyu2x","question":"I have a list of names of publicly listed companies (around 1000) and want to do textual analysis of information on their websites. Where do I start?\n\nI mean is there already a database that I can use. If not, how do I get their website address without looking each one up on google and how to automate the process of collecting information. I use python if you need to know. Any suggestion helps. Thankyou","preferred_answer":"Google beautifulsoup and web crawlers.\n\nEssentially, you get their website’s html and can analyze the html which includes the text .","full_conversation":[{"role":"OP","user_id":"anon_853e228ce9d88531","comment_id":"nbyu2x","kind":"post","text":"I have a list of names of publicly listed companies (around 1000) and want to do textual analysis of information on their websites. Where do I start?\n\nI mean is there already a database that I can use. If not, how do I get their website address without looking each one up on google and how to automate the process of collecting information. I use python if you need to know. Any suggestion helps. Thankyou","timestamp":"2021-05-14T03:02:58+00:00","score":2},{"role":"answerer","user_id":"anon_cacc53677c14af08","comment_id":"gy23ly5","kind":"comment","text":"Google beautifulsoup and web crawlers.\n\nEssentially, you get their website’s html and can analyze the html which includes the text .","timestamp":"2021-05-14T03:10:25+00:00","score":2},{"role":"OP","user_id":"anon_853e228ce9d88531","comment_id":"gy23u5l","kind":"comment","text":"Thankyou. Is there also a way of getting their website url? Looking each one up on google will take very long","timestamp":"2021-05-14T03:12:38+00:00","score":1},{"role":"answerer","user_id":"anon_cacc53677c14af08","comment_id":"gy269md","kind":"comment","text":"It looks like the clearbit.com name to domain api is free","timestamp":"2021-05-14T03:36:28+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_853e228ce9d88531","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cacc53677c14af08","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gy23ly5","thanks_reply_id":"gy23u5l","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ace10bfe3ec79cd0","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2021-05-17T14:14:44+00:00","post_id":"nehdv5","question":"Is it conference paper worthy?\n\nMy final year project is on Multi-class text classification and simply explores existing techniques (TF-IDF and Word2Vec) on a new and different dataset. Pipeline is standard: Data Pre-processing and Cleaning, Vectorization and Dimensionality Reduction, Model splitting and Training, Hyperparameter tuning, model re-training and finally model evaluation.\n\nIs it worthy of sending it as a paper to conferences even though it is nothing novel technique-wise but is on a different dataset?\n\nAny guidance would be appreciated!","preferred_answer":"Most likely no, with some exceptions if the dataset is very interesting. E.g. there are specific conferences on specific applied topics that they consider importan and in need of solutions, and they may publish a straightforward application of non-novel techniques if that implementation/application has significant practical importance and value in their field. But that's more about \"industrial\" applications with all the practical messiness, less so about a typical final year project.","full_conversation":[{"role":"OP","user_id":"anon_ace10bfe3ec79cd0","comment_id":"nehdv5","kind":"post","text":"Is it conference paper worthy?\n\nMy final year project is on Multi-class text classification and simply explores existing techniques (TF-IDF and Word2Vec) on a new and different dataset. Pipeline is standard: Data Pre-processing and Cleaning, Vectorization and Dimensionality Reduction, Model splitting and Training, Hyperparameter tuning, model re-training and finally model evaluation.\n\nIs it worthy of sending it as a paper to conferences even though it is nothing novel technique-wise but is on a different dataset?\n\nAny guidance would be appreciated!","timestamp":"2021-05-17T14:14:44+00:00","score":7},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"gyg9yko","kind":"comment","text":"Most likely no, with some exceptions if the dataset is very interesting. E.g. there are specific conferences on specific applied topics that they consider importan and in need of solutions, and they may publish a straightforward application of non-novel techniques if that implementation/application has significant practical importance and value in their field. But that's more about \"industrial\" applications with all the practical messiness, less so about a typical final year project.","timestamp":"2021-05-17T14:59:01+00:00","score":6},{"role":"OP","user_id":"anon_ace10bfe3ec79cd0","comment_id":"gygam9i","kind":"comment","text":"Yeah that makes sense, thank you! Would you say any paper worthy of a conference needs to introduce some novelty?","timestamp":"2021-05-17T15:03:42+00:00","score":0},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"gyggzp5","kind":"comment","text":"Not 100% (there are all kinds of conferences), but yes, a respectable academic conference will require papers to contain some novel research, and novelty is almost always an explicit axis of evaluation for reviewers.","timestamp":"2021-05-17T15:48:06+00:00","score":4}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ace10bfe3ec79cd0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gyg9yko","thanks_reply_id":"gygam9i","post_score":7,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_51ceb8ab31142c53","answerer_user_id":"anon_8ffdac55ca1e1294","subreddit":"LanguageTechnology","timestamp":"2021-05-20T12:33:48+00:00","post_id":"ngyzvo","question":"M.Sc. Computer linguistics in Germany\n\nHi, hi!\n\nBasically, my case is the opposite as the one archived here:\n\nhttps://www.reddit.com/r/LanguageTechnology/comments/8w06zn/msc_computational_linguistics_in_germany/\n\nI come from a theoretical/computational physics background and would like to properly educate myself in computational linguistics. Linguistics has been much of a hobby for me, while math and programming were part of my curriculum. \n\nNow I am finishing my master's on physics of complex systems and had one introduction to speech and text analysis, as well as a deep learning course.\n\nThis last information is also relevant, since I wouldn't like paying the tution fees for a second master (Zweitstudiengebühren) which would be applied in BaWü (Heidelberg, Tübingen, Stuttgart)\n\nAny recommendations here?","preferred_answer":"If you'd like a focus on the linguistic side and wouldn't mind a dive into digital humanities, I'd recommend taking a look at Linguistic and Literary Computing at the TU Darmstadt. As a result of that shifted focus, it's M.A. though, not [M.Sc](https://M.Sc).\n\nGood luck!","full_conversation":[{"role":"OP","user_id":"anon_51ceb8ab31142c53","comment_id":"ngyzvo","kind":"post","text":"M.Sc. Computer linguistics in Germany\n\nHi, hi!\n\nBasically, my case is the opposite as the one archived here:\n\nhttps://www.reddit.com/r/LanguageTechnology/comments/8w06zn/msc_computational_linguistics_in_germany/\n\nI come from a theoretical/computational physics background and would like to properly educate myself in computational linguistics. Linguistics has been much of a hobby for me, while math and programming were part of my curriculum. \n\nNow I am finishing my master's on physics of complex systems and had one introduction to speech and text analysis, as well as a deep learning course.\n\nThis last information is also relevant, since I wouldn't like paying the tution fees for a second master (Zweitstudiengebühren) which would be applied in BaWü (Heidelberg, Tübingen, Stuttgart)\n\nAny recommendations here?","timestamp":"2021-05-20T12:33:48+00:00","score":0},{"role":"answerer","user_id":"anon_8ffdac55ca1e1294","comment_id":"gyttbtm","kind":"comment","text":"If you'd like a focus on the linguistic side and wouldn't mind a dive into digital humanities, I'd recommend taking a look at Linguistic and Literary Computing at the TU Darmstadt. As a result of that shifted focus, it's M.A. though, not [M.Sc](https://M.Sc).\n\nGood luck!","timestamp":"2021-05-20T14:43:40+00:00","score":1},{"role":"OP","user_id":"anon_51ceb8ab31142c53","comment_id":"gzr36ay","kind":"comment","text":"Thanks a lot! Are you studying there? I'm working with their Sentence Transformers and I was wondering whether they had a masters on computational linguistics, now I see. :)","timestamp":"2021-05-28T12:39:34+00:00","score":1},{"role":"answerer","user_id":"anon_8ffdac55ca1e1294","comment_id":"gzuub6w","kind":"comment","text":"I finished the degree about a year ago :) Glad if I could help!","timestamp":"2021-05-29T09:37:37+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_51ceb8ab31142c53","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8ffdac55ca1e1294","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gyttbtm","thanks_reply_id":"gzr36ay","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_403184a156ae98bb","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2021-05-24T11:32:43+00:00","post_id":"njvtsw","question":"Is there a way to score the structure of a sentence against a corpus of other sentences?\n\nUsing Python.\n\nHaving trouble putting this question into words.\n\nIs there a way to score the structure of a sentence against a corpus of other sentences?\n\nSo if a sentence if badly written in terms of grammar/word order, the score would be low.\n\nI guess one would need to know the most common sentence structure within the corpus and work back from there?\n\nAny ideas much appreciated and apologies for the vagueness of the question.","preferred_answer":"I recall reading a paper some years ago on \"syntactic language modeling\" which was essentially applying standard n-gram probability models but (a) using syntactic tags of words or relations(dependencies) instead of words themselves (which isn't unusual - \"factored\" language models for e.g. POS-tag ngrams were applied in SMT before neural MT), and (b) instead of sequential ngrams, you use small \"tree fragments\" - pairs, triplets, etc with an additional symbol denoting the \"graph shape\" of that fragment.\n\nOnce you have that, you can just count the \"syntactic ngrams\" in a corpus, get their conditional probabilities, and match them with a parse tree of the sentence to evaluate it's (un)likelihood. You would need a reliable syntactic parser, but those are available for many languages through eg. universaldependencies project.","full_conversation":[{"role":"OP","user_id":"anon_403184a156ae98bb","comment_id":"njvtsw","kind":"post","text":"Is there a way to score the structure of a sentence against a corpus of other sentences?\n\nUsing Python.\n\nHaving trouble putting this question into words.\n\nIs there a way to score the structure of a sentence against a corpus of other sentences?\n\nSo if a sentence if badly written in terms of grammar/word order, the score would be low.\n\nI guess one would need to know the most common sentence structure within the corpus and work back from there?\n\nAny ideas much appreciated and apologies for the vagueness of the question.","timestamp":"2021-05-24T11:32:43+00:00","score":5},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"gz9gk6l","kind":"comment","text":"I recall reading a paper some years ago on \"syntactic language modeling\" which was essentially applying standard n-gram probability models but (a) using syntactic tags of words or relations(dependencies) instead of words themselves (which isn't unusual - \"factored\" language models for e.g. POS-tag ngrams were applied in SMT before neural MT), and (b) instead of sequential ngrams, you use small \"tree fragments\" - pairs, triplets, etc with an additional symbol denoting the \"graph shape\" of that fragment.\n\nOnce you have that, you can just count the \"syntactic ngrams\" in a corpus, get their conditional probabilities, and match them with a parse tree of the sentence to evaluate it's (un)likelihood. You would need a reliable syntactic parser, but those are available for many languages through eg. universaldependencies project.","timestamp":"2021-05-24T11:39:06+00:00","score":6},{"role":"OP","user_id":"anon_403184a156ae98bb","comment_id":"gz9h922","kind":"comment","text":"wow - thank you for the answer!","timestamp":"2021-05-24T11:47:49+00:00","score":2},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"gz9o4mg","kind":"comment","text":"This is the paper if you're interested - https://ebooks.iospress.nl/volumearticle/38025 - probably there's something more on this topic, it's been quite some time now.","timestamp":"2021-05-24T13:03:09+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_403184a156ae98bb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"gz9gk6l","thanks_reply_id":"gz9h922","post_score":5,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_f4b3429bcc82bd4f","answerer_user_id":"anon_3fefd543e87fc264","subreddit":"LanguageTechnology","timestamp":"2021-05-31T04:09:45+00:00","post_id":"not78h","question":"Structuring free text, then performing analysis vs. Performing analysis on unstructured free text\n\nHi reddit, NLP newbie here\n\nI am trying to understand if there is any value in creating a table out of free text, versus predictive analysis on the free text itself. \n\nFor context, I am working with 2 million clinical notes from the MIMIC-III dataset, and I would like to tabluate all this unstructured data. Would this yield much value, considering I could design a bespoke predicitve model directly on to the free text? Would there be much difference in results from the free text compared to its structured counterpart?","preferred_answer":"Are you trying to recognize or classify a part of the note or the entirety of it?\n\nIf the first I would recommend a tool capable of recording character offsets (there are several free and paid options). If the latter a table would probably be fine","full_conversation":[{"role":"OP","user_id":"anon_f4b3429bcc82bd4f","comment_id":"not78h","kind":"post","text":"Structuring free text, then performing analysis vs. Performing analysis on unstructured free text\n\nHi reddit, NLP newbie here\n\nI am trying to understand if there is any value in creating a table out of free text, versus predictive analysis on the free text itself. \n\nFor context, I am working with 2 million clinical notes from the MIMIC-III dataset, and I would like to tabluate all this unstructured data. Would this yield much value, considering I could design a bespoke predicitve model directly on to the free text? Would there be much difference in results from the free text compared to its structured counterpart?","timestamp":"2021-05-31T04:09:45+00:00","score":2},{"role":"answerer","user_id":"anon_3fefd543e87fc264","comment_id":"h01s4jf","kind":"comment","text":"Are you trying to recognize or classify a part of the note or the entirety of it?\n\nIf the first I would recommend a tool capable of recording character offsets (there are several free and paid options). If the latter a table would probably be fine","timestamp":"2021-05-31T04:24:26+00:00","score":1},{"role":"OP","user_id":"anon_f4b3429bcc82bd4f","comment_id":"h01srep","kind":"comment","text":"Hi, thanks so much for the reply.\n\nIdeally classification would be through named entity recognition. The entities that are recognised are sorted into a database. E.g.\n\nDanny was diagnosed with leukaemia at 4PM -->\n\nTime / Patient / diagnosis\n\n4pm / Danny / leukaemia","timestamp":"2021-05-31T04:31:44+00:00","score":2},{"role":"answerer","user_id":"anon_3fefd543e87fc264","comment_id":"h03jnyx","kind":"comment","text":"If you plan to use an NER approach, I would use something that captures from free text. \n\nWhy? Because that is true to what your model will be asked to do in the real world scenario. You can always derive tabular structures from NER labels later if you find table viz compelling, but if you capture training data in a tabular environment you will have a messy and error prone cleanup process to convert to training. That in addition to the fact that you will be teaching the model to optimize on a slight different task then where you plan to apply.","timestamp":"2021-05-31T16:50:18+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_f4b3429bcc82bd4f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3fefd543e87fc264","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h01s4jf","thanks_reply_id":"h01srep","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_37f8bda8cec0a569","answerer_user_id":"anon_dae80ba3203187fc","subreddit":"LanguageTechnology","timestamp":"2021-06-08T11:35:08+00:00","post_id":"nv1y5k","question":"Clustering latent representation vectors with a size less than the number of clusters\n\nI'm doing topic modeling for the first time in my life and I have a problem. My intention is to model daily topics, but my number of daily samples varies a lot, from 5 samples in one day to 100 in another, for example. The desired number of topics is 7, so I have problems from the first day of the dataset.\n\nThe methodology I'm following is [this](https://blog.insightdatascience.com/contextual-topic-identification-4291d256a032).\n\nThen the vector resulting from the LDA+BERT concatenation is passed in an Autoencoder and then used in a clustering model. This is where I have the problem at hand. My number of clusters is 7, but the representation vectors are 5.\n\nWith this I have the error:\n\nValueError: n\\_samples=5 should be >= n\\_clusters=7.\n\nDoes anyone know how I could fix this?","preferred_answer":"In my experience, clustering is often what ppl say they want, but what they actually want is classification. \n \nIf you really need to discover the new clusters each day, you could try a clustering technique that doesn't require knowing the number of clusters ahead of time, such as HDBSCAN. \n \nI predict this will be difficult to get anything that's actually useful, since NLP vectors are usually sparse and on these problematic days, your number of records is so very small. (You'll either end up with each cluster holding a single record, or only one cluster that holds all the articles for that day.)\n \nWithout knowing your actual use case, I would probably approach something like this: Use the data from [all the days? one week? one month?] put together to find your clusters, then create a new column with those labels, and train a classifier on that. From there, use the classifier model to predict on each article going forward into the future. \n \nYou could set up a schedule so it finds new clusters on a weekly / monthly cadence so it doesn't get stale.","full_conversation":[{"role":"OP","user_id":"anon_37f8bda8cec0a569","comment_id":"nv1y5k","kind":"post","text":"Clustering latent representation vectors with a size less than the number of clusters\n\nI'm doing topic modeling for the first time in my life and I have a problem. My intention is to model daily topics, but my number of daily samples varies a lot, from 5 samples in one day to 100 in another, for example. The desired number of topics is 7, so I have problems from the first day of the dataset.\n\nThe methodology I'm following is [this](https://blog.insightdatascience.com/contextual-topic-identification-4291d256a032).\n\nThen the vector resulting from the LDA+BERT concatenation is passed in an Autoencoder and then used in a clustering model. This is where I have the problem at hand. My number of clusters is 7, but the representation vectors are 5.\n\nWith this I have the error:\n\nValueError: n\\_samples=5 should be >= n\\_clusters=7.\n\nDoes anyone know how I could fix this?","timestamp":"2021-06-08T11:35:08+00:00","score":5},{"role":"answerer","user_id":"anon_dae80ba3203187fc","comment_id":"h11mzg8","kind":"comment","text":"In my experience, clustering is often what ppl say they want, but what they actually want is classification. \n \nIf you really need to discover the new clusters each day, you could try a clustering technique that doesn't require knowing the number of clusters ahead of time, such as HDBSCAN. \n \nI predict this will be difficult to get anything that's actually useful, since NLP vectors are usually sparse and on these problematic days, your number of records is so very small. (You'll either end up with each cluster holding a single record, or only one cluster that holds all the articles for that day.)\n \nWithout knowing your actual use case, I would probably approach something like this: Use the data from [all the days? one week? one month?] put together to find your clusters, then create a new column with those labels, and train a classifier on that. From there, use the classifier model to predict on each article going forward into the future. \n \nYou could set up a schedule so it finds new clusters on a weekly / monthly cadence so it doesn't get stale.","timestamp":"2021-06-08T16:28:28+00:00","score":3},{"role":"OP","user_id":"anon_37f8bda8cec0a569","comment_id":"h15bs0p","kind":"comment","text":"That's a best approach than what I'm doing, thank you for your answer!","timestamp":"2021-06-09T12:59:37+00:00","score":2},{"role":"answerer","user_id":"anon_dae80ba3203187fc","comment_id":"h15mqpj","kind":"comment","text":"Your question inspired me to write a LinkedIn blog post where I shared the same article you shared in your original question. Thanks for inspiring me with a good question and including that blog :)","timestamp":"2021-06-09T14:23:49+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_37f8bda8cec0a569","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dae80ba3203187fc","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h11mzg8","thanks_reply_id":"h15bs0p","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_bba5c5aed869bc77","answerer_user_id":"anon_4bc0bbb9acdf362d","subreddit":"LanguageTechnology","timestamp":"2021-06-10T10:22:04+00:00","post_id":"nwk5sp","question":"Question answering with Wikipedia API\n\nI'm working on a question answering system based on the Wikipedia API. A problem is that \"wikipedia.search\" yields a couple of articles, the first one not always being the best one. Any ideas how to chose the most appropriate article from the results?","preferred_answer":"Its not fun to implement something new on top of something else to solve a problem, but what we did after narrowing the search down is parse part of each wikipedia page then make a decision from that. \n\nSo for your examples (hopefully you have a lot of example queries), would you say it's most likely in the top 3 results? If so, you could parse those results and rank those to find your answer (of course, the next question is: what do you use to rank the results, that's yet another rabbit hole). \n\nMaybe someone here has a better solution, but this is the kind of stuff we usually did for getting the right answers to OQA type questions. It can also be really hacky. If a wikipedia page has some messed up formatting it can ruin this. We always had exceptions where the answer returned was formatted incorrectly or of course wasn't really the answer to the question but at least was on topic (that's always fun, trying to convince yourself its \"close enough\").\n\nGood luck!","full_conversation":[{"role":"OP","user_id":"anon_bba5c5aed869bc77","comment_id":"nwk5sp","kind":"post","text":"Question answering with Wikipedia API\n\nI'm working on a question answering system based on the Wikipedia API. A problem is that \"wikipedia.search\" yields a couple of articles, the first one not always being the best one. Any ideas how to chose the most appropriate article from the results?","timestamp":"2021-06-10T10:22:04+00:00","score":5},{"role":"answerer","user_id":"anon_4bc0bbb9acdf362d","comment_id":"h19iqxq","kind":"comment","text":"Its not fun to implement something new on top of something else to solve a problem, but what we did after narrowing the search down is parse part of each wikipedia page then make a decision from that. \n\nSo for your examples (hopefully you have a lot of example queries), would you say it's most likely in the top 3 results? If so, you could parse those results and rank those to find your answer (of course, the next question is: what do you use to rank the results, that's yet another rabbit hole). \n\nMaybe someone here has a better solution, but this is the kind of stuff we usually did for getting the right answers to OQA type questions. It can also be really hacky. If a wikipedia page has some messed up formatting it can ruin this. We always had exceptions where the answer returned was formatted incorrectly or of course wasn't really the answer to the question but at least was on topic (that's always fun, trying to convince yourself its \"close enough\").\n\nGood luck!","timestamp":"2021-06-10T10:33:55+00:00","score":3},{"role":"OP","user_id":"anon_bba5c5aed869bc77","comment_id":"h1b4sr3","kind":"comment","text":"Thanks! Ranking the search results should be a major issue, indeed. Maybe first I 'll try out a ranking by counting the occurences of the keyword in the resulting articles.","timestamp":"2021-06-10T18:14:46+00:00","score":2},{"role":"answerer","user_id":"anon_4bc0bbb9acdf362d","comment_id":"h1b6w19","kind":"comment","text":"That is indeed the lowest hanging fruit. Its always best to start with the easiest solution like that, measure how well it performs, then go from there.","timestamp":"2021-06-10T18:29:01+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bba5c5aed869bc77","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4bc0bbb9acdf362d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h19iqxq","thanks_reply_id":"h1b4sr3","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_6664b5b929c3fcef","answerer_user_id":"anon_3fff459ec8a6911e","subreddit":"LanguageTechnology","timestamp":"2021-06-14T14:10:01+00:00","post_id":"nznn4m","question":"BERT: How to do sentiment analysis on a custom dataset?\n\nHello,\n\nI have seen his sentiment analysis tutorial here: [https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment?text=I+like+you.+I+love+you](https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment?text=I+like+you.+I+love+you)\n\nNow, I was wondering, how do I do such a task using my own dataset? I have list of different sentences and I want to find out the sentiment of each sentence, which can be either \"happy\", \"sad\" or \"angry\". \n\nDo I need to fine tune BERT with my own data? If so, how?\n\nThanks.","preferred_answer":"Great question. You can call \n\n`result = happy_tc.classify_text(\"I loved it\")`","full_conversation":[{"role":"OP","user_id":"anon_6664b5b929c3fcef","comment_id":"nznn4m","kind":"post","text":"BERT: How to do sentiment analysis on a custom dataset?\n\nHello,\n\nI have seen his sentiment analysis tutorial here: [https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment?text=I+like+you.+I+love+you](https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment?text=I+like+you.+I+love+you)\n\nNow, I was wondering, how do I do such a task using my own dataset? I have list of different sentences and I want to find out the sentiment of each sentence, which can be either \"happy\", \"sad\" or \"angry\". \n\nDo I need to fine tune BERT with my own data? If so, how?\n\nThanks.","timestamp":"2021-06-14T14:10:01+00:00","score":6},{"role":"answerer","user_id":"anon_3fff459ec8a6911e","comment_id":"h1vxyru","kind":"comment","text":"Great question. You can call \n\n`result = happy_tc.classify_text(\"I loved it\")`","timestamp":"2021-06-15T20:01:25+00:00","score":1},{"role":"OP","user_id":"anon_6664b5b929c3fcef","comment_id":"h1wiovg","kind":"comment","text":"Cool - thanks. And, one more thing... Is it possible to use a custom dataset and do this exact same thing, but with multi class text classification? \n\nSo, for example, if we have this sentence: \"I am feeling great.\"\n\nThe model might output the following:\n\n```\npositive\n0.92\n\nnegative\n0.05\n\nneutral\n0.03\n```","timestamp":"2021-06-15T22:38:29+00:00","score":1},{"role":"answerer","user_id":"anon_3fff459ec8a6911e","comment_id":"h1xxmxo","kind":"comment","text":"Yes! Here is an example: \n\n\nhttps://github.com/EricFillion/happy-transformer/blob/master/examples/text\\_classification/training\\_example.py","timestamp":"2021-06-16T06:53:21+00:00","score":2},{"role":"OP","user_id":"anon_6664b5b929c3fcef","comment_id":"h1yb63i","kind":"comment","text":"Nice, I'll take a look at that - thanks. Also, how do I use a custom dataset for your example? I see that you have generated a dataset.","timestamp":"2021-06-16T10:21:56+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_6664b5b929c3fcef","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3fff459ec8a6911e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h1vxyru","thanks_reply_id":"h1wiovg","post_score":6,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_9f3e87267a779e7f","answerer_user_id":"anon_4c553590a59ddc34","subreddit":"LanguageTechnology","timestamp":"2021-06-16T02:40:03+00:00","post_id":"o0ut84","question":"Best way to work into an NLP/Computational Linguist career?\n\nHi all, I hope I’ve posted this in the right place! I’ve just graduated with an undergraduate degree in linguistics with hopes to do my masters in computational linguistics, but was ultimately unsuccessful with getting into a graduate program. I have basic experience with python, R, foma, and took computational ling courses during my degree so I’m a bit familiar with CYK, FSTs, etc. I’m just wondering if there’s any entry level job I could do with little experience/no masters that would keep me in the area of computational lingusitics/NLP, or if anyone else has had any success or advice about this sort of situation? Thanks so much :)","preferred_answer":"In my case, I got a job working with NLP researchers doing really low-level, borderline not-research stuff. Project admin, data annotation, communication with stakeholders, that kind of garbage. It wasn’t interesting work but it positioned me in proximity to interesting work. In that role I sought out minor technical tasks, which grew to heavier technical tasks. Now I’m a paid machine learning engineer doing NLP research. I too only have linguistics degrees and am self-taught in everything else.\n\nMy rec to you would be:\n\n1. Go the route I did. Get a menial job at a start up annotating linguistic data. Put in the time and work your way up. It’s very rewarding.\n\n2. Keep up the self-study and do a couple projects. Take the ones you’re proud of and compile a public-facing portfolio on GitHub or another service. Use it as your resume. At the end of the day, projects speak louder than degrees.","full_conversation":[{"role":"OP","user_id":"anon_9f3e87267a779e7f","comment_id":"o0ut84","kind":"post","text":"Best way to work into an NLP/Computational Linguist career?\n\nHi all, I hope I’ve posted this in the right place! I’ve just graduated with an undergraduate degree in linguistics with hopes to do my masters in computational linguistics, but was ultimately unsuccessful with getting into a graduate program. I have basic experience with python, R, foma, and took computational ling courses during my degree so I’m a bit familiar with CYK, FSTs, etc. I’m just wondering if there’s any entry level job I could do with little experience/no masters that would keep me in the area of computational lingusitics/NLP, or if anyone else has had any success or advice about this sort of situation? Thanks so much :)","timestamp":"2021-06-16T02:40:03+00:00","score":30},{"role":"answerer","user_id":"anon_4c553590a59ddc34","comment_id":"h221izi","kind":"comment","text":"In my case, I got a job working with NLP researchers doing really low-level, borderline not-research stuff. Project admin, data annotation, communication with stakeholders, that kind of garbage. It wasn’t interesting work but it positioned me in proximity to interesting work. In that role I sought out minor technical tasks, which grew to heavier technical tasks. Now I’m a paid machine learning engineer doing NLP research. I too only have linguistics degrees and am self-taught in everything else.\n\nMy rec to you would be:\n\n1. Go the route I did. Get a menial job at a start up annotating linguistic data. Put in the time and work your way up. It’s very rewarding.\n\n2. Keep up the self-study and do a couple projects. Take the ones you’re proud of and compile a public-facing portfolio on GitHub or another service. Use it as your resume. At the end of the day, projects speak louder than degrees.","timestamp":"2021-06-17T05:14:12+00:00","score":3},{"role":"OP","user_id":"anon_9f3e87267a779e7f","comment_id":"h222u50","kind":"comment","text":"That’s super encouraging to hear, thank you so much for the insight!","timestamp":"2021-06-17T05:29:42+00:00","score":2},{"role":"answerer","user_id":"anon_4c553590a59ddc34","comment_id":"h25q85g","kind":"comment","text":"Sure! The point is that a relevant degree never hurts, but lack of one doesn’t necessarily define you (like it does in the Humanities). With STEM/hard skills, there are many ways to prove your mettle, of which degrees are just one. It’s very democratizing, really.","timestamp":"2021-06-18T01:11:35+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9f3e87267a779e7f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4c553590a59ddc34","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h221izi","thanks_reply_id":"h222u50","post_score":30,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_6f06a171985d04f1","answerer_user_id":"anon_7bc6cf21afb31572","subreddit":"LanguageTechnology","timestamp":"2021-06-27T10:39:42+00:00","post_id":"o8uoqq","question":"When to use NER and POS tagging ?\n\nI only learnt about NER and POS tagging at the beginning of my NLP journey in the textbooks (one year and half ago), but I rarely see tutorials using them, and if some tutorial use them, they couple heir use with really simple models such as linear regression or logistic regression.\n\nThis gives me the impression that NER and POS are outdated, and only being used by the veterans in the field. I might be very much wrong since I am still relatively new.\n\nMy question is, are NER and POS tagging no longer useful, or am I too blinded by the transformers trend, and they are still used in industry? And if its the latter, in which circumstances you see their use is idea?","preferred_answer":"In industry we're mostly pragmatic engineers who aren't aiming for SOTA but \"whatever works and is cheapest\".\n\nNER - perhaps in combination with some form of co-reference resolution can be useful in and of itself for some use cases: for example clients might want to group/filter documents by which people and organisations are mentioned most within them. Likewise POS tagging for identifying verb chunks and noun chunks for the purpose of metadata enrichment or to improve document retrieval is quite common. Both NER and POS are useful upstream tasks that help with co-reference resolution and entity linking.\n\nRegarding transformers and older methods \"no longer\" being useful: whilst some companies in industry (typically the well funded incumbents like FAANG and unicorns) are obsessed with transformers, the rest of the industry is decidedly /NOT/ blinded by the transformers trend.\n\nAt my company the philosophy is to start with simple models and move towards more complex modelling approaches only if you have to. If I can get ~0.93 micro F1 on a text classification problem using bag-of-words features and a logistic regression model that will happily chug through 100k inferences/min on a $25/month virtual server, it is unlikely my customer will want to pay $500/month for the same throughput and 0.96 micro F1 using a fine-tuned huggingface BERTForClassification model.\n\nWhether you're planning on getting into industry or whether you're planning on staying in academia I would strongly recommend reading around and familiarising yourself with what is now considered \"old school\". In industry you might find you're using \"old school\" methods a lot more than you are new shiny models and in academia you might find that deeply understanding old models and new models helps you to unlock new ways to think about problems and model them like [this paper](https://www.aclweb.org/anthology/2020.acl-main.630.pdf) by someone in my PhD cohort who found that combining \"old school\" LDA topic modelling with BERT contextual embeddings improved their model performance at semantic similarity detection.","full_conversation":[{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"o8uoqq","kind":"post","text":"When to use NER and POS tagging ?\n\nI only learnt about NER and POS tagging at the beginning of my NLP journey in the textbooks (one year and half ago), but I rarely see tutorials using them, and if some tutorial use them, they couple heir use with really simple models such as linear regression or logistic regression.\n\nThis gives me the impression that NER and POS are outdated, and only being used by the veterans in the field. I might be very much wrong since I am still relatively new.\n\nMy question is, are NER and POS tagging no longer useful, or am I too blinded by the transformers trend, and they are still used in industry? And if its the latter, in which circumstances you see their use is idea?","timestamp":"2021-06-27T10:39:42+00:00","score":15},{"role":"answerer","user_id":"anon_7bc6cf21afb31572","comment_id":"h37aqci","kind":"comment","text":"In industry we're mostly pragmatic engineers who aren't aiming for SOTA but \"whatever works and is cheapest\".\n\nNER - perhaps in combination with some form of co-reference resolution can be useful in and of itself for some use cases: for example clients might want to group/filter documents by which people and organisations are mentioned most within them. Likewise POS tagging for identifying verb chunks and noun chunks for the purpose of metadata enrichment or to improve document retrieval is quite common. Both NER and POS are useful upstream tasks that help with co-reference resolution and entity linking.\n\nRegarding transformers and older methods \"no longer\" being useful: whilst some companies in industry (typically the well funded incumbents like FAANG and unicorns) are obsessed with transformers, the rest of the industry is decidedly /NOT/ blinded by the transformers trend.\n\nAt my company the philosophy is to start with simple models and move towards more complex modelling approaches only if you have to. If I can get ~0.93 micro F1 on a text classification problem using bag-of-words features and a logistic regression model that will happily chug through 100k inferences/min on a $25/month virtual server, it is unlikely my customer will want to pay $500/month for the same throughput and 0.96 micro F1 using a fine-tuned huggingface BERTForClassification model.\n\nWhether you're planning on getting into industry or whether you're planning on staying in academia I would strongly recommend reading around and familiarising yourself with what is now considered \"old school\". In industry you might find you're using \"old school\" methods a lot more than you are new shiny models and in academia you might find that deeply understanding old models and new models helps you to unlock new ways to think about problems and model them like [this paper](https://www.aclweb.org/anthology/2020.acl-main.630.pdf) by someone in my PhD cohort who found that combining \"old school\" LDA topic modelling with BERT contextual embeddings improved their model performance at semantic similarity detection.","timestamp":"2021-06-27T11:33:32+00:00","score":21},{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"h37gw1o","kind":"comment","text":"Thanks for this answer, that was exactly what I was looking for.\n\nWould you recommend some repos, resources where I can find examples of using \"classical NLP\" to solve these tasks.","timestamp":"2021-06-27T12:52:26+00:00","score":2},{"role":"answerer","user_id":"anon_7bc6cf21afb31572","comment_id":"h37kdum","kind":"comment","text":"No problem! Before transformers (and deep learning in general) the Conditional Random Fields model (a graphical models that learns probabilistic transitions between inputs - similar to HMMs) was considered best in class for sequence classification tasks like NER and POS. I'd highly recommend the [sklearn-crfsuite tutorial](https://sklearn-crfsuite.readthedocs.io/en/latest/tutorial.html) as a really nice accessible starting point for using CRF in a practical setting with a real NER corpus (CONLL 2002). If you'd like to know more about the theory behind CRF the [original paper](https://repository.upenn.edu/cgi/viewcontent.cgi?article=1162&context=cis_papers) might be worth a read but I found it quite dense. [this primer](https://people.cs.umass.edu/~wallach/technical_reports/wallach04conditional.pdf) by Hannah Wallach is a pretty good summary of the key mechanisms at play.\n\nBonus: between pure CRF and Transformers - around the 2015-2017 mark - state-of-the-art NER performance was set by using an LSTM to encode your document and then passing the encoded sequence into a CRF. See [here](http://export.arxiv.org/abs/1508.01991) for one of the original papers and [here](https://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html) for an example implementation in PyTorch.","timestamp":"2021-06-27T13:30:05+00:00","score":3},{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"h37nc1z","kind":"comment","text":"I will check them out, thank you again.","timestamp":"2021-06-27T13:59:05+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_6f06a171985d04f1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7bc6cf21afb31572","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h37aqci","thanks_reply_id":"h37gw1o","post_score":15,"answer_score":21,"preferred_answer_is_top_level":true}} {"user_id":"anon_265e0bd585fd0dfc","answerer_user_id":"anon_a38ef0ad655ed76e","subreddit":"LanguageTechnology","timestamp":"2021-07-09T17:31:54+00:00","post_id":"oh0g9u","question":"Those pursuing a PhD in NLP related fields in the US - how's the course going for you?\n\nThose pursuing a PhD in NLP related fields - how's it going for you? How do you cope with the publication pressure? Are you still interested in your research? \n\nBackground: I have a PhD offer in NLP, but Im on the fence about going back to school - I do love working on new problems and trying to find solutions from scratch - seeing what works, what doesn't and why.. But I'm terrified of the publication pressure ( academic twitter scares me ). I'm probably not that fascinated by the idea of publishing papers. \n\nAny insight on how you deal with it? Is it a lot pressure around conference deadlines? How do you manage the long term goal vs short term deadlines?\n\nThanks!","preferred_answer":"First of all, congratulations on receiving a PhD offer! I think this is a valuable set of questions to ask, particularly at the front-end of a potential PhD program. Before I comment on your question, I want to include a disclaimer: I do academic research (as a PhD), applying NLP tools to problems specific to my own discipline (which isn't NLP). Thus, I can't--and shouldn't--speak to what publication pressure is like specific to NLP. Having said that, here are my thoughts on what you asked:\n\n> I do love working on new problems and trying to find solutions from scratch - seeing what works, what doesn't and why..\n\nI think this kind of curiosity is valuable as you consider academic work. At some point, your primary job will involve working to address *unsolved* problems. There is rarely (if ever) a roadmap in academic research, so a willingness to dive in, explore deeply, and continually try (and fail) is a necessary path to success in research. \n\n> I'm terrified of the publication pressure ( academic twitter scares me )\n\nThere's no perfect solution here. Some best practices I've seen (and sought to incorporate): (i) Establish strong mentorship relationships early on and invest deeply in them, collaborating with others who are more experienced and *successful* (i.e., agreeable, prolific, and well-regarded internally and externally to your institution)--they can set you up for later success in knowing how to lead and publish your own projects, (ii) Spend a little time each week keeping up with the latest research, setting up email notifications when new publications or conference papers are released--never stop reading, (iii) Practice presenting your ideas and receiving feedback from others--when others offer their feedback, remember that they are *investing* in you. \n\nMore on point (iii): Often, the amount of pushback you receive for an idea correlates strongly with their level of interest in the subject matter--when you're receiving this feedback, try your best to be a student of what they have to say--i.e. be in a *learning* posture. Leave any and all defensiveness at the door; say GOODBYE to your ego, but also be willing to clarify why you took a specific approach that you did when pressed. You can always disagree with them later and take your paper/project in an entirely different direction, but when receiving feedback, be an undistracted listener. This kind of attitude is critical in the publication process, as you'll often need to juggle several (sometimes conflicting) points of feedback. Gratitude, competence, and humble confidence go a long way in the publication process. Publishing is largely about contribution (knowing what has been said and its key limitations), communication (speaking clearly, simply), competence (precision/appropriateness in concepts and methodology), and accommodation (managing coauthors' and the editorial team's feedback).\n\n> I'm probably not that fascinated by the idea of publishing papers.\n\nDo you think this is tied to the fear you mentioned about the publishing process, or something else? Does the idea of crafting a publication and contributing knowledge in that specific way interest you? If not, there are certainly other avenues (outside of academia) that can let you explore novel problems and work hard to solve them. \n\n> Any insight on how you deal with it?\n\nThis works for me, but it might not for you. I tell myself two things: (1) My life is not about tenure or recognition, and (2) I do not publish for tenure or the recognition of others. With respect to \"(1) My life is not about tenure\"--tenure is not \"the\" thing I'm working toward, nor is it the reason why I'm doing the research I'm doing. (Sure, it can influence how I navigate project timelines, but it is not the WHY behind the projects I undertake). My tenure decision process will come and go--I will pass or fail--and publication pressure will wax or wane based on a whole litany of factors. At the end of the day, I choose to believe (and pray/seek the advice and observations of friends and family) to ensure that who I am is not defined by how my peers view me but whether I was honest in my work and committed to things that matter more to me. I also try to get involved in non-work related hobbies, things that I genuinely enjoy that take my mind off of comparisons and work-related pressures. No one has my specific convictions, my family obligations, and my exact situation, so I can work confidently when I'm on the clock and genuinely rest when I know i've put in the effort to make progress (even if that day's progress seems minimal--at least I'm being consistent). Progress begets progress and publications are a natural byproduct of submissions--so I tell myself to keep writing and keep submitting.\n\n> Is it a lot pressure around conference deadlines?\n\nIt can be, especially when juggling multiple projects at different stages. But it's all about pacing--these deadlines are often cyclical, allowing you to prepare well in advance. Deadlines help me stay productive, however, so typically I will aim to submit one or more new conference papers each year to grow my network and invest in my friendships with other professors around the world. \n\n> How do you manage the long term goal vs short term deadlines?\n\nResearch work can be very long-tailed. You may start a project in 2021 but not submit it for peer review (particularly to a well-regarded conference or journal) until years later. In my field, publications matter more than conference proceedings, although both are respected for different reasons. In my work, I aim to attend a minimum of two annual conferences as motivators to make continued progress. The earlier of these two conferences asks for short paper proposals with preliminary data (sometimes), whereas the other expects polished, full-length manuscripts. Thus, I typically take a project at the idea-phase and craft it into a proposal for the first conference and polish it for the second one--this is a norm in my field. There's no easy solution to how long and how failure-prone research can be. What I do is the strategy above, plus ensure I'm working with productive coauthors (who I like!) and on multiple project simultaneously. I will also communicate clearly if/when I need to step back or off of a project--sometimes things just get overwhelming, and that's ok.","full_conversation":[{"role":"OP","user_id":"anon_265e0bd585fd0dfc","comment_id":"oh0g9u","kind":"post","text":"Those pursuing a PhD in NLP related fields in the US - how's the course going for you?\n\nThose pursuing a PhD in NLP related fields - how's it going for you? How do you cope with the publication pressure? Are you still interested in your research? \n\nBackground: I have a PhD offer in NLP, but Im on the fence about going back to school - I do love working on new problems and trying to find solutions from scratch - seeing what works, what doesn't and why.. But I'm terrified of the publication pressure ( academic twitter scares me ). I'm probably not that fascinated by the idea of publishing papers. \n\nAny insight on how you deal with it? Is it a lot pressure around conference deadlines? How do you manage the long term goal vs short term deadlines?\n\nThanks!","timestamp":"2021-07-09T17:31:54+00:00","score":22},{"role":"answerer","user_id":"anon_a38ef0ad655ed76e","comment_id":"h4mcrpx","kind":"comment","text":"First of all, congratulations on receiving a PhD offer! I think this is a valuable set of questions to ask, particularly at the front-end of a potential PhD program. Before I comment on your question, I want to include a disclaimer: I do academic research (as a PhD), applying NLP tools to problems specific to my own discipline (which isn't NLP). Thus, I can't--and shouldn't--speak to what publication pressure is like specific to NLP. Having said that, here are my thoughts on what you asked:\n\n> I do love working on new problems and trying to find solutions from scratch - seeing what works, what doesn't and why..\n\nI think this kind of curiosity is valuable as you consider academic work. At some point, your primary job will involve working to address *unsolved* problems. There is rarely (if ever) a roadmap in academic research, so a willingness to dive in, explore deeply, and continually try (and fail) is a necessary path to success in research. \n\n> I'm terrified of the publication pressure ( academic twitter scares me )\n\nThere's no perfect solution here. Some best practices I've seen (and sought to incorporate): (i) Establish strong mentorship relationships early on and invest deeply in them, collaborating with others who are more experienced and *successful* (i.e., agreeable, prolific, and well-regarded internally and externally to your institution)--they can set you up for later success in knowing how to lead and publish your own projects, (ii) Spend a little time each week keeping up with the latest research, setting up email notifications when new publications or conference papers are released--never stop reading, (iii) Practice presenting your ideas and receiving feedback from others--when others offer their feedback, remember that they are *investing* in you. \n\nMore on point (iii): Often, the amount of pushback you receive for an idea correlates strongly with their level of interest in the subject matter--when you're receiving this feedback, try your best to be a student of what they have to say--i.e. be in a *learning* posture. Leave any and all defensiveness at the door; say GOODBYE to your ego, but also be willing to clarify why you took a specific approach that you did when pressed. You can always disagree with them later and take your paper/project in an entirely different direction, but when receiving feedback, be an undistracted listener. This kind of attitude is critical in the publication process, as you'll often need to juggle several (sometimes conflicting) points of feedback. Gratitude, competence, and humble confidence go a long way in the publication process. Publishing is largely about contribution (knowing what has been said and its key limitations), communication (speaking clearly, simply), competence (precision/appropriateness in concepts and methodology), and accommodation (managing coauthors' and the editorial team's feedback).\n\n> I'm probably not that fascinated by the idea of publishing papers.\n\nDo you think this is tied to the fear you mentioned about the publishing process, or something else? Does the idea of crafting a publication and contributing knowledge in that specific way interest you? If not, there are certainly other avenues (outside of academia) that can let you explore novel problems and work hard to solve them. \n\n> Any insight on how you deal with it?\n\nThis works for me, but it might not for you. I tell myself two things: (1) My life is not about tenure or recognition, and (2) I do not publish for tenure or the recognition of others. With respect to \"(1) My life is not about tenure\"--tenure is not \"the\" thing I'm working toward, nor is it the reason why I'm doing the research I'm doing. (Sure, it can influence how I navigate project timelines, but it is not the WHY behind the projects I undertake). My tenure decision process will come and go--I will pass or fail--and publication pressure will wax or wane based on a whole litany of factors. At the end of the day, I choose to believe (and pray/seek the advice and observations of friends and family) to ensure that who I am is not defined by how my peers view me but whether I was honest in my work and committed to things that matter more to me. I also try to get involved in non-work related hobbies, things that I genuinely enjoy that take my mind off of comparisons and work-related pressures. No one has my specific convictions, my family obligations, and my exact situation, so I can work confidently when I'm on the clock and genuinely rest when I know i've put in the effort to make progress (even if that day's progress seems minimal--at least I'm being consistent). Progress begets progress and publications are a natural byproduct of submissions--so I tell myself to keep writing and keep submitting.\n\n> Is it a lot pressure around conference deadlines?\n\nIt can be, especially when juggling multiple projects at different stages. But it's all about pacing--these deadlines are often cyclical, allowing you to prepare well in advance. Deadlines help me stay productive, however, so typically I will aim to submit one or more new conference papers each year to grow my network and invest in my friendships with other professors around the world. \n\n> How do you manage the long term goal vs short term deadlines?\n\nResearch work can be very long-tailed. You may start a project in 2021 but not submit it for peer review (particularly to a well-regarded conference or journal) until years later. In my field, publications matter more than conference proceedings, although both are respected for different reasons. In my work, I aim to attend a minimum of two annual conferences as motivators to make continued progress. The earlier of these two conferences asks for short paper proposals with preliminary data (sometimes), whereas the other expects polished, full-length manuscripts. Thus, I typically take a project at the idea-phase and craft it into a proposal for the first conference and polish it for the second one--this is a norm in my field. There's no easy solution to how long and how failure-prone research can be. What I do is the strategy above, plus ensure I'm working with productive coauthors (who I like!) and on multiple project simultaneously. I will also communicate clearly if/when I need to step back or off of a project--sometimes things just get overwhelming, and that's ok.","timestamp":"2021-07-09T18:46:59+00:00","score":27},{"role":"OP","user_id":"anon_265e0bd585fd0dfc","comment_id":"h4v7z5w","kind":"comment","text":"Thank you so much for such a detailed answer! Is it ok if I dm you with some specific questions?","timestamp":"2021-07-12T00:23:59+00:00","score":3},{"role":"answerer","user_id":"anon_a38ef0ad655ed76e","comment_id":"h4v8jp2","kind":"comment","text":"You’re welcome. And sure, please feel welcome to.","timestamp":"2021-07-12T00:29:10+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_265e0bd585fd0dfc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a38ef0ad655ed76e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h4mcrpx","thanks_reply_id":"h4v7z5w","post_score":22,"answer_score":27,"preferred_answer_is_top_level":true}} {"user_id":"anon_6f06a171985d04f1","answerer_user_id":"anon_dae80ba3203187fc","subreddit":"LanguageTechnology","timestamp":"2021-07-13T01:59:12+00:00","post_id":"oj5rwt","question":"What are my options for deploying pre-trained language models?\n\nI have pretrained T5 and Roberta model fine-tuned to solve some business analytics task. I want to deploy the models and I am not sure where to start, Heroku doesn't seem to support GPU hardware and the Ram is too small. \n\nIdeally if there is a platform where you can pay as you use, because inference would be ran once a day, so most of the time the models would be idle.\n\nThank you.","preferred_answer":"Batch predictions on any of the cloud hosted servers. You usually pay for what you use, compute wise, and you'll need to pay storage (much cheaper) for both the trained model & the model outputs table. \n \nAmazon EC2, Google Cloud, or Azure are the \"big 3\" but there are other options as well, some even specialize in Tensor compute or GPU compute. \n \nYou'll need to configure your instance to boot up once per day, run & save the predictions, then turn itself off. \n \nIf you can find an online class or detailed blog on \"ML Ops\" that might help you.","full_conversation":[{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"oj5rwt","kind":"post","text":"What are my options for deploying pre-trained language models?\n\nI have pretrained T5 and Roberta model fine-tuned to solve some business analytics task. I want to deploy the models and I am not sure where to start, Heroku doesn't seem to support GPU hardware and the Ram is too small. \n\nIdeally if there is a platform where you can pay as you use, because inference would be ran once a day, so most of the time the models would be idle.\n\nThank you.","timestamp":"2021-07-13T01:59:12+00:00","score":1},{"role":"answerer","user_id":"anon_dae80ba3203187fc","comment_id":"h4zy296","kind":"comment","text":"Batch predictions on any of the cloud hosted servers. You usually pay for what you use, compute wise, and you'll need to pay storage (much cheaper) for both the trained model & the model outputs table. \n \nAmazon EC2, Google Cloud, or Azure are the \"big 3\" but there are other options as well, some even specialize in Tensor compute or GPU compute. \n \nYou'll need to configure your instance to boot up once per day, run & save the predictions, then turn itself off. \n \nIf you can find an online class or detailed blog on \"ML Ops\" that might help you.","timestamp":"2021-07-13T03:24:24+00:00","score":2},{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"h4zygp1","kind":"comment","text":"Thank you for you response, is there a particular service that you would point me at to so I can dig into it. I'd be more than happy to learn about ML Ops but for now this project is pressing me in time.\n\n And approximately, if I use 20 minutes daily compute time using a K80 GPU for example, how much would it cost monthly?","timestamp":"2021-07-13T03:28:25+00:00","score":1},{"role":"answerer","user_id":"anon_dae80ba3203187fc","comment_id":"h4zza21","kind":"comment","text":"I wish I was more up to date with current training and pricing, but I'm fairly disconnected with all that. \n \nI found this post, which may help, depending on the size of T5. \n \nhttps://www.reddit.com/r/MachineLearning/comments/la7o0q/p_deploying_ml_models_on_a_budget","timestamp":"2021-07-13T03:36:26+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6f06a171985d04f1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dae80ba3203187fc","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h4zy296","thanks_reply_id":"h4zygp1","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_6b225e329121b0a6","answerer_user_id":"anon_df4d1b89306e6027","subreddit":"LanguageTechnology","timestamp":"2021-07-14T17:24:16+00:00","post_id":"ok9432","question":"How to identify frequently asked questions based on the dataset of all questions ever asked?\n\nHi everyone, \n\n\nso I'm frontend developer totally new to NLP tools, so please bare with me 🙏I would like to create chatbot that will be using FAQ as response. I know how to do the frontend part and I plan to connect it to IBM Watson where I will hold my intents/entities. But I have problem with data processing. I have database with couple thousands of questions and I'm not even sure how/from where to start. \n\n\nWhat I would like to retrieve from that database: \n\\- Frequently asked question. I could see when I skimmed through them that a lot of question repeated itself. \n\\- Retrieve categories from there, like \"issues with account\", \"privacy\", \"technical difficulties\". \n\n\nIs it out of reach for a newbie? \nThank you a lot!","preferred_answer":"2nd is far easier than the 1st, at least to my mind. That’s a standard classification problem, just with text data in this case. As with most classification problems, you’re going to need some training data, those will be questions whose categories you’ve manually labelled. Once you’ve labelled the data you need to choose a technique that will convert from the raw text to a numerical representation (a long list of numbers that captures the text data in some way). I’d recommend looking up tf-idf and Doc2Vec as two possibilities for that. Start with tf-idf, it’s simpler to set up and more intuitive to understand how it takes the text and returns a vector that represents it. From there you should be able to copy/adapt examples of classification tasks from tutorials/a book as a first attempt, logistic regression would probably be the one to start with.\n\nAs for determining which questions are frequently asked, that’s much tricker unless you’re going to predetermine what categories of frequent questions there are and label data as above. If you want to learn from the data what types of frequently asked question there are without labelling then that’s a clustering task - you want to group together similar questions without knowing beforehand which goes with which. This is not difficult to set up but it’s very unlikely that it’s going to give you results to a standard that you’d be happy presenting on a front end, at least in my experience. You’d be better off doing some clustering analysis on this to learn what types of questions are frequently asked, then manually choosing or writing answers for them which can be displayed to an end user. Clustering tends to be messy, you will get some odd clusters on pretty much any real world example in my experience.\n\nAlso if you’re just starting out with this you should start by learning basic concepts of machine learning; train, test and validation sets, supervised/unsupervised learning, precision and recall etc are all concepts you need to be familiar with if you want to do this in the proper way. Most introductory data science/ML textbooks will cover these in the first few chapters, I can recommend one if you’d like but most will do a decent job with these. \n\nLastly, should say that when I say parts of this as “easy” I mean easy to set up and code and get results. that doesn’t mean it’ll be easy to get results at the standard you want for your application I.e. it’s easy to build a model, it just may not be a good one.","full_conversation":[{"role":"OP","user_id":"anon_6b225e329121b0a6","comment_id":"ok9432","kind":"post","text":"How to identify frequently asked questions based on the dataset of all questions ever asked?\n\nHi everyone, \n\n\nso I'm frontend developer totally new to NLP tools, so please bare with me 🙏I would like to create chatbot that will be using FAQ as response. I know how to do the frontend part and I plan to connect it to IBM Watson where I will hold my intents/entities. But I have problem with data processing. I have database with couple thousands of questions and I'm not even sure how/from where to start. \n\n\nWhat I would like to retrieve from that database: \n\\- Frequently asked question. I could see when I skimmed through them that a lot of question repeated itself. \n\\- Retrieve categories from there, like \"issues with account\", \"privacy\", \"technical difficulties\". \n\n\nIs it out of reach for a newbie? \nThank you a lot!","timestamp":"2021-07-14T17:24:16+00:00","score":2},{"role":"answerer","user_id":"anon_df4d1b89306e6027","comment_id":"h56riw3","kind":"comment","text":"2nd is far easier than the 1st, at least to my mind. That’s a standard classification problem, just with text data in this case. As with most classification problems, you’re going to need some training data, those will be questions whose categories you’ve manually labelled. Once you’ve labelled the data you need to choose a technique that will convert from the raw text to a numerical representation (a long list of numbers that captures the text data in some way). I’d recommend looking up tf-idf and Doc2Vec as two possibilities for that. Start with tf-idf, it’s simpler to set up and more intuitive to understand how it takes the text and returns a vector that represents it. From there you should be able to copy/adapt examples of classification tasks from tutorials/a book as a first attempt, logistic regression would probably be the one to start with.\n\nAs for determining which questions are frequently asked, that’s much tricker unless you’re going to predetermine what categories of frequent questions there are and label data as above. If you want to learn from the data what types of frequently asked question there are without labelling then that’s a clustering task - you want to group together similar questions without knowing beforehand which goes with which. This is not difficult to set up but it’s very unlikely that it’s going to give you results to a standard that you’d be happy presenting on a front end, at least in my experience. You’d be better off doing some clustering analysis on this to learn what types of questions are frequently asked, then manually choosing or writing answers for them which can be displayed to an end user. Clustering tends to be messy, you will get some odd clusters on pretty much any real world example in my experience.\n\nAlso if you’re just starting out with this you should start by learning basic concepts of machine learning; train, test and validation sets, supervised/unsupervised learning, precision and recall etc are all concepts you need to be familiar with if you want to do this in the proper way. Most introductory data science/ML textbooks will cover these in the first few chapters, I can recommend one if you’d like but most will do a decent job with these. \n\nLastly, should say that when I say parts of this as “easy” I mean easy to set up and code and get results. that doesn’t mean it’ll be easy to get results at the standard you want for your application I.e. it’s easy to build a model, it just may not be a good one.","timestamp":"2021-07-14T19:14:19+00:00","score":4},{"role":"OP","user_id":"anon_6b225e329121b0a6","comment_id":"h5bbdtu","kind":"comment","text":"Thank you for your help, it’s really clear up some stuff. Also I would really appreciate if you could share the tittle of the book/s you mentioned.","timestamp":"2021-07-15T19:56:07+00:00","score":1},{"role":"answerer","user_id":"anon_df4d1b89306e6027","comment_id":"h5eihlw","kind":"comment","text":"Hand on Machine Learning with Scikit-Learn, Keras and Tensorflow has a good introduction on the topics mentioned and has practical examples of using various classification techniques and dealing with common issues. I’d start there. There’s free pdf versions of it online (they’re legal if that’s a concern).","timestamp":"2021-07-16T14:49:17+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6b225e329121b0a6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_df4d1b89306e6027","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h56riw3","thanks_reply_id":"h5bbdtu","post_score":2,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_6f06a171985d04f1","answerer_user_id":"anon_c2da325de72909a3","subreddit":"LanguageTechnology","timestamp":"2021-07-16T17:10:31+00:00","post_id":"oll8s8","question":"How would you go about deploying transformer based model?\n\nI am studying the options I have in deploying an mT5 model and a Roberta model on the cloud. I am mainly considering google cloud, but I am still open for different suggestions.\n\nFrom what I understood, I have the choice of either using Google Compute Engine or Vertex AI stack, however the latter seems to be geared toward non-coding people.\n\nI have the model fine tuned and ready.","preferred_answer":"I honestly don’t have experience deploying these models. But there are lots of resources for optimizing inference on cpu for these models. Like using onnx and quantization https://discuss.huggingface.co/t/speeding-up-t5-inference/1841. \n\nIf you need gpu then be prepared to pay for it. And I think you’ll have to reserve hours of gpu time unlike aws lambda where you pay per inference.\n\nEdit —\n\nOther option is aws batch which does have gpu for scheduled jobs.","full_conversation":[{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"oll8s8","kind":"post","text":"How would you go about deploying transformer based model?\n\nI am studying the options I have in deploying an mT5 model and a Roberta model on the cloud. I am mainly considering google cloud, but I am still open for different suggestions.\n\nFrom what I understood, I have the choice of either using Google Compute Engine or Vertex AI stack, however the latter seems to be geared toward non-coding people.\n\nI have the model fine tuned and ready.","timestamp":"2021-07-16T17:10:31+00:00","score":11},{"role":"answerer","user_id":"anon_c2da325de72909a3","comment_id":"h5gbhe4","kind":"comment","text":"I honestly don’t have experience deploying these models. But there are lots of resources for optimizing inference on cpu for these models. Like using onnx and quantization https://discuss.huggingface.co/t/speeding-up-t5-inference/1841. \n\nIf you need gpu then be prepared to pay for it. And I think you’ll have to reserve hours of gpu time unlike aws lambda where you pay per inference.\n\nEdit —\n\nOther option is aws batch which does have gpu for scheduled jobs.","timestamp":"2021-07-16T22:43:16+00:00","score":2},{"role":"OP","user_id":"anon_6f06a171985d04f1","comment_id":"h5gf109","kind":"comment","text":"Thanks for the suggestions, they look interesting\n\nCan I DM you please, I have more questions, thank you!","timestamp":"2021-07-16T23:12:18+00:00","score":2},{"role":"answerer","user_id":"anon_c2da325de72909a3","comment_id":"h5gt34g","kind":"comment","text":"Sure, feel free to DM me!","timestamp":"2021-07-17T01:12:31+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6f06a171985d04f1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c2da325de72909a3","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h5gbhe4","thanks_reply_id":"h5gf109","post_score":11,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_8923321e579d5261","answerer_user_id":"anon_dcce0c8c18753a5c","subreddit":"LanguageTechnology","timestamp":"2021-07-23T07:48:03+00:00","post_id":"opxlnq","question":"Automating 3D Modeling using NLP\n\nI would like to know if there is any way we can automate 3D modeling processes. Like if I give the model a text input such as \"create a sphere and give it a red color\" and the we need to get the model. To be precise, I would like to create a bot that can perform actions in a software such as blender, like I tell the bot what I would like to do and then it does it. Any idea how can I achieve this?","preferred_answer":"This is a great idea; the 3D modeling process is so time-consuming and expensive as it stands now. There are a couple of different approaches you could take, one of which would be to label a lot of 3D models and train or fine-tune a model on a markup corpus (e.g. X3D). However before doing this it might be interesting to try using the one-shot learning capabilities of a massive NLP model such as GPT-J… i.e. include a few simple X3D samples in the prompt and see what the result looks like!","full_conversation":[{"role":"OP","user_id":"anon_8923321e579d5261","comment_id":"opxlnq","kind":"post","text":"Automating 3D Modeling using NLP\n\nI would like to know if there is any way we can automate 3D modeling processes. Like if I give the model a text input such as \"create a sphere and give it a red color\" and the we need to get the model. To be precise, I would like to create a bot that can perform actions in a software such as blender, like I tell the bot what I would like to do and then it does it. Any idea how can I achieve this?","timestamp":"2021-07-23T07:48:03+00:00","score":9},{"role":"answerer","user_id":"anon_dcce0c8c18753a5c","comment_id":"h68i3ne","kind":"comment","text":"This is a great idea; the 3D modeling process is so time-consuming and expensive as it stands now. There are a couple of different approaches you could take, one of which would be to label a lot of 3D models and train or fine-tune a model on a markup corpus (e.g. X3D). However before doing this it might be interesting to try using the one-shot learning capabilities of a massive NLP model such as GPT-J… i.e. include a few simple X3D samples in the prompt and see what the result looks like!","timestamp":"2021-07-23T11:10:55+00:00","score":4},{"role":"OP","user_id":"anon_8923321e579d5261","comment_id":"h69hhiz","kind":"comment","text":"Hey thanks for that, can you share with me the X3d corpus link or any other corpus that can help me?","timestamp":"2021-07-23T16:11:16+00:00","score":2},{"role":"answerer","user_id":"anon_dcce0c8c18753a5c","comment_id":"h69j1fi","kind":"comment","text":"See my reply to my own comment. Not X3D, but a similar format, and apparently 100,000 models available for free download. You may need to write a spider/crawler to build your corpus up.","timestamp":"2021-07-23T16:22:18+00:00","score":2},{"role":"OP","user_id":"anon_8923321e579d5261","comment_id":"h6ai7ud","kind":"comment","text":"Yeah I probably will do that","timestamp":"2021-07-23T20:39:42+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_8923321e579d5261","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dcce0c8c18753a5c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h68i3ne","thanks_reply_id":"h69hhiz","post_score":9,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_6b3503110c3c6ad1","answerer_user_id":"anon_3fefd543e87fc264","subreddit":"LanguageTechnology","timestamp":"2021-07-24T04:43:19+00:00","post_id":"oqj6g2","question":"Text Classification using word embeddings (bert based): In most of the architectures/ implementations I see on github, people get the token ids and pass it to the model rather than getting the embeddings from any Transformer encoder model and feeding it to say CNNs for text Classification.\n\nWhat exactly am I missing; why is the former the go to method? Or am I wrong?","preferred_answer":"I have to say that I usually see what you say you don't see: common transfer learning pattern is use a pretrained tokenizer from huggingface, pass token ids to pretrained model, take last layer outputs of model and pass to downstream domain specific network","full_conversation":[{"role":"OP","user_id":"anon_6b3503110c3c6ad1","comment_id":"oqj6g2","kind":"post","text":"Text Classification using word embeddings (bert based): In most of the architectures/ implementations I see on github, people get the token ids and pass it to the model rather than getting the embeddings from any Transformer encoder model and feeding it to say CNNs for text Classification.\n\nWhat exactly am I missing; why is the former the go to method? Or am I wrong?","timestamp":"2021-07-24T04:43:19+00:00","score":5},{"role":"answerer","user_id":"anon_3fefd543e87fc264","comment_id":"h6dhi8f","kind":"comment","text":"I have to say that I usually see what you say you don't see: common transfer learning pattern is use a pretrained tokenizer from huggingface, pass token ids to pretrained model, take last layer outputs of model and pass to downstream domain specific network","timestamp":"2021-07-24T15:34:08+00:00","score":2},{"role":"OP","user_id":"anon_6b3503110c3c6ad1","comment_id":"h6diu71","kind":"comment","text":"Thanks for the reply, why do we need tokens in the first place, can't we just use the fixed sized embeddings/vectors of each document ?","timestamp":"2021-07-24T15:44:41+00:00","score":1},{"role":"answerer","user_id":"anon_3fefd543e87fc264","comment_id":"h6edluu","kind":"comment","text":"It sounds like you have a very specific problem and codebase in mind. But generally you would need the tokenizer to even be able to access the embeddings?\n\nAnd you could just grab the embedding output rather than the pool of the last hidden layers I guess, but probably wouldn't work as well","timestamp":"2021-07-24T19:56:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6b3503110c3c6ad1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3fefd543e87fc264","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h6dhi8f","thanks_reply_id":"h6diu71","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_64a40d3f1aaf6032","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2021-07-27T18:32:27+00:00","post_id":"ossg76","question":"DFM --> Topic model\n\nHi, I've been trying all day to convert my DFM -> topic model. Im using the Quanteda tutorials. The code works all the way until:\n\ndtm= convert(dfm, to= \"topicmodel\")\n\nupon which, I get the following error message:\n\nError in convert(dfm, to = \"topicmodel\") : unused argument (to = \"topicmodel\")\nhelp??","preferred_answer":"Ok. When I did those things in R I used the topicmodel library and computed the model as such (eg with k = 10). I don't think quanteda can train topic models itself.\n\n```\ntm <- LDA(doctermmatrix, 10, method=\"Gibbs\", control=list(iter = 1000, seed = 69, verbose = 25))\n```","full_conversation":[{"role":"OP","user_id":"anon_64a40d3f1aaf6032","comment_id":"ossg76","kind":"post","text":"DFM --> Topic model\n\nHi, I've been trying all day to convert my DFM -> topic model. Im using the Quanteda tutorials. The code works all the way until:\n\ndtm= convert(dfm, to= \"topicmodel\")\n\nupon which, I get the following error message:\n\nError in convert(dfm, to = \"topicmodel\") : unused argument (to = \"topicmodel\")\nhelp??","timestamp":"2021-07-27T18:32:27+00:00","score":0},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"h6r1z1i","kind":"comment","text":"Ok. When I did those things in R I used the topicmodel library and computed the model as such (eg with k = 10). I don't think quanteda can train topic models itself.\n\n```\ntm <- LDA(doctermmatrix, 10, method=\"Gibbs\", control=list(iter = 1000, seed = 69, verbose = 25))\n```","timestamp":"2021-07-27T20:53:45+00:00","score":2},{"role":"OP","user_id":"anon_64a40d3f1aaf6032","comment_id":"h6rsirc","kind":"comment","text":"Thank you for the reply- this is the error message I'm getting with that code:\n\nEach row of the input matrix needs to contain at least one non-zero entry","timestamp":"2021-07-28T00:18:48+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"h6spwy9","kind":"comment","text":"It might be that with whatever preprocessing you do before creating the document-term matrix you end up with empty documents. Perhaps try to remove those empty rows before feeding the matrix to the LDA thingy","timestamp":"2021-07-28T05:18:17+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_64a40d3f1aaf6032","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h6r1z1i","thanks_reply_id":"h6rsirc","post_score":0,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_63a95cce8578f8e8","answerer_user_id":"anon_32541b749faaac21","subreddit":"LanguageTechnology","timestamp":"2021-08-03T12:50:27+00:00","post_id":"ox2ssp","question":"Watson Assistant - what do you think?\n\nHey there,\nI'm considering using Watson Assistant to build my app with. I would like to hear from others experience - how good is it? I care less about intuitive APIs and more about performance and configurability, how good and fast is it getting fluent in new domains and dialog flows?\nAre there better alternatives?\nThanks","preferred_answer":"Which part are you using or are interested in? There are so many services and APIs associated with Watson. \nGenerally speaking they cover a lot (if not almost any) of the NLP tasks. \nIn practice it was/is quite a bummer. \nSee this recent NYT article about how the marketing over promised the capabilities and how the whole system failed to gain wider traction: https://www.nytimes.com/2021/07/16/technology/what-happened-ibm-watson.html\nRegarding personal experience: I haven’t any public data to show, but we evaluated once in the company internally and it was always worse than other custom solutions for Sentiment Analysis and Named Entity Recognition. \nIf you are using it for a dialogue/chat bot I would recommend the open source Rasa library. \nI hope this helps.","full_conversation":[{"role":"OP","user_id":"anon_63a95cce8578f8e8","comment_id":"ox2ssp","kind":"post","text":"Watson Assistant - what do you think?\n\nHey there,\nI'm considering using Watson Assistant to build my app with. I would like to hear from others experience - how good is it? I care less about intuitive APIs and more about performance and configurability, how good and fast is it getting fluent in new domains and dialog flows?\nAre there better alternatives?\nThanks","timestamp":"2021-08-03T12:50:27+00:00","score":1},{"role":"answerer","user_id":"anon_32541b749faaac21","comment_id":"h7jrj5o","kind":"comment","text":"Which part are you using or are interested in? There are so many services and APIs associated with Watson. \nGenerally speaking they cover a lot (if not almost any) of the NLP tasks. \nIn practice it was/is quite a bummer. \nSee this recent NYT article about how the marketing over promised the capabilities and how the whole system failed to gain wider traction: https://www.nytimes.com/2021/07/16/technology/what-happened-ibm-watson.html\nRegarding personal experience: I haven’t any public data to show, but we evaluated once in the company internally and it was always worse than other custom solutions for Sentiment Analysis and Named Entity Recognition. \nIf you are using it for a dialogue/chat bot I would recommend the open source Rasa library. \nI hope this helps.","timestamp":"2021-08-03T13:09:44+00:00","score":4},{"role":"OP","user_id":"anon_63a95cce8578f8e8","comment_id":"h7js5ae","kind":"comment","text":"Sure helps! Thanks a lot. Yes, I'm talking specifically about Watson Assistant for dialogue/chatbot (speech to text is also relevant, but I think there is a much wider world of solutions there)","timestamp":"2021-08-03T13:15:12+00:00","score":1},{"role":"answerer","user_id":"anon_32541b749faaac21","comment_id":"h7jtg5u","kind":"comment","text":"For STT & TTS I can highly recommend https://github.com/coqui-ai","timestamp":"2021-08-03T13:26:15+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_63a95cce8578f8e8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_32541b749faaac21","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h7jrj5o","thanks_reply_id":"h7js5ae","post_score":1,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_f7c52b106cd12eea","answerer_user_id":"anon_9bace18b7099c0d9","subreddit":"LanguageTechnology","timestamp":"2021-08-03T15:51:30+00:00","post_id":"ox6afz","question":"Clustering of text - Where to start?\n\nLike in the title, where would one start to try and cluster text data?\n\nI have already a way to classify the text data but I'm currently trying to determine a way to do unsupervised learning on the data. But I am unsure how to proceed with this.\n\nCan anyone help me in the right direction please?","preferred_answer":"It's impossible to give specific recommendations without knowing more. What are your goals? Are you just trying to learn about text clustering methods, or do you have some specific analytic or product goal?","full_conversation":[{"role":"OP","user_id":"anon_f7c52b106cd12eea","comment_id":"ox6afz","kind":"post","text":"Clustering of text - Where to start?\n\nLike in the title, where would one start to try and cluster text data?\n\nI have already a way to classify the text data but I'm currently trying to determine a way to do unsupervised learning on the data. But I am unsure how to proceed with this.\n\nCan anyone help me in the right direction please?","timestamp":"2021-08-03T15:51:30+00:00","score":0},{"role":"answerer","user_id":"anon_9bace18b7099c0d9","comment_id":"h7kd4wy","kind":"comment","text":"It's impossible to give specific recommendations without knowing more. What are your goals? Are you just trying to learn about text clustering methods, or do you have some specific analytic or product goal?","timestamp":"2021-08-03T15:58:39+00:00","score":2},{"role":"OP","user_id":"anon_f7c52b106cd12eea","comment_id":"h7kecep","kind":"comment","text":"Thank you for your reply.\n\nMy main goal would be to find underlying themes throughout bodies of text. Also would be to compare the clustering method to the classification. And get a graphical representation of the texts.\n\nI will also be looking at thematic analysis. But I decided to start with the clustering.\n\nMy idea was to use the sentence encoder from Tensorflow, and the proceed to cluster the data. But I was unsuccessful.","timestamp":"2021-08-03T16:07:06+00:00","score":1},{"role":"answerer","user_id":"anon_9bace18b7099c0d9","comment_id":"h7lhh2i","kind":"comment","text":"Okay, three goals it sounds like:\n\n>find underlying themes throughout bodies of text\n\nBy far the best way to do this is to do some kind of random sampling, reading/annotating the text, and *possibly* developing some kind of supervised model on top of those annotations. What does \"underlying theme\" mean in your context? Depending on your context, you might (but **probably won't**) benefit from some type of statistical or automated method, such as topic modeling or clustering of embeddings. (You may find some of the discussion in [this Twitter thread](https://twitter.com/ryanjgallag/status/1420741719826468884) enlightening.)\n\n> compare the clustering method to the classification\n\nI'll be honest, I'm not sure what this means. Clustering by definition makes assumptions about what is \"important\" and what constitutes similarity between two texts. A comparison like this might tell us how strongly correlated that assumption is with whatever supervised model we've built, but it can't do much more than that. (Consider, for example, the following clustering method: (1) compute the length of each document in characters, (2) compute *k* percentiles uniformly over the lengths, (3) assign documents according to percentile. e.g. when *k* = 10, assign a document to the first cluster if its length is in the first decile, to the second if its in the second decile, and so on. This is a genuinely useful clustering of texts! Texts will differ substantially between clusters (in terms of length). However, it's probably not what you had in mind... so what would it mean to compare this clustering to your existing classification approach?)\n\n>get a graphical representation of the texts\n\nWhat kind of features would a good graphical representation of your texts have? How would you know that it was a \"useful\" representation? What would make it a \"bad\" representation?","timestamp":"2021-08-03T20:37:31+00:00","score":3},{"role":"OP","user_id":"anon_f7c52b106cd12eea","comment_id":"h7nmjqj","kind":"comment","text":"Thank you.\n\nI did go through the Twitter feed. \n\nSo to answer some of your questions:\n\nUnderlying theme - So to give an explanation, the text I'm currently working on is descriptions that define mistakes. I.e. a description that talks about making a wrong entry into a dataset. Or a description that states the datasets did not merge correctly, and some data was lost. So we know about these common mistakes, and we have classified these events into their respective categories with a classification model. Underlying theme comes into play when a wrong entry was made because of using to small of a keyboard, for example.\n\nSo my idea is to try to identify those types of themes within the descriptions I have. I hope this clears up my intention.\n\nComparison of clusters and classification - My idea behind comparing classification to the clustering is that perhaps some classification have similar aspects affecting them, that I'm not currently aware of. But this would probably be done by colour coding the clusters points with the given classification.\n\nGraphical representations - I have no idea what would be a good representation graphically. I will need to make some graphical representation, and then try to analyse them to determine if they're useful.","timestamp":"2021-08-04T08:36:29+00:00","score":1},{"role":"answerer","user_id":"anon_9bace18b7099c0d9","comment_id":"h7olfyl","kind":"comment","text":"> Underlying theme comes into play when a wrong entry was made because of using too small of a keyboard, for example.\n\nHmm, I'm still not really following here. Do you mean literal data entry errors, like typos? What is a \"wrong entry\"? \n\nIf what you want is to determine how similar two categories are, or to learn something about the structure or words that compose those categories, you might consider [word shift graphs](https://ryanjgallagher.github.io/code/word_shift/overview) or [Scattertext](https://github.com/JasonKessler/scattertext).","timestamp":"2021-08-04T14:45:10+00:00","score":1},{"role":"OP","user_id":"anon_f7c52b106cd12eea","comment_id":"h7sdpr9","kind":"comment","text":"Thank you, I'll definitely look into those methods.\n\nSorry for not expressing myself clearly. Let me try again.\n\nSo, the data I have is a description of a mistake made by someone/something that caused a problem in our data system.\n\nThat mistake, can for example be, someone merging two wrong datasets. Or when filling in a cell in a dataset, they made a typo.\n\nThus the description I have for the last event is, Mr or Ms so and so, made a typo and wrote \"this\" instead of \"that\". This was caused by not paying attention because the user worked over-time and it was near the employee's shift end. This lead to user 01's data being mixed with user 02's data. This had to be manually rectified.\n\nThe classification for this description would be for example: user error - Typo.\n\nWe have hundreds of such errors. And I would like to scan through the description, and find out if there are underlying themes throughout them all. Where not paying attention is definitely an issue, but because it was near shift end the mistake happened, and there might be multiple cases of such an example near shift end.\n\nI would like to identify if there are these multiple cases, and what these multiple cases might be. \n\nIt might not be, near shift end, but perhaps the employee complaining that their keyboard is too small, or something else.\n\nEdit: I really like the idea of the word shift graphs. As they can hopefully help point out changes over time.","timestamp":"2021-08-05T10:07:05+00:00","score":1},{"role":"answerer","user_id":"anon_9bace18b7099c0d9","comment_id":"h83nrb5","kind":"comment","text":"> underlying themes throughout them all. Where not paying attention is definitely an issue, but because it was near shift end the mistake happened, and there might be multiple cases of such an example near shift end.\n\nWell, it sounds like you're saying \"we want to find factors that correlate with our primary classification of interest\". For sure a good way to start would be using something like Scattertext to look at words that are more likely to show up in that category. The more manual way is to literally compute the odds ratio for each word/category, looking at the categories where a word is much more likely to occur. (Good example of this simple approach [here](https://jan.stanford.edu/pubs/2015-Forum77-CSCW.pdf).) That could point you towards building a taxonomy of \"themes\" and training a separate supervised classifier to identify those themes. In general, I would let your proposed business case motivate your choice of method: if you are just looking for phenomena that are likely to be highly business-relevant, than maybe you expect it to show up at least 1-5% of the time? If true, then you should be able to easily identify a few dozen or few hundred examples of some theme. Once again, that leaves you with a qualitative \"search, annotate, take notes, repeat\" process and not a statistical process. If you're looking for something much subtler (a la association rule mining), then think about what kinds of associations would actually have business value to you. (An unsupervised method may not... is \"latent text dimension 72 > 0.5 implies category A\" actually a useful association for you?)","timestamp":"2021-08-07T21:46:44+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_f7c52b106cd12eea","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9bace18b7099c0d9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h7kd4wy","thanks_reply_id":"h7kecep","post_score":0,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_e83ff840497229db","answerer_user_id":"anon_e49ed43cbfab27f4","subreddit":"LanguageTechnology","timestamp":"2021-08-14T19:27:59+00:00","post_id":"p4ef2u","question":"Tensorflow or Rasa for voice based chatbots?\n\nHi guys good day, I would like to ask the experienced people here some tips. I would like to learn NLP and integrate it to my web services. I understand that advanced algebra, calculas, statistics is required. I am ok with that part as I did electronics engineering and learning advanced maths is also one or our university requirements. Just concern which one will work best in web app based application. I am planning to run my services in nodejs. Thanks in advance for your assistance.","preferred_answer":"If I understand you correctly, you want a chatbot that takes spoken language as input and produces a text response?\nIn case that is correct, you need two components: a speech recognizer and a chat bot. The speech recognizer turns the speech into text, which can be handled by the chat bot.\n\nFor the chat bot part, rasa works quite well if your conversational agent is intended to solve specific tasks (booking a restaurant, retrieving information from the internet, that sort of thing). It is easy to set up and easy to model conversations, but you may need some training data for the bot to become actually robust.\nIf all you are looking for is a chit-chat bot that you can simply talk to without any task in mind, rasa is probably not the right tool.\n\nFor the speech recognizer, you can use one of the many automatic speech recognition toolkits available (Mozilla's Deep Speech, Nvidia's OpenSeq2Seq, ESPnet, Lingvo, Kaldi, these are just the ones I know of).\nThe good thing about those is that you do not have to reimplement the ASR architecture yourself and they suggest sensible default hyperparameters. So you actually do not have to know how they work in detail. \n\nI hope that helps.","full_conversation":[{"role":"OP","user_id":"anon_e83ff840497229db","comment_id":"p4ef2u","kind":"post","text":"Tensorflow or Rasa for voice based chatbots?\n\nHi guys good day, I would like to ask the experienced people here some tips. I would like to learn NLP and integrate it to my web services. I understand that advanced algebra, calculas, statistics is required. I am ok with that part as I did electronics engineering and learning advanced maths is also one or our university requirements. Just concern which one will work best in web app based application. I am planning to run my services in nodejs. Thanks in advance for your assistance.","timestamp":"2021-08-14T19:27:59+00:00","score":3},{"role":"answerer","user_id":"anon_e49ed43cbfab27f4","comment_id":"h94u168","kind":"comment","text":"If I understand you correctly, you want a chatbot that takes spoken language as input and produces a text response?\nIn case that is correct, you need two components: a speech recognizer and a chat bot. The speech recognizer turns the speech into text, which can be handled by the chat bot.\n\nFor the chat bot part, rasa works quite well if your conversational agent is intended to solve specific tasks (booking a restaurant, retrieving information from the internet, that sort of thing). It is easy to set up and easy to model conversations, but you may need some training data for the bot to become actually robust.\nIf all you are looking for is a chit-chat bot that you can simply talk to without any task in mind, rasa is probably not the right tool.\n\nFor the speech recognizer, you can use one of the many automatic speech recognition toolkits available (Mozilla's Deep Speech, Nvidia's OpenSeq2Seq, ESPnet, Lingvo, Kaldi, these are just the ones I know of).\nThe good thing about those is that you do not have to reimplement the ASR architecture yourself and they suggest sensible default hyperparameters. So you actually do not have to know how they work in detail. \n\nI hope that helps.","timestamp":"2021-08-16T08:32:39+00:00","score":3},{"role":"OP","user_id":"anon_e83ff840497229db","comment_id":"h95c0bk","kind":"comment","text":"Thanks, this is what I was finding out. I want to get audio input => processing =>the audio output as well with my first language in my country. For the speech recogniser I only know of web speech API as I want to run them on the website but they have like limited functions. Thanks u/simulacrum6 for pointing this new speech recognition tools. Ideally I want to run them on an e-commerce shops for users to ask questions and be provided with feedback as many native speakers dont know how to read. I'm running them on nodejs for now. Will look into this. I have some guide now.","timestamp":"2021-08-16T12:15:23+00:00","score":1},{"role":"answerer","user_id":"anon_e49ed43cbfab27f4","comment_id":"h95fv27","kind":"comment","text":"Interesting use case, you may need a text-to-speech module for the audio output then as well.\n\nMost AI applications are written in python, but you could certainly call the appropriate scripts using nodejs.\n\nMay I ask which language you are working with?","timestamp":"2021-08-16T12:50:31+00:00","score":2},{"role":"OP","user_id":"anon_e83ff840497229db","comment_id":"h95m50q","kind":"comment","text":"Thanks for the suggestion. Python does how the text to speech module, have worked on that just for simple fun stuff. I am working in Bahasa Malaysia ( melayu).","timestamp":"2021-08-16T13:41:46+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e83ff840497229db","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e49ed43cbfab27f4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h94u168","thanks_reply_id":"h95c0bk","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_a146eb24370b4e56","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2021-08-17T07:35:56+00:00","post_id":"p5z3eg","question":"Can Stanza generate multiple parse trees for 1 sentence?\n\nStanza gives me only 1 tree for each sentence or phrase, no matter how ambiguous a phrase is.\n\nIs Stanza able to generate multiple parse trees for an ambiguous sentence? \nIf it is not, can you say which parser is able to do that?","preferred_answer":"Most parsing algorithms will give you essentially a probability distribution or have a beam search, at every step carrying x as-of-yet best options through until final parse; it's essentially just an API implementation choice whether in the end you fetch just the single best option or multiple candidates - it's not a research question, but specific implementation API. For example, MaltParser has -kbest setting which IMHO should do that.","full_conversation":[{"role":"OP","user_id":"anon_a146eb24370b4e56","comment_id":"p5z3eg","kind":"post","text":"Can Stanza generate multiple parse trees for 1 sentence?\n\nStanza gives me only 1 tree for each sentence or phrase, no matter how ambiguous a phrase is.\n\nIs Stanza able to generate multiple parse trees for an ambiguous sentence? \nIf it is not, can you say which parser is able to do that?","timestamp":"2021-08-17T07:35:56+00:00","score":2},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"h99wlxc","kind":"comment","text":"Most parsing algorithms will give you essentially a probability distribution or have a beam search, at every step carrying x as-of-yet best options through until final parse; it's essentially just an API implementation choice whether in the end you fetch just the single best option or multiple candidates - it's not a research question, but specific implementation API. For example, MaltParser has -kbest setting which IMHO should do that.","timestamp":"2021-08-17T10:55:23+00:00","score":2},{"role":"OP","user_id":"anon_a146eb24370b4e56","comment_id":"h99yjdi","kind":"comment","text":"Thank you. I will try MaltParser then.\n\nAlso, if it is like that, Stanza should have something like -kbest too?","timestamp":"2021-08-17T11:17:34+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"h99zgna","kind":"comment","text":"I haven't used Stanza, but from an algorithm perspective there's no reason why it *couldn't* have a multiple-output option; however, from an API design perspective - i.e. to have a simple pipeline mechanism for combining multiple NLP models - it's plausible to make a design choice that each component in the pipeline must always output just a single best option and including the multiple outputs would not be compatible with that design of combining various NLP components, and perhaps Stanza has chosen to do it this way.","timestamp":"2021-08-17T11:27:37+00:00","score":1},{"role":"OP","user_id":"anon_a146eb24370b4e56","comment_id":"hc23ins","kind":"comment","text":"Hey, sorry for bothering with Stanza again. I just found things like \"best\" and \"score\" in [https://github.com/stanfordnlp/stanza/blob/main/stanza/models/parser.py#L166](https://github.com/stanfordnlp/stanza/blob/main/stanza/models/parser.py#L166)from line 166 to line 233 a few times.\n\nAlthough that is in the \"train\" function, could that be the thing that limits output to a single best option?\n\n​\n\nAlso, I've installed MaltParser and started to dig it but then realized that there are only 4 models while I need a model for Ukrainian. Does this mean I have to make this model myself?\n\nIf yes, will this work? I have an un-annotated corpus of texts. I pass it to Stanza and get all it parsed as CoNLL-U. I then use this parsed CoNLL-U text to train a model for MaltParser.","timestamp":"2021-09-08T13:46:07+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a146eb24370b4e56","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"h99wlxc","thanks_reply_id":"h99yjdi","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_d1b1b5a127a877f2","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2021-09-05T16:15:57+00:00","post_id":"pifzdb","question":"What does NLP work outside of the FAANG and research look like?\n\nIn the Stanford CS224N course, there's a lot of discussion about different architectures for solving different NLP tasks and how those have evolved over the years. I imagine in research and at FAANG companies, some of the work is based around developing those systems. What I'm curious about is what types of applications does NLP find in the less-techy firms, and what is the nature of the data scientist's work there? In other words, is it often just applying the pre-built models one can find online to privately held corpora, adding some custom business logic around the results, etc? Or is there more space and need for more nuts and bolts development of these systems? I get the impression that one could potentially do quite a bit with simply using some of the pre-built models from a library like HuggingFace and that needing to think about different architecture structures wouldn't really come up in day-to-day tasks, but I'm unsure whether this is correct.","preferred_answer":"We use existing models to do NER, summarisation, keyword extraction and other things. For our clients speed is more important than raw accuracy (results should be sent back in less than a second) so we can't really use the big transformer things right now. (I understand that if you have a model loaded in a GPU inference can be very fast, but we would need **many** GPUs). \n\n\nOur customers are not well versed into the field and are very happy to get *any kind of* results, so we don't need to have top-performing models etc. There's also no test sets for our use cases and performance achieved on the test sets the models have been evaluated on does not necessarily transfer to our data, so for now we stick, in prod, with the \"fast and robust things we know\".","full_conversation":[{"role":"OP","user_id":"anon_d1b1b5a127a877f2","comment_id":"pifzdb","kind":"post","text":"What does NLP work outside of the FAANG and research look like?\n\nIn the Stanford CS224N course, there's a lot of discussion about different architectures for solving different NLP tasks and how those have evolved over the years. I imagine in research and at FAANG companies, some of the work is based around developing those systems. What I'm curious about is what types of applications does NLP find in the less-techy firms, and what is the nature of the data scientist's work there? In other words, is it often just applying the pre-built models one can find online to privately held corpora, adding some custom business logic around the results, etc? Or is there more space and need for more nuts and bolts development of these systems? I get the impression that one could potentially do quite a bit with simply using some of the pre-built models from a library like HuggingFace and that needing to think about different architecture structures wouldn't really come up in day-to-day tasks, but I'm unsure whether this is correct.","timestamp":"2021-09-05T16:15:57+00:00","score":39},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"hbpbj1j","kind":"comment","text":"We use existing models to do NER, summarisation, keyword extraction and other things. For our clients speed is more important than raw accuracy (results should be sent back in less than a second) so we can't really use the big transformer things right now. (I understand that if you have a model loaded in a GPU inference can be very fast, but we would need **many** GPUs). \n\n\nOur customers are not well versed into the field and are very happy to get *any kind of* results, so we don't need to have top-performing models etc. There's also no test sets for our use cases and performance achieved on the test sets the models have been evaluated on does not necessarily transfer to our data, so for now we stick, in prod, with the \"fast and robust things we know\".","timestamp":"2021-09-05T16:32:43+00:00","score":21},{"role":"OP","user_id":"anon_d1b1b5a127a877f2","comment_id":"hbpc7t0","kind":"comment","text":">NER, summarisation, keyword extraction and other things.\n\nThanks, this is useful. Can you comment on what your clients use this information for, at least at a high-level?","timestamp":"2021-09-05T16:37:45+00:00","score":3},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"hbpenaf","kind":"comment","text":"Sorry, I should have mentioned our clients are internal ones. \n\nI suspect our internal clients receive too many documents that they *have to* process, so they use our tools to speed up the process.\n\nIt's a fun setting actually, where I build the pipeline but don't have access to the data being fed to it, **ever**. Also: I have signed a pretty strong NDA so that's as much as I'm comfortable saying :-)","timestamp":"2021-09-05T16:55:35+00:00","score":3},{"role":"OP","user_id":"anon_d1b1b5a127a877f2","comment_id":"hbpfoph","kind":"comment","text":"That’s interesting, thank you.","timestamp":"2021-09-05T17:03:18+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_d1b1b5a127a877f2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hbpbj1j","thanks_reply_id":"hbpc7t0","post_score":39,"answer_score":21,"preferred_answer_is_top_level":true}} {"user_id":"anon_bb863af75bd462fa","answerer_user_id":"anon_6f06a171985d04f1","subreddit":"LanguageTechnology","timestamp":"2021-09-06T07:26:18+00:00","post_id":"piunte","question":"Ancient Texts for non-English texts - which library?\n\nHi all,\nI'm looking into existing libraries to analyze ancient texts in Greek and in Arabic.\nStanza?\nSpaCY?\nCLTK?\nI believe in any case I'll have to add to the library code or models, since none has robust (ancient) Greek.\nArabic also has challenges, like second person.\nWhich would you recommend to start exploring?","preferred_answer":"Depending on the task that you want to do. I haven't worked with ancient Greek, but I did work with Arabic, and I have to admit that it's a nightmare in NLP. \n\nMany of the tools are outdated, and I had to programmatically code most of the work.\n\nSome deep learning models give good results though.","full_conversation":[{"role":"OP","user_id":"anon_bb863af75bd462fa","comment_id":"piunte","kind":"post","text":"Ancient Texts for non-English texts - which library?\n\nHi all,\nI'm looking into existing libraries to analyze ancient texts in Greek and in Arabic.\nStanza?\nSpaCY?\nCLTK?\nI believe in any case I'll have to add to the library code or models, since none has robust (ancient) Greek.\nArabic also has challenges, like second person.\nWhich would you recommend to start exploring?","timestamp":"2021-09-06T07:26:18+00:00","score":6},{"role":"answerer","user_id":"anon_6f06a171985d04f1","comment_id":"hbsagu0","kind":"comment","text":"Depending on the task that you want to do. I haven't worked with ancient Greek, but I did work with Arabic, and I have to admit that it's a nightmare in NLP. \n\nMany of the tools are outdated, and I had to programmatically code most of the work.\n\nSome deep learning models give good results though.","timestamp":"2021-09-06T07:49:16+00:00","score":3},{"role":"OP","user_id":"anon_bb863af75bd462fa","comment_id":"hbtrcmg","kind":"comment","text":"Thank you for your reply.\nCould you reference the DL models?","timestamp":"2021-09-06T16:46:58+00:00","score":1},{"role":"answerer","user_id":"anon_6f06a171985d04f1","comment_id":"hbuitr0","kind":"comment","text":"They are mostly Bert based models that you can find on the huggingface hub. If you are dealing with dialectal Arabic, there are models for it, and if you are dealing with Fusha, there are other models for it.","timestamp":"2021-09-06T20:07:25+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bb863af75bd462fa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6f06a171985d04f1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hbsagu0","thanks_reply_id":"hbtrcmg","post_score":6,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_be9d42ea1e9f382f","answerer_user_id":"anon_e77cbac210df1f13","subreddit":"LanguageTechnology","timestamp":"2021-09-14T05:13:56+00:00","post_id":"pnwg3s","question":"Anyone heard of A21I? It's a tokenizer trained on a larger set of data, but I can't find it publicly available.\n\nFeel free to say you haven't heard of it. Just wanted to know if this is available somewhere, thanks!","preferred_answer":"Can you explain please. I haven't heard and tried searching, ended up getting Samsung Galaxy A21. 😂","full_conversation":[{"role":"OP","user_id":"anon_be9d42ea1e9f382f","comment_id":"pnwg3s","kind":"post","text":"Anyone heard of A21I? It's a tokenizer trained on a larger set of data, but I can't find it publicly available.\n\nFeel free to say you haven't heard of it. Just wanted to know if this is available somewhere, thanks!","timestamp":"2021-09-14T05:13:56+00:00","score":5},{"role":"answerer","user_id":"anon_e77cbac210df1f13","comment_id":"hcsob8p","kind":"comment","text":"Can you explain please. I haven't heard and tried searching, ended up getting Samsung Galaxy A21. 😂","timestamp":"2021-09-14T08:00:54+00:00","score":2},{"role":"OP","user_id":"anon_be9d42ea1e9f382f","comment_id":"hcvxhkn","kind":"comment","text":"look at above comment! thanks for replying tho","timestamp":"2021-09-14T23:50:09+00:00","score":1},{"role":"answerer","user_id":"anon_e77cbac210df1f13","comment_id":"hcx88zl","kind":"comment","text":"I meant more information on the tokenizer. Lemme see if I can find with my PhD colleagues. Will keep you posted.","timestamp":"2021-09-15T06:52:32+00:00","score":1},{"role":"OP","user_id":"anon_be9d42ea1e9f382f","comment_id":"hcx8e8g","kind":"comment","text":"Ohhhh yes that would be amazing! I'm doing a project on this right now too.\n\nIt's called AI21 - I got this from somewhere else and it was misspelled, so was confused. I also want to know more about the tokenizer -- is it as easy to implement as BERT or GPT-2 per huggingface?","timestamp":"2021-09-15T06:54:30+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_be9d42ea1e9f382f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e77cbac210df1f13","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hcsob8p","thanks_reply_id":"hcvxhkn","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_13728ed1db341739","answerer_user_id":"anon_51afa0ee11ea9301","subreddit":"LanguageTechnology","timestamp":"2021-09-19T04:04:55+00:00","post_id":"pr0yjj","question":"Is there any sorce code implemented for twitter trending topic detection?","preferred_answer":"I guess You can use the API for trends near a location.\n\n[https://developer.twitter.com/en/docs/twitter-api/v1/trends/trends-for-location/api-reference/get-trends-place](https://developer.twitter.com/en/docs/twitter-api/v1/trends/trends-for-location/api-reference/get-trends-place)\n\n​\n\nThis returns the trending topics in a chosen place.","full_conversation":[{"role":"OP","user_id":"anon_13728ed1db341739","comment_id":"pr0yjj","kind":"post","text":"Is there any sorce code implemented for twitter trending topic detection?","timestamp":"2021-09-19T04:04:55+00:00","score":2},{"role":"answerer","user_id":"anon_51afa0ee11ea9301","comment_id":"hdkxzj7","kind":"comment","text":"I guess You can use the API for trends near a location.\n\n[https://developer.twitter.com/en/docs/twitter-api/v1/trends/trends-for-location/api-reference/get-trends-place](https://developer.twitter.com/en/docs/twitter-api/v1/trends/trends-for-location/api-reference/get-trends-place)\n\n​\n\nThis returns the trending topics in a chosen place.","timestamp":"2021-09-20T12:09:30+00:00","score":2},{"role":"OP","user_id":"anon_13728ed1db341739","comment_id":"hdl026h","kind":"comment","text":"Thank you for the response🥳. But i was trying to implement trending topic extraction using nlp with my mother language. For that to get started i wanted to find whethere someone have implemented it for any language and try to work with that. For example with the use of ngram tfidf value and etc. Is there any implementations?","timestamp":"2021-09-20T12:29:41+00:00","score":1},{"role":"answerer","user_id":"anon_51afa0ee11ea9301","comment_id":"hdl0ki0","kind":"comment","text":"Oh, I see. \nThen You can crawl Tweets, and apply a clustering system to them to define topics?","timestamp":"2021-09-20T12:34:29+00:00","score":2},{"role":"OP","user_id":"anon_13728ed1db341739","comment_id":"hdl10uv","kind":"comment","text":"Yes probably. Im pretty new to this thats why i wanted know what is best. And if there is a implementation that would help to understand","timestamp":"2021-09-20T12:38:42+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_13728ed1db341739","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_51afa0ee11ea9301","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hdkxzj7","thanks_reply_id":"hdl026h","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4ea776064504cfe0","answerer_user_id":"anon_24e2afe1b1a6cafa","subreddit":"LanguageTechnology","timestamp":"2021-09-22T07:54:34+00:00","post_id":"pt2on7","question":"Is there any white paper or research paper explaining the architecture of any NLP engine like Dialogflow or LUIS?\n\nI tried to find on Google but couldn't find any research paper related to i design implementation of any NLP engine like Dialogflow, LUIS etc.\nI would be really thankful if someone could provide.\nBasically I need to complete a POC for designing an NLP engine from scratch.","preferred_answer":"Dialogflow, as the name suggests is specifically for dialogue agents. It is not a general NLP engine, which as a term has no standard definition. LUIS is a little more general and can be adapted into other applications besides chatbots but neither are open source, it's all private black boxes. If you do want system you can use to build a decent task-oriented dialogue agent (i.e. a normal chatbot) then look at [RASA](https://rasa.com/) whose code is open source and has decent documentation explaining it","full_conversation":[{"role":"OP","user_id":"anon_4ea776064504cfe0","comment_id":"pt2on7","kind":"post","text":"Is there any white paper or research paper explaining the architecture of any NLP engine like Dialogflow or LUIS?\n\nI tried to find on Google but couldn't find any research paper related to i design implementation of any NLP engine like Dialogflow, LUIS etc.\nI would be really thankful if someone could provide.\nBasically I need to complete a POC for designing an NLP engine from scratch.","timestamp":"2021-09-22T07:54:34+00:00","score":13},{"role":"answerer","user_id":"anon_24e2afe1b1a6cafa","comment_id":"hdtlbrc","kind":"comment","text":"Dialogflow, as the name suggests is specifically for dialogue agents. It is not a general NLP engine, which as a term has no standard definition. LUIS is a little more general and can be adapted into other applications besides chatbots but neither are open source, it's all private black boxes. If you do want system you can use to build a decent task-oriented dialogue agent (i.e. a normal chatbot) then look at [RASA](https://rasa.com/) whose code is open source and has decent documentation explaining it","timestamp":"2021-09-22T08:19:09+00:00","score":8},{"role":"OP","user_id":"anon_4ea776064504cfe0","comment_id":"hdtwajc","kind":"comment","text":"Thanks, RASA looks promising. Can you please pinpoint me where they could have explained how should an NLP pipeline be designed (cleaning, entity extraction etc) and in which order.","timestamp":"2021-09-22T11:02:46+00:00","score":1},{"role":"answerer","user_id":"anon_24e2afe1b1a6cafa","comment_id":"hdu8zes","kind":"comment","text":"They have documentation, and a github. There are guides about how it all works. Google is your friend.","timestamp":"2021-09-22T13:09:12+00:00","score":3},{"role":"OP","user_id":"anon_4ea776064504cfe0","comment_id":"hdudjr2","kind":"comment","text":"thanks :)","timestamp":"2021-09-22T13:45:59+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4ea776064504cfe0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_24e2afe1b1a6cafa","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hdtlbrc","thanks_reply_id":"hdtwajc","post_score":13,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_fe5ccd037fe55a24","answerer_user_id":"anon_c339c41ab0c9986d","subreddit":"LanguageTechnology","timestamp":"2021-09-22T21:12:08+00:00","post_id":"ptgfvf","question":"Concatenate to LSTM models\n\nI'm fairly new to NLP and building a model that takes two sub-models and concatenates them. The dataset has two text input columns and the predictor variable has 3 classes. Below is the code I wrote:\n\nmodel1 = Sequential() model1.add(Embedding(MAX_NB_WORDS,EMBEDDING_DIM,input_length=X1.shape[1])) model1.add(SpatialDropout1D(0.2)) model1.add(LSTM(100,dropout=0.2,recurrent_dropout=0.2))\n\n# Shape \n\nmodel2 = Sequential() model2.add(Embedding(MAX_NB_WORDS,EMBEDDING_DIM,input_length=X2.shape[1])) model2.add(SpatialDropout1D(0.2)) model2.add(LSTM(100,dropout=0.2,recurrent_dropout=0.2))\n\n# Shape \n\nconcat_layer = Concatenate()([model1.output, model2.output]) dense_layer = Dense(10, activation='relu')(concat_layer) output = Dense(3, activation='softmax')(dense_layer)\n\ninput_1 = Input(shape=(MAX_LEN,)) input_2 = Input(shape=(MAX_LEN,))\n\n# I have set Max_LEN=250 # Both input_1 and input_2 are of shape TensorShape([None, 250])\n\nmodel = Model(inputs=[input_1, input_2], outputs=output)\n\n# When I run the model I get the below error:\nValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 250), dtype=tf.float32, name='embedding_3_input'), name='embedding_3_input', description=\"created by layer 'embedding_3_input'\") at layer \"embedding_3\". The following previous layers were accessed without issue: []\n\nWhat mistake am I making?","preferred_answer":"We stackoverflow now KEKW\n\nWhere is this \"embedding\\_3\" in your code that the error mentioned? I only saw 2 embedding layers.","full_conversation":[{"role":"OP","user_id":"anon_fe5ccd037fe55a24","comment_id":"ptgfvf","kind":"post","text":"Concatenate to LSTM models\n\nI'm fairly new to NLP and building a model that takes two sub-models and concatenates them. The dataset has two text input columns and the predictor variable has 3 classes. Below is the code I wrote:\n\nmodel1 = Sequential() model1.add(Embedding(MAX_NB_WORDS,EMBEDDING_DIM,input_length=X1.shape[1])) model1.add(SpatialDropout1D(0.2)) model1.add(LSTM(100,dropout=0.2,recurrent_dropout=0.2))\n\n# Shape \n\nmodel2 = Sequential() model2.add(Embedding(MAX_NB_WORDS,EMBEDDING_DIM,input_length=X2.shape[1])) model2.add(SpatialDropout1D(0.2)) model2.add(LSTM(100,dropout=0.2,recurrent_dropout=0.2))\n\n# Shape \n\nconcat_layer = Concatenate()([model1.output, model2.output]) dense_layer = Dense(10, activation='relu')(concat_layer) output = Dense(3, activation='softmax')(dense_layer)\n\ninput_1 = Input(shape=(MAX_LEN,)) input_2 = Input(shape=(MAX_LEN,))\n\n# I have set Max_LEN=250 # Both input_1 and input_2 are of shape TensorShape([None, 250])\n\nmodel = Model(inputs=[input_1, input_2], outputs=output)\n\n# When I run the model I get the below error:\nValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 250), dtype=tf.float32, name='embedding_3_input'), name='embedding_3_input', description=\"created by layer 'embedding_3_input'\") at layer \"embedding_3\". The following previous layers were accessed without issue: []\n\nWhat mistake am I making?","timestamp":"2021-09-22T21:12:08+00:00","score":6},{"role":"answerer","user_id":"anon_c339c41ab0c9986d","comment_id":"hdwez2q","kind":"comment","text":"We stackoverflow now KEKW\n\nWhere is this \"embedding\\_3\" in your code that the error mentioned? I only saw 2 embedding layers.","timestamp":"2021-09-22T23:28:28+00:00","score":6},{"role":"OP","user_id":"anon_fe5ccd037fe55a24","comment_id":"hdx6hnf","kind":"comment","text":"Thanks for pointing it out. \n\nNot sure how “embedding_3” showed up. When I run the code again the embedding layer has changed\n\nValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 250), dtype=tf.float32, name='embedding_1_input'), name='embedding_1_input', description=\"created by layer 'embedding_1_input'\") at layer \"embedding_1\". The following previous layers were accessed without issue: []","timestamp":"2021-09-23T03:11:53+00:00","score":0},{"role":"answerer","user_id":"anon_c339c41ab0c9986d","comment_id":"hdxa56f","kind":"comment","text":"Yeah so I guess your input 1 didn't connect to model 1. Add Input layer in model 1 (and model 2 the same) before embedding layer instead of a different Input object. Something like:\n\n>model1.add(tf.keras.Input(shape=(X1.shape\\[1\\],)))\n\nI'm not sure how it works in original Keras but for tf.keras you can check [https://www.tensorflow.org/api\\_docs/python/tf/keras/Sequential](https://www.tensorflow.org/api_docs/python/tf/keras/Sequential). Or you can try not to use the Sequential but Model object. See [https://keras.io/api/layers/core\\_layers/input/](https://keras.io/api/layers/core_layers/input/).","timestamp":"2021-09-23T03:44:49+00:00","score":2},{"role":"OP","user_id":"anon_fe5ccd037fe55a24","comment_id":"hdxg3ib","kind":"comment","text":"Thanks again.\n\nHere's what I changed:\n\nmodel1 = Sequential()model1.add(tf.keras.Input(shape=(X1.shape\\[1\\],)))model1.add(Embedding(MAX\\_NB\\_WORDS,EMBEDDING\\_DIM,input\\_length=X1.shape\\[1\\]))model1.add(SpatialDropout1D(0.2))model1.add(LSTM(100,dropout=0.2,recurrent\\_dropout=0.2))\n\n\\# and likewise for model2. And then\n\nconcat\\_layer = Concatenate()(\\[model1.output, model2.output\\])dense\\_layer = Dense(10, activation='relu')(concat\\_layer)output = Dense(3, activation='softmax')(dense\\_layer)\n\ninputs = tf.keras.Input(shape=(500,))model = Model(inputs=inputs, outputs=output)\n\n\\# I get this error:\n\nValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type\\_spec=TensorSpec(shape=(None, 250), dtype=tf.float32, name='input\\_2'), name='input\\_2', description=\"created by layer 'input\\_2'\") at layer \"embedding\\_1\". The following previous layers were accessed without issue: \\[\\]","timestamp":"2021-09-23T04:44:07+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_fe5ccd037fe55a24","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c339c41ab0c9986d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hdwez2q","thanks_reply_id":"hdx6hnf","post_score":6,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_6d778743f792ed05","answerer_user_id":"anon_6dbdbe51d5d6914f","subreddit":"LanguageTechnology","timestamp":"2021-10-05T09:53:50+00:00","post_id":"q1t4ur","question":"German POS Corpus for Commercial use\n\nI'm trying to find a German corpus with POS tags that can be used for commercial purposes. I know about the TIGER corpus for which you could get a commercial license at leat in theory... however they haven't responded in months. Is there any alternative?","preferred_answer":"I had the same problem a couple years ago. I think [Flair](https://github.com/flairNLP/flair), form Zalando uses a different Corpus. However, it's not great and I am pretty sure they are infringing the license anyway...\n\nIn the end I just used SpaCy and stopped there.","full_conversation":[{"role":"OP","user_id":"anon_6d778743f792ed05","comment_id":"q1t4ur","kind":"post","text":"German POS Corpus for Commercial use\n\nI'm trying to find a German corpus with POS tags that can be used for commercial purposes. I know about the TIGER corpus for which you could get a commercial license at leat in theory... however they haven't responded in months. Is there any alternative?","timestamp":"2021-10-05T09:53:50+00:00","score":3},{"role":"answerer","user_id":"anon_6dbdbe51d5d6914f","comment_id":"hfh82i0","kind":"comment","text":"I had the same problem a couple years ago. I think [Flair](https://github.com/flairNLP/flair), form Zalando uses a different Corpus. However, it's not great and I am pretty sure they are infringing the license anyway...\n\nIn the end I just used SpaCy and stopped there.","timestamp":"2021-10-05T13:43:56+00:00","score":2},{"role":"OP","user_id":"anon_6d778743f792ed05","comment_id":"hfhbqih","kind":"comment","text":"Thank you for your response and pointing me to Flair. Much appreciated. \n\nI would usually also use SpaCy, but I'm working with titles and since the capitalization is incorrect and there is no context, SpaCy doesn't do a good job. \n\nRight now I'd be happy if I had at least counts of POS Tag per word, so I could pretag my training data.","timestamp":"2021-10-05T14:12:07+00:00","score":2},{"role":"answerer","user_id":"anon_6dbdbe51d5d6914f","comment_id":"hg7espz","kind":"comment","text":"Uni of Tübingen seems to repackage TIGER under a permissive license? https://uni-tuebingen.de/en/faculties/faculty-of-humanities/departments/modern-languages/department-of-linguistics/chairs/general-and-computational-linguistics/ressources/corpora/tueba-dw/#c616060\n\nI stumbled accross this by random chance while looking for something else, haven't looked it up in detail.","timestamp":"2021-10-11T07:55:47+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6d778743f792ed05","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6dbdbe51d5d6914f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hfh82i0","thanks_reply_id":"hfhbqih","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_111cec6d93266d2a","answerer_user_id":"anon_b60cc7d7d123834c","subreddit":"LanguageTechnology","timestamp":"2021-10-07T20:57:41+00:00","post_id":"q3ihgi","question":"Looking for a table to text codebase\n\nHi, I am trying to implement a table to text summarizer for pharma tables. I am looking for existing codebase which can help me jumpstart the project. Any suggestions? I tried looking for them (papers that use ToTTo, WebNLG etc) but most of them do not have complete code. Thanks!","preferred_answer":"https://paperswithcode.com/task/table-to-text-generation","full_conversation":[{"role":"OP","user_id":"anon_111cec6d93266d2a","comment_id":"q3ihgi","kind":"post","text":"Looking for a table to text codebase\n\nHi, I am trying to implement a table to text summarizer for pharma tables. I am looking for existing codebase which can help me jumpstart the project. Any suggestions? I tried looking for them (papers that use ToTTo, WebNLG etc) but most of them do not have complete code. Thanks!","timestamp":"2021-10-07T20:57:41+00:00","score":3},{"role":"answerer","user_id":"anon_b60cc7d7d123834c","comment_id":"hfs04vq","kind":"comment","text":"https://paperswithcode.com/task/table-to-text-generation","timestamp":"2021-10-07T21:15:33+00:00","score":1},{"role":"OP","user_id":"anon_111cec6d93266d2a","comment_id":"hfs0orp","kind":"comment","text":"Thanks for this, but what I am looking for is a link to a complete codebase. For example, in this link, under “Greatest papers with code” , if we follow the link to first paper’s code, it is incomplete. I observed this is the case with many others. Any help here is much appreciated!","timestamp":"2021-10-07T21:19:35+00:00","score":1},{"role":"answerer","user_id":"anon_b60cc7d7d123834c","comment_id":"hfs18dq","kind":"comment","text":"I see. Sorry didn't vet each one. Just saw it linked to some codebases so figured it was worth sharing.","timestamp":"2021-10-07T21:23:28+00:00","score":2},{"role":"OP","user_id":"anon_111cec6d93266d2a","comment_id":"hfs2bjg","kind":"comment","text":"No worries. Thanks for your help!","timestamp":"2021-10-07T21:31:23+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_111cec6d93266d2a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b60cc7d7d123834c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hfs04vq","thanks_reply_id":"hfs0orp","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_4c553590a59ddc34","answerer_user_id":"anon_abce63617ea740ef","subreddit":"LanguageTechnology","timestamp":"2021-10-08T18:29:05+00:00","post_id":"q43qjg","question":"Any allennlp users in this sub?\n\nI have a whole host of questions that the official allennlp docs are unclear on - too many to post individually here - but no one to answer them.\n\nIf there are any allennlp users in this sub who wouldn't mind discussing them with me one-on-one, I would appreciate it tremendously. Apologies for the nebulous post, but thank you in advance!","preferred_answer":"I use AllenNLP all the time and have made several contributions to the repo. I’d be happy to try and answer some of your questions!","full_conversation":[{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"q43qjg","kind":"post","text":"Any allennlp users in this sub?\n\nI have a whole host of questions that the official allennlp docs are unclear on - too many to post individually here - but no one to answer them.\n\nIf there are any allennlp users in this sub who wouldn't mind discussing them with me one-on-one, I would appreciate it tremendously. Apologies for the nebulous post, but thank you in advance!","timestamp":"2021-10-08T18:29:05+00:00","score":6},{"role":"answerer","user_id":"anon_abce63617ea740ef","comment_id":"hh2d956","kind":"comment","text":"I use AllenNLP all the time and have made several contributions to the repo. I’d be happy to try and answer some of your questions!","timestamp":"2021-10-18T03:03:02+00:00","score":2},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"hh720bo","kind":"comment","text":"Awesome! Thanks for the reply.\n\nAs fate would have it, I no longer need answers to my questions urgently. But there's a good chance I'll need ask them in the future, if my colleagues decide to keep using AllenNLP.\n\nIf/when that time comes, do you mind if I DM you? f not, I will keep your name in my Reddit rolodex :)","timestamp":"2021-10-19T04:12:57+00:00","score":2},{"role":"answerer","user_id":"anon_abce63617ea740ef","comment_id":"hhpahxh","kind":"comment","text":"Yes of course! Feel free to DM.","timestamp":"2021-10-23T03:09:11+00:00","score":1},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"hhqyno7","kind":"comment","text":"Will do, many thanks :)","timestamp":"2021-10-23T15:22:16+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4c553590a59ddc34","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_abce63617ea740ef","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hh2d956","thanks_reply_id":"hh720bo","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_0eb70979f8e3e242","answerer_user_id":"anon_fdbd3a6b33e5117f","subreddit":"LanguageTechnology","timestamp":"2021-10-14T01:46:06+00:00","post_id":"q7ppn0","question":"Ways to reduce memory consumption in Q&A tasks without damage (or at least, not that much) the accuracy?\n\ni’m facing this problem: I’m trying to spend less memory in my Q&A task using bert. I debugged my steps and saw that the start\\_logits and end\\_logits\n\n>start\\_logits, end\\_logits = model(\\*\\*inputs) \n \n\ncosts more than 11gb of ram. Is there any ways to solve this? I mean, use less memory to perform this task without harm my model accuracy? If so, can someone share some of them? And some alternative ways in case is not possible to do this?","preferred_answer":"Hmm, well are you using bert-large? Perhaps you can try the smaller model if so? Alternatively you could setup an endpoint and cloud service to host your model that runs on GPU/TPU hardware ideally. Another more drastic solution would be trying distillation to teach a much smaller model.","full_conversation":[{"role":"OP","user_id":"anon_0eb70979f8e3e242","comment_id":"q7ppn0","kind":"post","text":"Ways to reduce memory consumption in Q&A tasks without damage (or at least, not that much) the accuracy?\n\ni’m facing this problem: I’m trying to spend less memory in my Q&A task using bert. I debugged my steps and saw that the start\\_logits and end\\_logits\n\n>start\\_logits, end\\_logits = model(\\*\\*inputs) \n \n\ncosts more than 11gb of ram. Is there any ways to solve this? I mean, use less memory to perform this task without harm my model accuracy? If so, can someone share some of them? And some alternative ways in case is not possible to do this?","timestamp":"2021-10-14T01:46:06+00:00","score":1},{"role":"answerer","user_id":"anon_fdbd3a6b33e5117f","comment_id":"hgke0ha","kind":"comment","text":"Hmm, well are you using bert-large? Perhaps you can try the smaller model if so? Alternatively you could setup an endpoint and cloud service to host your model that runs on GPU/TPU hardware ideally. Another more drastic solution would be trying distillation to teach a much smaller model.","timestamp":"2021-10-14T02:45:19+00:00","score":2},{"role":"OP","user_id":"anon_0eb70979f8e3e242","comment_id":"hglo75q","kind":"comment","text":"Thank you, i'll try these techniques... I'm already using a cloud service, but with limited use of GPU/TPU... I'll use a smaller model and see what happens. Otherwise, I'll try distillation (I never tried before, in case you have some tips, i would appreciate. Btw, thank you for replying my question!","timestamp":"2021-10-14T12:07:04+00:00","score":2},{"role":"answerer","user_id":"anon_fdbd3a6b33e5117f","comment_id":"hhy7lcp","kind":"comment","text":">Thank you, i'll try these techniques... I'm already using a cloud service, but with limited use of GPU/TPU... I'll use a smaller model and see what happens. Otherwise, I'll try distillation (I never tried before, in case you have some tips, i would appreciate. Btw, thank you for replying my question!\n\nNo prob! I forgot to mention DistillBert is a great smaller version of BERT if you haven't tried that already.","timestamp":"2021-10-25T04:32:37+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_0eb70979f8e3e242","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fdbd3a6b33e5117f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hgke0ha","thanks_reply_id":"hglo75q","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4599769e9b38e61b","answerer_user_id":"anon_4ee63958bd51edae","subreddit":"LanguageTechnology","timestamp":"2021-10-14T15:29:04+00:00","post_id":"q821td","question":"BERT models: how resilient are they to typos?\n\nHello,\n\nlet me introduce the context briefly: I'm fine tuning a generic BERT model for the context of food and beverage. The final goal is a classification task.\n\nTo train this model, I'm using a corpus of text gathered from blog posts, articles, magazines etc... that cover the topic.\n\nI am however facing a predicament that I don't know how to handle: specifically, there are sometimes words that either contain a typo, or maybe different accents, but that are semantically the same.\n\nLet me give you an example to briefly illustrate what I mean:\n\nThe wine `Gewürztraminer` is correctly written with the `ü`, however sometimes you also find it written with just a normal `u`, or some other times even just `Gewurtz`. There are several situations like this one.\n\nNow, a human being would obviously know that we're talking exactly about the same thing, but I have absolutely no idea about how BERT would handle these situations. Would it understand that they're the same thing? Would it consider them instead to be completely different words?\n\nI am currently in the process of cleaning my training data, fixing the typos and trying to even out all these inconsistencies, but at this point I'm not even sure if I should do that at all, considering that the text that will need to be classified can potentially contain typos and situations like the one described above.\n\nWhat would you guys suggest?","preferred_answer":"Have you examined the output of the tokenizer you're using to see how it's breaking those words down? Here's what I see from the BERT tokenizer (\"bert-base-cased\"):\n\n`In [3]: tok.tokenize(\"Gewürztraminer\")` \n`Out[3]: ['G', '##ew', '##ü', '##rz', '##tra', '##mine', '##r']` \n`In [4]: tok.tokenize(\"Gewurztraminer\")` \n`Out[4]: ['G', '##ew', '##ur', '##z', '##tra', '##mine', '##r']`\n\nSo there are similarities in the subword units that are being created, but it's not identical. You could theoretically get rid of diacritics, so your outputs are consistent at least...correcting words seems harder.","full_conversation":[{"role":"OP","user_id":"anon_4599769e9b38e61b","comment_id":"q821td","kind":"post","text":"BERT models: how resilient are they to typos?\n\nHello,\n\nlet me introduce the context briefly: I'm fine tuning a generic BERT model for the context of food and beverage. The final goal is a classification task.\n\nTo train this model, I'm using a corpus of text gathered from blog posts, articles, magazines etc... that cover the topic.\n\nI am however facing a predicament that I don't know how to handle: specifically, there are sometimes words that either contain a typo, or maybe different accents, but that are semantically the same.\n\nLet me give you an example to briefly illustrate what I mean:\n\nThe wine `Gewürztraminer` is correctly written with the `ü`, however sometimes you also find it written with just a normal `u`, or some other times even just `Gewurtz`. There are several situations like this one.\n\nNow, a human being would obviously know that we're talking exactly about the same thing, but I have absolutely no idea about how BERT would handle these situations. Would it understand that they're the same thing? Would it consider them instead to be completely different words?\n\nI am currently in the process of cleaning my training data, fixing the typos and trying to even out all these inconsistencies, but at this point I'm not even sure if I should do that at all, considering that the text that will need to be classified can potentially contain typos and situations like the one described above.\n\nWhat would you guys suggest?","timestamp":"2021-10-14T15:29:04+00:00","score":21},{"role":"answerer","user_id":"anon_4ee63958bd51edae","comment_id":"hgn4fbw","kind":"comment","text":"Have you examined the output of the tokenizer you're using to see how it's breaking those words down? Here's what I see from the BERT tokenizer (\"bert-base-cased\"):\n\n`In [3]: tok.tokenize(\"Gewürztraminer\")` \n`Out[3]: ['G', '##ew', '##ü', '##rz', '##tra', '##mine', '##r']` \n`In [4]: tok.tokenize(\"Gewurztraminer\")` \n`Out[4]: ['G', '##ew', '##ur', '##z', '##tra', '##mine', '##r']`\n\nSo there are similarities in the subword units that are being created, but it's not identical. You could theoretically get rid of diacritics, so your outputs are consistent at least...correcting words seems harder.","timestamp":"2021-10-14T18:31:38+00:00","score":3},{"role":"OP","user_id":"anon_4599769e9b38e61b","comment_id":"hgn4sbt","kind":"comment","text":"Getting rid of diacritics seems a good idea to start with, also thanks for specifying \"diacritics\" cause I didn't know that name!","timestamp":"2021-10-14T18:34:08+00:00","score":2},{"role":"answerer","user_id":"anon_4ee63958bd51edae","comment_id":"hgnbu6n","kind":"comment","text":"I didn't either prior to NLP and app development :) Odd word!","timestamp":"2021-10-14T19:22:59+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4599769e9b38e61b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4ee63958bd51edae","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hgn4fbw","thanks_reply_id":"hgn4sbt","post_score":21,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_97db364914a44fa4","answerer_user_id":"anon_7e110e8a7d6ee403","subreddit":"LanguageTechnology","timestamp":"2021-10-19T20:12:22+00:00","post_id":"qbjukd","question":"Help webscraping ACM Library (pull infomration that's not initially on the site)","preferred_answer":"Oh that's kinda interesting. The reason why is this website loads all that information server side so there's no need for the extra JS call to load the data because it's already there. Easy way to see what I'm talking about is to turn off JS in your chrome developer tools then scroll to the bottom of the page you linked to. All the author info that was in the sidebar after clicking the 'i' will be right there","full_conversation":[{"role":"OP","user_id":"anon_97db364914a44fa4","comment_id":"qbjukd","kind":"post","text":"Help webscraping ACM Library (pull infomration that's not initially on the site)","timestamp":"2021-10-19T20:12:22+00:00","score":3},{"role":"answerer","user_id":"anon_7e110e8a7d6ee403","comment_id":"hha59pa","kind":"comment","text":"Oh that's kinda interesting. The reason why is this website loads all that information server side so there's no need for the extra JS call to load the data because it's already there. Easy way to see what I'm talking about is to turn off JS in your chrome developer tools then scroll to the bottom of the page you linked to. All the author info that was in the sidebar after clicking the 'i' will be right there","timestamp":"2021-10-19T21:02:47+00:00","score":2},{"role":"OP","user_id":"anon_97db364914a44fa4","comment_id":"hhafmop","kind":"comment","text":"Thank you very much! It worked!\n\nWhat was your process to figure it out?\n\nI think that once I got the hint that the content could already be in the website (because the button didn't request anything) I could've printed the html my program got and Ctrl-F-ed the author's tags.\n\nAlthough this would've worked I would like to know if you did something similar or what went through your mind if you dont mind spending the time.\n\nI will also have the trick of looking at the website without Javascript in the future. Thank you very much again!","timestamp":"2021-10-19T22:17:09+00:00","score":1},{"role":"answerer","user_id":"anon_7e110e8a7d6ee403","comment_id":"hhalkrg","kind":"comment","text":"Yeah, I did the same thing you did initially which was wonder why the resource didn't load. But I work on an enterprise site full time and lots and lots of the time we show different stuff server side (in the HTML) than client side (loaded with JS) so it's a reflex for me to check. It's usually like 10 seconds to go to chrome developer tools, turn off javascript, and reload the page to see what pops up, so it's an easy one to check.\n\nI'd always keep that in mind to check JS and non-JS on the web. Especially since it's a lot easier to grab stuff that's not loaded JS anyways!","timestamp":"2021-10-19T23:02:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_97db364914a44fa4","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7e110e8a7d6ee403","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hha59pa","thanks_reply_id":"hhafmop","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_8c40472fd4404a37","answerer_user_id":"anon_8a4663d2712acaec","subreddit":"LanguageTechnology","timestamp":"2021-10-22T20:10:04+00:00","post_id":"qdp67x","question":"How do I fine-tune zero shot models?\n\nI want to fine tune a deberta model from huggingface .my objective is zero shot text classification as I donot know the classes.\n\nHow do I go about doing this? Would really appreciate some sample code as well.","preferred_answer":"It sounds like what you're looking for is topic modelling.\n\nThat said, HugginFace'a zeroshot pipeline uses NLI models so you could do something like domain adaption fine-tuning on the NLI task and use the new model in the pipeline. However, I don't believe you'll have much success with this as you'd need a lot of data. So you would need to construct pairs of (sentence, hypothesis) and label them according to the model e.g. entailment/contradiction/neutral.\n\nThe obvious answer is to look at how the Deberta model was trained for MNLI and copy that: [github](https://github.com/microsoft/DeBERTa)","full_conversation":[{"role":"OP","user_id":"anon_8c40472fd4404a37","comment_id":"qdp67x","kind":"post","text":"How do I fine-tune zero shot models?\n\nI want to fine tune a deberta model from huggingface .my objective is zero shot text classification as I donot know the classes.\n\nHow do I go about doing this? Would really appreciate some sample code as well.","timestamp":"2021-10-22T20:10:04+00:00","score":6},{"role":"answerer","user_id":"anon_8a4663d2712acaec","comment_id":"hhpxcxd","kind":"comment","text":"It sounds like what you're looking for is topic modelling.\n\nThat said, HugginFace'a zeroshot pipeline uses NLI models so you could do something like domain adaption fine-tuning on the NLI task and use the new model in the pipeline. However, I don't believe you'll have much success with this as you'd need a lot of data. So you would need to construct pairs of (sentence, hypothesis) and label them according to the model e.g. entailment/contradiction/neutral.\n\nThe obvious answer is to look at how the Deberta model was trained for MNLI and copy that: [github](https://github.com/microsoft/DeBERTa)","timestamp":"2021-10-23T07:41:25+00:00","score":1},{"role":"OP","user_id":"anon_8c40472fd4404a37","comment_id":"hhq26pz","kind":"comment","text":"Ok thanks. I'll have a look at the code .","timestamp":"2021-10-23T08:53:50+00:00","score":1},{"role":"answerer","user_id":"anon_8a4663d2712acaec","comment_id":"hhq59nx","kind":"comment","text":"As I say, your problem sound a lot like it could be solved by the judicious use of topic modelling but, if you're set on zeroshot, that's how you'd do it.\n\nI'm assuming you want to do fine-tuning because the Deberta model doesn't work well. There are, of course, other pre-trained NLI models you could try before jumping to fine-tuning.","timestamp":"2021-10-23T09:40:52+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8c40472fd4404a37","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a4663d2712acaec","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hhpxcxd","thanks_reply_id":"hhq26pz","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_d1d8c11952563006","answerer_user_id":"anon_880efaf1f1f6361c","subreddit":"LanguageTechnology","timestamp":"2021-10-23T03:58:57+00:00","post_id":"qdxcac","question":"[Python] Best Python NLP library to segment run-on and list-like sentences\n\nHi everyone!\n\nI am completely new to NLP and new to Python so I'm feeling a bit overwhelmed by the number of choices at the moment.\n\nI need a library that will allow me to take product titles such as these:\n\n1. 50/100pcs Kraft Paper Bag Gift Bags Packaging Biscuit Candy Food Cookie Bread Seen Snacks Baking Takeaway Bags\n2. Wholesale 2019 New Fashion 3D Mitsubishi Hat Cap Car logo MOTO GP Racing F1 Baseball Cap Hat Adjustable Casual Trucket Hat\n\nand run them through some function that will spit out something like this with added commas:\n\n1. 50/100pcs Kraft Paper Bag, Gift Bags, Packaging, Biscuit, Candy, Food, Cookie, Bread, Seen Snacks, Baking, Takeaway Bags\n2. Wholesale 2019, New Fashion, 3D Mitsubishi Hat, Cap, Car logo, MOTO GP Racing, F1, Baseball Cap, Hat, Adjustable, Casual, Trucket Hat\n\nSo it's very close to segmenting a paragraph into sentences but not quite.\n\nI need something that, ideally, already has a good dictionary and, mandatorily, provides support for both English and Portuguese. The more languages, the better.\n\nWhat do you recommend? What specific functions in the recommended libraries should I look into? I have already checked out spacy and it's dictionary was pretty good. Is it the best option? What specific functions would I use for this? Would I need to create one of my own based on grammar?\n\nThanks a lot!\n\n**EDIT:** Another thing I'd like is a way to detect sections in product titles containing brand and model names. For example:\n\n**Vgate Icar2 Obd2 Scanner ELM327 BT ELM 327 V2.1 Obd 2 Wifi Icar 2** Auto Diagnostic Tool For Android/Pc/Ios Code Reader\n\nThe first part of this sentence, which I bolded for emphasis is basically just the brand and model numbers. Is there a ready-made solution I could use to I automatically detect and segment these, perhaps based on the presence of numbers, abbreviations and unknown words?","preferred_answer":"Sorry, I should have been clearer. If the built in noun-chunking functions don't work then you will have to build the rule set that will do that yourself. So, you'd take a sample of the sentences and look at how they are being tagged by the model so that you can start extracting the compound words. You could do also bulld the ruleset from how you think it should be based on your own understanding of grammar.\n\nDo you know if the sentence is Spanish or Portuguese or English before hand? Or will you also need to detect the language before hand? \n\n\nThe question of out of vocabulary errors is problematic, I don't know how you would go around that you could try to retrain the models or use a larger one.","full_conversation":[{"role":"OP","user_id":"anon_d1d8c11952563006","comment_id":"qdxcac","kind":"post","text":"[Python] Best Python NLP library to segment run-on and list-like sentences\n\nHi everyone!\n\nI am completely new to NLP and new to Python so I'm feeling a bit overwhelmed by the number of choices at the moment.\n\nI need a library that will allow me to take product titles such as these:\n\n1. 50/100pcs Kraft Paper Bag Gift Bags Packaging Biscuit Candy Food Cookie Bread Seen Snacks Baking Takeaway Bags\n2. Wholesale 2019 New Fashion 3D Mitsubishi Hat Cap Car logo MOTO GP Racing F1 Baseball Cap Hat Adjustable Casual Trucket Hat\n\nand run them through some function that will spit out something like this with added commas:\n\n1. 50/100pcs Kraft Paper Bag, Gift Bags, Packaging, Biscuit, Candy, Food, Cookie, Bread, Seen Snacks, Baking, Takeaway Bags\n2. Wholesale 2019, New Fashion, 3D Mitsubishi Hat, Cap, Car logo, MOTO GP Racing, F1, Baseball Cap, Hat, Adjustable, Casual, Trucket Hat\n\nSo it's very close to segmenting a paragraph into sentences but not quite.\n\nI need something that, ideally, already has a good dictionary and, mandatorily, provides support for both English and Portuguese. The more languages, the better.\n\nWhat do you recommend? What specific functions in the recommended libraries should I look into? I have already checked out spacy and it's dictionary was pretty good. Is it the best option? What specific functions would I use for this? Would I need to create one of my own based on grammar?\n\nThanks a lot!\n\n**EDIT:** Another thing I'd like is a way to detect sections in product titles containing brand and model names. For example:\n\n**Vgate Icar2 Obd2 Scanner ELM327 BT ELM 327 V2.1 Obd 2 Wifi Icar 2** Auto Diagnostic Tool For Android/Pc/Ios Code Reader\n\nThe first part of this sentence, which I bolded for emphasis is basically just the brand and model numbers. Is there a ready-made solution I could use to I automatically detect and segment these, perhaps based on the presence of numbers, abbreviations and unknown words?","timestamp":"2021-10-23T03:58:57+00:00","score":11},{"role":"answerer","user_id":"anon_880efaf1f1f6361c","comment_id":"hhu97im","kind":"comment","text":"Sorry, I should have been clearer. If the built in noun-chunking functions don't work then you will have to build the rule set that will do that yourself. So, you'd take a sample of the sentences and look at how they are being tagged by the model so that you can start extracting the compound words. You could do also bulld the ruleset from how you think it should be based on your own understanding of grammar.\n\nDo you know if the sentence is Spanish or Portuguese or English before hand? Or will you also need to detect the language before hand? \n\n\nThe question of out of vocabulary errors is problematic, I don't know how you would go around that you could try to retrain the models or use a larger one.","timestamp":"2021-10-24T08:22:55+00:00","score":2},{"role":"OP","user_id":"anon_d1d8c11952563006","comment_id":"hhvagih","kind":"comment","text":"Oh, I see! Sounds great, I think I can do that. Thank you so much!\n\nI believe I will be able to have access to all titles beforehand so I will create a vocabulary list for them and expand the dictionary as necessary. Thanks again for all your help!","timestamp":"2021-10-24T15:09:50+00:00","score":1},{"role":"answerer","user_id":"anon_880efaf1f1f6361c","comment_id":"hhvaq9v","kind":"comment","text":"No problem, good luck!","timestamp":"2021-10-24T15:11:55+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d1d8c11952563006","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_880efaf1f1f6361c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hhu97im","thanks_reply_id":"hhvagih","post_score":11,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_5176417e9c08e0fe","answerer_user_id":"anon_b35a3531a0d770da","subreddit":"LanguageTechnology","timestamp":"2021-10-24T23:25:09+00:00","post_id":"qf3uyp","question":"NLP + documenting endangered +/ extinct languages?\n\nI'm really sorry if this is vague, but I wanted to write about NLP used for documenting endangered and/or extinct languages... for anyone experienced in NLP, what would that look like?","preferred_answer":"i've got a lot of articles saved on this as i've been working on a similar project for the last couple months. on mobile atm but when i get home from work i can share some of my favourites if you'd like!\n\noff the top of my head, though, Lucy Derlin's SwissCrawl and SwissText provide an excellent methodology for the automated corpus collection for resource scarce languages.","full_conversation":[{"role":"OP","user_id":"anon_5176417e9c08e0fe","comment_id":"qf3uyp","kind":"post","text":"NLP + documenting endangered +/ extinct languages?\n\nI'm really sorry if this is vague, but I wanted to write about NLP used for documenting endangered and/or extinct languages... for anyone experienced in NLP, what would that look like?","timestamp":"2021-10-24T23:25:09+00:00","score":6},{"role":"answerer","user_id":"anon_b35a3531a0d770da","comment_id":"hidgt6q","kind":"comment","text":"i've got a lot of articles saved on this as i've been working on a similar project for the last couple months. on mobile atm but when i get home from work i can share some of my favourites if you'd like!\n\noff the top of my head, though, Lucy Derlin's SwissCrawl and SwissText provide an excellent methodology for the automated corpus collection for resource scarce languages.","timestamp":"2021-10-28T12:39:54+00:00","score":2},{"role":"OP","user_id":"anon_5176417e9c08e0fe","comment_id":"hidjpi2","kind":"comment","text":"sharing those would be amazing, thank you!! and i will definitely look into those resources :)","timestamp":"2021-10-28T13:04:29+00:00","score":2},{"role":"answerer","user_id":"anon_b35a3531a0d770da","comment_id":"hixb3x3","kind":"comment","text":"here's some of the highlights from my folder of documents lol -- i came into this as just a linguist with no NLP knowledge, so this might be too basic for you, but i found a lot of it really helpful! and even if it's old hat, the citations in these articles could also be of help, i hope.\n\nNLP & lang doc specifically\n\n* Sarah Moeller's PhD Dissertation, \"[Machine Learning for Language Documentation and Linguistic Analysis](https://www.researchgate.net/publication/338718924_Machine_Learning_for_Language_Documentation_and_Linguistic_Analysis?enrichId=rgreq-b9cd6f716493685f21b0d9de98806509-XXX&enrichSource=Y292ZXJQYWdlOzMzODcxODkyNDtBUzo4NTA1NzA4ODk5MzY4OTdAMTU3OTgwMzMxMTkyMw%3D%3D&el=1_x_3&_esc=publicationCoverPdf)\" -- this is an proposal for a super ambitious project that i'm very curious about (haven't looked further since i first read this months ago tho), and as someone who had like no NLP knowledge going into this, it was a good stepping stone to see what the relevant technologies were and what they can help with\n* [The Welsh Language Technology Action Plan](https://gov.wales/sites/default/files/publications/2018-12/welsh-language-technology-and-digital-media-action-plan.pdf) \\-- gave me some context for an actual government-supported use of technology for language revitalization (which you didn't ask about, but it's up my alley lol)\n* Le & Sadat, \"[Revitalization of Indigenous Languages through Pre-processing and Neural Machine Translation: The case of Inuktitut](https://aclanthology.org/2020.coling-main.410.pdf)\" -- they already had a huge parallel corpus to work with, but still useful information imo and a very cool project\n* from the proceedings of LREC 2016 -- Arppe et al., \"[Basic Language Resource Kits for Endangered Languages: A Case Study of Plains Cree](http://www.lrec-conf.org/proceedings/lrec2016/workshops/LREC2016Workshop-CCURL2016_Proceedings.pdf)\" -- in conjunction, i would recommend reading Krauwer's stuff on BLARK (one is [here](http://www.elsnet.org/dox/krauwer-specom2003.pdf)), even though ELSNET's website doesn't seem to be actively maintained, it helped me. but this particular paper had good info on how to apply the principles of BLARK to an endangered langauge situation.\n\nNLP-adjacent things dealing specifically with low-resource languages\n\n* Grießhaber et al., \"[Fine-tuning BERT for Low-Resource Natural Language Understanding via Active Learning](https://aclanthology.org/2020.coling-main.100.pdf)\"\n* Linder et al., \"[Automatic Creation of Text Corpora for Low-Resource Languages from the Internet: The Case of Swiss German](https://arxiv.org/pdf/1912.00159v3.pdf)\" -- i'm using this to inform the methodology behind the development of a LID model, it seems really good for endangered or low resource languages with a web presence. based off of their work, i required 60k sentences in the target language, so i'd keep that in mind.\n* Loubser & Puttkammer, \"[Viability of Neural Networks for Core Technologies for Resource-Scarce Languages](https://www.mdpi.com/2078-2489/11/1/41/htm)\" -- tests some different NLP tools on different low-resource bantu languages. they refer to analytic and synthetic languages as disjunctive and conjunctive, which i'd never seen before, figured that was worth a mention because it confused me...\n* Nowakowski et al., \"[Improving Basic Natural Language Processing Tools for the Ainu Language](https://www.mdpi.com/2078-2489/10/11/329/htm)\" -- uses additional resource to develop a preexisting tool for Ainu\n\ni also really like this older paper, [\"Mining the Web to Create Minority Language Corpora\"](http://www.cs.cmu.edu/~TextLearning/corpusbuilder/papers/cikm2001.pdf) (Ghani et al.) -- the technology isn't what i'm using specifically for what i've been looking into, but i liked their methods of keyword selection VIA prompting native speakers for certain types of words, so i thought it was worth a mention.\n\ntbh, the issue of Information titled \"Computational Linguistics for Low-Resource Languages\" has a lot of great info, i only named some articles here, but it's all open-access.","timestamp":"2021-11-01T20:12:16+00:00","score":2},{"role":"OP","user_id":"anon_5176417e9c08e0fe","comment_id":"hjovpl9","kind":"comment","text":"I apologize, this is really late, but THANK YOU!! I will definitely look into all of those, and I would definitely award you the helpful award if I had it smh. But thank you and have a blessed day!!","timestamp":"2021-11-07T16:36:21+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_5176417e9c08e0fe","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b35a3531a0d770da","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hidgt6q","thanks_reply_id":"hidjpi2","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_056e4daa39639f2e","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2021-11-06T11:02:16+00:00","post_id":"qnxzlt","question":"Word senses clustering with state-of-the-art models?\n\nHi everyone\n\nI'm a CS student trying to study and research on a specific topic for my AI class. I'm literally new to this field but done some searches about the topic.\n\nAs the Header says, I'm trying to semantically cluster polysemous words or word with different meanings in a corpus.\n\nmy input is: a corpus\n\nthe output I want is: clustering of different meanings of K frequent words with their semantical synonyms; e.g.: suppose word \"cell\" is 1000 time frequent in corpus but with different meanings, like the sentence \" *There are many organelles in a biological* ***cell*** \" the cell here is related semantically to biological stuff or the sentence \" *He went to prison* ***cell*** \" cell here means prison or we mean mobile for cell in \"cell phone\", so we have some clusters of cell with their synonyms.\n\nFinding the K frequent words is kind of preprocessing and can be done easily.\n\nFor the clustering part I searched for related papers, there was a wordnet that seems to be similar!\n\nAlso there are some literature word embeddings like Glove, FastText, Word2vec, Bert, Elmo (which is contextualized and seems to be helpful) that can propose similar vectors, The vectors with the highest percentage of similarity will be selected.\n\nThe thing is most words have multiple senses and as I said explained above each meaning of word is contextualized to the correspondent sentence. I thought that would be cool if we make a BERT vector (e.g. cell as in cell phone) of one of the K frequent words and compare it with other sentences in our corpus. (that's actually my first intuition but not sure about under the hood) so we would have clusters of polysemous words with their semantically similar meanings in a cluster, plus keeping their correspondent sentences as an example for later use.\n\nI'm not sure If this is the right way to do it or not! but I'm asking my question here, to get another intuitions if possible or to know other more accurate and popular techniques in the field.\n\nthanks for your time.\n\nany information would be helpful.","preferred_answer":"This would generally be a word sense disambiguation component, for techniques on that, take a look at e.g. http://nlpprogress.com/english/word_sense_disambiguation.html","full_conversation":[{"role":"OP","user_id":"anon_056e4daa39639f2e","comment_id":"qnxzlt","kind":"post","text":"Word senses clustering with state-of-the-art models?\n\nHi everyone\n\nI'm a CS student trying to study and research on a specific topic for my AI class. I'm literally new to this field but done some searches about the topic.\n\nAs the Header says, I'm trying to semantically cluster polysemous words or word with different meanings in a corpus.\n\nmy input is: a corpus\n\nthe output I want is: clustering of different meanings of K frequent words with their semantical synonyms; e.g.: suppose word \"cell\" is 1000 time frequent in corpus but with different meanings, like the sentence \" *There are many organelles in a biological* ***cell*** \" the cell here is related semantically to biological stuff or the sentence \" *He went to prison* ***cell*** \" cell here means prison or we mean mobile for cell in \"cell phone\", so we have some clusters of cell with their synonyms.\n\nFinding the K frequent words is kind of preprocessing and can be done easily.\n\nFor the clustering part I searched for related papers, there was a wordnet that seems to be similar!\n\nAlso there are some literature word embeddings like Glove, FastText, Word2vec, Bert, Elmo (which is contextualized and seems to be helpful) that can propose similar vectors, The vectors with the highest percentage of similarity will be selected.\n\nThe thing is most words have multiple senses and as I said explained above each meaning of word is contextualized to the correspondent sentence. I thought that would be cool if we make a BERT vector (e.g. cell as in cell phone) of one of the K frequent words and compare it with other sentences in our corpus. (that's actually my first intuition but not sure about under the hood) so we would have clusters of polysemous words with their semantically similar meanings in a cluster, plus keeping their correspondent sentences as an example for later use.\n\nI'm not sure If this is the right way to do it or not! but I'm asking my question here, to get another intuitions if possible or to know other more accurate and popular techniques in the field.\n\nthanks for your time.\n\nany information would be helpful.","timestamp":"2021-11-06T11:02:16+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"hjk75u2","kind":"comment","text":"This would generally be a word sense disambiguation component, for techniques on that, take a look at e.g. http://nlpprogress.com/english/word_sense_disambiguation.html","timestamp":"2021-11-06T15:32:00+00:00","score":2},{"role":"OP","user_id":"anon_056e4daa39639f2e","comment_id":"hjks7wm","kind":"comment","text":"Thanks.\n\nWSD seems kinda different from what I want, actually not sure! see the image bellow.\n\n[This is a similar image of what I want but for one word \\[search\\].](https://imgur.com/a/rqVoriw)","timestamp":"2021-11-06T18:01:10+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"hjnrmln","kind":"comment","text":"Have you considered Princeton WordNet? E.g. http://wordnetweb.princeton.edu/perl/webwn?o2=&o0=1&o8=1&o1=1&o7=&o5=&o9=&o6=&o3=&o4=&s=search&i=6&h=000001000000#c","timestamp":"2021-11-07T10:50:00+00:00","score":2},{"role":"OP","user_id":"anon_056e4daa39639f2e","comment_id":"hjntd8y","kind":"comment","text":"Good point, but WordNet is crafted and compiled painstakingly via human effort, I'm looking for same thing through using SOTA word embeddings.","timestamp":"2021-11-07T11:14:48+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"hjoc9fk","kind":"comment","text":"Since a decent resource exists for English, there's not much serious effort on trying similar things without using WN data as a key part of the solution (i.e. perhaps you do an embedding-based solution for words not covered by PWN but use PWN for the common words) ; however, I believe that some of wordnets for other languages started with automatic sense clusters - though that still involves human effort after the automatic clusters, so the automatic clusters are essentially done *once per language* and are not very useful afterwards as soon as someone has put in the manual work to create some more accurate data; this is a field where at least a bit of human effort helps a lot; the quality of purely automatic results is not sufficient to make it useful for any practical purpose and there's not much motivation to avoid human effort (except to say \"yaay I did a toy dataset without manual corrections) where it actually is useful; you automate what can be automated, but not more.","timestamp":"2021-11-07T14:22:14+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_056e4daa39639f2e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hjk75u2","thanks_reply_id":"hjks7wm","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_da5d47bc2dbfa32a","answerer_user_id":"anon_8c7e15c2d14ff69c","subreddit":"LanguageTechnology","timestamp":"2021-11-20T03:35:54+00:00","post_id":"qxwv30","question":"Job offer advice for new grad interested in NLP\n\nHi everyone.\n\nI am a new grad trying to pick my first software engineering job. As an undergrad, I had a strong interest in NLP and did research in that area, and I would like to continue working in NLP. I am deciding between two job offers.\n\nAt the first company, I would be working in NLU/NLG teams for the company's voice assistant technologies. They also publish often, which sounds nice to me since I might consider grad school in the long term. However, they are offering me a systems role, so I will mostly be working on ML infrastructure (C++) without manipulating their models or doing core ML engineering.\n\nAt the second company, I am hired as an ML engineer, but I will be working on ranking. The tech stack is mostly Python. The downside is that I won’t be doing any NLP work.\n\nIf I want to have a career in NLP, would accepting the first company be better, even if I am not working directly on the models as an ML engineer? Or would it be most important to have the title of \"ML engineer\" even if I am working on a different problem area?","preferred_answer":"congrats on your offers! \n\nLittle background before giving any advice:\n\nI worked as a software eng for 1y (completely unrelated to NLP), went to grad school for Computational linguistics, and worked as an NLP Resesrch Assistant -> Scientist/Engineer in different roles for about 2y.\n\n\n\nIn terms of setting you up for a career in NLP:\n\n1 - If you are planning on grad school, both of these are great experience imo\n\n2 - You said you'd be working on ranking. Is this ranking in Information Retrieval? I wouldn't say that's completely unrelated to NLP. \n\n>> IMO, if you are looking to go from this job to another job specifcally to work on NLP models, job #2 will be more valuable. You'll gain experience modelling and learn a lot more from your seniors about what types of decisions come along with it & that's exactly what you'll be asked about in your interviews for a modelling role.\n\nSidenote: The title \"ML Engineer\" is has a lot of different definitions in job descriptions, so the name of the title is not that important if that was a concern IMO\n\n^ sort of a lot I had to assume & I'm sure there are things I misinterpreted. Feel free to msg/ I'm happy to give insight!","full_conversation":[{"role":"OP","user_id":"anon_da5d47bc2dbfa32a","comment_id":"qxwv30","kind":"post","text":"Job offer advice for new grad interested in NLP\n\nHi everyone.\n\nI am a new grad trying to pick my first software engineering job. As an undergrad, I had a strong interest in NLP and did research in that area, and I would like to continue working in NLP. I am deciding between two job offers.\n\nAt the first company, I would be working in NLU/NLG teams for the company's voice assistant technologies. They also publish often, which sounds nice to me since I might consider grad school in the long term. However, they are offering me a systems role, so I will mostly be working on ML infrastructure (C++) without manipulating their models or doing core ML engineering.\n\nAt the second company, I am hired as an ML engineer, but I will be working on ranking. The tech stack is mostly Python. The downside is that I won’t be doing any NLP work.\n\nIf I want to have a career in NLP, would accepting the first company be better, even if I am not working directly on the models as an ML engineer? Or would it be most important to have the title of \"ML engineer\" even if I am working on a different problem area?","timestamp":"2021-11-20T03:35:54+00:00","score":15},{"role":"answerer","user_id":"anon_8c7e15c2d14ff69c","comment_id":"hlcijy4","kind":"comment","text":"congrats on your offers! \n\nLittle background before giving any advice:\n\nI worked as a software eng for 1y (completely unrelated to NLP), went to grad school for Computational linguistics, and worked as an NLP Resesrch Assistant -> Scientist/Engineer in different roles for about 2y.\n\n\n\nIn terms of setting you up for a career in NLP:\n\n1 - If you are planning on grad school, both of these are great experience imo\n\n2 - You said you'd be working on ranking. Is this ranking in Information Retrieval? I wouldn't say that's completely unrelated to NLP. \n\n>> IMO, if you are looking to go from this job to another job specifcally to work on NLP models, job #2 will be more valuable. You'll gain experience modelling and learn a lot more from your seniors about what types of decisions come along with it & that's exactly what you'll be asked about in your interviews for a modelling role.\n\nSidenote: The title \"ML Engineer\" is has a lot of different definitions in job descriptions, so the name of the title is not that important if that was a concern IMO\n\n^ sort of a lot I had to assume & I'm sure there are things I misinterpreted. Feel free to msg/ I'm happy to give insight!","timestamp":"2021-11-20T03:59:49+00:00","score":7},{"role":"OP","user_id":"anon_da5d47bc2dbfa32a","comment_id":"hlcm2z5","kind":"comment","text":"Thank you very much for the insight!\n\nAt the second job, I would be working on ranking for a friend recommendation feature. They were explicit that it involves no text processing or NLP.\n\nI'm definitely considering grad school in computational linguistics/NLP, so it's good to hear that both would help me gain useful experience!","timestamp":"2021-11-20T04:32:44+00:00","score":3},{"role":"answerer","user_id":"anon_8c7e15c2d14ff69c","comment_id":"hlcnwm1","kind":"comment","text":"No problem!\n\nAhhh, I see, that makes more sense. I think I'd still lean towards gaining hands-on modeling experience, but that's coming from a modeler so all bias be told! Haha\n\nRight on, best of luck and feel free to reach out!","timestamp":"2021-11-20T04:50:23+00:00","score":5}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_da5d47bc2dbfa32a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8c7e15c2d14ff69c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hlcijy4","thanks_reply_id":"hlcm2z5","post_score":15,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_0ad77bc4fdc2965b","answerer_user_id":"anon_cf6ab3eb2f1e6fe8","subreddit":"LanguageTechnology","timestamp":"2021-11-21T10:35:37+00:00","post_id":"qysddr","question":"How to extract prepositions from parallel texts?\n\nHello.\n\nI have parallel texts in English-German and English French.\n\n EN.txt = \"The hat is on the table.\\n The picture is on the wall.\\n The bottle is under the sink.\"\n DE.txt = \"Der Hut liegt auf dem Tisch.\\n Das Bild hängt an der Wand.\\n Die Flasche ist unter dem Waschbecken.\"\n FR.txt = \"Le chapeau est sur la table.\\n La photo est sur le mur.\\n La bouteille est sous l'évier.\"\n\nI would like to extract the prepositions from the EN-DE, EN-FR sentence pairs and create some kind of frequency counter in a dictionary of the pairs. Something like this, I guess:\n\n EN_DE = {\"on\":{\"auf\":1, \"an\":1}, \"under\":{\"unter\":1}} \n\nEventually, I'd like to create an alignment matrix or a heatmap with the frequencies.\n\n​\n\nSome questions:\n\n1. Is this feasible?\n2. How should I go about doing this? Algorithmically, I think I need to tokenise the sentences, POS tag them using Stanza, **figure out what prepositions in English Sentence X align with what prepositions in German Sentence X**, and then update the counter dictionary.\n3. The bold part is what I am particularly having trouble with. Any idea how I can best do that?\n4. I am thinking of doing this in a pandas DataFrame. Is that a good idea?\n5. Any other approaches to this problem?\n\nPlease, any advice or suggestions would be much appreciated.\n\nI am very much a beginner programmer. I'm a linguist trying to use computational tools to analyse my data, but I feel like I might be out of my league.\n\nThank you in advance for your suggestions.","preferred_answer":"If fast_align gives accurate enough pairings for you then you can simply go through all the prepositions and use the fast_align indices to find the matching word. With the i-j Pharaoh format, you might get one word with multiple matches both ways. So you can have 0-1 0-2 or 0-1 1-1 so you would have to decide how to deal with that. Other than that it shouldn't be too complicated code wise. Go through the prepositions in English, grab the matching German word/words, find the key in your EN_DE dict and add one to the frequency.","full_conversation":[{"role":"OP","user_id":"anon_0ad77bc4fdc2965b","comment_id":"qysddr","kind":"post","text":"How to extract prepositions from parallel texts?\n\nHello.\n\nI have parallel texts in English-German and English French.\n\n EN.txt = \"The hat is on the table.\\n The picture is on the wall.\\n The bottle is under the sink.\"\n DE.txt = \"Der Hut liegt auf dem Tisch.\\n Das Bild hängt an der Wand.\\n Die Flasche ist unter dem Waschbecken.\"\n FR.txt = \"Le chapeau est sur la table.\\n La photo est sur le mur.\\n La bouteille est sous l'évier.\"\n\nI would like to extract the prepositions from the EN-DE, EN-FR sentence pairs and create some kind of frequency counter in a dictionary of the pairs. Something like this, I guess:\n\n EN_DE = {\"on\":{\"auf\":1, \"an\":1}, \"under\":{\"unter\":1}} \n\nEventually, I'd like to create an alignment matrix or a heatmap with the frequencies.\n\n​\n\nSome questions:\n\n1. Is this feasible?\n2. How should I go about doing this? Algorithmically, I think I need to tokenise the sentences, POS tag them using Stanza, **figure out what prepositions in English Sentence X align with what prepositions in German Sentence X**, and then update the counter dictionary.\n3. The bold part is what I am particularly having trouble with. Any idea how I can best do that?\n4. I am thinking of doing this in a pandas DataFrame. Is that a good idea?\n5. Any other approaches to this problem?\n\nPlease, any advice or suggestions would be much appreciated.\n\nI am very much a beginner programmer. I'm a linguist trying to use computational tools to analyse my data, but I feel like I might be out of my league.\n\nThank you in advance for your suggestions.","timestamp":"2021-11-21T10:35:37+00:00","score":6},{"role":"answerer","user_id":"anon_cf6ab3eb2f1e6fe8","comment_id":"hlkanoe","kind":"comment","text":"If fast_align gives accurate enough pairings for you then you can simply go through all the prepositions and use the fast_align indices to find the matching word. With the i-j Pharaoh format, you might get one word with multiple matches both ways. So you can have 0-1 0-2 or 0-1 1-1 so you would have to decide how to deal with that. Other than that it shouldn't be too complicated code wise. Go through the prepositions in English, grab the matching German word/words, find the key in your EN_DE dict and add one to the frequency.","timestamp":"2021-11-21T22:03:44+00:00","score":1},{"role":"OP","user_id":"anon_0ad77bc4fdc2965b","comment_id":"hlxje2w","kind":"comment","text":"Hi! Thank you for your response! \n\nThat makes sense in principle, but I'm not sure what this would look like in practice. \n\nLike, let's say I have this: \n\n`[[\"The\", \"hat\", \"is\", \"on\", \"the\", \"table\"], [\"Der\", \"Hut\", \"liegt\", \"auf\", \"dem\", \"Tisch\"], [0-0, 1-1, 2-2, 3-3, 4-4, 5-5]]`\n\nHow can use the fast\\_align indices to indicate the position in the EN/DE list of tokenised words?","timestamp":"2021-11-24T18:30:21+00:00","score":1},{"role":"answerer","user_id":"anon_cf6ab3eb2f1e6fe8","comment_id":"hm0gyxf","kind":"comment","text":"If your tokens are pos tagged then save the indices of the prepositions, go through all the fast_align indices and find all the ones where the i index (from fast_align i-j) matches the prepositions index, take the j index and grab the token from the second list at that index. Sorry if I misunderstood or didn't explain well but it seems to me like that's all you need to do.","timestamp":"2021-11-25T08:14:38+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_0ad77bc4fdc2965b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cf6ab3eb2f1e6fe8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hlkanoe","thanks_reply_id":"hlxje2w","post_score":6,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_4781a8d5e0064083","answerer_user_id":"anon_7d79d484505438b5","subreddit":"LanguageTechnology","timestamp":"2021-12-07T14:27:37+00:00","post_id":"rb0d5n","question":"How to implement a weighted string classifier that results in an exportable model and also gives a confidence score?\n\nHi there! I've been recently working on a side project that works vaguely like this:\n\n[https://imgur.com/a/g1FvKCM](https://imgur.com/a/g1FvKCM) <-- link to flowchart cause apparently you guys hate images\n\nI already built the labeler, as you can see from the image it produces an already cleaned CSV file with the structure\n\n>lowercase stopwords removed string i want to classify , \\[1/-1\\]\n\nWith 1 or -1 as the value I want to label to that string with.\n\n*BTW: the project is all on Python3.*\n\nNow, I need to build the classifier with these needs:\n\n* Creates an exportable model I can then use in a discriminator, that will process future inputs based on this model\n * I absolutely need the discriminator to give me a confidence score when evaluating the inputs because I will pick only output with a certain confidence score or higher\n* Applies a weight based on data recency, last data in the file gets a higher weight\n * In a scale from 0 \"I don't consider this at all\" to 1 \"this is the most important piece of information I will ever handle\" I would like to apply a soft growing weight, something like [this](https://imgur.com/a/mIoaaD8)\n * I don't actually know if this is possible or not but if possible I would definitely do this even if makes things way more complicated\n\nNow, all the tutorials and GitHub repos and videos always went with the Bayes or Linear Regression approach, which I also tried and resulted in a not-that-bad result, with the KPI of AUC around 0.7, but it didn't solve either of the two problems before presented in the bullet list so I'm quite stuck.\n\nI did some image processing in the past so I thought it would have been easier to handle strings but until now it's giving me some troubles.\n\nI really appreciate any support comment, any indication, guide or study material to look after. Thank you all.\n\n**TLDR: Just read the title**","preferred_answer":"This seems like a straightforward sequence classification task, for which the common solution is BERT. For an out-of-the-box discriminator which you can train using your data, look at huggingface's BertForSequenceClassification. As for your weighting scheme, I don't really understand why you would want this; if all samples are out of the domain of possible data you would see in production, you want to include it in your training set with equal \"weight\" of any other point. If it's not representative of what the model would encounter in the future, then you should not train on it period. It's the job of the model to determine which features are important in classification, not yours.\n\nThe model described above produces softmax outputs representing a normalized confidence in the data belonging to any one class. For a discriminator, one would return the class prediction with the maximum value on this output, but you could just use that output as your confidence metric.","full_conversation":[{"role":"OP","user_id":"anon_4781a8d5e0064083","comment_id":"rb0d5n","kind":"post","text":"How to implement a weighted string classifier that results in an exportable model and also gives a confidence score?\n\nHi there! I've been recently working on a side project that works vaguely like this:\n\n[https://imgur.com/a/g1FvKCM](https://imgur.com/a/g1FvKCM) <-- link to flowchart cause apparently you guys hate images\n\nI already built the labeler, as you can see from the image it produces an already cleaned CSV file with the structure\n\n>lowercase stopwords removed string i want to classify , \\[1/-1\\]\n\nWith 1 or -1 as the value I want to label to that string with.\n\n*BTW: the project is all on Python3.*\n\nNow, I need to build the classifier with these needs:\n\n* Creates an exportable model I can then use in a discriminator, that will process future inputs based on this model\n * I absolutely need the discriminator to give me a confidence score when evaluating the inputs because I will pick only output with a certain confidence score or higher\n* Applies a weight based on data recency, last data in the file gets a higher weight\n * In a scale from 0 \"I don't consider this at all\" to 1 \"this is the most important piece of information I will ever handle\" I would like to apply a soft growing weight, something like [this](https://imgur.com/a/mIoaaD8)\n * I don't actually know if this is possible or not but if possible I would definitely do this even if makes things way more complicated\n\nNow, all the tutorials and GitHub repos and videos always went with the Bayes or Linear Regression approach, which I also tried and resulted in a not-that-bad result, with the KPI of AUC around 0.7, but it didn't solve either of the two problems before presented in the bullet list so I'm quite stuck.\n\nI did some image processing in the past so I thought it would have been easier to handle strings but until now it's giving me some troubles.\n\nI really appreciate any support comment, any indication, guide or study material to look after. Thank you all.\n\n**TLDR: Just read the title**","timestamp":"2021-12-07T14:27:37+00:00","score":2},{"role":"answerer","user_id":"anon_7d79d484505438b5","comment_id":"hnll5gj","kind":"comment","text":"This seems like a straightforward sequence classification task, for which the common solution is BERT. For an out-of-the-box discriminator which you can train using your data, look at huggingface's BertForSequenceClassification. As for your weighting scheme, I don't really understand why you would want this; if all samples are out of the domain of possible data you would see in production, you want to include it in your training set with equal \"weight\" of any other point. If it's not representative of what the model would encounter in the future, then you should not train on it period. It's the job of the model to determine which features are important in classification, not yours.\n\nThe model described above produces softmax outputs representing a normalized confidence in the data belonging to any one class. For a discriminator, one would return the class prediction with the maximum value on this output, but you could just use that output as your confidence metric.","timestamp":"2021-12-07T14:57:48+00:00","score":5},{"role":"OP","user_id":"anon_4781a8d5e0064083","comment_id":"hnlo2uo","kind":"comment","text":"Thanks for the reply. About the weighting stuff, yes all data in the dataset are in the domain of what will be available in production but I would like to make sure that if a certain data was classified X more recently it it much important than if it was classified the same way but earlier.","timestamp":"2021-12-07T15:18:53+00:00","score":2},{"role":"answerer","user_id":"anon_7d79d484505438b5","comment_id":"hnltkzf","kind":"comment","text":"You can train the model on the newer data more times than the older data, but make sure you have enough as to not overfit on the brand new data. This would require retraining the model at regular intervals.","timestamp":"2021-12-07T15:58:47+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4781a8d5e0064083","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7d79d484505438b5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hnll5gj","thanks_reply_id":"hnlo2uo","post_score":2,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_bffc28814d210da8","answerer_user_id":"anon_05a633e185744819","subreddit":"LanguageTechnology","timestamp":"2021-12-07T17:27:33+00:00","post_id":"rb3tvm","question":"Has anybody tried to retrain Stanza NER on new data?\n\nI have been trying to follow the instructions in this page [https://stanfordnlp.github.io/stanza/training.html#ner-data](https://stanfordnlp.github.io/stanza/training.html#ner-data) to retrain Stanza on a new dataset for NER. \n\nI have managed to convert my .iob files (training, development and test datasets) into the .json files required by the model. However, I don't understand where I should put my data to have \"run\\_ner.py\" run successfully.\n\nThis command is mentioned in the page:\n\n python -m stanza.utils.training.run_ner fi_turku\n\nBut I don't understand what \"fi\\_turku\" is supposed to be. I know it's a sample corpus I can download, but what is it exactly? A directory containing the three .json files? What is the path to it? \n\nIt seems like the only problem is the path to the new dataset I want to train the model on, but I'm failing to undestand where exactly I should put it.","preferred_answer":"Look for this text on [this page](https://stanfordnlp.github.io/stanza/training.html#training-with-scripts) There's a command line given there\n\n> You can also run ner_tagger.py directly\n\nYou'll need to replace the paths with the given paths, including by downloading the word vectors:\n\n`python` \n`import stanza` \n`stanza.download(\"de\")` \n\nThe WV will probably wind up somewhere like `~/stanza_resources/de/pretrain/gsd.pt`\n\nThe charlm generally helps a lot, although maybe your domain will be substantially different. The name of the German charlm is \"newswiki\"\n\nI'll try to get the stanza-train repo straightened out tomorrow","full_conversation":[{"role":"OP","user_id":"anon_bffc28814d210da8","comment_id":"rb3tvm","kind":"post","text":"Has anybody tried to retrain Stanza NER on new data?\n\nI have been trying to follow the instructions in this page [https://stanfordnlp.github.io/stanza/training.html#ner-data](https://stanfordnlp.github.io/stanza/training.html#ner-data) to retrain Stanza on a new dataset for NER. \n\nI have managed to convert my .iob files (training, development and test datasets) into the .json files required by the model. However, I don't understand where I should put my data to have \"run\\_ner.py\" run successfully.\n\nThis command is mentioned in the page:\n\n python -m stanza.utils.training.run_ner fi_turku\n\nBut I don't understand what \"fi\\_turku\" is supposed to be. I know it's a sample corpus I can download, but what is it exactly? A directory containing the three .json files? What is the path to it? \n\nIt seems like the only problem is the path to the new dataset I want to train the model on, but I'm failing to undestand where exactly I should put it.","timestamp":"2021-12-07T17:27:33+00:00","score":1},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"hnu3abo","kind":"comment","text":"Look for this text on [this page](https://stanfordnlp.github.io/stanza/training.html#training-with-scripts) There's a command line given there\n\n> You can also run ner_tagger.py directly\n\nYou'll need to replace the paths with the given paths, including by downloading the word vectors:\n\n`python` \n`import stanza` \n`stanza.download(\"de\")` \n\nThe WV will probably wind up somewhere like `~/stanza_resources/de/pretrain/gsd.pt`\n\nThe charlm generally helps a lot, although maybe your domain will be substantially different. The name of the German charlm is \"newswiki\"\n\nI'll try to get the stanza-train repo straightened out tomorrow","timestamp":"2021-12-09T10:00:37+00:00","score":1},{"role":"OP","user_id":"anon_bffc28814d210da8","comment_id":"hnuh025","kind":"comment","text":"I'll have a look, thanks, although I skipped that bit because I didn't understand anything haha.\n\nBut why is run\\_ner.py not working? I feel like I'm so close, since the converter successfully converted my .bio files in the desired .json ones. It's such a pity that it doesn't work!","timestamp":"2021-12-09T12:51:30+00:00","score":1},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"hnyqudg","kind":"comment","text":"Wait... I went back to add a more descriptive message than the `ValueError`, and when I look there, I see that such a message should already exist. There's a log line that tells you where it looked for the .json files:\n\n`logger.error(f\"Unable to build the data. Please correctly build the files in {train_file}, {dev_file}, {test_file} and then try again.\")`\n\nDo you see that log line above the error? It should look something like this:\n\n`2021-12-10 00:10:52 ERROR: Unable to build the data. Please correctly build the files in data/ner/de_asdf.train.json, data/ner/de_asdf.dev.json, data/ner/de_asdf.test.json and then try again.`\n\nAnywho, I added a bit more clarity to the error if you want to reinstall. If you installed via github, as the stanza-train doc suggested, the extra error message is in the `dev` branch. If you installed via pip, you can do this:\n\n`pip install --no-deps --force git+git://github.com/stanfordnlp/stanza.git@f1a427c48bc9ec6a88f4bdbdffabfb4bf99a9bc5`","timestamp":"2021-12-10T08:19:19+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bffc28814d210da8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_05a633e185744819","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hnu3abo","thanks_reply_id":"hnuh025","post_score":1,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_b6ab069b8455ed82","answerer_user_id":"anon_a38ef0ad655ed76e","subreddit":"LanguageTechnology","timestamp":"2021-12-16T11:01:01+00:00","post_id":"rhog6u","question":"What are some available tools for multilingual emotion analysis (also question about LIWC)?\n\nAs the title says. I've heard of LIWC (which you have to pay for) and NRC Emotion Lexicon. \n\nI haven't used either of them yet, but I'm mainly interested in the multilingual aspect. Are there any other tools for emotion analysis out there that are available also for languages other than English?\n\nAlso, if anybody has paid to use LIWC (for academic purposes), do you automatically have access to all the languages available? Thank you!","preferred_answer":"Hi there! As a long-time LIWC user, I’ll say be careful with the posemo and negemo categories as they have lower validity than some of the more robustly validated categories (e.g., some of the Drives variables for instance). \n\nAs for the other language question: Yes, your purchase of LIWC2015 will come with access to analysis of other languages.","full_conversation":[{"role":"OP","user_id":"anon_b6ab069b8455ed82","comment_id":"rhog6u","kind":"post","text":"What are some available tools for multilingual emotion analysis (also question about LIWC)?\n\nAs the title says. I've heard of LIWC (which you have to pay for) and NRC Emotion Lexicon. \n\nI haven't used either of them yet, but I'm mainly interested in the multilingual aspect. Are there any other tools for emotion analysis out there that are available also for languages other than English?\n\nAlso, if anybody has paid to use LIWC (for academic purposes), do you automatically have access to all the languages available? Thank you!","timestamp":"2021-12-16T11:01:01+00:00","score":6},{"role":"answerer","user_id":"anon_a38ef0ad655ed76e","comment_id":"hp8ogz2","kind":"comment","text":"Hi there! As a long-time LIWC user, I’ll say be careful with the posemo and negemo categories as they have lower validity than some of the more robustly validated categories (e.g., some of the Drives variables for instance). \n\nAs for the other language question: Yes, your purchase of LIWC2015 will come with access to analysis of other languages.","timestamp":"2021-12-20T01:26:32+00:00","score":2},{"role":"OP","user_id":"anon_b6ab069b8455ed82","comment_id":"hqk0t9g","kind":"comment","text":"Hi, thank you for your reply! \n\nWhat do you mean by \"more robustly validated categories\"? And what are the Drives variables?","timestamp":"2021-12-30T15:34:37+00:00","score":2},{"role":"answerer","user_id":"anon_a38ef0ad655ed76e","comment_id":"hqkeni8","kind":"comment","text":"This publication, written by Pennebaker et al (who made LIWC), should help answer your questions: https://repositories.lib.utexas.edu/bitstream/handle/2152/31333/LIWC2015_LanguageManual.pdf\n\nThe drives variables are among many of the dimensions included in LIWC’s standard dictionary. They are generally based on McClelland’s (1985) work on human motivation but demonstrate high reliability.","timestamp":"2021-12-30T17:06:28+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b6ab069b8455ed82","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a38ef0ad655ed76e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hp8ogz2","thanks_reply_id":"hqk0t9g","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_b6ab069b8455ed82","answerer_user_id":"anon_05a633e185744819","subreddit":"LanguageTechnology","timestamp":"2021-12-20T20:59:26+00:00","post_id":"rkx0k3","question":"The Spacy NER model for Spanish is terrible\n\nHas anybody tried to use Spacy for NER in Spanish? I downloaded the biggest pipeline, but when implemented on some text it tends to extract full bits of sentences and label them as MISC (miscellaneous). \n\nIt does correctly extract people and locations, too, but it seems weird to me that the NER model of one of the 'main' languages would be so bad. Has anybody experienced this?","preferred_answer":"Hey, happy New Year!\n\nI added NER models for Danish, NB, and NN to the dev branch of Stanza. We need to improve our quality by incorporating bert or other transformers, and that's potentially on the short list before making a new release, but currently it's available w/o bert if you want to take a look. I could even prepare a testpypi release if that helps","full_conversation":[{"role":"OP","user_id":"anon_b6ab069b8455ed82","comment_id":"rkx0k3","kind":"post","text":"The Spacy NER model for Spanish is terrible\n\nHas anybody tried to use Spacy for NER in Spanish? I downloaded the biggest pipeline, but when implemented on some text it tends to extract full bits of sentences and label them as MISC (miscellaneous). \n\nIt does correctly extract people and locations, too, but it seems weird to me that the NER model of one of the 'main' languages would be so bad. Has anybody experienced this?","timestamp":"2021-12-20T20:59:26+00:00","score":17},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"hqscoli","kind":"comment","text":"Hey, happy New Year!\n\nI added NER models for Danish, NB, and NN to the dev branch of Stanza. We need to improve our quality by incorporating bert or other transformers, and that's potentially on the short list before making a new release, but currently it's available w/o bert if you want to take a look. I could even prepare a testpypi release if that helps","timestamp":"2022-01-01T08:32:01+00:00","score":2},{"role":"OP","user_id":"anon_b6ab069b8455ed82","comment_id":"hrmkx1u","kind":"comment","text":"Hi, thank you so much for your reply!\n\nSo would it work the same as for the other NER models? Shall I simply download the 'ner' pipeline for those specific languages?","timestamp":"2022-01-07T12:10:30+00:00","score":1},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"hrp6sm3","kind":"comment","text":"Yeah, but you just need to install the dev branch first. We don't have an exact timetable for a new release incorporating these models, so you want to do something like this:\n\n```\npip install git+git://github.com/stanfordnlp/stanza.git@f37042924b7665bbaf006b02dcbf8904d71931a1\n```","timestamp":"2022-01-07T22:27:35+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b6ab069b8455ed82","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_05a633e185744819","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hqscoli","thanks_reply_id":"hrmkx1u","post_score":17,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_dfffe5b263a177b2","answerer_user_id":"anon_39b78d0a5695edff","subreddit":"LanguageTechnology","timestamp":"2021-12-22T13:55:31+00:00","post_id":"rm5pzm","question":"Do you think that Large Language Models could be used to generate Knowledge Graphs?\n\nDo you know of any such experiments?\n\nI keep reading about LLMs using external memory resources, but could they also be used to generate resources such as Knowledge Graphs on a huge scale?\n\nEdit: preliminary results from a little experimentation with GPT-3 (davinci-instruct)\n\n**Prompt**\n\nknowledge graph described by a list of relations:\n\nfinger -> part of -> hand\n\nfinger -> subclass of -> digit\n\nmusic -> subclass of -> sound\n\nEarth -> instance of -> terrestrial planet\n\ngreen -> subclass of -> color\n\npathogen -> opposite of -> nonpathogenic organism\n\ncolor -> subclass of -> property\n\nmusic -> part of -> culture\n\nculture -> opposite of -> nature","preferred_answer":"There are quite a few papers on using (large) language models as the basis of open knowledge graphs. Here's a recent paper from 2020 that's pretty accesible as the paper was written by students rather than researchers at one of the large AI labs (who have access to much more compute power than the rest of us). \n\n\"Language Models are Open Knowledge Graphs\" \nhttps://arxiv.org/abs/2010.11967\n\nThe \"Language Models are Open Knowledge Graphs\" authors' model, MaMa, appears to be a play on LAMA which was introduced in that other paper that SuperImprobable linked to in their comment. Like SuperImprobable mentioned, without any mechanism to 'balance out' the knowledge that you're distilling from a LLM you're likely to get hallucinated \"facts\" pulled out of a LLM. The MaMA folks generated a _candidate_ set of facts from the (L)LMs and pitted that against the WikiData schema to verify / check the veracity of the facts that were distilled from the (L)LM.\n\nI think \"knowlege distillation\" is the keyword that you're looking for when you're talking about taking 'things that a big model knows' and _distilling_ that knowledge down into 'something smaller' (like a KG). That might be a helpful term to use when you're running your queries / trying to find out more about this topic.\n\nEdit: fixed a typo","full_conversation":[{"role":"OP","user_id":"anon_dfffe5b263a177b2","comment_id":"rm5pzm","kind":"post","text":"Do you think that Large Language Models could be used to generate Knowledge Graphs?\n\nDo you know of any such experiments?\n\nI keep reading about LLMs using external memory resources, but could they also be used to generate resources such as Knowledge Graphs on a huge scale?\n\nEdit: preliminary results from a little experimentation with GPT-3 (davinci-instruct)\n\n**Prompt**\n\nknowledge graph described by a list of relations:\n\nfinger -> part of -> hand\n\nfinger -> subclass of -> digit\n\nmusic -> subclass of -> sound\n\nEarth -> instance of -> terrestrial planet\n\ngreen -> subclass of -> color\n\npathogen -> opposite of -> nonpathogenic organism\n\ncolor -> subclass of -> property\n\nmusic -> part of -> culture\n\nculture -> opposite of -> nature","timestamp":"2021-12-22T13:55:31+00:00","score":20},{"role":"answerer","user_id":"anon_39b78d0a5695edff","comment_id":"hpm0007","kind":"comment","text":"There are quite a few papers on using (large) language models as the basis of open knowledge graphs. Here's a recent paper from 2020 that's pretty accesible as the paper was written by students rather than researchers at one of the large AI labs (who have access to much more compute power than the rest of us). \n\n\"Language Models are Open Knowledge Graphs\" \nhttps://arxiv.org/abs/2010.11967\n\nThe \"Language Models are Open Knowledge Graphs\" authors' model, MaMa, appears to be a play on LAMA which was introduced in that other paper that SuperImprobable linked to in their comment. Like SuperImprobable mentioned, without any mechanism to 'balance out' the knowledge that you're distilling from a LLM you're likely to get hallucinated \"facts\" pulled out of a LLM. The MaMA folks generated a _candidate_ set of facts from the (L)LMs and pitted that against the WikiData schema to verify / check the veracity of the facts that were distilled from the (L)LM.\n\nI think \"knowlege distillation\" is the keyword that you're looking for when you're talking about taking 'things that a big model knows' and _distilling_ that knowledge down into 'something smaller' (like a KG). That might be a helpful term to use when you're running your queries / trying to find out more about this topic.\n\nEdit: fixed a typo","timestamp":"2021-12-22T22:07:50+00:00","score":5},{"role":"OP","user_id":"anon_dfffe5b263a177b2","comment_id":"hq53uom","kind":"comment","text":"Oh, this one is really great (Language Models are Open Knowledge Graphs). Thanks!","timestamp":"2021-12-27T12:51:53+00:00","score":1},{"role":"answerer","user_id":"anon_39b78d0a5695edff","comment_id":"hq8kl40","kind":"comment","text":"Glad that paper was helpful! Last year a colleague was curious about the Transformer models and how one could extract a rudimentary KG structure from those LLMs, so I did a bit of digging. The Wiki corpus of facts is a pretty handy dataset for open-domain true statements. I've had some good luck using that dataset in other tasks where I needed a 'fact checker' / oracle.","timestamp":"2021-12-28T04:15:03+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_dfffe5b263a177b2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_39b78d0a5695edff","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hpm0007","thanks_reply_id":"hq53uom","post_score":20,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_c6737cde4317bd27","answerer_user_id":"anon_e903838b95c95eca","subreddit":"LanguageTechnology","timestamp":"2022-01-07T00:33:04+00:00","post_id":"rxtn0v","question":"How can you do efficient text preprocessing?\n\nHello,\n\nI am trying to do some basic preprocessing on 2.5GB of text. More specifically, I want to do tokenization, lower casing, remove stop words and top-k words. I need to use spacy because the dataset is in greek and I think other libraries can't support this.\n\nHowever, when I try to apply what the spacy documentation or most of the guides/resources mention, it takes forever to complete even half of the techniques that I mentioned above. I stop the execution every time.\n\nCould you provide me with some resources that I might have missed, in order to make this procedure run faster?\n\nThanks in advance","preferred_answer":"look into the documentation of the functions you're using. It's possible that they have a \\`n\\_jobs=#ofcores\\` or something to that effect that you specify how many cores your computer has.\n\nIf such a thing is in spacy's documentation, it will definitely speed things up.","full_conversation":[{"role":"OP","user_id":"anon_c6737cde4317bd27","comment_id":"rxtn0v","kind":"post","text":"How can you do efficient text preprocessing?\n\nHello,\n\nI am trying to do some basic preprocessing on 2.5GB of text. More specifically, I want to do tokenization, lower casing, remove stop words and top-k words. I need to use spacy because the dataset is in greek and I think other libraries can't support this.\n\nHowever, when I try to apply what the spacy documentation or most of the guides/resources mention, it takes forever to complete even half of the techniques that I mentioned above. I stop the execution every time.\n\nCould you provide me with some resources that I might have missed, in order to make this procedure run faster?\n\nThanks in advance","timestamp":"2022-01-07T00:33:04+00:00","score":7},{"role":"answerer","user_id":"anon_e903838b95c95eca","comment_id":"hrkjh8t","kind":"comment","text":"look into the documentation of the functions you're using. It's possible that they have a \\`n\\_jobs=#ofcores\\` or something to that effect that you specify how many cores your computer has.\n\nIf such a thing is in spacy's documentation, it will definitely speed things up.","timestamp":"2022-01-07T00:45:13+00:00","score":2},{"role":"OP","user_id":"anon_c6737cde4317bd27","comment_id":"hrmuyvj","kind":"comment","text":"Thanks for the answer, I will keep an eye on that","timestamp":"2022-01-07T13:42:24+00:00","score":2},{"role":"answerer","user_id":"anon_e903838b95c95eca","comment_id":"hrmvkqf","kind":"comment","text":"hope it helps! \n\nbest of luck on your search!","timestamp":"2022-01-07T13:47:09+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c6737cde4317bd27","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e903838b95c95eca","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hrkjh8t","thanks_reply_id":"hrmuyvj","post_score":7,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_388fc50262235153","answerer_user_id":"anon_6cba92bd5fc6716e","subreddit":"LanguageTechnology","timestamp":"2022-01-14T04:09:39+00:00","post_id":"s3iw6i","question":"Help needed. How to predict profession from short bio ?\n\nHi NLP community,\n\nProbably much of a newbie here and need some guidance. I am doing a personal project that aims to predict a person's industry from their short biography.\n\n​\n\nFor example:\n\n\" I am a retired engineer and company manager. I do not have a financial background or offer financial advice. blah blah \" => **Prediction:** ENGINEERING\n\nand\n\n\" Damon makes his living as a gap trader, an earnings trader, and an interday trader. In his free time, he writes for ABC, where he focuses on seasonal investing, market timing, and earnings analyses. \" => **Prediction:** FINANCE\n\n​\n\nI wanted to ask what approach should i do to make such predictions ? And what kind of public dataset would be useful to train a ML model for such task ?\n\n​\n\nThank you so much !","preferred_answer":"Find terms in job descriptions for a variety of industries/professions, based on vocabulary patterns (e.g. tf-idf type measures with your dataset of descriptions and subsets for each field of employment) train classifiers to estimate which profession is most likely given the language used in the person’s bio (or words with similar meaning, if you’re savvy enough), tune to desired level of performance (potentially by big “adjustments” like getting more data or exploring alternative classifiers), save model, ???deployment voodoo???, use as intended?","full_conversation":[{"role":"OP","user_id":"anon_388fc50262235153","comment_id":"s3iw6i","kind":"post","text":"Help needed. How to predict profession from short bio ?\n\nHi NLP community,\n\nProbably much of a newbie here and need some guidance. I am doing a personal project that aims to predict a person's industry from their short biography.\n\n​\n\nFor example:\n\n\" I am a retired engineer and company manager. I do not have a financial background or offer financial advice. blah blah \" => **Prediction:** ENGINEERING\n\nand\n\n\" Damon makes his living as a gap trader, an earnings trader, and an interday trader. In his free time, he writes for ABC, where he focuses on seasonal investing, market timing, and earnings analyses. \" => **Prediction:** FINANCE\n\n​\n\nI wanted to ask what approach should i do to make such predictions ? And what kind of public dataset would be useful to train a ML model for such task ?\n\n​\n\nThank you so much !","timestamp":"2022-01-14T04:09:39+00:00","score":6},{"role":"answerer","user_id":"anon_6cba92bd5fc6716e","comment_id":"hsl4pmg","kind":"comment","text":"Find terms in job descriptions for a variety of industries/professions, based on vocabulary patterns (e.g. tf-idf type measures with your dataset of descriptions and subsets for each field of employment) train classifiers to estimate which profession is most likely given the language used in the person’s bio (or words with similar meaning, if you’re savvy enough), tune to desired level of performance (potentially by big “adjustments” like getting more data or exploring alternative classifiers), save model, ???deployment voodoo???, use as intended?","timestamp":"2022-01-14T04:22:46+00:00","score":1},{"role":"OP","user_id":"anon_388fc50262235153","comment_id":"hsl6cx9","kind":"comment","text":"Thank you for your reply. But methods such as tfidf embedding will not help in sentences with such negation/temporal structures:\n\n\"I used to be in engineering. Now i am in finance\" => finance\n\n\"I am not in finance but engineering\" => engineering.","timestamp":"2022-01-14T04:36:37+00:00","score":1},{"role":"answerer","user_id":"anon_6cba92bd5fc6716e","comment_id":"hsl9s7g","kind":"comment","text":"I mean, for temporal structures you could split input based on verb tenses and then give more weight to fragments in present/future tense, which requires some pretreatment but there are packages that can do that for you.\n\nAs far as negations, you’re right. I might argue in response that we can’t discount the other sentences in the bio that may appear as evidence of “engineering” as the classification in your second example (e.g. “I am not in finance but engineering. It’s great to be back at the plant”)\n\nMaybe just personal preference, but for a first go at the model, my gut says it’s better to start with the “this feels too easy” approach and then fix what feels wrong after that. It’s clear your heads in the right place, hopefully a little more discussion here gets your thoughts where you want them!","timestamp":"2022-01-14T05:05:56+00:00","score":6}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_388fc50262235153","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6cba92bd5fc6716e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hsl4pmg","thanks_reply_id":"hsl6cx9","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_3389d2977bde72c5","answerer_user_id":"anon_e88897c9cdf9d61b","subreddit":"LanguageTechnology","timestamp":"2022-01-18T13:51:46+00:00","post_id":"s6y0ah","question":"Sentence-transformer Bert model performs worse after fine-tuning\n\nI'm using [symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli](https://huggingface.co/symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli) from HuggingFace. After multiple tries with different batch sizes, epochs, learning rates and even different unsupervised learning models methods such as [this](https://www.sbert.net/examples/unsupervised_learning/TSDAE/README.html), I couldn't get my sentence transformer to perform better than raw model straight from HuggingFace. I'm not sure what I'm doing wrong. I'm sure there are no bugs in my code since I followed the sentence transformer model documentation almost verbatim.\n\nbackground on my task: my datasets consists of a list of sentences(legal articles— around \\~300 small sentences) and a person will enter a query of say 3-5 sentences and I'm supposed to find the \"correct\" matches for the query.\n\nCurrently, the base model isn't amazing but it's also not too bad. Hence, I expected better performance once I fine-tune it. However, upon fine-tuning, cosine similarity scores all drop and the fine-tuned model has never made a better prediction(map from query to correct sentence in the dataset) than the original model with no fine tuning.\n\nI'd like to know why that might be the case and if that's a normal thing that usually happen with nlp models. My dataset is very small so my guess is my training parameters were bad? or is my training data so insignificant that my fine-tuning simply doesn't matter?","preferred_answer":"Of the top of my head: \n\\- Your learning rate may be to high, causing the model to move erratically through the parameter space. \n\\- When you say \"performs worse\", are you evaluating on the training data or on a test split? If you're in the second case, then your training data may not be representative of your test data.","full_conversation":[{"role":"OP","user_id":"anon_3389d2977bde72c5","comment_id":"s6y0ah","kind":"post","text":"Sentence-transformer Bert model performs worse after fine-tuning\n\nI'm using [symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli](https://huggingface.co/symanto/sn-xlm-roberta-base-snli-mnli-anli-xnli) from HuggingFace. After multiple tries with different batch sizes, epochs, learning rates and even different unsupervised learning models methods such as [this](https://www.sbert.net/examples/unsupervised_learning/TSDAE/README.html), I couldn't get my sentence transformer to perform better than raw model straight from HuggingFace. I'm not sure what I'm doing wrong. I'm sure there are no bugs in my code since I followed the sentence transformer model documentation almost verbatim.\n\nbackground on my task: my datasets consists of a list of sentences(legal articles— around \\~300 small sentences) and a person will enter a query of say 3-5 sentences and I'm supposed to find the \"correct\" matches for the query.\n\nCurrently, the base model isn't amazing but it's also not too bad. Hence, I expected better performance once I fine-tune it. However, upon fine-tuning, cosine similarity scores all drop and the fine-tuned model has never made a better prediction(map from query to correct sentence in the dataset) than the original model with no fine tuning.\n\nI'd like to know why that might be the case and if that's a normal thing that usually happen with nlp models. My dataset is very small so my guess is my training parameters were bad? or is my training data so insignificant that my fine-tuning simply doesn't matter?","timestamp":"2022-01-18T13:51:46+00:00","score":20},{"role":"answerer","user_id":"anon_e88897c9cdf9d61b","comment_id":"ht6m06x","kind":"comment","text":"Of the top of my head: \n\\- Your learning rate may be to high, causing the model to move erratically through the parameter space. \n\\- When you say \"performs worse\", are you evaluating on the training data or on a test split? If you're in the second case, then your training data may not be representative of your test data.","timestamp":"2022-01-18T15:02:41+00:00","score":1},{"role":"OP","user_id":"anon_3389d2977bde72c5","comment_id":"ht6oo63","kind":"comment","text":"Thanks for your response. I highly appreciate it. My learning rate is 5e-5 currently. Should I increase it. \n\nWhat I have a small test set that I test on manually. I just enter about 10 queries and see if i get the legal article that match them. The dataset isn't labeled and I write the query myself by changing the words a bit. Is there a better way to test that i'm unaware of? i'm pretty new to the field so would appreciate any ideas","timestamp":"2022-01-18T15:20:43+00:00","score":1},{"role":"answerer","user_id":"anon_e88897c9cdf9d61b","comment_id":"htart7e","kind":"comment","text":"I can't tell you what an appropriate learning rate is, but try lowering it by a factor of 10 and see if this improves the model performance.\n\nI strongly advise splitting the original dataset into two parts: 80% training and 20% testing. You train on the training split as usual. For testing, you feed each test sample and compare the model output with the target output. This allows you to compute a metric, such as accuracy: The % of cases predicted correctly.\n\nThis allows you to compare models with a single number (your chosen metric), which is much more robust then your current approach. It is quite likely that you have some biases which make you under/over-estimate the performance of the original and finetuned model.\n\nEdit: Reading the other comments I now understand that you don't have labeled data and are using an unsupervised training approach. In that case I would still advise to create a single test set for testing different models. The test set should consist of a fixed set of test queries and their corresponding target documents. Make sure you have at least 50 or so test queries (more is better), because otherwise statistical noise will affect the resulting accuracy too much to draw any meaningful conclusions.","timestamp":"2022-01-19T09:38:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3389d2977bde72c5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e88897c9cdf9d61b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ht6m06x","thanks_reply_id":"ht6oo63","post_score":20,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_06d179354a2056f0","answerer_user_id":"anon_b90e10270d8b9bd7","subreddit":"LanguageTechnology","timestamp":"2022-01-19T17:52:50+00:00","post_id":"s7vype","question":"[D] Did you also feel that Snorkel's LabelModel is really slow?\n\nHas anyone here used Snorkel AI's LabelModel for automatically labeling text? Have you found it to be super slow?","preferred_answer":"Yes it is. Read the flyingsquid paper to find out why and it's alternative: \n\nhttps://github.com/HazyResearch/flyingsquid","full_conversation":[{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"s7vype","kind":"post","text":"[D] Did you also feel that Snorkel's LabelModel is really slow?\n\nHas anyone here used Snorkel AI's LabelModel for automatically labeling text? Have you found it to be super slow?","timestamp":"2022-01-19T17:52:50+00:00","score":7},{"role":"answerer","user_id":"anon_b90e10270d8b9bd7","comment_id":"htdyg2q","kind":"comment","text":"Yes it is. Read the flyingsquid paper to find out why and it's alternative: \n\nhttps://github.com/HazyResearch/flyingsquid","timestamp":"2022-01-19T23:35:51+00:00","score":5},{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"htdyxga","kind":"comment","text":"Thanks for the pointer to this. I was wondering whether it’s only the improvement in speed or are these (Snorkel vs FlyingSquid) models different? They do come from the same research group.","timestamp":"2022-01-19T23:39:14+00:00","score":4},{"role":"answerer","user_id":"anon_b90e10270d8b9bd7","comment_id":"hte6hql","kind":"comment","text":"Yeah from my understandimg the speed comes from a different \"model\". Snorkel seems to use an iterative optimisation method but flyingsquid is closed form... But don't quote me on this. I merely happened to glance through the paper","timestamp":"2022-01-20T00:34:42+00:00","score":4},{"role":"OP","user_id":"anon_06d179354a2056f0","comment_id":"htgcyw1","kind":"comment","text":">Yeah from my understandimg the speed comes from a different \"model\". Snorkel seems to use an iterative optimisation method but flyingsquid is closed form... But don't quote me on this. I merely happened to glance through the paper\n\nI'll give it a read. Even if I do not use it for the project, I can use it as a dummy to experiment until the final scripts are ready. Thanks, again.","timestamp":"2022-01-20T13:14:18+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_06d179354a2056f0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b90e10270d8b9bd7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"htdyg2q","thanks_reply_id":"htdyxga","post_score":7,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_3e6f39014fe017ee","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2022-01-24T09:09:35+00:00","post_id":"sbhz36","question":"How to test statistical significance on text data?\n\nSo, I was in an interview and I was asked so many questions about statistical details on text data. For example \n1. How would you sample million sentences from billions of sentences? What strategies will you use for sampling?\n\n2. Having sampled, how would determine that the sampled data follows actual data distribution? (In nutshell how would you determine whether two text data distributions are similar or not)\n\nFollow up for these questions were, When will you decide to re-train your model. (Yet again how would you determine whether data distribution has changed)\n\nNow I am confused about how to perform such statistical analysis over text data. I have understanding about DL approaches within NLP, but stats is something bugging me a lot during the interviews. (I have worked less/no in stats than actual model building)\n\nPlease advice me how to solve these about mentioned questions as well as where should I start working/learning on stats for such questions. Will be very helpful.","preferred_answer":"If the sample is indeed in the millions of sentences, you could compare the [Zipf distribution](https://en.wikipedia.org/wiki/Zipf%27s_law) of the sample vs the one on the whole data. There should be enough data for them to be relatively the same and thus something like a Spearman (or even better a Pearson) between these two should be pretty close.","full_conversation":[{"role":"OP","user_id":"anon_3e6f39014fe017ee","comment_id":"sbhz36","kind":"post","text":"How to test statistical significance on text data?\n\nSo, I was in an interview and I was asked so many questions about statistical details on text data. For example \n1. How would you sample million sentences from billions of sentences? What strategies will you use for sampling?\n\n2. Having sampled, how would determine that the sampled data follows actual data distribution? (In nutshell how would you determine whether two text data distributions are similar or not)\n\nFollow up for these questions were, When will you decide to re-train your model. (Yet again how would you determine whether data distribution has changed)\n\nNow I am confused about how to perform such statistical analysis over text data. I have understanding about DL approaches within NLP, but stats is something bugging me a lot during the interviews. (I have worked less/no in stats than actual model building)\n\nPlease advice me how to solve these about mentioned questions as well as where should I start working/learning on stats for such questions. Will be very helpful.","timestamp":"2022-01-24T09:09:35+00:00","score":19},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"hu017b7","kind":"comment","text":"If the sample is indeed in the millions of sentences, you could compare the [Zipf distribution](https://en.wikipedia.org/wiki/Zipf%27s_law) of the sample vs the one on the whole data. There should be enough data for them to be relatively the same and thus something like a Spearman (or even better a Pearson) between these two should be pretty close.","timestamp":"2022-01-24T09:34:25+00:00","score":11},{"role":"OP","user_id":"anon_3e6f39014fe017ee","comment_id":"hu01s9t","kind":"comment","text":"Thanks. Would look into these.\n\nBut what about sampled data is small? Let say, overall data is 50k while we have to sample 7-8k. In that case how would we sample?","timestamp":"2022-01-24T09:42:32+00:00","score":2},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"hu03q3y","kind":"comment","text":">But what about sampled data is small? Let say, overall data is 50k while we have to sample 7-8k. In that case how would we sample?\n\nIn that case I would do something more linguistics-y. There are few enough sentences to pass them all through a common pipeline (such as spaCy, if the language is supported). Then you can compare the distributions of:\n\n\\- sentence complexity (eg: similar proportion of (for example) relative clauses? are the tenses used are similar?)\n\n\\- noun/verbs proportion?\n\n\\- etc","timestamp":"2022-01-24T10:09:48+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3e6f39014fe017ee","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hu017b7","thanks_reply_id":"hu01s9t","post_score":19,"answer_score":11,"preferred_answer_is_top_level":true}} {"user_id":"anon_2aa3b031fbd62554","answerer_user_id":"anon_ffcbd23cfb80b076","subreddit":"LanguageTechnology","timestamp":"2022-02-07T19:21:33+00:00","post_id":"smydor","question":"Any pointers as to creating a bot that generates silly quotes?\n\nTitle pretty much sums it up. I am looking for any pointers you might have to help me build a bot that generates silly quotes.","preferred_answer":"You could look into trigram models! NLTK has a built-in trigram function. \n\n\nIf you collect a bunch of memorable quotes and train your trigram model using that, it'll 'learn' from the word order of those quotes. \n\n\nGeneration using the model will use word order it's seen from the corpus and then try to replicate it. You can get some pretty silly/nonsensical results.","full_conversation":[{"role":"OP","user_id":"anon_2aa3b031fbd62554","comment_id":"smydor","kind":"post","text":"Any pointers as to creating a bot that generates silly quotes?\n\nTitle pretty much sums it up. I am looking for any pointers you might have to help me build a bot that generates silly quotes.","timestamp":"2022-02-07T19:21:33+00:00","score":6},{"role":"answerer","user_id":"anon_ffcbd23cfb80b076","comment_id":"hvziifk","kind":"comment","text":"You could look into trigram models! NLTK has a built-in trigram function. \n\n\nIf you collect a bunch of memorable quotes and train your trigram model using that, it'll 'learn' from the word order of those quotes. \n\n\nGeneration using the model will use word order it's seen from the corpus and then try to replicate it. You can get some pretty silly/nonsensical results.","timestamp":"2022-02-07T19:58:44+00:00","score":6},{"role":"OP","user_id":"anon_2aa3b031fbd62554","comment_id":"hvzpzpv","kind":"comment","text":"Thank you very much for the pointer. Quick question: if we think of language as made up of legos, this is essentially getting the most used groups of 3 legos together and then putting those groups side by side, right?","timestamp":"2022-02-07T20:47:08+00:00","score":1},{"role":"answerer","user_id":"anon_ffcbd23cfb80b076","comment_id":"hvzxjn4","kind":"comment","text":"You're on the right track, I think. \n\n\nA trigram (n-gram with three tokens) is something like the following: \n\n\n\"Here is an example of trigrams in a sentence.\"\n\nTrigram 1: \"Here is an\" \n\n\nTrigram 2: \"is an example\" \n\n\nTrigram 3: \"an example of\" \n\n\nTrigram 4: \"example of trigrams\"\n\n....etc.\n\nYou can do it with bigrams (n-gram with two tokens) too, but you might lose that 'silly' word order you're looking for.","timestamp":"2022-02-07T21:35:08+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2aa3b031fbd62554","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ffcbd23cfb80b076","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hvziifk","thanks_reply_id":"hvzpzpv","post_score":6,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_ffcbd23cfb80b076","answerer_user_id":"anon_680551432a03f19e","subreddit":"LanguageTechnology","timestamp":"2022-02-10T16:27:28+00:00","post_id":"spaigr","question":"Corpus of news articles about Politicians?\n\nHI! \nI've been looking around for something I could use but nothing has jumped out at me. I'm looking for a corpus of news articles about politicians. Specifically, I'm looking for a database I can use to feed a neural network the article, and the subject's sex (male/female).\n\nIf I can find a corpus about politicians, I can do the manual labor of storing it as male/female myself. \n\n\nThese articles could be something with like \"Biden repeats earlier statement regarding....\", or \"Washington halts Greene's progress on...\", etc.\n\n​\n\nAny sort of guidance is helpful.\n\nThanks!","preferred_answer":"News on the Web Corpus aka NOW","full_conversation":[{"role":"OP","user_id":"anon_ffcbd23cfb80b076","comment_id":"spaigr","kind":"post","text":"Corpus of news articles about Politicians?\n\nHI! \nI've been looking around for something I could use but nothing has jumped out at me. I'm looking for a corpus of news articles about politicians. Specifically, I'm looking for a database I can use to feed a neural network the article, and the subject's sex (male/female).\n\nIf I can find a corpus about politicians, I can do the manual labor of storing it as male/female myself. \n\n\nThese articles could be something with like \"Biden repeats earlier statement regarding....\", or \"Washington halts Greene's progress on...\", etc.\n\n​\n\nAny sort of guidance is helpful.\n\nThanks!","timestamp":"2022-02-10T16:27:28+00:00","score":5},{"role":"answerer","user_id":"anon_680551432a03f19e","comment_id":"hwek95q","kind":"comment","text":"News on the Web Corpus aka NOW","timestamp":"2022-02-10T19:04:29+00:00","score":1},{"role":"OP","user_id":"anon_ffcbd23cfb80b076","comment_id":"hwezkqq","kind":"comment","text":">Any \n\nThanks! I'll check it out.","timestamp":"2022-02-10T20:35:52+00:00","score":1},{"role":"answerer","user_id":"anon_680551432a03f19e","comment_id":"hwf00mo","kind":"comment","text":"With NER or simple searches there‘s probably a way to generate the dataset you need","timestamp":"2022-02-10T20:38:32+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ffcbd23cfb80b076","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_680551432a03f19e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hwek95q","thanks_reply_id":"hwezkqq","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_5008d8b9cedec62e","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2022-02-14T11:14:21+00:00","post_id":"ss898f","question":"Dependency Parsing(python)\n\nI have predicted dependency relation for each of the words in a sentence. How do I find syntactical head of each of these words if my data now is of form list(deprel) for a sentence inorder to construct dependency tree?","preferred_answer":"Also, if you want dependency parsing, you would be much better of using [Stanza](https://stanfordnlp.github.io/stanza/available_models.html), it has models for Tamil.","full_conversation":[{"role":"OP","user_id":"anon_5008d8b9cedec62e","comment_id":"ss898f","kind":"post","text":"Dependency Parsing(python)\n\nI have predicted dependency relation for each of the words in a sentence. How do I find syntactical head of each of these words if my data now is of form list(deprel) for a sentence inorder to construct dependency tree?","timestamp":"2022-02-14T11:14:21+00:00","score":3},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"hwx683b","kind":"comment","text":"Also, if you want dependency parsing, you would be much better of using [Stanza](https://stanfordnlp.github.io/stanza/available_models.html), it has models for Tamil.","timestamp":"2022-02-14T16:03:22+00:00","score":1},{"role":"OP","user_id":"anon_5008d8b9cedec62e","comment_id":"hwx7kze","kind":"comment","text":"first of all thank you so much for these responses. we're actually planning to make this a project, so we wanted to make a model from scratch.","timestamp":"2022-02-14T16:12:49+00:00","score":1},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"hwx975l","kind":"comment","text":"That makes sense and the approach is fine, there are many examples of dependency parsers that use BERT ([e.g.](https://aclanthology.org/2020.findings-emnlp.245.pdf)). But they still use preannotated data, so this is what I'm missing here.","timestamp":"2022-02-14T16:23:44+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_5008d8b9cedec62e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hwx683b","thanks_reply_id":"hwx7kze","post_score":3,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_5841757b9ad826e0","answerer_user_id":"anon_e2856e4dc523174d","subreddit":"LanguageTechnology","timestamp":"2022-02-16T11:21:33+00:00","post_id":"sttkig","question":"data format to fine tune gpt-2 for code generation\n\nI'm following this [https://github.com/nshepperd/gpt-2](https://github.com/nshepperd/gpt-2) repo to fine tune the gpt-2 355M model, i've collected (comment,code) pairs from github into a text file where data have the following format :\n\n #comment \n code\n <|endoftext|> \n\nis this the correct format for fine tuning the gpt-2 model?","preferred_answer":"I've also tried this on the GPT-2 small and putting in multiple languages will make it harder to get a good result - best to stick to one language.\n\nI haven't used nshepperd's code myself but it should work, being careful that tabs and multiple line breaks might be removed when the text file is processed into the dataset.\n\nBut give it a shot and see how it goes, and let me know!","full_conversation":[{"role":"OP","user_id":"anon_5841757b9ad826e0","comment_id":"sttkig","kind":"post","text":"data format to fine tune gpt-2 for code generation\n\nI'm following this [https://github.com/nshepperd/gpt-2](https://github.com/nshepperd/gpt-2) repo to fine tune the gpt-2 355M model, i've collected (comment,code) pairs from github into a text file where data have the following format :\n\n #comment \n code\n <|endoftext|> \n\nis this the correct format for fine tuning the gpt-2 model?","timestamp":"2022-02-16T11:21:33+00:00","score":5},{"role":"answerer","user_id":"anon_e2856e4dc523174d","comment_id":"hx5us51","kind":"comment","text":"I've also tried this on the GPT-2 small and putting in multiple languages will make it harder to get a good result - best to stick to one language.\n\nI haven't used nshepperd's code myself but it should work, being careful that tabs and multiple line breaks might be removed when the text file is processed into the dataset.\n\nBut give it a shot and see how it goes, and let me know!","timestamp":"2022-02-16T11:56:12+00:00","score":2},{"role":"OP","user_id":"anon_5841757b9ad826e0","comment_id":"hx609z5","kind":"comment","text":"thank you for your answer. i forget to mention that i'm focusing on python code only","timestamp":"2022-02-16T12:50:27+00:00","score":3},{"role":"answerer","user_id":"anon_e2856e4dc523174d","comment_id":"hxad2m9","kind":"comment","text":"That's good then.\n\nWell I was trying to show you u/abstract_void_bot who has a GPT-2 small model trained on a mix of Python, Java and C#. It's terrible, but funny. \n\nThe 355M should be a bit better.","timestamp":"2022-02-17T09:09:45+00:00","score":1},{"role":"OP","user_id":"anon_5841757b9ad826e0","comment_id":"hxk46z2","kind":"comment","text":"oh soorry i just saw your comment and yeah that's not satisfying . btw why should i remove tabs and multiple line breaks especially that i'm using python and the code should have tabulation and new line\n\nthis is a sample of the dataset\n\n\\#Extracts video ID from URL. \ndef get\\_vid\\_from\\_url(url): \n\"\"\"Extracts video ID from URL\"\"\" \nreturn match1(url, r'youtu\\\\.be/(\\[\\^?/\\]+)') or \\\\ \nmatch1(url, r'youtube\\\\.com/embed/(\\[\\^/?\\]+)') or \\\\ \nmatch1(url, r'youtube\\\\.com/v/(\\[\\^/?\\]+)') or \\\\ \nmatch1(url, r'youtube\\\\.com/watch/(\\[\\^/?\\]+)') or \\\\ \nparse\\_query\\_param(url, 'v') or \\\\ \nparse\\_query\\_param(parse\\_query\\_param(url, 'u'), 'v') \n<|endoftext|>","timestamp":"2022-02-19T08:58:58+00:00","score":1},{"role":"answerer","user_id":"anon_e2856e4dc523174d","comment_id":"hxnpk6e","kind":"comment","text":"I'm not saying you should remove the linebreaks/tabs/etc but sometimes it happens without your control. The number of spaces etc are important for Python indentation so you should try and preserve them as much as possible. But I'm not familiar with the nshepperd repo so you'll have to try it and find out.\n\nAnother thing is that this will take 2-3x more time to fine-tune than a standard language model because of the complexity of the coding language.","timestamp":"2022-02-20T02:57:37+00:00","score":1},{"role":"OP","user_id":"anon_5841757b9ad826e0","comment_id":"hxp8pwb","kind":"comment","text":"that's clear , thank you","timestamp":"2022-02-20T13:28:29+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_5841757b9ad826e0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e2856e4dc523174d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"hx5us51","thanks_reply_id":"hx609z5","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_6117aafa2153a39a","answerer_user_id":"anon_bf9865c496acd377","subreddit":"LanguageTechnology","timestamp":"2022-03-13T15:12:35+00:00","post_id":"td8xqf","question":"Master's degree in Computational Linguistics?\n\nHi everyone. I know close to nothing about Computational Linguistics, but a professor gave a presentation about this Master's degree and I was kinda interested. It looks to me like a very specific degree with niche job opportunities. Is it worth the effort? And could you recommend me sources to know this topic better? Thanks","preferred_answer":"From the course names I can't extrapolate too much, but what I'd recommend is reading some Manning as was suggested, to start, but also: \n\n- learn Python\n\n- learn about machine learning, especially transformers\n\n- learn the math, or at least basics of the math, behind how ML works. Linear Algebra is a good place to start. Stats is good too.\n\n- learn common CL tools like spaCy, and huggingface. Experiment with them. Start a GitHub and save your experiments there. It helps, a lot, to have a body of work to point at. There are tons of articles out there on simple projects. Learn from others, copy their work (do it yourself but you can use them as a guide! Otherwise you aren't learning.)","full_conversation":[{"role":"OP","user_id":"anon_6117aafa2153a39a","comment_id":"td8xqf","kind":"post","text":"Master's degree in Computational Linguistics?\n\nHi everyone. I know close to nothing about Computational Linguistics, but a professor gave a presentation about this Master's degree and I was kinda interested. It looks to me like a very specific degree with niche job opportunities. Is it worth the effort? And could you recommend me sources to know this topic better? Thanks","timestamp":"2022-03-13T15:12:35+00:00","score":30},{"role":"answerer","user_id":"anon_bf9865c496acd377","comment_id":"i0iepu9","kind":"comment","text":"From the course names I can't extrapolate too much, but what I'd recommend is reading some Manning as was suggested, to start, but also: \n\n- learn Python\n\n- learn about machine learning, especially transformers\n\n- learn the math, or at least basics of the math, behind how ML works. Linear Algebra is a good place to start. Stats is good too.\n\n- learn common CL tools like spaCy, and huggingface. Experiment with them. Start a GitHub and save your experiments there. It helps, a lot, to have a body of work to point at. There are tons of articles out there on simple projects. Learn from others, copy their work (do it yourself but you can use them as a guide! Otherwise you aren't learning.)","timestamp":"2022-03-13T17:05:43+00:00","score":11},{"role":"OP","user_id":"anon_6117aafa2153a39a","comment_id":"i0ifjfq","kind":"comment","text":"Thanks man! I appreciate it a lot","timestamp":"2022-03-13T17:11:26+00:00","score":1},{"role":"answerer","user_id":"anon_bf9865c496acd377","comment_id":"i0ii76q","kind":"comment","text":"Happy to help! If you ever want any more specific advice, reach out. My path is only one of them, but it worked out all right!","timestamp":"2022-03-13T17:29:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6117aafa2153a39a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bf9865c496acd377","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i0iepu9","thanks_reply_id":"i0ifjfq","post_score":30,"answer_score":11,"preferred_answer_is_top_level":false}} {"user_id":"anon_a7181b72688104e2","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2022-03-28T03:08:59+00:00","post_id":"tpzv2y","question":"Is it possible to measure the intensity of emotion in text using BERT?\n\nHello there, I'm a newbie and still learning NLP, so correct me if I am wrong! It will be a huge help.\n\nI'm trying to measure the intensity of anger and/or fear in e-petition data, then analyze whether the intensity of emotion affects the number of signatures.\n\nSince I could not find a quality emotion dictionary in my language, I have to create one myself.\n\nInitially, I was going to use word2vec and make a list of words closest to \"anger\" and \"fear\", then do the usual dictionary-based sentiment analysis (tagging the intensity of emotion of each petition based on the frequency of word appearances).\n\nThen I found out BERT has become the SOTA nowadays, and now I am wondering whether I should use BERT in my case.\n\nFrom what I have read, BERT seems to be used for classifying emotion, not measuring the intensity of emotion. But since I am not an expert in this field, I wanted to make sure and ask smarter people to be sure!\n\n**TL; DR: Is it possible to measure the intensity of emotion in text using BERT?**\n\nThank you so much in advance!","preferred_answer":"If you had an annotated dataset with intensity of emotion in text, then using data to train/finetune BERT (or some similar model e.g. RoBERTa) would be a straightforward way to get decent results - that's also the exact way how you would use BERT for classifying emotion. If you do not have any dataset showing what exactly do you mean by 'intensity of emotion', then you're not going to be able just get that information out of the pre-trained BERT; however, frankly, you would need such a dataset anyway because how otherwise you can evaluate whatever system you make?","full_conversation":[{"role":"OP","user_id":"anon_a7181b72688104e2","comment_id":"tpzv2y","kind":"post","text":"Is it possible to measure the intensity of emotion in text using BERT?\n\nHello there, I'm a newbie and still learning NLP, so correct me if I am wrong! It will be a huge help.\n\nI'm trying to measure the intensity of anger and/or fear in e-petition data, then analyze whether the intensity of emotion affects the number of signatures.\n\nSince I could not find a quality emotion dictionary in my language, I have to create one myself.\n\nInitially, I was going to use word2vec and make a list of words closest to \"anger\" and \"fear\", then do the usual dictionary-based sentiment analysis (tagging the intensity of emotion of each petition based on the frequency of word appearances).\n\nThen I found out BERT has become the SOTA nowadays, and now I am wondering whether I should use BERT in my case.\n\nFrom what I have read, BERT seems to be used for classifying emotion, not measuring the intensity of emotion. But since I am not an expert in this field, I wanted to make sure and ask smarter people to be sure!\n\n**TL; DR: Is it possible to measure the intensity of emotion in text using BERT?**\n\nThank you so much in advance!","timestamp":"2022-03-28T03:08:59+00:00","score":14},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"i2e7vcl","kind":"comment","text":"If you had an annotated dataset with intensity of emotion in text, then using data to train/finetune BERT (or some similar model e.g. RoBERTa) would be a straightforward way to get decent results - that's also the exact way how you would use BERT for classifying emotion. If you do not have any dataset showing what exactly do you mean by 'intensity of emotion', then you're not going to be able just get that information out of the pre-trained BERT; however, frankly, you would need such a dataset anyway because how otherwise you can evaluate whatever system you make?","timestamp":"2022-03-28T03:18:57+00:00","score":16},{"role":"OP","user_id":"anon_a7181b72688104e2","comment_id":"i2e8txv","kind":"comment","text":"thank you for your thoughtful reply! that comment helped me understand the issue a lot.\n\nYes, the major problem i'm facing is that there is no annotated dataset for emotion intensity. \nWould sentiment analysis based on a list of words created with word2vec a sound option in this case?","timestamp":"2022-03-28T03:27:27+00:00","score":3},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"i2i1xya","kind":"comment","text":"You can finetune a large pretrained model on quite small quantities of annotated data; I would suggest first spending a day or two annotating some samples - you might be surprised at how much data that might be - and only then looking at technical options; also then you would be able to actually verify which technical options work for the task and which don't.","timestamp":"2022-03-28T23:44:19+00:00","score":2},{"role":"OP","user_id":"anon_a7181b72688104e2","comment_id":"i2ietdo","kind":"comment","text":"thank you so much for your recommendation!! i will work on annotating the data and try to find out what options i have!","timestamp":"2022-03-29T01:31:21+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a7181b72688104e2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i2e7vcl","thanks_reply_id":"i2e8txv","post_score":14,"answer_score":16,"preferred_answer_is_top_level":true}} {"user_id":"anon_c496963ee2334728","answerer_user_id":"anon_6eed58a8b7321068","subreddit":"LanguageTechnology","timestamp":"2022-03-29T11:07:49+00:00","post_id":"tqxbff","question":"New to Spacy and NLP: NUM pos tag for non Number\n\nI'm running spacy ('es_core_news_sm') on the following spanish sentence: '¿ Seguro que queréis dejarnos tan pronto ?' and get the POS tag of NUM for the token 'queréis'.\n\nThis seems so wrong that I'm not sure what to make of it - what steps can I take to improve this tag? Is there something really basic I'm not doing but should be?","preferred_answer":"First thing I would try is the larger model(es_core_news_lg) and see if you get the same result.","full_conversation":[{"role":"OP","user_id":"anon_c496963ee2334728","comment_id":"tqxbff","kind":"post","text":"New to Spacy and NLP: NUM pos tag for non Number\n\nI'm running spacy ('es_core_news_sm') on the following spanish sentence: '¿ Seguro que queréis dejarnos tan pronto ?' and get the POS tag of NUM for the token 'queréis'.\n\nThis seems so wrong that I'm not sure what to make of it - what steps can I take to improve this tag? Is there something really basic I'm not doing but should be?","timestamp":"2022-03-29T11:07:49+00:00","score":5},{"role":"answerer","user_id":"anon_6eed58a8b7321068","comment_id":"i2jurfa","kind":"comment","text":"First thing I would try is the larger model(es_core_news_lg) and see if you get the same result.","timestamp":"2022-03-29T11:26:26+00:00","score":3},{"role":"OP","user_id":"anon_c496963ee2334728","comment_id":"i2ki1l3","kind":"comment","text":"Thanks - it did work. Is the small model then generally pretty unreliable?","timestamp":"2022-03-29T14:38:29+00:00","score":2},{"role":"answerer","user_id":"anon_6eed58a8b7321068","comment_id":"i2kkop7","kind":"comment","text":"It's all about a tradeoff - smaller model is more lightweight, but less precise; larger model is bigger, but more precise. You kinda choose depending on your needs.","timestamp":"2022-03-29T14:56:19+00:00","score":2},{"role":"OP","user_id":"anon_c496963ee2334728","comment_id":"i2lf7ou","kind":"comment","text":"Thanks","timestamp":"2022-03-29T18:11:22+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_c496963ee2334728","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6eed58a8b7321068","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i2jurfa","thanks_reply_id":"i2ki1l3","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_ef663be20eb63c3e","answerer_user_id":"anon_32d81e3bc25f8ce8","subreddit":"LanguageTechnology","timestamp":"2022-03-31T17:10:05+00:00","post_id":"tt4j6d","question":"How to find schools offering a masters in computational linguistics?\n\nIs there a website or something with a master list of schools who offer a masters degree related to computational linguistics? I am just trying to broaden my horizons beyond the obvious top 10 schools before I start applying for grad school here in the next few months. It could be in Europe or North America, not very picky about location. Thank you in advance.","preferred_answer":"Here's a list of relevant programs, sorry it doesn't look so good I just copied them from a sheet.\n- https://www.compling.uw.edu/\n- https://www.ed.ac.uk/studying/postgraduate/degrees/index.php?r=site/view&edition=2019&id=290\n- https://idmc.univ-lorraine.fr/idmc-master-degree-in-natural-language-processing/\n- https://www.sheffield.ac.uk/postgraduate/taught/courses/2021/computer-science-speech-and-language-processing-msc\n- https://www.wlv.ac.uk/courses/ma-computational-linguistics/\n- https://www.uu.se/en/admissions/master/selma/program/?pKod=HSP2M\n- https://www.uni-heidelberg.de/en/study/all-subjects/computational-linguistics/computational-linguistics-master\n- https://www.uni-stuttgart.de/en/study/study-programs/Computational-Linguistics-M.Sc-00001./\n- https://uni-tuebingen.de/en/study/finding-a-course/degree-programs-available/detail/course/computerlinguistik-computational-linguistics-master/\n- https://www.uni-saarland.de/en/study/programmes/master/lst.html\n- https://grad.soe.ucsc.edu/nlp\n- https://www.brandeis.edu/computer-science/computational-linguistics/masters/index.html\n- https://masterdatascience.ubc.ca/programs/computational-linguistics","full_conversation":[{"role":"OP","user_id":"anon_ef663be20eb63c3e","comment_id":"tt4j6d","kind":"post","text":"How to find schools offering a masters in computational linguistics?\n\nIs there a website or something with a master list of schools who offer a masters degree related to computational linguistics? I am just trying to broaden my horizons beyond the obvious top 10 schools before I start applying for grad school here in the next few months. It could be in Europe or North America, not very picky about location. Thank you in advance.","timestamp":"2022-03-31T17:10:05+00:00","score":7},{"role":"answerer","user_id":"anon_32d81e3bc25f8ce8","comment_id":"i4oaoaq","kind":"comment","text":"Here's a list of relevant programs, sorry it doesn't look so good I just copied them from a sheet.\n- https://www.compling.uw.edu/\n- https://www.ed.ac.uk/studying/postgraduate/degrees/index.php?r=site/view&edition=2019&id=290\n- https://idmc.univ-lorraine.fr/idmc-master-degree-in-natural-language-processing/\n- https://www.sheffield.ac.uk/postgraduate/taught/courses/2021/computer-science-speech-and-language-processing-msc\n- https://www.wlv.ac.uk/courses/ma-computational-linguistics/\n- https://www.uu.se/en/admissions/master/selma/program/?pKod=HSP2M\n- https://www.uni-heidelberg.de/en/study/all-subjects/computational-linguistics/computational-linguistics-master\n- https://www.uni-stuttgart.de/en/study/study-programs/Computational-Linguistics-M.Sc-00001./\n- https://uni-tuebingen.de/en/study/finding-a-course/degree-programs-available/detail/course/computerlinguistik-computational-linguistics-master/\n- https://www.uni-saarland.de/en/study/programmes/master/lst.html\n- https://grad.soe.ucsc.edu/nlp\n- https://www.brandeis.edu/computer-science/computational-linguistics/masters/index.html\n- https://masterdatascience.ubc.ca/programs/computational-linguistics","timestamp":"2022-04-14T07:51:31+00:00","score":2},{"role":"OP","user_id":"anon_ef663be20eb63c3e","comment_id":"i4obukh","kind":"comment","text":"Awesome thank you so much!","timestamp":"2022-04-14T08:07:52+00:00","score":2},{"role":"answerer","user_id":"anon_32d81e3bc25f8ce8","comment_id":"i4ocgtl","kind":"comment","text":"Sure, best of luck!","timestamp":"2022-04-14T08:16:38+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ef663be20eb63c3e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_32d81e3bc25f8ce8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i4oaoaq","thanks_reply_id":"i4obukh","post_score":7,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_35e804729520ea8d","answerer_user_id":"anon_3fefd543e87fc264","subreddit":"LanguageTechnology","timestamp":"2022-04-05T15:04:43+00:00","post_id":"twx1ik","question":"Classifying sections of a document\n\nHi! I work with clinical documents and am trying to develop a method of section classification. Rules-based methods perform okay, but I'm curious about deep learning methods as well. The only neural approach I've seen is [http://www.oeft.de/su/pdf/specom2018.pdf](http://www.oeft.de/su/pdf/specom2018.pdf), and it only does binary classification of boundaries. \n\n​\n\nI was thinking of using a longformer and using token classification modeled after NER. But these would be really long \"entities\". Anybody have any experience/recommendations for this type of problem?","preferred_answer":"Yes I have used Bert and Roberta style models to good effect on this type of problem. \n\nYou will have to handle splitting docs in multiple overlapping chunks and merging outputs, which is a bit of a pain but very possible","full_conversation":[{"role":"OP","user_id":"anon_35e804729520ea8d","comment_id":"twx1ik","kind":"post","text":"Classifying sections of a document\n\nHi! I work with clinical documents and am trying to develop a method of section classification. Rules-based methods perform okay, but I'm curious about deep learning methods as well. The only neural approach I've seen is [http://www.oeft.de/su/pdf/specom2018.pdf](http://www.oeft.de/su/pdf/specom2018.pdf), and it only does binary classification of boundaries. \n\n​\n\nI was thinking of using a longformer and using token classification modeled after NER. But these would be really long \"entities\". Anybody have any experience/recommendations for this type of problem?","timestamp":"2022-04-05T15:04:43+00:00","score":2},{"role":"answerer","user_id":"anon_3fefd543e87fc264","comment_id":"i3mn2r0","kind":"comment","text":"Yes I have used Bert and Roberta style models to good effect on this type of problem. \n\nYou will have to handle splitting docs in multiple overlapping chunks and merging outputs, which is a bit of a pain but very possible","timestamp":"2022-04-06T14:18:06+00:00","score":1},{"role":"OP","user_id":"anon_35e804729520ea8d","comment_id":"i3mpowd","kind":"comment","text":"Thank you! I was considering using a longformer to help reduce that problem. \n\nHow did you approach the problem? NER-like approach with B- I- O- token classification? Or something else?","timestamp":"2022-04-06T14:35:33+00:00","score":1},{"role":"answerer","user_id":"anon_3fefd543e87fc264","comment_id":"i3mzj85","kind":"comment","text":"Unless you have lots of back to back label groups you probably could just use IO instead of BIO","timestamp":"2022-04-06T15:39:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_35e804729520ea8d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3fefd543e87fc264","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i3mn2r0","thanks_reply_id":"i3mpowd","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_04ed36300d3718fe","answerer_user_id":"anon_96863b9a5ee4ada4","subreddit":"LanguageTechnology","timestamp":"2022-04-10T09:58:11+00:00","post_id":"u0ei3v","question":"How to change BERT pre-training tasks on HuggingFace?\n\nHello all!\n\nI am fairly new to HuggingFace, and have only used the most famous functionalities as of now and am now looking into how to make my own BERT model. I found a few blogs which detail the procedure to train a model from scratch and some to further pre-train/finetune on a custom dataset. What I am unable to find is \"How to pre-train a BERT model (say RoBERTa) on different pre-training tasks (say MLM+RTD) using HuggingFace?\" Is it even possible? I would appreciate all and any help regarding my query.\n\nThanks!","preferred_answer":"Huggingface has some example scripts that show how to do the fine-tuning. They provide a `Trainer` class to abstract out the training details ( pytorch lightning adaptation).\n\nIn terms of model definition, HF already has a base class for Bert model (customised via a config), we would need a RTD head on top of that.","full_conversation":[{"role":"OP","user_id":"anon_04ed36300d3718fe","comment_id":"u0ei3v","kind":"post","text":"How to change BERT pre-training tasks on HuggingFace?\n\nHello all!\n\nI am fairly new to HuggingFace, and have only used the most famous functionalities as of now and am now looking into how to make my own BERT model. I found a few blogs which detail the procedure to train a model from scratch and some to further pre-train/finetune on a custom dataset. What I am unable to find is \"How to pre-train a BERT model (say RoBERTa) on different pre-training tasks (say MLM+RTD) using HuggingFace?\" Is it even possible? I would appreciate all and any help regarding my query.\n\nThanks!","timestamp":"2022-04-10T09:58:11+00:00","score":9},{"role":"answerer","user_id":"anon_96863b9a5ee4ada4","comment_id":"i45glwm","kind":"comment","text":"Huggingface has some example scripts that show how to do the fine-tuning. They provide a `Trainer` class to abstract out the training details ( pytorch lightning adaptation).\n\nIn terms of model definition, HF already has a base class for Bert model (customised via a config), we would need a RTD head on top of that.","timestamp":"2022-04-10T11:18:34+00:00","score":4},{"role":"OP","user_id":"anon_04ed36300d3718fe","comment_id":"i45h1re","kind":"comment","text":"Thanks! If possible, can you detail how to go about adding the RTD head? And is it done through the Trainer class?","timestamp":"2022-04-10T11:23:59+00:00","score":1},{"role":"answerer","user_id":"anon_96863b9a5ee4ada4","comment_id":"i464iaq","kind":"comment","text":"I am not much aware about RTD.\n\nBased on the initial search, it seems that RTD is just a different objective and the model for MLM should work as-is, with just a change in loss function.\n\nFollowing links might be helpful\n\nhttps://huggingface.co/transformers/v3.3.1/training.html#trainer\n\nhttps://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling\n\nhttps://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py","timestamp":"2022-04-10T14:54:42+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_04ed36300d3718fe","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_96863b9a5ee4ada4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i45glwm","thanks_reply_id":"i45h1re","post_score":9,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_8dd4110495182c1a","answerer_user_id":"anon_149fd83dfe482b73","subreddit":"LanguageTechnology","timestamp":"2022-04-16T18:04:37+00:00","post_id":"u53gfw","question":"Tips for posting code review\n\nHello everyone,\n\nI have been working on a project for my masters thesis that looks to classify nuclear power plant outage reports based on severity. \n\nIt's taken me quite some time to figure out and learn bert.\n\nI do not have much support in NLP work and hearing feedback from the community is what I have mostly relied on up to this point.\n\nWith this said, what is the best way to post code and to have it looked at to make sure I am doing things correctly, as expected? \n\nI do not intend to just throw code up and expect feedback. I will be sure to clean things up, document and comment as clearly and concise as possible. I just need tips figuring out where I can appropriately the code and how to show the input data in a way that streamlines feedback.\n\nThanks for the help everyone!","preferred_answer":"You'll have plenty of Time to get peers reviews when you'll get to work (in research or in the industry). Don't get too perfect too soon. You should instead focus on your own comprehension of your code. A good rule of thumbs IS to be sure to still understand what you wrote in let's say 2 or 3 years. So comments, comments, comments. You'll have plenty of time to get into optimizations and all the fancy stuff later.","full_conversation":[{"role":"OP","user_id":"anon_8dd4110495182c1a","comment_id":"u53gfw","kind":"post","text":"Tips for posting code review\n\nHello everyone,\n\nI have been working on a project for my masters thesis that looks to classify nuclear power plant outage reports based on severity. \n\nIt's taken me quite some time to figure out and learn bert.\n\nI do not have much support in NLP work and hearing feedback from the community is what I have mostly relied on up to this point.\n\nWith this said, what is the best way to post code and to have it looked at to make sure I am doing things correctly, as expected? \n\nI do not intend to just throw code up and expect feedback. I will be sure to clean things up, document and comment as clearly and concise as possible. I just need tips figuring out where I can appropriately the code and how to show the input data in a way that streamlines feedback.\n\nThanks for the help everyone!","timestamp":"2022-04-16T18:04:37+00:00","score":2},{"role":"answerer","user_id":"anon_149fd83dfe482b73","comment_id":"i4zhwoi","kind":"comment","text":"You'll have plenty of Time to get peers reviews when you'll get to work (in research or in the industry). Don't get too perfect too soon. You should instead focus on your own comprehension of your code. A good rule of thumbs IS to be sure to still understand what you wrote in let's say 2 or 3 years. So comments, comments, comments. You'll have plenty of time to get into optimizations and all the fancy stuff later.","timestamp":"2022-04-16T18:18:28+00:00","score":2},{"role":"OP","user_id":"anon_8dd4110495182c1a","comment_id":"i4ziqzz","kind":"comment","text":"I agree, thank you for your feedback. I was hoping to still get some feedback to make sure I am executing the training model correctly and it is doing what I expect it is doing.","timestamp":"2022-04-16T18:24:32+00:00","score":1},{"role":"answerer","user_id":"anon_149fd83dfe482b73","comment_id":"i4zjzot","kind":"comment","text":"Just post some github ;)","timestamp":"2022-04-16T18:33:47+00:00","score":2},{"role":"OP","user_id":"anon_8dd4110495182c1a","comment_id":"i4znqi4","kind":"comment","text":"Awesome! I can do that! Once I get it in a presentable condition I'll repost back to the main feed. Thanks!","timestamp":"2022-04-16T19:01:38+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_8dd4110495182c1a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_149fd83dfe482b73","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i4zhwoi","thanks_reply_id":"i4ziqzz","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_a7dba5f30b660935","answerer_user_id":"anon_79e93eb4566ada51","subreddit":"LanguageTechnology","timestamp":"2022-04-21T17:36:47+00:00","post_id":"u8t1t2","question":"Leetcode for NLP positions?\n\nLocation: Germany, Baden-Württemberg\n\nI recently finished my dual-major MA in English and Computational Linguistics in Croatia, got my Goethe B2 certificate, and built a GitHub portfolio with some NLP/ML projects. I need to tweak my CV a bit, and I plan to start applying for positions in Germany within a week or two.\n\nI was wondering if I should focus my prep time for the interviews on Leetcode style problems or actually relevant coding exercises with Spacy/NLTK/TensorFlow etc.\n\nWhat are your experiences? Any additional tips are welcome, of course, especially if someone wants to provide feedback on my portfolio, and/or my CV when I'm done.\n\nHere's the GitHub link: [https://github.com/SkarletXx](https://github.com/SkarletXx)\n\nNote: if relevant, I already live in Germany.","preferred_answer":"Your Github looks great! I'd suggest if you want to improve your profile, get into research on your own. Having research papers (you don't need to do it under a professor or a company) where the work is relevant to real world problems will really help boost your NLP profile as its a highly research driven field even in Applied AI companies.","full_conversation":[{"role":"OP","user_id":"anon_a7dba5f30b660935","comment_id":"u8t1t2","kind":"post","text":"Leetcode for NLP positions?\n\nLocation: Germany, Baden-Württemberg\n\nI recently finished my dual-major MA in English and Computational Linguistics in Croatia, got my Goethe B2 certificate, and built a GitHub portfolio with some NLP/ML projects. I need to tweak my CV a bit, and I plan to start applying for positions in Germany within a week or two.\n\nI was wondering if I should focus my prep time for the interviews on Leetcode style problems or actually relevant coding exercises with Spacy/NLTK/TensorFlow etc.\n\nWhat are your experiences? Any additional tips are welcome, of course, especially if someone wants to provide feedback on my portfolio, and/or my CV when I'm done.\n\nHere's the GitHub link: [https://github.com/SkarletXx](https://github.com/SkarletXx)\n\nNote: if relevant, I already live in Germany.","timestamp":"2022-04-21T17:36:47+00:00","score":6},{"role":"answerer","user_id":"anon_79e93eb4566ada51","comment_id":"i5qukp5","kind":"comment","text":"Your Github looks great! I'd suggest if you want to improve your profile, get into research on your own. Having research papers (you don't need to do it under a professor or a company) where the work is relevant to real world problems will really help boost your NLP profile as its a highly research driven field even in Applied AI companies.","timestamp":"2022-04-22T13:19:02+00:00","score":3},{"role":"OP","user_id":"anon_a7dba5f30b660935","comment_id":"i5qvs36","kind":"comment","text":"Thank you! \nI have one listed on my CV that I did during my studies with a fellow student and a professor: \nDetecting Hate Speech Online: A Case of Croatian. In: Fehri H., Mesfar S., Silberztein M. (eds) Formalizing Natural Languages with NooJ 2019 and Its Natural Language Processing Applications. \n\nYou think I should add it to my GitHub as well?","timestamp":"2022-04-22T13:28:11+00:00","score":2},{"role":"answerer","user_id":"anon_79e93eb4566ada51","comment_id":"i5qwzg0","kind":"comment","text":">SkarletXx\n\nYepp. The code to your paper should always be on Github. In fact, the GitHub repository acts as a supplementary material to your paper essentially.\n\nApart from that, based on industry requirements, you can also learn other sub-domains of NLP like Information extraction, recommendation systems, MLOps and scaling Machine Learning softwares etc.\n\nFeel free to connect with me via chat. I'm moving to Berlin in a couple of months to work as a Machine Learning engineer and would love to answer any questions you might have :)","timestamp":"2022-04-22T13:37:22+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a7dba5f30b660935","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_79e93eb4566ada51","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i5qukp5","thanks_reply_id":"i5qvs36","post_score":6,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_518df384bba26fe0","answerer_user_id":"anon_ae6a40e22677d794","subreddit":"LanguageTechnology","timestamp":"2022-05-12T18:16:28+00:00","post_id":"uo7e5a","question":"Has anyone worked with Snorkel.ai's product or their libraries? How has the experience been for you?\n\nSo everyone talks about weak supervision and how well it works for large-scale data labelling. I've always been a little confused about how the models would learn to avoid the labels which are actually wrongly labelled by the system. Would it not try to fit those data rows as well?\n\nWhats the biggest challenge with implementing this setup?","preferred_answer":"I've used snorkel's open source software. Some things to note:\n- Performance depends on quality of labeling functions\n- Labeling functions usually have some \"effective domain\", e.g., a keyword existence could -> positive class, but absence may not -> negative class. In that case, function should \"abstain\" (no class)\n- Some of the most effective labeling functions were actually prior, simpler, or transferred models\n- Ideally where your labeling functions do something wrong, they're \"cancelled out\" by another function's mistake or correction, and that tension is learned\n\nBiggest challenge is actually discovering the domain knowledge needed to write good labeling functions. You should prepare to become an expert in your dataset. Hopefully you can lean on another real expert in collaboration. A good search interface over your dataset is useful, both for your own exploration and collaborating with experts (this is part of the sell of Snorkel's enterprise product).\n\nEdit: Conveniently just came across [this paper](https://arxiv.org/abs/2004.14723) which validates/adds to that. A careful reading should be quite helpful. Also take a look at a library called skweak (which I haven't used).","full_conversation":[{"role":"OP","user_id":"anon_518df384bba26fe0","comment_id":"uo7e5a","kind":"post","text":"Has anyone worked with Snorkel.ai's product or their libraries? How has the experience been for you?\n\nSo everyone talks about weak supervision and how well it works for large-scale data labelling. I've always been a little confused about how the models would learn to avoid the labels which are actually wrongly labelled by the system. Would it not try to fit those data rows as well?\n\nWhats the biggest challenge with implementing this setup?","timestamp":"2022-05-12T18:16:28+00:00","score":12},{"role":"answerer","user_id":"anon_ae6a40e22677d794","comment_id":"i8cqb58","kind":"comment","text":"I've used snorkel's open source software. Some things to note:\n- Performance depends on quality of labeling functions\n- Labeling functions usually have some \"effective domain\", e.g., a keyword existence could -> positive class, but absence may not -> negative class. In that case, function should \"abstain\" (no class)\n- Some of the most effective labeling functions were actually prior, simpler, or transferred models\n- Ideally where your labeling functions do something wrong, they're \"cancelled out\" by another function's mistake or correction, and that tension is learned\n\nBiggest challenge is actually discovering the domain knowledge needed to write good labeling functions. You should prepare to become an expert in your dataset. Hopefully you can lean on another real expert in collaboration. A good search interface over your dataset is useful, both for your own exploration and collaborating with experts (this is part of the sell of Snorkel's enterprise product).\n\nEdit: Conveniently just came across [this paper](https://arxiv.org/abs/2004.14723) which validates/adds to that. A careful reading should be quite helpful. Also take a look at a library called skweak (which I haven't used).","timestamp":"2022-05-12T18:54:49+00:00","score":15},{"role":"OP","user_id":"anon_518df384bba26fe0","comment_id":"i8d0bfz","kind":"comment","text":"Amazing insights! Thanks a lot, for your input. \n\nCan the enterprise product be used by non-technical folks? A lot of orgs I work with only have a single non-technical SME to spare on data labelling. \n\nAnd they need to label like 50-100k records so manual data labelling is impossible.\n\nMy understanding is that keywords can only get you so far wrt good labelling functions.","timestamp":"2022-05-12T19:58:55+00:00","score":2},{"role":"answerer","user_id":"anon_ae6a40e22677d794","comment_id":"i8hc7xp","kind":"comment","text":"I believe that's their big sell. They seemed a little hard to get ahold of but that may have changed more recently (they seem to be rapidly scaling).\n\nWhat worked for me in that situation, and there's precedence for this elsewhere, is setting up a workflow where one technical and one non-technical person can collaborate over a zoom call. It requires a particular UI like a search interface but that can work quite well for generating initial ideas to fine tune later.\n\n(I've also built some more custom interfaces and thought about the problem quite a bit. Happy to share what I know, feel free to DM if you'd like to chat through your use case.)\n\nBTW, I added a paper link to my original post you should check out","timestamp":"2022-05-13T18:11:24+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_518df384bba26fe0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ae6a40e22677d794","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i8cqb58","thanks_reply_id":"i8d0bfz","post_score":12,"answer_score":15,"preferred_answer_is_top_level":true}} {"user_id":"anon_8b6114c1fd68792a","answerer_user_id":"anon_46578794a71451d4","subreddit":"LanguageTechnology","timestamp":"2022-05-13T10:38:05+00:00","post_id":"uoot5s","question":"How good is my summary?\n\nHi. I am looking for some code in python that gives me a % of how similar my generated extractive summary of a paper is compared to the original abstract of that paper. I want to know how good or bad my summary was. Preferably without using training, but I can use any pre trainned data if freely available. Any tips/recommendations would be amazing! Thanks","preferred_answer":"You can consider implementing your own code in order to compute ROUGE score. Not so complicated, but for sure it isn't the easiest way to go. Or you can check whether the library you are using for extractive summarization already has a built-in function for evaluation.\nHere there is an [article](https://towardsdatascience.com/the-ultimate-performance-metric-in-nlp-111df6c64460) that explains ROUGE metrics in a very simple way.","full_conversation":[{"role":"OP","user_id":"anon_8b6114c1fd68792a","comment_id":"uoot5s","kind":"post","text":"How good is my summary?\n\nHi. I am looking for some code in python that gives me a % of how similar my generated extractive summary of a paper is compared to the original abstract of that paper. I want to know how good or bad my summary was. Preferably without using training, but I can use any pre trainned data if freely available. Any tips/recommendations would be amazing! Thanks","timestamp":"2022-05-13T10:38:05+00:00","score":12},{"role":"answerer","user_id":"anon_46578794a71451d4","comment_id":"i8gzvio","kind":"comment","text":"You can consider implementing your own code in order to compute ROUGE score. Not so complicated, but for sure it isn't the easiest way to go. Or you can check whether the library you are using for extractive summarization already has a built-in function for evaluation.\nHere there is an [article](https://towardsdatascience.com/the-ultimate-performance-metric-in-nlp-111df6c64460) that explains ROUGE metrics in a very simple way.","timestamp":"2022-05-13T16:49:08+00:00","score":2},{"role":"OP","user_id":"anon_8b6114c1fd68792a","comment_id":"i8hd82c","kind":"comment","text":"That is great thank you, however not having the semantics in rouge is a big drawback.","timestamp":"2022-05-13T18:18:17+00:00","score":1},{"role":"answerer","user_id":"anon_46578794a71451d4","comment_id":"i8igadr","kind":"comment","text":"Yep, you have a point. Indeed, a human evaluation is always needed.","timestamp":"2022-05-13T23:03:48+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8b6114c1fd68792a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_46578794a71451d4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i8gzvio","thanks_reply_id":"i8hd82c","post_score":12,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_d1d8c11952563006","answerer_user_id":"anon_e255d466c2314619","subreddit":"LanguageTechnology","timestamp":"2022-05-17T19:12:12+00:00","post_id":"urtvhd","question":"Can the BLEU score be used to choose the best human translator among a pool of samples?\n\nHi everyone!\n\nA translation agency is using the BLEU score to select the best human translators among a large pool of candidates. They had only two sample translations against which to compare each test entry. The subject matter is a highly complex legal document 500 words in length.\n\nDo you think this is a valid approach? How reliable would the scores be? What are the problems with it?\n\nThanks a lot!","preferred_answer":"Depends on the language tbh. But even so, there are literally 100+ metrics that correlate with human judgment better than BLEU. As a simple and quick test of quality, sure. But to use BLEU to evaluate human translators will be problematic.","full_conversation":[{"role":"OP","user_id":"anon_d1d8c11952563006","comment_id":"urtvhd","kind":"post","text":"Can the BLEU score be used to choose the best human translator among a pool of samples?\n\nHi everyone!\n\nA translation agency is using the BLEU score to select the best human translators among a large pool of candidates. They had only two sample translations against which to compare each test entry. The subject matter is a highly complex legal document 500 words in length.\n\nDo you think this is a valid approach? How reliable would the scores be? What are the problems with it?\n\nThanks a lot!","timestamp":"2022-05-17T19:12:12+00:00","score":6},{"role":"answerer","user_id":"anon_e255d466c2314619","comment_id":"i8zipuv","kind":"comment","text":"Depends on the language tbh. But even so, there are literally 100+ metrics that correlate with human judgment better than BLEU. As a simple and quick test of quality, sure. But to use BLEU to evaluate human translators will be problematic.","timestamp":"2022-05-17T19:51:55+00:00","score":4},{"role":"OP","user_id":"anon_d1d8c11952563006","comment_id":"i8ziyue","kind":"comment","text":"Thank you so much for replying!\n\nThe source language is Portuguese and the target is English. Can you give a few examples of possible problems?","timestamp":"2022-05-17T19:53:39+00:00","score":1},{"role":"answerer","user_id":"anon_e255d466c2314619","comment_id":"i8zkjs8","kind":"comment","text":"Well, if the target is English then it is slightly better. However, one major problem with BLEU is that it simply calculates n-gram overlap which means if translators end up using any synonyms or similar words/structures, BLEU will count it as wrong. Huge problem when used with human translators since no two humans translate in the same way.","timestamp":"2022-05-17T20:04:32+00:00","score":6},{"role":"OP","user_id":"anon_d1d8c11952563006","comment_id":"i8zkrvp","kind":"comment","text":"Thanks a lot! I thought this might be a problem","timestamp":"2022-05-17T20:06:06+00:00","score":2},{"role":"answerer","user_id":"anon_e255d466c2314619","comment_id":"i8zkzif","kind":"comment","text":"Np! Good luck","timestamp":"2022-05-17T20:07:34+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_d1d8c11952563006","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e255d466c2314619","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i8zipuv","thanks_reply_id":"i8ziyue","post_score":6,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_af525ca9e97a58ee","answerer_user_id":"anon_68e2b73033133578","subreddit":"LanguageTechnology","timestamp":"2022-05-25T03:50:59+00:00","post_id":"ux8qkv","question":"How can I crowdsource speech/translation data for an endangered Semitic language?\n\nHi everyone!\n\n**Mission:** I am trying to crowdsources speech and translation data for an endangered Semitic language: Neo-Aramaic\n\n**What I have done already:** There are many many dialects of spoken Neo-Aramaic (not including Classical Syriac). Documenting all of them is important. But for the most common dialect specifically (Urmi), I have a \\~100 page bilingual English/Assyrian corpus in the desired phonetic Romanized [alphabet](https://nena.ames.cam.ac.uk/audio/200/). I have also created an ASR model with 12% CER to semi-automate the transcription of future unlabeled speech data.\n\n**Challenges:** There is simply not enough data! Most dialects simply have no data at all. The corpus I previously mentioned is not great for ML tasks: the sentences in this corpus are not at all common everyday sentences, and there is not much variety.\n\n**My idea:** I want to create a website for crowdsourcing speech and translation data for all dialects of Neo-Aramaic! This is ambitious but it needs to happen. I have no experience so this could be dumb, but my plan is to have platform like Mozilla's [Common Voice](https://commonvoice.mozilla.org/en):\n\n1. This platform will show the user an English sentence, like \"He goes to the store\".\n2. The user then reads this sentence in their dialect of Neo-Aramaic into their browser.\n3. The user then approximately transcribes what they are saying in English characters.\n4. The user then marks what city they are from / what dialect they have (depending on how informed they are).\n5. Somehow the translation is validated (must be done by speakers) and the transcription is corrected to the proper phonetic Romanized alphabet (can be done by any phonetician).\n\n**Questions for you all:**\n\n1. Will a corpus built this way be meaningful? Like, wouldn't this data be very skewed? I hypothesize the data might work well to train an English to Neo-Aramaic translator but not a Neo-Aramaic - English translator.\n2. Would the crowdsourced translations be too difficult to validate? I'm not sure how messy things will get. I wish I could speak to someone with experience on similar projects.\n3. If you all think this can work, where can I get the corpus of typical English sentences?\n\nThanks for reading to the end.","preferred_answer":"Depending on the number of speakers, this project might need actual on-site fieldwork and involvement of specific people. E.g. https://www.avaxbb.com/2022/03/19/the-jewish-neo-aramaic-dialect-of-urmi/ already implies that in 2008 they had trouble getting data from the remaining few native speakers, and now 15 years later probably it's harder.\n\nCrowdsourcing works when there are crowds, and where you can get a sufficient quantity only if tiny fraction of the audience (1% would be very optimistic, usually it's much less even given advertising campaigns) contribute a tiny bit each. For endangered languages, the crowds aren't there so you won't get enough data just by having a platform, someone needs to do the actual work to interact with these people - the only way you can do it remotely is if you have a strong relationship with their community and community activists and they say they can organize this data collection. It's never a \"build-it-and-they-will-come\" situation - for any successful crowdsourcing project the effort on outreach and advertising and validation is far larger than the effort needed to build the tech platform.\n\nIt's not a tech problem and a tech solution (e.g. creating a website) won't be sufficient, the difficult part is non-tech; you need funding and/or motivation to organize lots of non-tech labor for such a task.","full_conversation":[{"role":"OP","user_id":"anon_af525ca9e97a58ee","comment_id":"ux8qkv","kind":"post","text":"How can I crowdsource speech/translation data for an endangered Semitic language?\n\nHi everyone!\n\n**Mission:** I am trying to crowdsources speech and translation data for an endangered Semitic language: Neo-Aramaic\n\n**What I have done already:** There are many many dialects of spoken Neo-Aramaic (not including Classical Syriac). Documenting all of them is important. But for the most common dialect specifically (Urmi), I have a \\~100 page bilingual English/Assyrian corpus in the desired phonetic Romanized [alphabet](https://nena.ames.cam.ac.uk/audio/200/). I have also created an ASR model with 12% CER to semi-automate the transcription of future unlabeled speech data.\n\n**Challenges:** There is simply not enough data! Most dialects simply have no data at all. The corpus I previously mentioned is not great for ML tasks: the sentences in this corpus are not at all common everyday sentences, and there is not much variety.\n\n**My idea:** I want to create a website for crowdsourcing speech and translation data for all dialects of Neo-Aramaic! This is ambitious but it needs to happen. I have no experience so this could be dumb, but my plan is to have platform like Mozilla's [Common Voice](https://commonvoice.mozilla.org/en):\n\n1. This platform will show the user an English sentence, like \"He goes to the store\".\n2. The user then reads this sentence in their dialect of Neo-Aramaic into their browser.\n3. The user then approximately transcribes what they are saying in English characters.\n4. The user then marks what city they are from / what dialect they have (depending on how informed they are).\n5. Somehow the translation is validated (must be done by speakers) and the transcription is corrected to the proper phonetic Romanized alphabet (can be done by any phonetician).\n\n**Questions for you all:**\n\n1. Will a corpus built this way be meaningful? Like, wouldn't this data be very skewed? I hypothesize the data might work well to train an English to Neo-Aramaic translator but not a Neo-Aramaic - English translator.\n2. Would the crowdsourced translations be too difficult to validate? I'm not sure how messy things will get. I wish I could speak to someone with experience on similar projects.\n3. If you all think this can work, where can I get the corpus of typical English sentences?\n\nThanks for reading to the end.","timestamp":"2022-05-25T03:50:59+00:00","score":6},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"i9xkg6f","kind":"comment","text":"Depending on the number of speakers, this project might need actual on-site fieldwork and involvement of specific people. E.g. https://www.avaxbb.com/2022/03/19/the-jewish-neo-aramaic-dialect-of-urmi/ already implies that in 2008 they had trouble getting data from the remaining few native speakers, and now 15 years later probably it's harder.\n\nCrowdsourcing works when there are crowds, and where you can get a sufficient quantity only if tiny fraction of the audience (1% would be very optimistic, usually it's much less even given advertising campaigns) contribute a tiny bit each. For endangered languages, the crowds aren't there so you won't get enough data just by having a platform, someone needs to do the actual work to interact with these people - the only way you can do it remotely is if you have a strong relationship with their community and community activists and they say they can organize this data collection. It's never a \"build-it-and-they-will-come\" situation - for any successful crowdsourcing project the effort on outreach and advertising and validation is far larger than the effort needed to build the tech platform.\n\nIt's not a tech problem and a tech solution (e.g. creating a website) won't be sufficient, the difficult part is non-tech; you need funding and/or motivation to organize lots of non-tech labor for such a task.","timestamp":"2022-05-25T13:21:53+00:00","score":2},{"role":"OP","user_id":"anon_af525ca9e97a58ee","comment_id":"i9yik7y","kind":"comment","text":"Thanks for the response! So my family speaks the most common dialect (Urmi). This means I know that for at least this one dialect, I can personally ask friends and family to contribute. I absolutely plan to publicize the effort to Facebook, reddit, churches, etc. For other dialects to get representation, somebody from that dialect must act as an ambassador of sorts and orchestrate an effort.\n\nFor context, I think I can personally get 10-50 people to use the platform at least once. I think I can get 50 strangers or more from online communities.\n\nDoes that sound reasonable?","timestamp":"2022-05-25T17:14:53+00:00","score":1},{"role":"answerer","user_id":"anon_68e2b73033133578","comment_id":"ia9ybnf","kind":"comment","text":"That sounds much more reasonable - and in this case there's less focus needed on the 'crowdsourcing-specific' features but rather on the annotation workflow perhaps expecting that someone can assist in data entry.\n\nOne thing you probably should plan from the beginning in the software structure is a workflow that expects doing review of data entered by someone else; the data will need at least some review and moderation in any case.","timestamp":"2022-05-28T03:52:13+00:00","score":2},{"role":"OP","user_id":"anon_af525ca9e97a58ee","comment_id":"ia9ygre","kind":"comment","text":">One thing you probably should plan from the beginning in the software structure is a workflow that expects doing review of data entered by someone else; the data will need at least some review and moderation in any case. \n\nI will keep this in mind, thank you so much for this advice!","timestamp":"2022-05-28T03:53:41+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_af525ca9e97a58ee","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_68e2b73033133578","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"i9xkg6f","thanks_reply_id":"i9yik7y","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4c553590a59ddc34","answerer_user_id":"anon_5b67b89f71a0ec7a","subreddit":"LanguageTechnology","timestamp":"2022-05-26T14:06:33+00:00","post_id":"uy8f1f","question":"Optimizing for efficiency/memory use with spaCy and dask when preprocessing ~30M medium-large strings\n\nI have scraped about 30 million Reddit comments. Now I want to use them to train some classification models. But this volume of data is proving seriously challenging to work with.\n\nMy current set up is that the comment strings are stored as a `dask.Series`. At first I was using `dask` methods to clean the comments in parallel (this step involves multiple passes each using regex), then using `apply(nlp)` to convert each comment into a `spacy` `Doc` (this just uses `spacy`’s default preprocessing pipeline). But it takes an absolute eternity, before running out of memory and failing.\n\nSo something has to give here, but I’m not sure what. I’ve considered using `numpy` instead of `dask`, but `dask` doesn’t seem like the right tool since it’s really optimized for numerical computation, not string operations.\n\nSo how on earth can I preprocess this much natural language data??? Let me know if more details are required.\n\nEdit: Some additional thoughts…\n\n- So far all of this has been done on a standard-issue MacBook Pro, which is very likely just unable to handle this task. Eventually I’d like to move all my computation to AWS EC2, which seems like the right move. But before that point, I’d like to make sure my code is as optimized as possible. I’m not convinced that it’s there yet.\n\n- I have also considered using `spacy`’s `nlp.pipe` to take advantage of multiprocessing, but I’m not sure yet how best to get that working with data stored as a `dask.Series`. Maybe trying to use `dask` is actually holding me back after all?","preferred_answer":"I've found the best thing to do is preprocess in dask and filter with map, repatriation and use then use map\\_partitions, and use nlp.pipe. Load the model in the function called from map\\_partitions. Make the reparation size to the same size of the batch you'll send through nlp.pipe.\n\nNot sure how you code was functioning, but if you load the model outside of .mp function it causes leaked semaphore objects. If you load it in every function called from map, there's a lot of overhead.","full_conversation":[{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"uy8f1f","kind":"post","text":"Optimizing for efficiency/memory use with spaCy and dask when preprocessing ~30M medium-large strings\n\nI have scraped about 30 million Reddit comments. Now I want to use them to train some classification models. But this volume of data is proving seriously challenging to work with.\n\nMy current set up is that the comment strings are stored as a `dask.Series`. At first I was using `dask` methods to clean the comments in parallel (this step involves multiple passes each using regex), then using `apply(nlp)` to convert each comment into a `spacy` `Doc` (this just uses `spacy`’s default preprocessing pipeline). But it takes an absolute eternity, before running out of memory and failing.\n\nSo something has to give here, but I’m not sure what. I’ve considered using `numpy` instead of `dask`, but `dask` doesn’t seem like the right tool since it’s really optimized for numerical computation, not string operations.\n\nSo how on earth can I preprocess this much natural language data??? Let me know if more details are required.\n\nEdit: Some additional thoughts…\n\n- So far all of this has been done on a standard-issue MacBook Pro, which is very likely just unable to handle this task. Eventually I’d like to move all my computation to AWS EC2, which seems like the right move. But before that point, I’d like to make sure my code is as optimized as possible. I’m not convinced that it’s there yet.\n\n- I have also considered using `spacy`’s `nlp.pipe` to take advantage of multiprocessing, but I’m not sure yet how best to get that working with data stored as a `dask.Series`. Maybe trying to use `dask` is actually holding me back after all?","timestamp":"2022-05-26T14:06:33+00:00","score":11},{"role":"answerer","user_id":"anon_5b67b89f71a0ec7a","comment_id":"irh9tau","kind":"comment","text":"I've found the best thing to do is preprocess in dask and filter with map, repatriation and use then use map\\_partitions, and use nlp.pipe. Load the model in the function called from map\\_partitions. Make the reparation size to the same size of the batch you'll send through nlp.pipe.\n\nNot sure how you code was functioning, but if you load the model outside of .mp function it causes leaked semaphore objects. If you load it in every function called from map, there's a lot of overhead.","timestamp":"2022-10-08T03:15:23+00:00","score":1},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"irueu26","kind":"comment","text":"Thanks for the reply! Better late than never :) But this is fairly complex at first pass, I'm having difficulty grokking all the details.\n\nDo you have any code examples I could inspect to understand this flow? Also, could you describe the use cases in which you've done this yourself? Mine (30M medium-to-long strings) is fairly particular, so I just want to make sure your implementation would translate well before attempting it myself.\n\nI've been distracted with other things lately and still haven't really solved this problem.","timestamp":"2022-10-11T02:50:30+00:00","score":1},{"role":"answerer","user_id":"anon_5b67b89f71a0ec7a","comment_id":"irws2lv","kind":"comment","text":"I process common crawl data, so very long html strings. The list of 30m strings is likely quite long, I would load it into dask in batches. \n\n\nI use dask bags so a little different, I would consider switching to bags, seem to be the fastest for large raw text and nested dicts. But here is a rough example:\n\n```\ndef do_preprocessing(_x):\n # do preprocessing\n\ndef _NLP_pipe(part):\n part_list = list(part)\n nlpd_list = []\n text_docs = [x['text_doc'] for x in part_list]\n for doc in nlp.pipe(text_docs, batch_size=BATCH_SIZE):\n nlpd_list.append(extract(doc))\n for i, item in enumerate(nlpd_list):\n part_list[i]['nlp'] = item\n return part_list\n\n\n\nbag = db.from_sequence(doc_list, partition_size=PART_SIZE):\n .map(do_preprocessing)\\\n .filter(do_filtering)\\\n .repartition(npartiontions=REPART_SIZE)\\\n .map_partitions(_NLP_pipe)\n\nbag.compute()\n```\n\nLet me know if you have other Qs the formatting is tough in reddit\n\nNote: I'm not sure what format you're scrapped comments are in but there is likely a better way to import them than `from_sequence`. And again, I would likely only read in a certain number, not the entire 30m, unless you need to do aggregations on them, but dask should handle the DAG reasonably well.","timestamp":"2022-10-11T16:55:38+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4c553590a59ddc34","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5b67b89f71a0ec7a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"irh9tau","thanks_reply_id":"irueu26","post_score":11,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_6dbd9461f5a927c3","answerer_user_id":"anon_9b55fe910db4e132","subreddit":"LanguageTechnology","timestamp":"2022-06-02T14:40:30+00:00","post_id":"v3adzz","question":"How did you kick-start your career in NLP?\n\nHi all, \n\nI should probably preface with: I'm addressing in particular people who did not study/major in any kind of machine learning because then the answer is obvious - you studied it then you found a job in the field. :)\n\nA little about myself and why I ask this question. I'm in my mid thirties, I have a PhD in computer science and I had worked as a postdoc for about 3 years, but my area of research was High Performance Computing with a focus on system software for parallel systems. I don't hate it but I can't say I'm super passionate about it either.\n\nHowever I have always been passionate about languages and everything that had to do with it (I speak several languages on at least B1 level) and for a while now I've had the idea of switching to NLP in order to get closer to what I like. But I'm not exactly sure how to do it. What I've been doing so far is taking an online course about NLP, but I do struggle to keep up because there are just so many things to learn. I should probably just choose one particular type of task within NLP and focus on learning about it rather than trying to learn a bit of everything. Although I presume that during the interview they will be asking \"a little about everything\". :) I feel a bit lost and discouraged and wonder how others got into the field, how they approached studying the theoretical/practical part and more importantly - how did they get their first job in NLP. I'd be happy and very grateful to hear your stories and maybe even get motivated by them. Cheers!","preferred_answer":"For me, it was projects. I got my undergrad in linguistics, but became interested in machine learning language applications in late 2016, so I began working ML classes into my curriculum and took some coursera courses on ML, NLP, and RL. Those courses taught me more than my college classes at the time, but unfortunately I have yet to find a company who cares about them. Later I took a Python and Machine Translation seminar class that to-this-day is the best education I’ve gotten on this subject and I wish it were recorded so I could make it publicly available. My PhD was in computational linguistics. \n\nThe first project I did that got me any attention from companies was a text summarizer that took a url as input, sort out what needed summarizing by scraping, then summarizing. The second one was a search engine that used text analysis and classification for matching (significantly slower than normal, but with way more relevant matches). These were tremendously helpful when included on resumes, as they offered hiring managers a glimpse of something I had already done that maybe they needed.\n\nSeveral sad points:\n\n-\tEvery company I’ve worked at has told me I’d be working with languages directly, because that’s my passion. Only when I was an actual translator was that true. A lot of them genuinely believed when they told me that so they weren’t lying, but because they didn’t understand the localization process, they were wrong. \n-\tDespite machine translation being my specialty (and my most downloaded models on hf), people with PhDs in math and computer science are always getting those jobs. Many of them end up using my work in one form or another, which is why I’m committed to continue open-sourcing, but it makes me sad and jealous as well because that’s what I’d like to be doing.\n-\tUnfortunately, I’ve worked for 2 companies where I was on the payroll *just* so they could say they had a PhD research scientist working on their NLP problems. They didn’t really have a whole lot for me to do. \n-\tModeling is easy, MLOps is hard.\n-\tMost NLP business use cases right now are either text classification or semantic segmentation. This isn’t to say there aren’t others, they’re just less common. You’ll have to be hired by a research team to work on anything *really* fun/interesting/cutting edge.","full_conversation":[{"role":"OP","user_id":"anon_6dbd9461f5a927c3","comment_id":"v3adzz","kind":"post","text":"How did you kick-start your career in NLP?\n\nHi all, \n\nI should probably preface with: I'm addressing in particular people who did not study/major in any kind of machine learning because then the answer is obvious - you studied it then you found a job in the field. :)\n\nA little about myself and why I ask this question. I'm in my mid thirties, I have a PhD in computer science and I had worked as a postdoc for about 3 years, but my area of research was High Performance Computing with a focus on system software for parallel systems. I don't hate it but I can't say I'm super passionate about it either.\n\nHowever I have always been passionate about languages and everything that had to do with it (I speak several languages on at least B1 level) and for a while now I've had the idea of switching to NLP in order to get closer to what I like. But I'm not exactly sure how to do it. What I've been doing so far is taking an online course about NLP, but I do struggle to keep up because there are just so many things to learn. I should probably just choose one particular type of task within NLP and focus on learning about it rather than trying to learn a bit of everything. Although I presume that during the interview they will be asking \"a little about everything\". :) I feel a bit lost and discouraged and wonder how others got into the field, how they approached studying the theoretical/practical part and more importantly - how did they get their first job in NLP. I'd be happy and very grateful to hear your stories and maybe even get motivated by them. Cheers!","timestamp":"2022-06-02T14:40:30+00:00","score":22},{"role":"answerer","user_id":"anon_9b55fe910db4e132","comment_id":"iaxo7xt","kind":"comment","text":"For me, it was projects. I got my undergrad in linguistics, but became interested in machine learning language applications in late 2016, so I began working ML classes into my curriculum and took some coursera courses on ML, NLP, and RL. Those courses taught me more than my college classes at the time, but unfortunately I have yet to find a company who cares about them. Later I took a Python and Machine Translation seminar class that to-this-day is the best education I’ve gotten on this subject and I wish it were recorded so I could make it publicly available. My PhD was in computational linguistics. \n\nThe first project I did that got me any attention from companies was a text summarizer that took a url as input, sort out what needed summarizing by scraping, then summarizing. The second one was a search engine that used text analysis and classification for matching (significantly slower than normal, but with way more relevant matches). These were tremendously helpful when included on resumes, as they offered hiring managers a glimpse of something I had already done that maybe they needed.\n\nSeveral sad points:\n\n-\tEvery company I’ve worked at has told me I’d be working with languages directly, because that’s my passion. Only when I was an actual translator was that true. A lot of them genuinely believed when they told me that so they weren’t lying, but because they didn’t understand the localization process, they were wrong. \n-\tDespite machine translation being my specialty (and my most downloaded models on hf), people with PhDs in math and computer science are always getting those jobs. Many of them end up using my work in one form or another, which is why I’m committed to continue open-sourcing, but it makes me sad and jealous as well because that’s what I’d like to be doing.\n-\tUnfortunately, I’ve worked for 2 companies where I was on the payroll *just* so they could say they had a PhD research scientist working on their NLP problems. They didn’t really have a whole lot for me to do. \n-\tModeling is easy, MLOps is hard.\n-\tMost NLP business use cases right now are either text classification or semantic segmentation. This isn’t to say there aren’t others, they’re just less common. You’ll have to be hired by a research team to work on anything *really* fun/interesting/cutting edge.","timestamp":"2022-06-02T17:28:12+00:00","score":6},{"role":"OP","user_id":"anon_6dbd9461f5a927c3","comment_id":"ib0l3au","kind":"comment","text":"Thanks for your input! Did you manage to find a job closer to what you wanted to do in the end? If you majored in CL I imagine that all doors must be open for you...","timestamp":"2022-06-03T08:46:59+00:00","score":2},{"role":"answerer","user_id":"anon_9b55fe910db4e132","comment_id":"ib5edot","kind":"comment","text":"Not really, still just working on NLP. I wish all doors were open, the fact of the matter is I often have to answer the question of what CL and L10n are in my interviews. If everyone knew then I’d imagine it wouldn’t be as hard to get where we want to be.","timestamp":"2022-06-04T14:36:09+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6dbd9461f5a927c3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9b55fe910db4e132","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iaxo7xt","thanks_reply_id":"ib0l3au","post_score":22,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_87597f6c7164332e","answerer_user_id":"anon_5d6d4f06c85aa823","subreddit":"LanguageTechnology","timestamp":"2022-06-07T21:26:55+00:00","post_id":"v786xw","question":"😥A silly question about BPE?? Does \"@@\" appear in model vacabulary?\n\nHi there! I have a silly question about BPE algorithm.\n\nFor example, when word \"actor\" is divided into \"act@@ or\" and put into a model. Will it be represented as \"act or\" or \"act@@ or\"?\n\nOr for \"act\" and \"act@@\", will their vector be identical or different as model inputs?","preferred_answer":"I'm not 100% sure I understood your question correctly, but I used HuggingFace's BertTokenizer for a quick experiment. ([https://huggingface.co/docs/transformers/tokenizer\\_summary#bytepair-encoding-bpe](https://huggingface.co/docs/transformers/tokenizer_summary#bytepair-encoding-bpe))\n\nI couldn't get the BPE of actor as you described using HuggingFace's BERT tokenizer, so my word of interest is \"gpu\".\n\ndivided word of interest: \\[\"gpu\" -> \"gp\", \"##u\"\\] (I think your '@' symbols are synonymous with '#')\n\nexample sentence: \"gpu versus gp ##u\"\n\nexample sentence tokenized: \\[\"gp\", \"##u\", \"versus\", \"gp\", \"#\", \"#\", \"u\"\\]\n\nexample sentence input\\_ids (i.e. what the model interprets):\n\n\\[101, 14246, 2226, 6431, 14246, 1001, 1001, 1057, 102\\]\n\nwhich translates to\n\n\\[\\[CLS\\], gp, ##u, versus, gp, #, #, u, \\[SEP\\]\\]\n\nso in your case, for act@@ or, I assume your input id to the model will be an array representing \\['act##', 'or'\\] (but this might be specific to whatever BPE tokenizer you're using.)","full_conversation":[{"role":"OP","user_id":"anon_87597f6c7164332e","comment_id":"v786xw","kind":"post","text":"😥A silly question about BPE?? Does \"@@\" appear in model vacabulary?\n\nHi there! I have a silly question about BPE algorithm.\n\nFor example, when word \"actor\" is divided into \"act@@ or\" and put into a model. Will it be represented as \"act or\" or \"act@@ or\"?\n\nOr for \"act\" and \"act@@\", will their vector be identical or different as model inputs?","timestamp":"2022-06-07T21:26:55+00:00","score":1},{"role":"answerer","user_id":"anon_5d6d4f06c85aa823","comment_id":"ibm01sm","kind":"comment","text":"I'm not 100% sure I understood your question correctly, but I used HuggingFace's BertTokenizer for a quick experiment. ([https://huggingface.co/docs/transformers/tokenizer\\_summary#bytepair-encoding-bpe](https://huggingface.co/docs/transformers/tokenizer_summary#bytepair-encoding-bpe))\n\nI couldn't get the BPE of actor as you described using HuggingFace's BERT tokenizer, so my word of interest is \"gpu\".\n\ndivided word of interest: \\[\"gpu\" -> \"gp\", \"##u\"\\] (I think your '@' symbols are synonymous with '#')\n\nexample sentence: \"gpu versus gp ##u\"\n\nexample sentence tokenized: \\[\"gp\", \"##u\", \"versus\", \"gp\", \"#\", \"#\", \"u\"\\]\n\nexample sentence input\\_ids (i.e. what the model interprets):\n\n\\[101, 14246, 2226, 6431, 14246, 1001, 1001, 1057, 102\\]\n\nwhich translates to\n\n\\[\\[CLS\\], gp, ##u, versus, gp, #, #, u, \\[SEP\\]\\]\n\nso in your case, for act@@ or, I assume your input id to the model will be an array representing \\['act##', 'or'\\] (but this might be specific to whatever BPE tokenizer you're using.)","timestamp":"2022-06-08T14:12:45+00:00","score":2},{"role":"OP","user_id":"anon_87597f6c7164332e","comment_id":"ibmoy17","kind":"comment","text":"OMG thank you so much! Really appreciate your detailed explanition! \n\nMaybe I didn't say it clearly because English is not my first language. Many thks anyway.","timestamp":"2022-06-08T17:10:27+00:00","score":2},{"role":"answerer","user_id":"anon_5d6d4f06c85aa823","comment_id":"ibmphsc","kind":"comment","text":"No worries! :) glad I could try and help. \n\n\n(And your English is fine. I just have this weird habit of always misreading/misinterpreting instructions.)","timestamp":"2022-06-08T17:14:17+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_87597f6c7164332e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5d6d4f06c85aa823","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ibm01sm","thanks_reply_id":"ibmoy17","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_6880a13efcd98046","answerer_user_id":"anon_6eed58a8b7321068","subreddit":"LanguageTechnology","timestamp":"2022-06-16T01:58:39+00:00","post_id":"vdapop","question":"HELP PLEASE\n\nHi colleagues I really need help here, I graduated from faculty of arts English dep. Then I decided to get into Computational linguistics, I started to take courses in ml, Dl, and nlp.\nI applied for many jobs and internships but unfortunately always rejected.\nI need a help how to get an internship\nIs this difficult for me?\nI'm so disappointed please help 😔\n\nBTW I'm from Egypt","preferred_answer":"Are you living in Egypt and applying for positions in the US? If that's the case, it's more about immigration related issues than anything else.","full_conversation":[{"role":"OP","user_id":"anon_6880a13efcd98046","comment_id":"vdapop","kind":"post","text":"HELP PLEASE\n\nHi colleagues I really need help here, I graduated from faculty of arts English dep. Then I decided to get into Computational linguistics, I started to take courses in ml, Dl, and nlp.\nI applied for many jobs and internships but unfortunately always rejected.\nI need a help how to get an internship\nIs this difficult for me?\nI'm so disappointed please help 😔\n\nBTW I'm from Egypt","timestamp":"2022-06-16T01:58:39+00:00","score":2},{"role":"answerer","user_id":"anon_6eed58a8b7321068","comment_id":"ickgn5t","kind":"comment","text":"Are you living in Egypt and applying for positions in the US? If that's the case, it's more about immigration related issues than anything else.","timestamp":"2022-06-16T11:00:34+00:00","score":2},{"role":"OP","user_id":"anon_6880a13efcd98046","comment_id":"ickhb8k","kind":"comment","text":"Thanks for your reply\nActually No I applied for \"remote\" internships and internships here in Egypt always rejected","timestamp":"2022-06-16T11:08:28+00:00","score":2},{"role":"answerer","user_id":"anon_6eed58a8b7321068","comment_id":"ickjwbl","kind":"comment","text":"If that's the case, try to do some networking rather than just applying online for internships. Making connections with hiring managers and decision makers makes it much easier to get opportunities.","timestamp":"2022-06-16T11:37:35+00:00","score":2},{"role":"OP","user_id":"anon_6880a13efcd98046","comment_id":"ickjzhq","kind":"comment","text":"Thanks sir, I'll do my best","timestamp":"2022-06-16T11:38:33+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_6880a13efcd98046","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6eed58a8b7321068","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ickgn5t","thanks_reply_id":"ickhb8k","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_2afa489ba998cd80","answerer_user_id":"anon_6eed58a8b7321068","subreddit":"LanguageTechnology","timestamp":"2022-06-16T18:54:05+00:00","post_id":"vdt65u","question":"Can someone help!\n\nSo I have been working on this project, where I had to find similarity between two data sets and match the columns, but they don't have any semantic meaning (for example finding similarity between \"LPO 1615 City Bus\" and \"LPO 1615 Bus\", where they indicate the same thing and I need to match them). There are around 10,000 rows. So I tried creating my own embeddings but it didn't have much efficiency, is there another method I can try?","preferred_answer":"Try levenshtein distance(or other edit distance measures) as a similarity metric. Alternatively, if the data is as consistent as the example, you can represent the text as a bag-of-words and use Jaccard similarity.","full_conversation":[{"role":"OP","user_id":"anon_2afa489ba998cd80","comment_id":"vdt65u","kind":"post","text":"Can someone help!\n\nSo I have been working on this project, where I had to find similarity between two data sets and match the columns, but they don't have any semantic meaning (for example finding similarity between \"LPO 1615 City Bus\" and \"LPO 1615 Bus\", where they indicate the same thing and I need to match them). There are around 10,000 rows. So I tried creating my own embeddings but it didn't have much efficiency, is there another method I can try?","timestamp":"2022-06-16T18:54:05+00:00","score":0},{"role":"answerer","user_id":"anon_6eed58a8b7321068","comment_id":"icmi1yh","kind":"comment","text":"Try levenshtein distance(or other edit distance measures) as a similarity metric. Alternatively, if the data is as consistent as the example, you can represent the text as a bag-of-words and use Jaccard similarity.","timestamp":"2022-06-16T20:26:25+00:00","score":3},{"role":"OP","user_id":"anon_2afa489ba998cd80","comment_id":"ico89c4","kind":"comment","text":"Thanks for the insights, but what if I there is another text \"LPO 1612 Bus\" but it should be different from \"LPO 1615 Bus\". What can do here?","timestamp":"2022-06-17T04:40:01+00:00","score":1},{"role":"answerer","user_id":"anon_6eed58a8b7321068","comment_id":"icp4352","kind":"comment","text":"I mean.... try the suggested methods above and see for yourself? We know nothing about your data.","timestamp":"2022-06-17T11:30:27+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_2afa489ba998cd80","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6eed58a8b7321068","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"icmi1yh","thanks_reply_id":"ico89c4","post_score":0,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_cf2f61962fdf3e00","answerer_user_id":"anon_7a119678a566071b","subreddit":"LanguageTechnology","timestamp":"2022-06-17T19:27:10+00:00","post_id":"venzfx","question":"Is it possible to get a linguistic (NLP) job with a physics master degree?\n\nI'm considering a change of career from physics to NLP, and have been teaching myself some basic stuff in linguistics and ML by taking online courses etc.. but don't have anything in this field to show on my resume. Any advice on how to improve my chance of getting hired in this field with a pretty much blank resume as a physics master (need H1b sponsorship unfortunately) ? I'm thinking maybe I can code up a project and post it on github to show I at least know something about NLP, but I'm not sure what degree of complexity of the project would be considered useful by a recruiter if at all. I'm also wondering if the certifications from online course platforms are useful at all? \n\nI have some long term career goals and would appreciate any advice on how to develop relevant skillsets:\n\n1. developing apps/platforms that help preserve or revive endangered languages with uncommon phones and scripts. like to use algorithms to enhance learning rate in new learners, or to use machine translation + manual correction to increase the amount of available materials in the target language, or to develop interactive apps that simulate an immersive native speaker environment. \n2. Use techniques like sentiment analysis to understand the phenomenon of polarization in politics, morality etc, and try to find remedies that help social media companies to design their systems in a way that reduces polarization while remaining profitable. (mostly inspired by professor Jonathan Haidt)\n\nThese are just my long term ambitions and I don't know if those are realistic for me at all, and would appreciate any advice on how to proceed as a total newbie from an irrelevant field. Would also appreciate the honesty if my goal is not specifically realistic and I should pursuit a relevant degree or try my luck outside the US (due to the need of H1b sponsorship). Thanks!","preferred_answer":"What he means is that you pick a couple of libraries (NLP/ML/DL/etc) and you master how to use them. You learn how to train NLP models from more traditional stuff like Lemmatization, POS, and NER all the way to more modern downstream tasks like multi-label sequence classification, Question Answering, Translation, and Summarization via transformer-based models like BERT/GPT/ and so on. \n\n \nThen you have lots of repositories with notebooks demonstrating that you know how to do those things, it's good for you and it's good for other people trying to learn the same things as well. If you can, you could learn also how to deploy them for inference/prediction for instance (which that's what in production means). Here, you can also pick a target (AWS, GCP, Azure, etc.) or a simple \"here is a Dockerfile\", build an image and run it to have something that you can use as an app. (you know, these are all demos of your capabilities to overcome not having official CS training/experience) It could be a Streamlit app in a Docker, you can find many ideas here: [https://huggingface.co/spaces](https://huggingface.co/spaces) \n\n\nCheck this page out if you are interested in an NLP career in Healthcare AI - they even have an internship program. Obviously, you can apply the same technique of picking any NLP library, mastering it, passing a training, getting some online certificates, and doing some open-source projects to showcase them on your GitHub and then applying for a DS job. It's just you may not have enough time before to learn more than 1, so I advice mastering 1 first and then learning more on the job while climbing up the ladder:\n\n[https://www.johnsnowlabs.com/spark-nlp-training/](https://www.johnsnowlabs.com/spark-nlp-training/)","full_conversation":[{"role":"OP","user_id":"anon_cf2f61962fdf3e00","comment_id":"venzfx","kind":"post","text":"Is it possible to get a linguistic (NLP) job with a physics master degree?\n\nI'm considering a change of career from physics to NLP, and have been teaching myself some basic stuff in linguistics and ML by taking online courses etc.. but don't have anything in this field to show on my resume. Any advice on how to improve my chance of getting hired in this field with a pretty much blank resume as a physics master (need H1b sponsorship unfortunately) ? I'm thinking maybe I can code up a project and post it on github to show I at least know something about NLP, but I'm not sure what degree of complexity of the project would be considered useful by a recruiter if at all. I'm also wondering if the certifications from online course platforms are useful at all? \n\nI have some long term career goals and would appreciate any advice on how to develop relevant skillsets:\n\n1. developing apps/platforms that help preserve or revive endangered languages with uncommon phones and scripts. like to use algorithms to enhance learning rate in new learners, or to use machine translation + manual correction to increase the amount of available materials in the target language, or to develop interactive apps that simulate an immersive native speaker environment. \n2. Use techniques like sentiment analysis to understand the phenomenon of polarization in politics, morality etc, and try to find remedies that help social media companies to design their systems in a way that reduces polarization while remaining profitable. (mostly inspired by professor Jonathan Haidt)\n\nThese are just my long term ambitions and I don't know if those are realistic for me at all, and would appreciate any advice on how to proceed as a total newbie from an irrelevant field. Would also appreciate the honesty if my goal is not specifically realistic and I should pursuit a relevant degree or try my luck outside the US (due to the need of H1b sponsorship). Thanks!","timestamp":"2022-06-17T19:27:10+00:00","score":9},{"role":"answerer","user_id":"anon_7a119678a566071b","comment_id":"ict3b8c","kind":"comment","text":"What he means is that you pick a couple of libraries (NLP/ML/DL/etc) and you master how to use them. You learn how to train NLP models from more traditional stuff like Lemmatization, POS, and NER all the way to more modern downstream tasks like multi-label sequence classification, Question Answering, Translation, and Summarization via transformer-based models like BERT/GPT/ and so on. \n\n \nThen you have lots of repositories with notebooks demonstrating that you know how to do those things, it's good for you and it's good for other people trying to learn the same things as well. If you can, you could learn also how to deploy them for inference/prediction for instance (which that's what in production means). Here, you can also pick a target (AWS, GCP, Azure, etc.) or a simple \"here is a Dockerfile\", build an image and run it to have something that you can use as an app. (you know, these are all demos of your capabilities to overcome not having official CS training/experience) It could be a Streamlit app in a Docker, you can find many ideas here: [https://huggingface.co/spaces](https://huggingface.co/spaces) \n\n\nCheck this page out if you are interested in an NLP career in Healthcare AI - they even have an internship program. Obviously, you can apply the same technique of picking any NLP library, mastering it, passing a training, getting some online certificates, and doing some open-source projects to showcase them on your GitHub and then applying for a DS job. It's just you may not have enough time before to learn more than 1, so I advice mastering 1 first and then learning more on the job while climbing up the ladder:\n\n[https://www.johnsnowlabs.com/spark-nlp-training/](https://www.johnsnowlabs.com/spark-nlp-training/)","timestamp":"2022-06-18T07:00:36+00:00","score":2},{"role":"OP","user_id":"anon_cf2f61962fdf3e00","comment_id":"id21jqc","kind":"comment","text":"thank you those are very useful! do you think online certificates are useful on a resume?","timestamp":"2022-06-20T13:22:21+00:00","score":1},{"role":"answerer","user_id":"anon_7a119678a566071b","comment_id":"id22021","kind":"comment","text":"You are welcome. In many domains and job titles (even DS job depending on what you need to do) the online certificates won't be the only thing they would look first. However, most DS positions in AI/DL/ML/NLP fields the online trainings/certificates are important as they are mostly in-practice sessions. (so you just know they learned something that was practical even if they may lack the general in-depth knowledge of something. For instance, they may not know or explain what exactly is \"gradient descent\" or how actually \"CNN\" works, but they know how to stack a nice RNN model in Keras and train a sequence classifier.)","timestamp":"2022-06-20T13:26:22+00:00","score":2},{"role":"OP","user_id":"anon_cf2f61962fdf3e00","comment_id":"id402cb","kind":"comment","text":"I see, thank you!","timestamp":"2022-06-20T22:04:45+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_cf2f61962fdf3e00","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7a119678a566071b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ict3b8c","thanks_reply_id":"id21jqc","post_score":9,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_8c55274b737b277f","answerer_user_id":"anon_933ad9e581084f80","subreddit":"LanguageTechnology","timestamp":"2022-06-20T00:31:03+00:00","post_id":"vg8pnz","question":"How to extract Russian IPA transcriptions from Wiktionary?\n\nI'd like to create a plain text file (or csv) with Wiktionary's IPA transcriptions for Russian. Ideally, I'd like to have all words on one column and the IPA transcription on another. Is there a way to extract this information? \n\nI suspect there's some Python to be used, however I still know very rudimentary Python for me to know how to use scripts (like, once I have them in downloads, how would I use it?). If it were any other computer language: I would have absolutely no knowledge.\n\nI'll appreciate the help and guidance to obtain this information.","preferred_answer":"https://github.com/CUNY-CL/wikipron <- script for general mining and tsvs for Russian already available.","full_conversation":[{"role":"OP","user_id":"anon_8c55274b737b277f","comment_id":"vg8pnz","kind":"post","text":"How to extract Russian IPA transcriptions from Wiktionary?\n\nI'd like to create a plain text file (or csv) with Wiktionary's IPA transcriptions for Russian. Ideally, I'd like to have all words on one column and the IPA transcription on another. Is there a way to extract this information? \n\nI suspect there's some Python to be used, however I still know very rudimentary Python for me to know how to use scripts (like, once I have them in downloads, how would I use it?). If it were any other computer language: I would have absolutely no knowledge.\n\nI'll appreciate the help and guidance to obtain this information.","timestamp":"2022-06-20T00:31:03+00:00","score":3},{"role":"answerer","user_id":"anon_933ad9e581084f80","comment_id":"id0btyu","kind":"comment","text":"https://github.com/CUNY-CL/wikipron <- script for general mining and tsvs for Russian already available.","timestamp":"2022-06-20T01:13:29+00:00","score":2},{"role":"OP","user_id":"anon_8c55274b737b277f","comment_id":"id2hwum","kind":"comment","text":"This is perfect! Just what I was looking for. Can express enough my gratitude! Thank you so much!","timestamp":"2022-06-20T15:31:47+00:00","score":2},{"role":"answerer","user_id":"anon_933ad9e581084f80","comment_id":"id2kaoq","kind":"comment","text":"Glad to hear!","timestamp":"2022-06-20T15:49:09+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8c55274b737b277f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_933ad9e581084f80","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"id0btyu","thanks_reply_id":"id2hwum","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_23024892f3a73b82","answerer_user_id":"anon_7af9ec8f927a3ae8","subreddit":"LanguageTechnology","timestamp":"2022-06-24T18:02:03+00:00","post_id":"vjugzj","question":"Computational Linguistics:How to make grammar from the language?\n\nThe title says everything. How to make grammar which generates from the language?\n\nL = {pr s(on the power of q) k a(on the power of b) lic a(on the power of d)| q **∈** N, b **∈** N, d **∈** N)}","preferred_answer":"Those are very different languages. Yours has three powers: q, b, and d, which are each used only once. That is a regular language (Type 3) and very easy to make a grammar for. (Easy as in quickly explained. It's okay that you asked!)\n\nThe linked language uses only one power, but three times! That is a Type 0 language. This one specifically would need to generate the letters first and then represent a sorting algorithm encoded in the grammar! e.g. A := gB; B := HI; to generate and IH := HI; to sort and gH := gh; hH:= hh; hI := hi; iI := ii; to convert everything to terminals.","full_conversation":[{"role":"OP","user_id":"anon_23024892f3a73b82","comment_id":"vjugzj","kind":"post","text":"Computational Linguistics:How to make grammar from the language?\n\nThe title says everything. How to make grammar which generates from the language?\n\nL = {pr s(on the power of q) k a(on the power of b) lic a(on the power of d)| q **∈** N, b **∈** N, d **∈** N)}","timestamp":"2022-06-24T18:02:03+00:00","score":0},{"role":"answerer","user_id":"anon_7af9ec8f927a3ae8","comment_id":"idlmdsu","kind":"comment","text":"Those are very different languages. Yours has three powers: q, b, and d, which are each used only once. That is a regular language (Type 3) and very easy to make a grammar for. (Easy as in quickly explained. It's okay that you asked!)\n\nThe linked language uses only one power, but three times! That is a Type 0 language. This one specifically would need to generate the letters first and then represent a sorting algorithm encoded in the grammar! e.g. A := gB; B := HI; to generate and IH := HI; to sort and gH := gh; hH:= hh; hI := hi; iI := ii; to convert everything to terminals.","timestamp":"2022-06-24T19:46:45+00:00","score":1},{"role":"OP","user_id":"anon_23024892f3a73b82","comment_id":"idlngch","kind":"comment","text":"Thank you so much, at least I know now which types of languages are. Can you tell me, is there any program that generates it by itself or do you know a good source for learning this? Sorry if I ask stupid questions","timestamp":"2022-06-24T19:53:54+00:00","score":1},{"role":"answerer","user_id":"anon_7af9ec8f927a3ae8","comment_id":"idlpigq","kind":"comment","text":"Not from the top of my head. What you're searching for is \"generating a formal grammar from set notation.\" Ask as much as you want. I taught formal languages for three years. I've heard much worse!","timestamp":"2022-06-24T20:07:43+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_23024892f3a73b82","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7af9ec8f927a3ae8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"idlmdsu","thanks_reply_id":"idlngch","post_score":0,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_b5c23a3206740e37","answerer_user_id":"anon_3fb32a1c929a1474","subreddit":"LanguageTechnology","timestamp":"2022-07-06T19:20:19+00:00","post_id":"vsy2dy","question":"Building content moderation solution vs using a SaaS\n\nI'm working on a project around content moderation for a specific platform and I'm wondering what the advantages are of building out my own solution vs using a SaaS platform like Hive or Two Hat or the many others that are popping up. \n\nOther than lower cost of operation (SaaS value) and being able to improve performance of the model by training with my own data and labels (building own solution) is there anything else I should be thinking about in terms of performance metrics and ROI?","preferred_answer":"If you do it well, you will end up building another SaaS platform for content moderation. If you have the resources to build it and keep updating it, it might be nice.\n\nOne added benefit is the anonymity and increased data protection. If you have very sensitive data you might want to avoid sending it to a third party for analysis.","full_conversation":[{"role":"OP","user_id":"anon_b5c23a3206740e37","comment_id":"vsy2dy","kind":"post","text":"Building content moderation solution vs using a SaaS\n\nI'm working on a project around content moderation for a specific platform and I'm wondering what the advantages are of building out my own solution vs using a SaaS platform like Hive or Two Hat or the many others that are popping up. \n\nOther than lower cost of operation (SaaS value) and being able to improve performance of the model by training with my own data and labels (building own solution) is there anything else I should be thinking about in terms of performance metrics and ROI?","timestamp":"2022-07-06T19:20:19+00:00","score":2},{"role":"answerer","user_id":"anon_3fb32a1c929a1474","comment_id":"if6dsxo","kind":"comment","text":"If you do it well, you will end up building another SaaS platform for content moderation. If you have the resources to build it and keep updating it, it might be nice.\n\nOne added benefit is the anonymity and increased data protection. If you have very sensitive data you might want to avoid sending it to a third party for analysis.","timestamp":"2022-07-07T06:37:27+00:00","score":2},{"role":"OP","user_id":"anon_b5c23a3206740e37","comment_id":"if7fo5n","kind":"comment","text":"Thanks. The security piece of it is an interesting thought. Thanks for the feedback.\n\nPerformance is going to be the top metric for this project. I’ll do some benchmarking but I feel I can get much more desired performance training a model with my own data.","timestamp":"2022-07-07T13:44:17+00:00","score":1},{"role":"answerer","user_id":"anon_3fb32a1c929a1474","comment_id":"if7sdsk","kind":"comment","text":"There are plenty of moderation saas solutions that you can train with your data. If you train your model you probably want to read the google guide on that:\n\nhttps://developers.google.com/machine-learning/guides/text-classification/\n\nand depending on your design details use huggingface models with a classification head or build a simpler classifier using logistic regression (scikit-learn).","timestamp":"2022-07-07T15:13:54+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b5c23a3206740e37","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3fb32a1c929a1474","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"if6dsxo","thanks_reply_id":"if7fo5n","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_3b0233c5f7840db2","answerer_user_id":"anon_66c54c3a6c6d9124","subreddit":"LanguageTechnology","timestamp":"2022-07-08T10:20:41+00:00","post_id":"vu7h0u","question":"Is there a technique to detect anonymous repeat users?\n\nHi everyone. Hoping for a bit of help on this one from my favorite sub.\n\nI'm working with a dataset of anonymous chat conversations (\\~300k+ messages in \\~17k+ conversations) for a large children's welfare NGO. I'm tasked with identifying repeat users - i.e. users that (for one reason or another) utilize the service heavily (10+ conversations in a month). Apart from the conversation ID, the available features are \"message text\", \"datetime\" and \"channel\" (webchat or text message). We also have the IP of each conversation but this feature is *not* to be used for modelling, only validation.\n\n**Preprocessing**\n\nI've grouped by conversation ID, concatenating all messages into a single string per conversation. I've then added n-grams, removed stopwords etc. Lastly I've tried several embedding schemes, incl. TF-IDF, Doc2Vec, averaged Word2Vec and feature extraction from some transformer models.\n\n**Modelling**\n\nIntuitively, clustering or topic modelling comes to mind but, since we don't know the amount of repeat users at prediction time, we cannot specify a number of clusters. Therefore, I've tried hierarchical clustering (which infers k, the amount of clusters) which does manage to find some of the more active repeat users but the optimal threshold varies significantly which different batches of conversations.\n\nI've then tried to turn it into a supervised problem, a binary classification in which the target variable is defined as 1 *if number of IP occurrences >= 10 else 0*. This is a messy definition for many reasons but the test result significantly outperforms a zero-rule baseline. However, it doesn't generalize well to unseen users (which makes a lot of sense). Essentially what it does it learn the specific users which is not what we are looking for. Intuitively, however, it makes sense that there is no *generic* repeat user since a repeat user is only defined as such by the fact that such a user has been more active that others.\n\n**The ask**\n\nAm I missing something here? I think I'm too close to the problem and I could really use a fresh perspective on this case. Perhaps it's not solvable with the current approach? Any inputs would be greatly appreciated really.\n\nI have also looked into stylometry (awesome field of comp ling!) but the areas normally deals with a few actors and a lot of text. I deal with lots of actors and little text.\n\nThanks a lot for reading!","preferred_answer":"Uncommon spelling mistakes, usage of uncommon proper nouns and other uncommon terms will probably give you some useful features. There are various other ways to fingerprint users, or partially deanonymise them (usage of vocabulary outside of the top 400 words, ratio of past tense vs present tense, usage of plural vs singular prounouns, lexical diversity, average sentence length).\n\nThese features will probably work better than topic analysis (at a guess).","full_conversation":[{"role":"OP","user_id":"anon_3b0233c5f7840db2","comment_id":"vu7h0u","kind":"post","text":"Is there a technique to detect anonymous repeat users?\n\nHi everyone. Hoping for a bit of help on this one from my favorite sub.\n\nI'm working with a dataset of anonymous chat conversations (\\~300k+ messages in \\~17k+ conversations) for a large children's welfare NGO. I'm tasked with identifying repeat users - i.e. users that (for one reason or another) utilize the service heavily (10+ conversations in a month). Apart from the conversation ID, the available features are \"message text\", \"datetime\" and \"channel\" (webchat or text message). We also have the IP of each conversation but this feature is *not* to be used for modelling, only validation.\n\n**Preprocessing**\n\nI've grouped by conversation ID, concatenating all messages into a single string per conversation. I've then added n-grams, removed stopwords etc. Lastly I've tried several embedding schemes, incl. TF-IDF, Doc2Vec, averaged Word2Vec and feature extraction from some transformer models.\n\n**Modelling**\n\nIntuitively, clustering or topic modelling comes to mind but, since we don't know the amount of repeat users at prediction time, we cannot specify a number of clusters. Therefore, I've tried hierarchical clustering (which infers k, the amount of clusters) which does manage to find some of the more active repeat users but the optimal threshold varies significantly which different batches of conversations.\n\nI've then tried to turn it into a supervised problem, a binary classification in which the target variable is defined as 1 *if number of IP occurrences >= 10 else 0*. This is a messy definition for many reasons but the test result significantly outperforms a zero-rule baseline. However, it doesn't generalize well to unseen users (which makes a lot of sense). Essentially what it does it learn the specific users which is not what we are looking for. Intuitively, however, it makes sense that there is no *generic* repeat user since a repeat user is only defined as such by the fact that such a user has been more active that others.\n\n**The ask**\n\nAm I missing something here? I think I'm too close to the problem and I could really use a fresh perspective on this case. Perhaps it's not solvable with the current approach? Any inputs would be greatly appreciated really.\n\nI have also looked into stylometry (awesome field of comp ling!) but the areas normally deals with a few actors and a lot of text. I deal with lots of actors and little text.\n\nThanks a lot for reading!","timestamp":"2022-07-08T10:20:41+00:00","score":4},{"role":"answerer","user_id":"anon_66c54c3a6c6d9124","comment_id":"iffuz38","kind":"comment","text":"Uncommon spelling mistakes, usage of uncommon proper nouns and other uncommon terms will probably give you some useful features. There are various other ways to fingerprint users, or partially deanonymise them (usage of vocabulary outside of the top 400 words, ratio of past tense vs present tense, usage of plural vs singular prounouns, lexical diversity, average sentence length).\n\nThese features will probably work better than topic analysis (at a guess).","timestamp":"2022-07-09T05:14:40+00:00","score":2},{"role":"OP","user_id":"anon_3b0233c5f7840db2","comment_id":"ifktn1l","kind":"comment","text":"Thanks for the thorough reply. \n\nI will try to include all of these features with the text embeddings themselves and in general dive a bit more into lexical or linguistic features. Do you then suggest sticking with a supervised approach, instead of the topic analysis? \n\nThanks!","timestamp":"2022-07-10T09:33:40+00:00","score":1},{"role":"answerer","user_id":"anon_66c54c3a6c6d9124","comment_id":"ifl75zq","kind":"comment","text":"I think you would need to figure out whether repeat users keep the same topics or not. If the typical repeat user is someone who talks about the same things in every call, then topic could be a good feature. But if a typical repeat user calls up about absolutely everything, then topic won't tell you very much.","timestamp":"2022-07-10T12:27:12+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3b0233c5f7840db2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_66c54c3a6c6d9124","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iffuz38","thanks_reply_id":"ifktn1l","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_b8d486ab816f6836","answerer_user_id":"anon_38b01801c7f0d21d","subreddit":"LanguageTechnology","timestamp":"2022-07-15T05:49:51+00:00","post_id":"vzh2sp","question":"Why are we training Segment Embedding in BERT?\n\nIn BERT we have segment embeddings that are used for \"Segment Embeddings with shape (1, n, 768) which are vector representations to help BERT distinguish between paired input sequences.\"\n\nYes, but why. There are just 2 sentences, why are we making it so complicated and using 768-sized vector representation for 0 or 1? And we are adding them to the token and positional embeddings.\n\nSo it will be like :\n\nSegment Embeddings:\n\n`[0.321,0.231,...,0.434,0.312,0.123]`\n\nPosition Embeddings:\n\n`[0.123,0.6435,...,0.231,0.121,0.321]`\n\nEven If we sum those embeddings, summation will be like any embedding. How this summation will make the model distinguish between paired input sequences?","preferred_answer":"You add token+segment+position embedding to get the final embedding, right? All need to have 768 size in the 3rd dim. You are right, for 1st/2nd sentence it will ideally be 0/1. But mapping it to a fixed 768 size solves the dimension issue.","full_conversation":[{"role":"OP","user_id":"anon_b8d486ab816f6836","comment_id":"vzh2sp","kind":"post","text":"Why are we training Segment Embedding in BERT?\n\nIn BERT we have segment embeddings that are used for \"Segment Embeddings with shape (1, n, 768) which are vector representations to help BERT distinguish between paired input sequences.\"\n\nYes, but why. There are just 2 sentences, why are we making it so complicated and using 768-sized vector representation for 0 or 1? And we are adding them to the token and positional embeddings.\n\nSo it will be like :\n\nSegment Embeddings:\n\n`[0.321,0.231,...,0.434,0.312,0.123]`\n\nPosition Embeddings:\n\n`[0.123,0.6435,...,0.231,0.121,0.321]`\n\nEven If we sum those embeddings, summation will be like any embedding. How this summation will make the model distinguish between paired input sequences?","timestamp":"2022-07-15T05:49:51+00:00","score":7},{"role":"answerer","user_id":"anon_38b01801c7f0d21d","comment_id":"ig8cpts","kind":"comment","text":"You add token+segment+position embedding to get the final embedding, right? All need to have 768 size in the 3rd dim. You are right, for 1st/2nd sentence it will ideally be 0/1. But mapping it to a fixed 768 size solves the dimension issue.","timestamp":"2022-07-15T06:10:53+00:00","score":3},{"role":"OP","user_id":"anon_b8d486ab816f6836","comment_id":"iga8c39","kind":"comment","text":"Thanks for the answer.\n\nIs the content of segment embedding as i provided (\\[0.322,0.213,0.122.....\\]) or is it like \\[0,0,0,0,0,0,0,0,0,\\] // \\[1,1,1,1,1,1,\\] ?","timestamp":"2022-07-15T16:46:39+00:00","score":1},{"role":"answerer","user_id":"anon_38b01801c7f0d21d","comment_id":"igaee9k","kind":"comment","text":"1 is mapped to some FIXED 768 size vector. 0 is also mapped to some other FIXED 768 size vector. The values in the vector are irrelevant they just need to be constant. Think of 0 and 1 not as numbers but keys in a lookup table","timestamp":"2022-07-15T17:26:14+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b8d486ab816f6836","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_38b01801c7f0d21d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ig8cpts","thanks_reply_id":"iga8c39","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_9e2646fd4a20811b","answerer_user_id":"anon_fd834b92314ba53d","subreddit":"LanguageTechnology","timestamp":"2022-07-25T07:51:10+00:00","post_id":"w7itpd","question":"How to score sentence pairs for Bi-Encoder SBERT fine tuning\n\nMy task is to fine-tune Bi-Encoder SBERT ([https://www.sbert.net/](https://www.sbert.net/)) on custom data.\n\nMy custom data consists of \\~100K short sentence pairs with similar meaning. \n\nI create \\~500K negative samples by negative sampling.\n\nFor Bi-Encoder SBERT fine-tuning I need a score for each pair. The only scores I have are 0 (for all negative samples) and 1 (for all positive samples).\n\n​\n\nMy question: Are those scores are good enough for fine tuning? \n\nIf not, how should I give a score for each pair?","preferred_answer":"I think it looks ok, if the negative sampling was done well. SBERT'S similarities functions are most between 0 and 1 too (usually, cosine distance)","full_conversation":[{"role":"OP","user_id":"anon_9e2646fd4a20811b","comment_id":"w7itpd","kind":"post","text":"How to score sentence pairs for Bi-Encoder SBERT fine tuning\n\nMy task is to fine-tune Bi-Encoder SBERT ([https://www.sbert.net/](https://www.sbert.net/)) on custom data.\n\nMy custom data consists of \\~100K short sentence pairs with similar meaning. \n\nI create \\~500K negative samples by negative sampling.\n\nFor Bi-Encoder SBERT fine-tuning I need a score for each pair. The only scores I have are 0 (for all negative samples) and 1 (for all positive samples).\n\n​\n\nMy question: Are those scores are good enough for fine tuning? \n\nIf not, how should I give a score for each pair?","timestamp":"2022-07-25T07:51:10+00:00","score":5},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"ihksx5o","kind":"comment","text":"I think it looks ok, if the negative sampling was done well. SBERT'S similarities functions are most between 0 and 1 too (usually, cosine distance)","timestamp":"2022-07-25T13:51:04+00:00","score":2},{"role":"OP","user_id":"anon_9e2646fd4a20811b","comment_id":"ihpgzr6","kind":"comment","text":"Thanks for your comment.\n\nAt first I randomly sampled negative samples and could not improve performance on Test data.\n\nThen I've sampled negative samples using BM25, so the negatives will be somewhat similar but still negative i.e. \"Hard negatives\". Training now.\n\nDo you have in mind a better way to generate negative pairs?","timestamp":"2022-07-26T12:35:06+00:00","score":1},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"ihpih6v","kind":"comment","text":"Negative sampling is a whole art. BM25 should do better than random sampling, at least in theory. (Out of curiosity, what are you using for BM25? Your own code? Or something like anserini?) \n\nThings that are know to work well usually include some form of harder negative mining. \n\nSomething you can try is to use the scores of your own method to mine \"hard\" negatives. Basically, if Bert thinks it's hard, it should be hard. I think SBERT's MarginMSELoss does something like this.","timestamp":"2022-07-26T12:47:36+00:00","score":2},{"role":"OP","user_id":"anon_9e2646fd4a20811b","comment_id":"ihpq73g","kind":"comment","text":"> what are you using for BM25?\n\nI'm using it to create \"hard\" negatives. Out of all negative samples I'm looking for those that has high similarity score (w.r.t BM25) with a given positive sample. (Is it called \"hard negative mining\"?)\n\n> use the scores of your own method\n\nGood idea. Tnx!","timestamp":"2022-07-26T13:48:05+00:00","score":1},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"ihps9k4","kind":"comment","text":">\tI’m using it to create “hard” negatives.\n\nI mean, have you implemented BM25 yourself? or are you using a library to compute BM25?\n\n>\tIs it called “hard negative mining”?)\n\nAny process you take to pick harder negatives can be called hard negative mining. There is no specific method you need to use.","timestamp":"2022-07-26T14:03:12+00:00","score":1},{"role":"OP","user_id":"anon_9e2646fd4a20811b","comment_id":"ihpzzkj","kind":"comment","text":"I'm using this library:\n\n from rank_bm25 import BM25Okapi\n\nFollowed this example: https://github.com/UKPLab/sentence-transformers/blob/master/examples/applications/retrieve_rerank/retrieve_rerank_simple_wikipedia.ipynb","timestamp":"2022-07-26T14:56:40+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_9e2646fd4a20811b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fd834b92314ba53d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ihksx5o","thanks_reply_id":"ihpgzr6","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_0252bc57b51855b6","answerer_user_id":"anon_9265257eca8e7f04","subreddit":"LanguageTechnology","timestamp":"2022-07-28T15:38:11+00:00","post_id":"wad40c","question":"Classifying unstructured text: sentences, phrases, lists of words\n\nHello everyone!\n\nI am working on the text classification problem. The task is to divide the text into segments, each of which relates to a predetermined topic. Input texts could contain sentences, phrases, lists of words or all above mixed together. For example: \"I have a book and a pen\" or \"book, pen, pencil\" or \"Personal belongings: book '\\\\n', pen '\\\\n', pencil\". In all cases, the text should be attributed as referring to personal items without recognizing these items.\n\nSo, the problem is how to fine-tune transformer on such types of texts? My thinking is to divide text on sentences and meaningful phrases, and lists. So, I could fine-tune transformer on sentences/phrases and use some rules to determine topics for lists and badly written phrases. What do you think about this approach? \nAnother approach is to fine-tune model on all types of texts. Could transformer models like RoBERTa and distilled-RoBERTa achieve good results on mix of sentences, phrases and lists of words?","preferred_answer":"I would try BERTopic and Top2Vec to see which one works better on your data.","full_conversation":[{"role":"OP","user_id":"anon_0252bc57b51855b6","comment_id":"wad40c","kind":"post","text":"Classifying unstructured text: sentences, phrases, lists of words\n\nHello everyone!\n\nI am working on the text classification problem. The task is to divide the text into segments, each of which relates to a predetermined topic. Input texts could contain sentences, phrases, lists of words or all above mixed together. For example: \"I have a book and a pen\" or \"book, pen, pencil\" or \"Personal belongings: book '\\\\n', pen '\\\\n', pencil\". In all cases, the text should be attributed as referring to personal items without recognizing these items.\n\nSo, the problem is how to fine-tune transformer on such types of texts? My thinking is to divide text on sentences and meaningful phrases, and lists. So, I could fine-tune transformer on sentences/phrases and use some rules to determine topics for lists and badly written phrases. What do you think about this approach? \nAnother approach is to fine-tune model on all types of texts. Could transformer models like RoBERTa and distilled-RoBERTa achieve good results on mix of sentences, phrases and lists of words?","timestamp":"2022-07-28T15:38:11+00:00","score":9},{"role":"answerer","user_id":"anon_9265257eca8e7f04","comment_id":"ii2hezn","kind":"comment","text":"I would try BERTopic and Top2Vec to see which one works better on your data.","timestamp":"2022-07-29T01:17:37+00:00","score":1},{"role":"OP","user_id":"anon_0252bc57b51855b6","comment_id":"ii43kcl","kind":"comment","text":"Thanks for the advice. What do you think of adding prompts to lists of words for the better topic resolution?","timestamp":"2022-07-29T11:18:48+00:00","score":1},{"role":"answerer","user_id":"anon_9265257eca8e7f04","comment_id":"ii4p4ir","kind":"comment","text":"I am not sure I understand. Do you mean something like colors: red, yellow, blue?","timestamp":"2022-07-29T14:17:15+00:00","score":1},{"role":"OP","user_id":"anon_0252bc57b51855b6","comment_id":"iihsjez","kind":"comment","text":"I mean adding text to the list of words to create a full sentences. For example: \"a pen, a pencil, a book\" -> \"I have these personal belongings: a pen, a pencil, a book\".","timestamp":"2022-08-01T11:13:02+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_0252bc57b51855b6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9265257eca8e7f04","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ii2hezn","thanks_reply_id":"ii43kcl","post_score":9,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_c80a7c588e11cbc1","answerer_user_id":"anon_e23f0887ac655f56","subreddit":"LanguageTechnology","timestamp":"2022-08-02T08:53:05+00:00","post_id":"we6klr","question":"How to sort list of sentences based on similarity route\n\nLet's say that we have N sentences (embedded into a vector space by some sentence transformer)\n\nWe want to sort them such that the sentence in index i+1 will be the most similar to the sentence in index i but i+2 should also be similar to i and i+1 (cosine similarity, euclidean distance, whatever) . The idea is that if you read those sentences in this order , you will see that sentences tend to be similar to each other along the list. We can start from a random sentence for i=0 if needed.\n\nThis is not a theoretical question, and the solution can be an approximation (yes, it's probably NP-hard). I am looking for practical solutions. Any ideas?","preferred_answer":"What a great question! There are a few ways to do this that come to mind, but I think understand your end goal will help guide you towards the correct answer. \n\nThe NP-Hard approach is to picture these sentence embeddings like coordinates for cities, and the latent space as a map, and then solve the traveling salesman problem for your embeddings.\n\nYou could potentially make your life easier by projecting your embeddings into a lower dim space using UMAP or SVD (but probably not t\n-SNE) \n\nThe “i want to machine learn away my woes” approach is just put another embedding layer of size 1 attached to the pre-trained embedding and then just fine tune the last layer on some data. \n\nWhat do you want to accomplish by doing this?","full_conversation":[{"role":"OP","user_id":"anon_c80a7c588e11cbc1","comment_id":"we6klr","kind":"post","text":"How to sort list of sentences based on similarity route\n\nLet's say that we have N sentences (embedded into a vector space by some sentence transformer)\n\nWe want to sort them such that the sentence in index i+1 will be the most similar to the sentence in index i but i+2 should also be similar to i and i+1 (cosine similarity, euclidean distance, whatever) . The idea is that if you read those sentences in this order , you will see that sentences tend to be similar to each other along the list. We can start from a random sentence for i=0 if needed.\n\nThis is not a theoretical question, and the solution can be an approximation (yes, it's probably NP-hard). I am looking for practical solutions. Any ideas?","timestamp":"2022-08-02T08:53:05+00:00","score":11},{"role":"answerer","user_id":"anon_e23f0887ac655f56","comment_id":"iimvcov","kind":"comment","text":"What a great question! There are a few ways to do this that come to mind, but I think understand your end goal will help guide you towards the correct answer. \n\nThe NP-Hard approach is to picture these sentence embeddings like coordinates for cities, and the latent space as a map, and then solve the traveling salesman problem for your embeddings.\n\nYou could potentially make your life easier by projecting your embeddings into a lower dim space using UMAP or SVD (but probably not t\n-SNE) \n\nThe “i want to machine learn away my woes” approach is just put another embedding layer of size 1 attached to the pre-trained embedding and then just fine tune the last layer on some data. \n\nWhat do you want to accomplish by doing this?","timestamp":"2022-08-02T12:31:27+00:00","score":4},{"role":"OP","user_id":"anon_c80a7c588e11cbc1","comment_id":"iimx3qg","kind":"comment","text":"Thanks for your answer!\n\nI am generating list of around 1000-2000 very short sentences which some of them should be merged by a human (it is too sensitive for clustering) . The human annotator is reading that list and decide if sentences should be merged into one entity, or stay as they are.\n\n​\n\nBy sorting the list i am helping the human annotator to see similar \"groups\" of sentences without actually grouping them. \n\nAt the moment, my solution is to run clustering and then sort them by the spanning tree such that I know which sentences have common ancestors, but it is a bit heavy .","timestamp":"2022-08-02T12:46:32+00:00","score":1},{"role":"answerer","user_id":"anon_e23f0887ac655f56","comment_id":"iits7he","kind":"comment","text":"A bit of a delayed reply but an important follow up: I think you need to do some research on survey methods and experimental design moreso than NLP. \n\nThe order in which you present these sentences is a confounding variable that really ought to be accounted for. You have random ordering as a control group and then your proposed method as an experimental group. \n\nOn a related note: clustering *is* classifying, it’s just unsupervised. The minute you assign a cluster ID to a group of things, that’s the same as a assigning all of those samples to a label. Classification methods apply here and that is what the other person is talking about.","timestamp":"2022-08-03T20:18:46+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c80a7c588e11cbc1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e23f0887ac655f56","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iimvcov","thanks_reply_id":"iimx3qg","post_score":11,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_83912320f2fa30fc","answerer_user_id":"anon_4a2b322feb12cffe","subreddit":"LanguageTechnology","timestamp":"2022-08-31T00:51:10+00:00","post_id":"x1zprg","question":"Any resources for transformers?\n\nIs there any resource where I can learn the basics of transformers or how to build those? I want to build a transformer for my project. Thank you.","preferred_answer":"Hugging face documentation is pretty great. Best way is to just start building with their auto stuff and then move deeper as the need arises. Lots of it gets real domain specific real fast. Good luck","full_conversation":[{"role":"OP","user_id":"anon_83912320f2fa30fc","comment_id":"x1zprg","kind":"post","text":"Any resources for transformers?\n\nIs there any resource where I can learn the basics of transformers or how to build those? I want to build a transformer for my project. Thank you.","timestamp":"2022-08-31T00:51:10+00:00","score":13},{"role":"answerer","user_id":"anon_4a2b322feb12cffe","comment_id":"imh4ljp","kind":"comment","text":"Hugging face documentation is pretty great. Best way is to just start building with their auto stuff and then move deeper as the need arises. Lots of it gets real domain specific real fast. Good luck","timestamp":"2022-08-31T03:02:16+00:00","score":3},{"role":"OP","user_id":"anon_83912320f2fa30fc","comment_id":"imiiazy","kind":"comment","text":"Thank you so much <3","timestamp":"2022-08-31T12:32:15+00:00","score":1},{"role":"answerer","user_id":"anon_4a2b322feb12cffe","comment_id":"iml3c7m","kind":"comment","text":"HF development is part of my day to day, so if you have any questions or a cool idea for an open source project I’m all ears :)","timestamp":"2022-08-31T22:45:54+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_83912320f2fa30fc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4a2b322feb12cffe","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"imh4ljp","thanks_reply_id":"imiiazy","post_score":13,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_bfc668f269adf896","answerer_user_id":"anon_29ff55db8fa6bf7f","subreddit":"LanguageTechnology","timestamp":"2022-09-03T00:34:55+00:00","post_id":"x4h2nm","question":"What areas of programming would I need to study in order to make my idea?\n\n​\n\nHi!\n\nI don't want to get ripped off, so I'll use an example that's just similar to my idea:\n\nA mobile app where a user can take a picture of a nutrition label and then manipulate it. The user could change the serving size, and other data like calories and macronutrients would automatically scale along with it. The user could also select a language for the label to be translated into, like English to Spanish. After the changes have been made a printable image for the new label is produced.\n\nI only know a little bit of web dev, like just how to glue APIs together with some code. I have no idea how text is recognized from a photo or how it gets translated into another language.\n\nWhat are some concepts and technologies I would need to know in order to make something like this? Any response is appreciated.","preferred_answer":"How much programming do you know?\n\nIn short: You’re going to want to first decide what type of phone you’re developing for. If you using Android, learn Java. If you’re using iPhone, learn Swift or Objective-C. \n\nA lot of the more complex functionality you want can be accomplished using APIs, which are like services your app communicates with to accomplish a specific task, so I wouldn’t worry about digging into AI. Just concentrate on building a good user interface and use APIs to accomplish the more complex stuff.","full_conversation":[{"role":"OP","user_id":"anon_bfc668f269adf896","comment_id":"x4h2nm","kind":"post","text":"What areas of programming would I need to study in order to make my idea?\n\n​\n\nHi!\n\nI don't want to get ripped off, so I'll use an example that's just similar to my idea:\n\nA mobile app where a user can take a picture of a nutrition label and then manipulate it. The user could change the serving size, and other data like calories and macronutrients would automatically scale along with it. The user could also select a language for the label to be translated into, like English to Spanish. After the changes have been made a printable image for the new label is produced.\n\nI only know a little bit of web dev, like just how to glue APIs together with some code. I have no idea how text is recognized from a photo or how it gets translated into another language.\n\nWhat are some concepts and technologies I would need to know in order to make something like this? Any response is appreciated.","timestamp":"2022-09-03T00:34:55+00:00","score":7},{"role":"answerer","user_id":"anon_29ff55db8fa6bf7f","comment_id":"imw38f2","kind":"comment","text":"How much programming do you know?\n\nIn short: You’re going to want to first decide what type of phone you’re developing for. If you using Android, learn Java. If you’re using iPhone, learn Swift or Objective-C. \n\nA lot of the more complex functionality you want can be accomplished using APIs, which are like services your app communicates with to accomplish a specific task, so I wouldn’t worry about digging into AI. Just concentrate on building a good user interface and use APIs to accomplish the more complex stuff.","timestamp":"2022-09-03T04:53:46+00:00","score":6},{"role":"OP","user_id":"anon_bfc668f269adf896","comment_id":"imw583e","kind":"comment","text":"Thanks, this seems like great advice. I only know python and javascript but I'm looking into the languages you mentioned, kotlin too.","timestamp":"2022-09-03T05:16:10+00:00","score":2},{"role":"answerer","user_id":"anon_29ff55db8fa6bf7f","comment_id":"imw65jy","kind":"comment","text":"No prob. Sorry, I must have skimmed over the part where you mentioned some of your experience in the original post.\n\nSince your on Android I would check out Google ML services, should help:\n\nhttps://developers.google.com/ml-kit","timestamp":"2022-09-03T05:26:44+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bfc668f269adf896","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_29ff55db8fa6bf7f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"imw38f2","thanks_reply_id":"imw583e","post_score":7,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_3f681dbf8bd45b3a","answerer_user_id":"anon_45a59d067adcfa62","subreddit":"LanguageTechnology","timestamp":"2022-09-06T13:29:15+00:00","post_id":"x7aofp","question":"How to find similarities across long documents\n\nSuppose someone has written eleven books, and you want to determine how much of the latest book is restatements of claims made in their previous books. Ideally I would want the output to be sentence by sentence pairing of the latest book with the previous ones. Can someone point me in the right direction?\n\n​\n\n**Update (9 Sept 2022)**: In case anyone is interested, I came across \"Plundering Philosophers: Identifying Sources of the Encyclopédie\" Timothy Allen, Charles Cooney, et al. *Journal of the Association for History and Computing*. Vol. 13, no. 1, Spring 2010. [Open access link](http://hdl.handle.net/2027/spo.3310410.0013.107).\n\n**Abstract**: Denis Diderot and Jean le Rond d’Alembert’s *Encyclopédie ou Dictionnaire raisonné des sciences, des arts et des métiers* stands as one of the crowning achievements of the French Enlightenment. This monumental work, containing some 77,000 articles written by no less than 140 contributors, was published in Paris between 1751 and 1772 in seventeen in-folio volumes of text and eleven volumes of engravings. As with all reference works, the authors and editors of the *Encyclopédie* made extensive use of a vast array of contemporary reference works and scholarship to complete their massive compendium of enlightened knowledge. The identification of sources material used by the philosophes is a massive undertaking in itself, as the authors rarely acknowledged the works upon which they relied in writing their contributions. This paper describes two different experiments to identify sources of the *Encyclopédie*. The first applies the \"Vector Space Model\" (VSM) to identify articles that may have been borrowed from the *Dictionnaire de Trévoux* (1743) – an intellectual rival of the Encyclopédie compiled by French Jesuits in the first half of the 18th century. We find that the Vector Space Model can be an effective means of identifying \"similar\" passages in documents, in this case, potentially borrowed articles that were then examined by human evaluators. Overall, we conclude that 5.32 percent of all of the articles in the *Encyclopédie* that were examined were borrowed from the Jesuit critics of the philosophes. The second experiment, building on the first, applies what we call Pairwise Alignment of Intertextual Relations (PAIR) to detect passages borrowed from another important predecessor of the *Encyclopédie*, Louis Moréri's popular *Grand dictionnaire historique (1671-1759)*, which was also a product of Jesuit scholarship. Given the genealogical character of the Moréri dictionary, which represented an understanding of knowledge radically different than that of the *encyclopédistes*, we were nonetheless able to identify more than 400 shared passages between the two works using the PAIR approach. These findings shed new light on the composition process of the Encyclopédie and suggest that the intellectual battle lines between the Jesuits and the philosophes may not have been as firmly established as previously understood. We conclude by outlining improvements to both the VSM and PAIR models, which we expect will make further identification of similar passages more effective.","preferred_answer":"Compute sentence embedding for every sentence from every book. Tag the embedding with the book-id. Cluster the embeddings. Look for clusters with multiple members. The sentences in such clusters are “likely” to be repetitions.","full_conversation":[{"role":"OP","user_id":"anon_3f681dbf8bd45b3a","comment_id":"x7aofp","kind":"post","text":"How to find similarities across long documents\n\nSuppose someone has written eleven books, and you want to determine how much of the latest book is restatements of claims made in their previous books. Ideally I would want the output to be sentence by sentence pairing of the latest book with the previous ones. Can someone point me in the right direction?\n\n​\n\n**Update (9 Sept 2022)**: In case anyone is interested, I came across \"Plundering Philosophers: Identifying Sources of the Encyclopédie\" Timothy Allen, Charles Cooney, et al. *Journal of the Association for History and Computing*. Vol. 13, no. 1, Spring 2010. [Open access link](http://hdl.handle.net/2027/spo.3310410.0013.107).\n\n**Abstract**: Denis Diderot and Jean le Rond d’Alembert’s *Encyclopédie ou Dictionnaire raisonné des sciences, des arts et des métiers* stands as one of the crowning achievements of the French Enlightenment. This monumental work, containing some 77,000 articles written by no less than 140 contributors, was published in Paris between 1751 and 1772 in seventeen in-folio volumes of text and eleven volumes of engravings. As with all reference works, the authors and editors of the *Encyclopédie* made extensive use of a vast array of contemporary reference works and scholarship to complete their massive compendium of enlightened knowledge. The identification of sources material used by the philosophes is a massive undertaking in itself, as the authors rarely acknowledged the works upon which they relied in writing their contributions. This paper describes two different experiments to identify sources of the *Encyclopédie*. The first applies the \"Vector Space Model\" (VSM) to identify articles that may have been borrowed from the *Dictionnaire de Trévoux* (1743) – an intellectual rival of the Encyclopédie compiled by French Jesuits in the first half of the 18th century. We find that the Vector Space Model can be an effective means of identifying \"similar\" passages in documents, in this case, potentially borrowed articles that were then examined by human evaluators. Overall, we conclude that 5.32 percent of all of the articles in the *Encyclopédie* that were examined were borrowed from the Jesuit critics of the philosophes. The second experiment, building on the first, applies what we call Pairwise Alignment of Intertextual Relations (PAIR) to detect passages borrowed from another important predecessor of the *Encyclopédie*, Louis Moréri's popular *Grand dictionnaire historique (1671-1759)*, which was also a product of Jesuit scholarship. Given the genealogical character of the Moréri dictionary, which represented an understanding of knowledge radically different than that of the *encyclopédistes*, we were nonetheless able to identify more than 400 shared passages between the two works using the PAIR approach. These findings shed new light on the composition process of the Encyclopédie and suggest that the intellectual battle lines between the Jesuits and the philosophes may not have been as firmly established as previously understood. We conclude by outlining improvements to both the VSM and PAIR models, which we expect will make further identification of similar passages more effective.","timestamp":"2022-09-06T13:29:15+00:00","score":15},{"role":"answerer","user_id":"anon_45a59d067adcfa62","comment_id":"inbvun0","kind":"comment","text":"Compute sentence embedding for every sentence from every book. Tag the embedding with the book-id. Cluster the embeddings. Look for clusters with multiple members. The sentences in such clusters are “likely” to be repetitions.","timestamp":"2022-09-06T16:14:35+00:00","score":8},{"role":"OP","user_id":"anon_3f681dbf8bd45b3a","comment_id":"inbw6a3","kind":"comment","text":"Thanks! I'm okay with potential repetitions as I would go over the results manually. I think you've outlined my work for the next six months or so, but I'm grateful.","timestamp":"2022-09-06T16:16:43+00:00","score":3},{"role":"answerer","user_id":"anon_45a59d067adcfa62","comment_id":"inbxr92","kind":"comment","text":"Do post your results. \nWhat embedding did you use. What tools/libraries. \nWhich clustering algo did you use. \nHow did you scale as there will be 1000s of sentences that will have to be clustered. \nWhich distance measure worked well. Etc. etc.. \n\nI would like to learn from your research.","timestamp":"2022-09-06T16:27:02+00:00","score":3},{"role":"OP","user_id":"anon_3f681dbf8bd45b3a","comment_id":"inbxx02","kind":"comment","text":"Will do. I am still very much a neophyte so my six month projection is probably not far off the mark.","timestamp":"2022-09-06T16:28:04+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_3f681dbf8bd45b3a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_45a59d067adcfa62","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"inbvun0","thanks_reply_id":"inbw6a3","post_score":15,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_b713b0b5474bfe2e","answerer_user_id":"anon_5cc02282fe511e5f","subreddit":"LanguageTechnology","timestamp":"2022-09-18T04:31:28+00:00","post_id":"xh71yt","question":"BERTopic for longer texts?\n\nI've been having great success using BERTopic to model topics from a short-document corpus. As promised, the topics are indeed way more interpretable than those extracted by other topic modeling algorithms, and the interface is easy and just works.\n\nHowever, the same cannot be said of a corpus containing long documents (~30.000 characters). Given how fast the whole training phase is, I suspect they're actually being truncated (maybe this is obvious, given the well-known limitation of transformers).\n\nSo I'm trying to come up with a strategy to deal with these longer texts, and any advice and/or pointers would be much appreciated. Maybe dividing the documents into 512-ish token chunks, and then averaging probabilities for each topic would work...?\n\nThank you!","preferred_answer":"Bigbird, a Roberta derivative with sparse attention, can process 1.5k tokens. Longformer can process 4k tokens. I don't know how you turn them into sentence transformers. Someone might have figured it out already, and you could use BertTopic. As you know, you can use any sentence transformer you want with that library.\n\nPlease correct me if I'm wrong, but we switched to siamese networks because they're faster. You could squash the document into a single vector using any transformer, which people do when they need more accurate representations.\n\nLinks:\n\n[https://www.sbert.net/](https://www.sbert.net/)\n\n[https://arxiv.org/abs/1908.10084](https://arxiv.org/abs/1908.10084)","full_conversation":[{"role":"OP","user_id":"anon_b713b0b5474bfe2e","comment_id":"xh71yt","kind":"post","text":"BERTopic for longer texts?\n\nI've been having great success using BERTopic to model topics from a short-document corpus. As promised, the topics are indeed way more interpretable than those extracted by other topic modeling algorithms, and the interface is easy and just works.\n\nHowever, the same cannot be said of a corpus containing long documents (~30.000 characters). Given how fast the whole training phase is, I suspect they're actually being truncated (maybe this is obvious, given the well-known limitation of transformers).\n\nSo I'm trying to come up with a strategy to deal with these longer texts, and any advice and/or pointers would be much appreciated. Maybe dividing the documents into 512-ish token chunks, and then averaging probabilities for each topic would work...?\n\nThank you!","timestamp":"2022-09-18T04:31:28+00:00","score":5},{"role":"answerer","user_id":"anon_5cc02282fe511e5f","comment_id":"iow7e4v","kind":"comment","text":"Bigbird, a Roberta derivative with sparse attention, can process 1.5k tokens. Longformer can process 4k tokens. I don't know how you turn them into sentence transformers. Someone might have figured it out already, and you could use BertTopic. As you know, you can use any sentence transformer you want with that library.\n\nPlease correct me if I'm wrong, but we switched to siamese networks because they're faster. You could squash the document into a single vector using any transformer, which people do when they need more accurate representations.\n\nLinks:\n\n[https://www.sbert.net/](https://www.sbert.net/)\n\n[https://arxiv.org/abs/1908.10084](https://arxiv.org/abs/1908.10084)","timestamp":"2022-09-18T06:17:16+00:00","score":3},{"role":"OP","user_id":"anon_b713b0b5474bfe2e","comment_id":"ip0gwi6","kind":"comment","text":"This is super helpful. Thanks a lot!\nOnly one follow up question: how should I go about \"squashing\" each document into a single vector without losing the ability to pull out the relevant tokens that make up each topic?","timestamp":"2022-09-19T02:13:30+00:00","score":1},{"role":"answerer","user_id":"anon_5cc02282fe511e5f","comment_id":"ip14ltp","kind":"comment","text":"You store the vectors in a separate column.","timestamp":"2022-09-19T05:47:24+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b713b0b5474bfe2e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5cc02282fe511e5f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iow7e4v","thanks_reply_id":"ip0gwi6","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_0987aa97c8679927","answerer_user_id":"anon_6cedd3b5b6295864","subreddit":"LanguageTechnology","timestamp":"2022-09-23T15:48:24+00:00","post_id":"xm14p9","question":"How can I get word-level timestamps in OpenAI's Whisper ASR?\n\nI use OpenAI's [Whisper](https://github.com/openai/whisper) python lib for speech recognition. How can I get word-level timestamps?","preferred_answer":"it looks plausible so far. i managed to get the timestamps of each word from the predictions, and they do have increasing timestamps for each proceeding word but i only tested it with the jfk.flac. i'll write a wrapper for it","full_conversation":[{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"xm14p9","kind":"post","text":"How can I get word-level timestamps in OpenAI's Whisper ASR?\n\nI use OpenAI's [Whisper](https://github.com/openai/whisper) python lib for speech recognition. How can I get word-level timestamps?","timestamp":"2022-09-23T15:48:24+00:00","score":4},{"role":"answerer","user_id":"anon_6cedd3b5b6295864","comment_id":"ipzpg39","kind":"comment","text":"it looks plausible so far. i managed to get the timestamps of each word from the predictions, and they do have increasing timestamps for each proceeding word but i only tested it with the jfk.flac. i'll write a wrapper for it","timestamp":"2022-09-26T16:55:52+00:00","score":2},{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"ipzufdz","kind":"comment","text":"Thanks, very cool! If you could share once you are done with it, that'd be great.","timestamp":"2022-09-26T17:28:00+00:00","score":1},{"role":"answerer","user_id":"anon_6cedd3b5b6295864","comment_id":"iqc3kmo","kind":"comment","text":"https://github.com/jianfch/stable-ts","timestamp":"2022-09-29T06:03:23+00:00","score":1},{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"iqcxoeu","kind":"comment","text":"Nice, thanks!","timestamp":"2022-09-29T12:29:46+00:00","score":1},{"role":"answerer","user_id":"anon_6cedd3b5b6295864","comment_id":"iqg1v9n","kind":"comment","text":"just patched a major bug and made more robust to cases of overshooting too","timestamp":"2022-09-30T01:42:35+00:00","score":2},{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"iqg239f","kind":"comment","text":"Awesome, thanks!","timestamp":"2022-09-30T01:44:11+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_0987aa97c8679927","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6cedd3b5b6295864","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ipzpg39","thanks_reply_id":"ipzufdz","post_score":4,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_4afe2e35292e6802","answerer_user_id":"anon_251482a9ec4135a5","subreddit":"LanguageTechnology","timestamp":"2022-09-29T09:35:35+00:00","post_id":"xr3bla","question":"Creating a multilingual info chatbot for Ukrainian refugees that is maintainable by non-techies?\n\nI'm working in a project where we're trying to build a chatbot that answers the most urgent questions of Ukrainian refugees in multiple languages (EN/UKR/RU). The bot is based on a flowchart and offers predefined answering options (no free text entry from users). I'm now looking for a tool that we can use build this bot. The desiderata are:\n\n* *Multilingual support*: Every question answer pair should be (easily) maintained in multiple languages\n* *Easy visual editing*: a WYSIWYG editor where non-tech people (social workers) can build and edit conversation flows (i.e. flow charts)\n* *Ideally*: integration into multiple channels like Telegram\n* *Ideally*: easily deploy-able (button clicking)\n\nI know it's early for a Christmas whishlist, but to me it seemed like a pretty standard list of requirements. However, I've now spent 2+ days researching tools and frameworks and I can't seem to find a solution that ticks all the boxes. Here's what I've found:\n\n* **zendesk**: Offers an intuitive WYSIWYG interface ([Flow Builder](https://support.zendesk.com/hc/en-us/articles/4408838909210-About-Flow-Builder)) to create and edit conversations. Also, they offer easy integration into channels like Telegram and WhatsApp. They do seem to offer multilingual support as well, but that somehow doesn't integrate with the flow builder. The solution here would be to build and maintain the same flow for all languages separately (a lot of duplicate work and room for errors).\n* **Google Dialogflow**: The [ES](https://cloud.google.com/dialogflow/es/docs) version doesn't offer a visual flow builder, only the [CX](https://cloud.google.com/dialogflow/cx/docs) one, and that one is quite complicated to use and not very intuitive, hence not suited for non-techies. Also, it seems quite unclear how multilingual support works, as for many platforms only the bot's standard language is accessible.\n* **Yarn Spinner**: seems to be a great and easy to use [tool](https://blurymind.github.io/YarnClassic/) to build conversation flows and I see how multilingual options can be maintained here (just prefix selectable answers with a language identifier). Also, the offer JSON export which is quite nice. This JSON then would have to be parsed by a custom script and the fed into something like zendesk through APIs to generate the bots (which might take a lot of fiddling and we're on a tight money/time budget).\n\nI've also looked into [IBM Watson](https://www.ibm.com/products/watson-assistant/visual-builder) (has flow builder; really expensive for standard version, no multilingual support), [Amazon Lex](https://aws.amazon.com/blogs/machine-learning/announcing-visual-conversation-builder-for-amazon-lex/) (editor seems better than Dialogflow CX, but again no multilingual support), MS [Luis](https://learn.microsoft.com/en-us/azure/cognitive-services/luis/what-is-luis)/[QNA Builder](https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/language-support) (no multilingual support, no flowbuilder), and [Rasa](https://rasa.com/) (no WYSIWYG editor nor multilingual support).\n\nThanks for any kind of feedback!","preferred_answer":"You could try [TwinCreator](https://app.twincreator.com), a new chatbot creation platform built by the company I work for.\n\nCompared to the platforms you mentioned it has several advantages:\n\n* You build your chatbot in English, then an automatic translation mechanism provides the same chatbot experience in other languages. You add content in one language only. We don't provide Ukrainian and Russian at the moment, but they can be added easily and quickly.\n* You can add questions and answers by chatting with the bot itself. Everyone can add new content, without any knowledge of how the bot works.\n* Editing content is very easy and designed to be used by non-techies: you basically work with flat list of questions and answers. You can optionally add tags and context variables to specific questions to a create a dialog sequence as complex as you want. No boxes and arrows.\n* When a user leaves a question to which the bot can't answer, it is stored and you can later find it in a special section. From there you can decide what to do with it (add an answer, consider it as a different form of an existing question, and so on).\n\nIt's really very easy. The company is a startup and the platform is still very new, but it is production-ready. As a free user you have a limit of 200 chats a month, we can raise this limit up to 10K, considered the purpose of the chatbot. We would be proud to be the platform of choice for your project.\n\nWe currently don't offer integrations with Telegram or other services, but there's a full set of APIs and an integration can be built easily. We can provide support and examples.\n\nGive it a try, and contact me with a DM or my company via email if you need any help.","full_conversation":[{"role":"OP","user_id":"anon_4afe2e35292e6802","comment_id":"xr3bla","kind":"post","text":"Creating a multilingual info chatbot for Ukrainian refugees that is maintainable by non-techies?\n\nI'm working in a project where we're trying to build a chatbot that answers the most urgent questions of Ukrainian refugees in multiple languages (EN/UKR/RU). The bot is based on a flowchart and offers predefined answering options (no free text entry from users). I'm now looking for a tool that we can use build this bot. The desiderata are:\n\n* *Multilingual support*: Every question answer pair should be (easily) maintained in multiple languages\n* *Easy visual editing*: a WYSIWYG editor where non-tech people (social workers) can build and edit conversation flows (i.e. flow charts)\n* *Ideally*: integration into multiple channels like Telegram\n* *Ideally*: easily deploy-able (button clicking)\n\nI know it's early for a Christmas whishlist, but to me it seemed like a pretty standard list of requirements. However, I've now spent 2+ days researching tools and frameworks and I can't seem to find a solution that ticks all the boxes. Here's what I've found:\n\n* **zendesk**: Offers an intuitive WYSIWYG interface ([Flow Builder](https://support.zendesk.com/hc/en-us/articles/4408838909210-About-Flow-Builder)) to create and edit conversations. Also, they offer easy integration into channels like Telegram and WhatsApp. They do seem to offer multilingual support as well, but that somehow doesn't integrate with the flow builder. The solution here would be to build and maintain the same flow for all languages separately (a lot of duplicate work and room for errors).\n* **Google Dialogflow**: The [ES](https://cloud.google.com/dialogflow/es/docs) version doesn't offer a visual flow builder, only the [CX](https://cloud.google.com/dialogflow/cx/docs) one, and that one is quite complicated to use and not very intuitive, hence not suited for non-techies. Also, it seems quite unclear how multilingual support works, as for many platforms only the bot's standard language is accessible.\n* **Yarn Spinner**: seems to be a great and easy to use [tool](https://blurymind.github.io/YarnClassic/) to build conversation flows and I see how multilingual options can be maintained here (just prefix selectable answers with a language identifier). Also, the offer JSON export which is quite nice. This JSON then would have to be parsed by a custom script and the fed into something like zendesk through APIs to generate the bots (which might take a lot of fiddling and we're on a tight money/time budget).\n\nI've also looked into [IBM Watson](https://www.ibm.com/products/watson-assistant/visual-builder) (has flow builder; really expensive for standard version, no multilingual support), [Amazon Lex](https://aws.amazon.com/blogs/machine-learning/announcing-visual-conversation-builder-for-amazon-lex/) (editor seems better than Dialogflow CX, but again no multilingual support), MS [Luis](https://learn.microsoft.com/en-us/azure/cognitive-services/luis/what-is-luis)/[QNA Builder](https://learn.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/language-support) (no multilingual support, no flowbuilder), and [Rasa](https://rasa.com/) (no WYSIWYG editor nor multilingual support).\n\nThanks for any kind of feedback!","timestamp":"2022-09-29T09:35:35+00:00","score":15},{"role":"answerer","user_id":"anon_251482a9ec4135a5","comment_id":"iqcruc4","kind":"comment","text":"You could try [TwinCreator](https://app.twincreator.com), a new chatbot creation platform built by the company I work for.\n\nCompared to the platforms you mentioned it has several advantages:\n\n* You build your chatbot in English, then an automatic translation mechanism provides the same chatbot experience in other languages. You add content in one language only. We don't provide Ukrainian and Russian at the moment, but they can be added easily and quickly.\n* You can add questions and answers by chatting with the bot itself. Everyone can add new content, without any knowledge of how the bot works.\n* Editing content is very easy and designed to be used by non-techies: you basically work with flat list of questions and answers. You can optionally add tags and context variables to specific questions to a create a dialog sequence as complex as you want. No boxes and arrows.\n* When a user leaves a question to which the bot can't answer, it is stored and you can later find it in a special section. From there you can decide what to do with it (add an answer, consider it as a different form of an existing question, and so on).\n\nIt's really very easy. The company is a startup and the platform is still very new, but it is production-ready. As a free user you have a limit of 200 chats a month, we can raise this limit up to 10K, considered the purpose of the chatbot. We would be proud to be the platform of choice for your project.\n\nWe currently don't offer integrations with Telegram or other services, but there's a full set of APIs and an integration can be built easily. We can provide support and examples.\n\nGive it a try, and contact me with a DM or my company via email if you need any help.","timestamp":"2022-09-29T11:34:12+00:00","score":3},{"role":"OP","user_id":"anon_4afe2e35292e6802","comment_id":"iqcvu0k","kind":"comment","text":"Thanks for the tip and the offer. ATM, we're trying to avoid machine translation, because we need +/- 100% reliable translations of the crucial info. Do you have a documentation of your service?","timestamp":"2022-09-29T12:12:59+00:00","score":1},{"role":"answerer","user_id":"anon_251482a9ec4135a5","comment_id":"iqcx0t9","kind":"comment","text":"If you have crucial info that must not be translated, you can always add it to the answers as an attachment (PDF, image, video...). The answer will provide the base text for the chatbot Q&A algorithm, the attachments will provide the details and will not be touched.\n\nYou can find some info on the platform's website: [www.twincreator.com](https://www.twincreator.com). Developer documentation and examples are accessible from the platform once you are registered.","timestamp":"2022-09-29T12:23:51+00:00","score":0}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4afe2e35292e6802","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_251482a9ec4135a5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iqcruc4","thanks_reply_id":"iqcvu0k","post_score":15,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_93ae257678c609f3","answerer_user_id":"anon_a5db229f9bc9cea0","subreddit":"LanguageTechnology","timestamp":"2022-10-03T23:22:16+00:00","post_id":"xuyqxn","question":"I am looking at open source multilingual ,open source, speech 2 text models. How do I do speech detection for audio that switches between english and spanish?\n\nI am mainly looking at OpenAI's whisper model and somewhat wave2vec 2.0 (facebook). The audio files that I am using are conversations that go back and forth between Spanish and English. Are there any general ideas for tweaking or modifying these the code of the models so they can transcribe audio that switches between english and spanish?","preferred_answer":"Did you try Whisper on the dataset? I've tried it on some audio files containing English and Romanian and it worked quite well, but it would only transcribe one language at a time, so you would have to run it twice, once for English and once for Spanish.","full_conversation":[{"role":"OP","user_id":"anon_93ae257678c609f3","comment_id":"xuyqxn","kind":"post","text":"I am looking at open source multilingual ,open source, speech 2 text models. How do I do speech detection for audio that switches between english and spanish?\n\nI am mainly looking at OpenAI's whisper model and somewhat wave2vec 2.0 (facebook). The audio files that I am using are conversations that go back and forth between Spanish and English. Are there any general ideas for tweaking or modifying these the code of the models so they can transcribe audio that switches between english and spanish?","timestamp":"2022-10-03T23:22:16+00:00","score":2},{"role":"answerer","user_id":"anon_a5db229f9bc9cea0","comment_id":"iqzotxg","kind":"comment","text":"Did you try Whisper on the dataset? I've tried it on some audio files containing English and Romanian and it worked quite well, but it would only transcribe one language at a time, so you would have to run it twice, once for English and once for Spanish.","timestamp":"2022-10-04T07:57:31+00:00","score":1},{"role":"OP","user_id":"anon_93ae257678c609f3","comment_id":"ir0si6h","kind":"comment","text":"Thank you for your comment. I am trying to find a way to modify the code so that it cab transcribe two languages simultaneously instead of running it twice. Is this doable you think?","timestamp":"2022-10-04T14:43:59+00:00","score":1},{"role":"answerer","user_id":"anon_a5db229f9bc9cea0","comment_id":"ir1hidq","kind":"comment","text":"I don't think it has been trained to do this, so it won't be easy to achieve this.","timestamp":"2022-10-04T17:24:19+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_93ae257678c609f3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a5db229f9bc9cea0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iqzotxg","thanks_reply_id":"ir0si6h","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_d762086863155351","answerer_user_id":"anon_a7740bacf1f97813","subreddit":"LanguageTechnology","timestamp":"2022-10-11T06:56:43+00:00","post_id":"y123ri","question":"Can we make bert model understand the grammar of different language (maybe using transfer learning) say, turkish or japanese?\n\nHi, as the title says, is there any possibility of making bert like models understand different language given we've parallel corpus between two languages and don't intend to pre train the whole model.","preferred_answer":"This is a little pedantic, so sorry for that, but no BERT cannot \"understand\" ANY natural language grammar. If mimics natural language patterns but it does not \"understand\" anything. In the current moment it's become very important not to attribute human abilities and intelligence to our algorithms.","full_conversation":[{"role":"OP","user_id":"anon_d762086863155351","comment_id":"y123ri","kind":"post","text":"Can we make bert model understand the grammar of different language (maybe using transfer learning) say, turkish or japanese?\n\nHi, as the title says, is there any possibility of making bert like models understand different language given we've parallel corpus between two languages and don't intend to pre train the whole model.","timestamp":"2022-10-11T06:56:43+00:00","score":2},{"role":"answerer","user_id":"anon_a7740bacf1f97813","comment_id":"irvbexc","kind":"comment","text":"This is a little pedantic, so sorry for that, but no BERT cannot \"understand\" ANY natural language grammar. If mimics natural language patterns but it does not \"understand\" anything. In the current moment it's become very important not to attribute human abilities and intelligence to our algorithms.","timestamp":"2022-10-11T09:21:26+00:00","score":7},{"role":"OP","user_id":"anon_d762086863155351","comment_id":"irvblb2","kind":"comment","text":"oh, I appreciate your comment, but I am looking for how to code such a thing for now (mimicking as you say), so not looking for a philosophical answer (which is important I know, and sorry if this sounds rude, but yeah, I am just trying to make my code run lol)","timestamp":"2022-10-11T09:24:07+00:00","score":3},{"role":"answerer","user_id":"anon_a7740bacf1f97813","comment_id":"irvfm0o","kind":"comment","text":"Yeah, I know, and I'm sorry to give a non-answer as a response lol. All I've got as an actual suggestion is also \"check out hugging face for transformers\". Best of luck!","timestamp":"2022-10-11T10:22:33+00:00","score":1},{"role":"OP","user_id":"anon_d762086863155351","comment_id":"irvfp63","kind":"comment","text":"oh it's fine, you don't have to apologise lol, and yeah hugging face, I am looking at it, thank you:)","timestamp":"2022-10-11T10:23:43+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_d762086863155351","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a7740bacf1f97813","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"irvbexc","thanks_reply_id":"irvblb2","post_score":2,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_b3f9ca2b33a4261b","answerer_user_id":"anon_b9f5581c4b021140","subreddit":"LanguageTechnology","timestamp":"2022-10-19T14:59:04+00:00","post_id":"y84yke","question":"What would you consider must-have stats knowledge to work in the field?\n\nI've been learning NLP for a while now but I want to dig deeper and have a solid understanding of the theory. I feel I have some practical tools but I'm having a bit of trouble putting them together in projects. Suggestions of must-have, must-learn topics and resources are welcome!","preferred_answer":"1> Statistics are important but also 2> linear algebra. Next in line I would say 3> calculus. You don't necessarily use them every day but the conceptual aspects are key.","full_conversation":[{"role":"OP","user_id":"anon_b3f9ca2b33a4261b","comment_id":"y84yke","kind":"post","text":"What would you consider must-have stats knowledge to work in the field?\n\nI've been learning NLP for a while now but I want to dig deeper and have a solid understanding of the theory. I feel I have some practical tools but I'm having a bit of trouble putting them together in projects. Suggestions of must-have, must-learn topics and resources are welcome!","timestamp":"2022-10-19T14:59:04+00:00","score":18},{"role":"answerer","user_id":"anon_b9f5581c4b021140","comment_id":"isyvpic","kind":"comment","text":"1> Statistics are important but also 2> linear algebra. Next in line I would say 3> calculus. You don't necessarily use them every day but the conceptual aspects are key.","timestamp":"2022-10-19T18:31:49+00:00","score":8},{"role":"OP","user_id":"anon_b3f9ca2b33a4261b","comment_id":"iszti15","kind":"comment","text":"Thanks for the reply! Any specific topics you recommend focusing on? I have very basic knowledge on those areas, I've taken a couple of introductory courses but don't consider I really know much.","timestamp":"2022-10-19T22:08:35+00:00","score":2},{"role":"answerer","user_id":"anon_b9f5581c4b021140","comment_id":"iszv11x","kind":"comment","text":"I would recommend not focusing, but getting a good general math foundation. For example if you totally skip something like trig it's going to be hard down the line. You can do all this through cheap courses from udemy it doesnt have to cost a lot. Go slowly don't skip anything. It took me a full year to review everything I had forgotten from school.\n\nAs you're going through if you hit a snag you can get cheap and easy tutoring, focussing on specific areas, through websites like fiverr. For example I did this when I had trouble getting through fourier analysis.","timestamp":"2022-10-19T22:19:28+00:00","score":4},{"role":"OP","user_id":"anon_b3f9ca2b33a4261b","comment_id":"it0ilu5","kind":"comment","text":"And would you say that the foundation for NLP is roughly the same than the one needed for, to put it one way, general data science? Or should I look for specific course applied to NLP? For example, I know that similarity methods are based on cosine distance, which I don't know if it's taught in more broad DS courses so I'm not sure what I should be looking for.\n\nSorry to bother with all these questions and thanks again for the help!","timestamp":"2022-10-20T01:16:58+00:00","score":1},{"role":"answerer","user_id":"anon_b9f5581c4b021140","comment_id":"it12a69","kind":"comment","text":"NLP = DS + linguistics so I would recommend learning as much about language and particularly grammar as possible. Books like this are essential:\n\nLinguistic Fundamentals for Natural Language Processing II 100 Essentials from Semantics and Pragmatics \nSpeech and Language Processing An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition","timestamp":"2022-10-20T03:53:38+00:00","score":6},{"role":"OP","user_id":"anon_b3f9ca2b33a4261b","comment_id":"it2asov","kind":"comment","text":"You have been most kind, internet stranger. I really appreciate you taking the time, I'll definitely check the first book (I'm already reading the second one).","timestamp":"2022-10-20T12:51:37+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_b3f9ca2b33a4261b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b9f5581c4b021140","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"isyvpic","thanks_reply_id":"iszti15","post_score":18,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_ec44cef0c6fc4047","answerer_user_id":"anon_66fa33219925c8d1","subreddit":"LanguageTechnology","timestamp":"2022-10-24T09:30:59+00:00","post_id":"yc6seh","question":"Multi class classification problem(categories and sub-categories)\n\nI have a multi class classification problem where I have to first classify the texts with categories and then classify for each category, the subcategories. I have 15 categories, and each category has 9\\~10 subcategories. How can I approach this problem? Should I train a model (I will be using BERT pre-trained) for example to detect the categories, and then train 15 models (??), each one is specialized on a category to detect its sub-categories? Is there a better approach?","preferred_answer":"I am working on something similar and have chosen to only focus on subcategory because I can just assign the category after prediction (a subcategory will only ever be under one category so this is easy to do in my case). So at the moment my model predicts the subcategory and then based on that I pull the category from a predefined dictionary, I then output both","full_conversation":[{"role":"OP","user_id":"anon_ec44cef0c6fc4047","comment_id":"yc6seh","kind":"post","text":"Multi class classification problem(categories and sub-categories)\n\nI have a multi class classification problem where I have to first classify the texts with categories and then classify for each category, the subcategories. I have 15 categories, and each category has 9\\~10 subcategories. How can I approach this problem? Should I train a model (I will be using BERT pre-trained) for example to detect the categories, and then train 15 models (??), each one is specialized on a category to detect its sub-categories? Is there a better approach?","timestamp":"2022-10-24T09:30:59+00:00","score":11},{"role":"answerer","user_id":"anon_66fa33219925c8d1","comment_id":"itll3uj","kind":"comment","text":"I am working on something similar and have chosen to only focus on subcategory because I can just assign the category after prediction (a subcategory will only ever be under one category so this is easy to do in my case). So at the moment my model predicts the subcategory and then based on that I pull the category from a predefined dictionary, I then output both","timestamp":"2022-10-24T15:28:45+00:00","score":2},{"role":"OP","user_id":"anon_ec44cef0c6fc4047","comment_id":"itloe1v","kind":"comment","text":"Thank you for the reply. Already tried your approach ie: building a model that focus on predicting the subcategories (total \\~150 ones in my case), however i did not get a success, the model performs weak because the data is unbalanced (i tried to upsample and augment the low resources subcategories but no improvements). Now i'm moving to perform a two-stage prediction, trying to predict the category first then for each one i'm going to build a model to predict the subcategories... idk if it will help or not but gonna try anyway.","timestamp":"2022-10-24T15:50:45+00:00","score":1},{"role":"answerer","user_id":"anon_66fa33219925c8d1","comment_id":"itm78aq","kind":"comment","text":"I mean yeah, it’s worth a try. The only thing I can think is that you may run into issues where the predicted subcategory is from a different category. But if the overall performance of the two models are better then I guess it’s fine","timestamp":"2022-10-24T17:53:07+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ec44cef0c6fc4047","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_66fa33219925c8d1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"itll3uj","thanks_reply_id":"itloe1v","post_score":11,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_93ae257678c609f3","answerer_user_id":"anon_e903838b95c95eca","subreddit":"LanguageTechnology","timestamp":"2022-11-03T20:33:44+00:00","post_id":"yle0wo","question":"Is it better to use NLTK or Spacy for text pre processing?\n\nWhen I refer to text preprocessing I am referring to stop word removal, tokenizing, lemmatization and other essentials.","preferred_answer":"within their CountVectorizer function\n\n[https://scikit-learn.org/stable/modules/generated/sklearn.feature\\_extraction.text.CountVectorizer.html](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html)\n\nit's been about a year since I've used it, but I recall doing a stopword comparison of nltk, spacy and sklearn. i was satisfied with sklearns for some reason\n\nEdit: project was scientific document classification, w/logreg and ngrams, and as for when idk (not sure if you were seriously asking)","full_conversation":[{"role":"OP","user_id":"anon_93ae257678c609f3","comment_id":"yle0wo","kind":"post","text":"Is it better to use NLTK or Spacy for text pre processing?\n\nWhen I refer to text preprocessing I am referring to stop word removal, tokenizing, lemmatization and other essentials.","timestamp":"2022-11-03T20:33:44+00:00","score":13},{"role":"answerer","user_id":"anon_e903838b95c95eca","comment_id":"iv0scne","kind":"comment","text":"within their CountVectorizer function\n\n[https://scikit-learn.org/stable/modules/generated/sklearn.feature\\_extraction.text.CountVectorizer.html](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html)\n\nit's been about a year since I've used it, but I recall doing a stopword comparison of nltk, spacy and sklearn. i was satisfied with sklearns for some reason\n\nEdit: project was scientific document classification, w/logreg and ngrams, and as for when idk (not sure if you were seriously asking)","timestamp":"2022-11-04T13:05:30+00:00","score":1},{"role":"OP","user_id":"anon_93ae257678c609f3","comment_id":"iv2e22f","kind":"comment","text":"ahhh thats right I forgot about countvectorizer. Thanks for reminding me. \n\nBut correct me if I am wrong, but countvectorizer is a simplistic and usually not the most effective way of implementing text representation.","timestamp":"2022-11-04T19:31:58+00:00","score":2},{"role":"answerer","user_id":"anon_e903838b95c95eca","comment_id":"iv334id","kind":"comment","text":"all depends on the use case, so it's hard to say. \n\ni'm no expert, but from my digging at the time I didn't find any performance difference between other methods on my ngrams\n\nthere certainly might be htough","timestamp":"2022-11-04T22:27:20+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_93ae257678c609f3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e903838b95c95eca","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iv0scne","thanks_reply_id":"iv2e22f","post_score":13,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_49aa7003c8638946","answerer_user_id":"anon_9bace18b7099c0d9","subreddit":"LanguageTechnology","timestamp":"2022-11-07T15:03:06+00:00","post_id":"yopkhn","question":"Annotation: how to make a balanced set of texts to annotate?\n\nHi everyone! I'm starting an annotation campaign for NER and aspect-based sentiment analysis on historical texts, ranging from the 16th to the 20th century. All texts have a similar topic. I have >3000 texts at hand in 4 languages (+ some Latin descriptions here and there).\n\nDo you have any advice for me on how to assemble a balanced set of texts to annotate and use as training material? Is it better to focus primarily on a good linguistic distribution, do I better have a look at content, or do I mainly base the annotation set on the years/centuries?\n\n​\n\nFirst time for me, so I'm very interested to hear about your experiences. Any tips are welcome.","preferred_answer":"Yeah, this is the correct answer. You should think very carefully about the sampling approach you want to use. Keep in mind that this will depend substantially on the sampling approach used to collect the unlabeled corpus in the first place! If you want to maintain the sampling strategy used to collect your existing (unannotated) corpus, then you literally can't beat random sampling of documents for annotation.","full_conversation":[{"role":"OP","user_id":"anon_49aa7003c8638946","comment_id":"yopkhn","kind":"post","text":"Annotation: how to make a balanced set of texts to annotate?\n\nHi everyone! I'm starting an annotation campaign for NER and aspect-based sentiment analysis on historical texts, ranging from the 16th to the 20th century. All texts have a similar topic. I have >3000 texts at hand in 4 languages (+ some Latin descriptions here and there).\n\nDo you have any advice for me on how to assemble a balanced set of texts to annotate and use as training material? Is it better to focus primarily on a good linguistic distribution, do I better have a look at content, or do I mainly base the annotation set on the years/centuries?\n\n​\n\nFirst time for me, so I'm very interested to hear about your experiences. Any tips are welcome.","timestamp":"2022-11-07T15:03:06+00:00","score":11},{"role":"answerer","user_id":"anon_9bace18b7099c0d9","comment_id":"ivgyrnu","kind":"comment","text":"Yeah, this is the correct answer. You should think very carefully about the sampling approach you want to use. Keep in mind that this will depend substantially on the sampling approach used to collect the unlabeled corpus in the first place! If you want to maintain the sampling strategy used to collect your existing (unannotated) corpus, then you literally can't beat random sampling of documents for annotation.","timestamp":"2022-11-07T22:06:57+00:00","score":3},{"role":"OP","user_id":"anon_49aa7003c8638946","comment_id":"ivgzfis","kind":"comment","text":"Thanks! I want to avoid human bias, so random sampling seems like a good strategy indeed. I'll look into it!","timestamp":"2022-11-07T22:11:32+00:00","score":1},{"role":"answerer","user_id":"anon_9bace18b7099c0d9","comment_id":"ivh05m7","kind":"comment","text":">I want to avoid human bias\n\nSo do we all! Unfortunately, that won't be possible, since there is human bias in the authoring, preservation, and collation of the document collection you already have. Instead, you'll need to account for that bias explicitly and think about your sampling objectives explicitly.","timestamp":"2022-11-07T22:16:34+00:00","score":2},{"role":"OP","user_id":"anon_49aa7003c8638946","comment_id":"ivh47by","kind":"comment","text":"Great advice, thanks a lot!","timestamp":"2022-11-07T22:45:14+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_49aa7003c8638946","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9bace18b7099c0d9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ivgyrnu","thanks_reply_id":"ivgzfis","post_score":11,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_054b0e32e8135baf","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2022-11-27T07:35:57+00:00","post_id":"z5uy9p","question":"What is the meaing of \"formalization of natural lanuguage\"?\n\nWhat is the meaing of \"formalization of natural lanuguage\"?, i couldn't find the definition of formalization in this context.","preferred_answer":"Typically formalization means establishing a system of entities, properties and rules that would allow you to express any well formed utterance in succint, predictable and consistent manner. There are severso systems that do that for particular aspects of language, like the bracket notation for semantics (Taylor Swift is [+human], [+rich]) or the Universal Dependencies formalization of syntax.","full_conversation":[{"role":"OP","user_id":"anon_054b0e32e8135baf","comment_id":"z5uy9p","kind":"post","text":"What is the meaing of \"formalization of natural lanuguage\"?\n\nWhat is the meaing of \"formalization of natural lanuguage\"?, i couldn't find the definition of formalization in this context.","timestamp":"2022-11-27T07:35:57+00:00","score":5},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"ixy93fw","kind":"comment","text":"Typically formalization means establishing a system of entities, properties and rules that would allow you to express any well formed utterance in succint, predictable and consistent manner. There are severso systems that do that for particular aspects of language, like the bracket notation for semantics (Taylor Swift is [+human], [+rich]) or the Universal Dependencies formalization of syntax.","timestamp":"2022-11-27T08:48:14+00:00","score":2},{"role":"OP","user_id":"anon_054b0e32e8135baf","comment_id":"ixzr594","kind":"comment","text":"Thank you for your reply .\nCan you please tell me what the benefits of formalization in this context are ?","timestamp":"2022-11-27T17:45:45+00:00","score":1},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"iy7u9wb","kind":"comment","text":"I can think of two major ones: 1. modelling, 2. linguistic analysis, especially the quantitative kind.\nI mostly deal with 2: you need to formalize, say, sentence structure, to be able to conduct a quantitative analysis of word order.","timestamp":"2022-11-29T11:55:10+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_054b0e32e8135baf","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ixy93fw","thanks_reply_id":"ixzr594","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_aabdb253e27d784e","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2022-11-28T11:58:23+00:00","post_id":"z6uocq","question":"Question about Google Ngram viewer\n\nCan anyone tell me whether the % indicates the percentage of the query of the total ngrams in the corups or whether % indicates the number of books the query is featured in?\n\nFrom an NLP standpoint it stands to reason it is comparing the query against the total words of the corpus, however, I fail to believe the semi colon was used every 1 in 100 words in 1820\n\nCan anyone confirm please?","preferred_answer":"It wouldn't suprise me that the semi-colon **might have been detected by the OCR engine** roughly 1 on 100 words in 1820","full_conversation":[{"role":"OP","user_id":"anon_aabdb253e27d784e","comment_id":"z6uocq","kind":"post","text":"Question about Google Ngram viewer\n\nCan anyone tell me whether the % indicates the percentage of the query of the total ngrams in the corups or whether % indicates the number of books the query is featured in?\n\nFrom an NLP standpoint it stands to reason it is comparing the query against the total words of the corpus, however, I fail to believe the semi colon was used every 1 in 100 words in 1820\n\nCan anyone confirm please?","timestamp":"2022-11-28T11:58:23+00:00","score":8},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"iy3cmqh","kind":"comment","text":"It wouldn't suprise me that the semi-colon **might have been detected by the OCR engine** roughly 1 on 100 words in 1820","timestamp":"2022-11-28T13:05:30+00:00","score":2},{"role":"OP","user_id":"anon_aabdb253e27d784e","comment_id":"iy3h83w","kind":"comment","text":"Perfect, thanks for the answer!","timestamp":"2022-11-28T13:48:07+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"iy3i1mv","kind":"comment","text":"No worries. If I may: depending on what you do, Google Ngram viewer is very bad in terms of representativeness. The following is a great article about it: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0137041","timestamp":"2022-11-28T13:55:19+00:00","score":2},{"role":"OP","user_id":"anon_aabdb253e27d784e","comment_id":"iy3jmq7","kind":"comment","text":"For the work I am doing with it the inaccuracies are fine. \nRandom question, do you know where I can find a csv/json of the USA/American dictionary?","timestamp":"2022-11-28T14:08:54+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"iy3pn6x","kind":"comment","text":"I'm afraid not","timestamp":"2022-11-28T14:56:58+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_aabdb253e27d784e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"iy3cmqh","thanks_reply_id":"iy3h83w","post_score":8,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_b1b47ecdff7125ec","answerer_user_id":"anon_32541b749faaac21","subreddit":"LanguageTechnology","timestamp":"2022-12-09T15:11:08+00:00","post_id":"zgzrue","question":"Open-Ended Survey Questions Analysis\n\nHi guys, I have a survey dataset (\\~500 responses) with both qualitative and quantitative questions. \n\nFor the qualitative questions, we are trying to obtain the top few most popular opinions for each qualitative question. What would be the best approach for this?","preferred_answer":"I did Key Point Analysis (KPA) for a similar task. Can you share the data? If so, I can run it through my pipeline.","full_conversation":[{"role":"OP","user_id":"anon_b1b47ecdff7125ec","comment_id":"zgzrue","kind":"post","text":"Open-Ended Survey Questions Analysis\n\nHi guys, I have a survey dataset (\\~500 responses) with both qualitative and quantitative questions. \n\nFor the qualitative questions, we are trying to obtain the top few most popular opinions for each qualitative question. What would be the best approach for this?","timestamp":"2022-12-09T15:11:08+00:00","score":3},{"role":"answerer","user_id":"anon_32541b749faaac21","comment_id":"izli5oi","kind":"comment","text":"I did Key Point Analysis (KPA) for a similar task. Can you share the data? If so, I can run it through my pipeline.","timestamp":"2022-12-09T23:49:16+00:00","score":2},{"role":"OP","user_id":"anon_b1b47ecdff7125ec","comment_id":"izmfeje","kind":"comment","text":"Hi, thank you for your reply! Unfortunately, the data is a bit sensitive. Would you point me in how do I go about building this pipeline or any methods to perform KPA?","timestamp":"2022-12-10T04:25:49+00:00","score":2},{"role":"answerer","user_id":"anon_32541b749faaac21","comment_id":"izn9hx0","kind":"comment","text":"You can find more information here:\n\n- https://research.ibm.com/blog/kpa-for-opinion-text\n\n- https://medium.com/ibm-data-ai/project-debater-tutorial-finding-insights-in-survey-data-dbae7dfaa0f7\n\nWe can do a colab, if you are interested.","timestamp":"2022-12-10T10:50:08+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b1b47ecdff7125ec","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_32541b749faaac21","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"izli5oi","thanks_reply_id":"izmfeje","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_93ae257678c609f3","answerer_user_id":"anon_5560ec71f827e559","subreddit":"LanguageTechnology","timestamp":"2022-12-28T20:24:58+00:00","post_id":"zxjxo5","question":"I am using OpenAi's whisper transcription/translation model. I am wondering if I can improve it's performance by optimizing the audio files somehow. What features of audio files should I look into to make the whisper model perform better?","preferred_answer":"The better way to improve the model is to actually fine-tune it. Recently I participated in an event by HuggingFace to fine-tune the model using public datasets like Common Voice. You can create your own dataset with the type of audio you transcribe (like podcast), and you should see huge improvement after fine-tuning.\n\nThe other thing you could try is to tweak the decoder generation parameters. Since it is GPT under the hood, you can tweak the sampling parameters to make it spit out fewer repetitive words, and also add text as prompt to make the model understand the context of the transcription. task.","full_conversation":[{"role":"OP","user_id":"anon_93ae257678c609f3","comment_id":"zxjxo5","kind":"post","text":"I am using OpenAi's whisper transcription/translation model. I am wondering if I can improve it's performance by optimizing the audio files somehow. What features of audio files should I look into to make the whisper model perform better?","timestamp":"2022-12-28T20:24:58+00:00","score":9},{"role":"answerer","user_id":"anon_5560ec71f827e559","comment_id":"j21n5v7","kind":"comment","text":"The better way to improve the model is to actually fine-tune it. Recently I participated in an event by HuggingFace to fine-tune the model using public datasets like Common Voice. You can create your own dataset with the type of audio you transcribe (like podcast), and you should see huge improvement after fine-tuning.\n\nThe other thing you could try is to tweak the decoder generation parameters. Since it is GPT under the hood, you can tweak the sampling parameters to make it spit out fewer repetitive words, and also add text as prompt to make the model understand the context of the transcription. task.","timestamp":"2022-12-29T00:25:55+00:00","score":3},{"role":"OP","user_id":"anon_93ae257678c609f3","comment_id":"j23xua7","kind":"comment","text":"thank you so much! Is the finetuning script you wrote publicly available?","timestamp":"2022-12-29T14:10:16+00:00","score":1},{"role":"answerer","user_id":"anon_5560ec71f827e559","comment_id":"j26w1te","kind":"comment","text":"https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event","timestamp":"2022-12-30T02:09:05+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_93ae257678c609f3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5560ec71f827e559","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j21n5v7","thanks_reply_id":"j23xua7","post_score":9,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_33295ea13fa5b71a","answerer_user_id":"anon_cda4b7e1bca93734","subreddit":"LanguageTechnology","timestamp":"2023-01-01T15:33:02+00:00","post_id":"100lzsx","question":"Embeddings and semantic search\n\nHi guys I created embeddings of a couple of laws using openai and uploaded them to pinecone for similarity search. \nHowever : intuitively I find the order of the results very surprising. Also some results don’t have any connection to the search phrase at all. (But one or two results further they have connection to the search phrase again )\nAny idea how to debug this?","preferred_answer":"I once had a similar error with images which was cause by not setting a seed.","full_conversation":[{"role":"OP","user_id":"anon_33295ea13fa5b71a","comment_id":"100lzsx","kind":"post","text":"Embeddings and semantic search\n\nHi guys I created embeddings of a couple of laws using openai and uploaded them to pinecone for similarity search. \nHowever : intuitively I find the order of the results very surprising. Also some results don’t have any connection to the search phrase at all. (But one or two results further they have connection to the search phrase again )\nAny idea how to debug this?","timestamp":"2023-01-01T15:33:02+00:00","score":6},{"role":"answerer","user_id":"anon_cda4b7e1bca93734","comment_id":"j3jf7o6","kind":"comment","text":"I once had a similar error with images which was cause by not setting a seed.","timestamp":"2023-01-09T00:00:24+00:00","score":1},{"role":"OP","user_id":"anon_33295ea13fa5b71a","comment_id":"j3lizir","kind":"comment","text":"Good to hear you solved it. Can you elaborate a bit more ?","timestamp":"2023-01-09T11:52:19+00:00","score":1},{"role":"answerer","user_id":"anon_cda4b7e1bca93734","comment_id":"j3lx7hh","kind":"comment","text":"I initialized a Resnet model using pytorch and converted all my images to embeddings. At runtime a mobile app would take pictures and then send them to the backend. In the backend l would initialize a separate instance again of the Resnet model and convert the photo into embeddings and search my collection of images. \nThe difference in the two models led to two different embeddings being created that led to the wierd behavior.","timestamp":"2023-01-09T14:05:22+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_33295ea13fa5b71a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cda4b7e1bca93734","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j3jf7o6","thanks_reply_id":"j3lizir","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_a37aff2a63879587","answerer_user_id":"anon_cc7b197748426cf7","subreddit":"LanguageTechnology","timestamp":"2023-01-04T15:36:33+00:00","post_id":"1036jh5","question":"How to determine/classify whether a given piece of string is a grammatically correct sentence or not?\n\nHi all! I'm a fresher and got lucky enough to join research as an assistant/intern. I have a task assigned to me that I thought was 'pretty basic', in terms of NLP, but I'm stuck now having no idea. I guess that's quite normal about interns :D \nLet me explain the situation...\n\n# Context:\n\n* There's a dataset of scraped text from web pages, primarily cyber security related. Mostly, only the rendered text from each webpage is converted into a separate txt file. \n* Some txt files seem to include few HTML tags as well...\n* The researcher aims to train an NLP model to detect sentences that have important details regarding cyber threats.\n* For that to be achieved, we need a training dataset that has columns as follows\n * `needed` \\- Complete sentences/meaningful phrases that have information about cyber threats\n * `unneeded` \\- Complete sentences/meaningful phrases that don't have information relevant to cyber threats.\n\n# My problem:\n\n* As you might have guessed, I have to extract only the sentences from that scraped data. \n* Individual words/grammatically wrong gibberish or other phrases that don't have meaning in this context such as 'About Us', and 'Contact Us' should be omitted.\n* Text from any ads, punctuation marks, special symbols etc. should be omitted as well.\n\nHow do I achieve this? Are there any prebuilt frameworks that can do this with a prebuilt function, ideally like:\n\n is_sentence(piece_of_string) -> Bool\n\nAnything else would be of great help as well.\n\nI've tried frameworks like [Stanza](https://stanfordnlp.github.io/), Spacy and NLTK. Though they have a `sentence` class(?), it looks like it's purely based on punctuation alone, and not anything intelligent. Hence this question. \n\nIf I tried to achieve this using rules based on RegEx and punctuation, the output might include elements that should have been omitted. \n\nPlease help me figure this out. Your ideas would be of great help to me and help me advance in my career.","preferred_answer":"The easy solution is to use a pretrained grammaticality (sequence classification) model. These are available on HuggingFace very easily and will catch a lot of the bad sentences. \n\nI'd recommend then reviewing the discarded sentences manually, since it's probably made some errors. \n\nYou should now have a significantly smaller set of sentences that seem grammatical. Removing texts like \"about us\" is much harder to do via a model, and perhaps a task where regex actually could help. Or you could train a binary sequence classification model to identify them, but you'd need to do manual data labelling to give it training data.","full_conversation":[{"role":"OP","user_id":"anon_a37aff2a63879587","comment_id":"1036jh5","kind":"post","text":"How to determine/classify whether a given piece of string is a grammatically correct sentence or not?\n\nHi all! I'm a fresher and got lucky enough to join research as an assistant/intern. I have a task assigned to me that I thought was 'pretty basic', in terms of NLP, but I'm stuck now having no idea. I guess that's quite normal about interns :D \nLet me explain the situation...\n\n# Context:\n\n* There's a dataset of scraped text from web pages, primarily cyber security related. Mostly, only the rendered text from each webpage is converted into a separate txt file. \n* Some txt files seem to include few HTML tags as well...\n* The researcher aims to train an NLP model to detect sentences that have important details regarding cyber threats.\n* For that to be achieved, we need a training dataset that has columns as follows\n * `needed` \\- Complete sentences/meaningful phrases that have information about cyber threats\n * `unneeded` \\- Complete sentences/meaningful phrases that don't have information relevant to cyber threats.\n\n# My problem:\n\n* As you might have guessed, I have to extract only the sentences from that scraped data. \n* Individual words/grammatically wrong gibberish or other phrases that don't have meaning in this context such as 'About Us', and 'Contact Us' should be omitted.\n* Text from any ads, punctuation marks, special symbols etc. should be omitted as well.\n\nHow do I achieve this? Are there any prebuilt frameworks that can do this with a prebuilt function, ideally like:\n\n is_sentence(piece_of_string) -> Bool\n\nAnything else would be of great help as well.\n\nI've tried frameworks like [Stanza](https://stanfordnlp.github.io/), Spacy and NLTK. Though they have a `sentence` class(?), it looks like it's purely based on punctuation alone, and not anything intelligent. Hence this question. \n\nIf I tried to achieve this using rules based on RegEx and punctuation, the output might include elements that should have been omitted. \n\nPlease help me figure this out. Your ideas would be of great help to me and help me advance in my career.","timestamp":"2023-01-04T15:36:33+00:00","score":10},{"role":"answerer","user_id":"anon_cc7b197748426cf7","comment_id":"j2x6ldc","kind":"comment","text":"The easy solution is to use a pretrained grammaticality (sequence classification) model. These are available on HuggingFace very easily and will catch a lot of the bad sentences. \n\nI'd recommend then reviewing the discarded sentences manually, since it's probably made some errors. \n\nYou should now have a significantly smaller set of sentences that seem grammatical. Removing texts like \"about us\" is much harder to do via a model, and perhaps a task where regex actually could help. Or you could train a binary sequence classification model to identify them, but you'd need to do manual data labelling to give it training data.","timestamp":"2023-01-04T16:03:42+00:00","score":4},{"role":"OP","user_id":"anon_a37aff2a63879587","comment_id":"j2x9q6a","kind":"comment","text":"Thanks a lot. Your answer seems like it would work. \n\nJust to be sure that I'm looking at the right stuff, can you please share a few models' links?","timestamp":"2023-01-04T16:24:01+00:00","score":3},{"role":"answerer","user_id":"anon_cc7b197748426cf7","comment_id":"j2z7x7o","kind":"comment","text":"[https://huggingface.co/models?language=en&pipeline\\_tag=text-classification&sort=downloads](https://huggingface.co/models?language=en&pipeline_tag=text-classification&sort=downloads)\n\nThis is the set of English text classification models on HF. As long as you avoid things like sentiment analysis ones, you'll be fine. You can also look for ones trained on specific datasets (like CoLA or Lang8) or train a base model (BERT, RoBERTa, etc.) yourself on one of those. \n\n\n[https://huggingface.co/gchhablani/bert-base-cased-finetuned-cola](https://huggingface.co/gchhablani/bert-base-cased-finetuned-cola) This one came up when I searched \"cola\" for instance.","timestamp":"2023-01-04T23:38:03+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a37aff2a63879587","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cc7b197748426cf7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j2x6ldc","thanks_reply_id":"j2x9q6a","post_score":10,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_d18e4bec853cac8d","answerer_user_id":"anon_4b21b911caa3d32b","subreddit":"LanguageTechnology","timestamp":"2023-01-04T19:13:45+00:00","post_id":"103c4bf","question":"Is lowercasing every word before processing some text always the best idea? Is there a better approach to preserve to exceptional words that might carry meaning?\n\nFor instance, if we have a thing named \"And\", the following sentence will be misinterpreted:\n\n\"He stole the cash, And put in his pocket\", where And is a person.","preferred_answer":"Sorry not an answer and just a layman, but in what case would you capitalize it like you did? If it was a new sentence sure, but for emphasis there are better ways, right? Sorry if I’m missing the point, and this is not helpful.","full_conversation":[{"role":"OP","user_id":"anon_d18e4bec853cac8d","comment_id":"103c4bf","kind":"post","text":"Is lowercasing every word before processing some text always the best idea? Is there a better approach to preserve to exceptional words that might carry meaning?\n\nFor instance, if we have a thing named \"And\", the following sentence will be misinterpreted:\n\n\"He stole the cash, And put in his pocket\", where And is a person.","timestamp":"2023-01-04T19:13:45+00:00","score":0},{"role":"answerer","user_id":"anon_4b21b911caa3d32b","comment_id":"j2ylbf8","kind":"comment","text":"Sorry not an answer and just a layman, but in what case would you capitalize it like you did? If it was a new sentence sure, but for emphasis there are better ways, right? Sorry if I’m missing the point, and this is not helpful.","timestamp":"2023-01-04T21:15:00+00:00","score":1},{"role":"OP","user_id":"anon_d18e4bec853cac8d","comment_id":"j2yu2q3","kind":"comment","text":"No. Thanks for asking.\n\n\\> in what case would you capitalize it like you did?\n\nIn cases, when names of things are grammatical terms not used at the beginning of a sentence. For instance, the [Why Worry Lane, Arizona, USA](https://www.google.com/maps/place/W+Why+Worry+Ln,+Phoenix,+AZ+85021,+USA/data=!4m2!3m1!1s0x872b6d058b5c876d:0x30805ae468135bbc?sa=X&ved=2ahUKEwjyguym9q78AhV4cvEDHW1pAHwQ8gF6BAgLEAE)","timestamp":"2023-01-04T22:08:29+00:00","score":2},{"role":"answerer","user_id":"anon_4b21b911caa3d32b","comment_id":"j2z15wc","kind":"comment","text":"So again I’m probably missing some vital knowledge? And the other commentor may have given you the info you needed already but, this is for language software parsing? They don’t have a certain syntax for this type of thing? Just curious and struggling to understand. I know it’s a case of not knowing what I don’t know. Don’t feel any need to entertain my questions","timestamp":"2023-01-04T22:54:01+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d18e4bec853cac8d","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4b21b911caa3d32b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j2ylbf8","thanks_reply_id":"j2yu2q3","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_dd1b71ddf0b232c3","answerer_user_id":"anon_7335e1b8cf6ea33b","subreddit":"LanguageTechnology","timestamp":"2023-01-07T16:06:05+00:00","post_id":"105shym","question":"Looking for a way to do semantic similarity search with wildcards\n\nImagine I have a database full of patterns like this:\n\n`go to *`\n\nwhere the asterisk denotes a variable amount of words.\nI would like to calculate a similarity score for inputs like\n\n`go to bed` (very high score)\n\n`walk to my house` (high score)\n\n`run to kindergarden` (high score)\n\n`talk to me` (low score)\n\nBasically it is a mix between word / sentence embeddings and regular expressions but I haven't seen anything like this before. \n\nDo you have any recommendations or ideas for this approach? Are there any NLP modules providing this technology?","preferred_answer":"Exactly!","full_conversation":[{"role":"OP","user_id":"anon_dd1b71ddf0b232c3","comment_id":"105shym","kind":"post","text":"Looking for a way to do semantic similarity search with wildcards\n\nImagine I have a database full of patterns like this:\n\n`go to *`\n\nwhere the asterisk denotes a variable amount of words.\nI would like to calculate a similarity score for inputs like\n\n`go to bed` (very high score)\n\n`walk to my house` (high score)\n\n`run to kindergarden` (high score)\n\n`talk to me` (low score)\n\nBasically it is a mix between word / sentence embeddings and regular expressions but I haven't seen anything like this before. \n\nDo you have any recommendations or ideas for this approach? Are there any NLP modules providing this technology?","timestamp":"2023-01-07T16:06:05+00:00","score":1},{"role":"answerer","user_id":"anon_7335e1b8cf6ea33b","comment_id":"j3dm65w","kind":"comment","text":"Exactly!","timestamp":"2023-01-07T20:36:45+00:00","score":1},{"role":"OP","user_id":"anon_dd1b71ddf0b232c3","comment_id":"j3doqsy","kind":"comment","text":"I will try this idea. Thank you for the suggestion!","timestamp":"2023-01-07T20:53:46+00:00","score":1},{"role":"answerer","user_id":"anon_7335e1b8cf6ea33b","comment_id":"j3doxdr","kind":"comment","text":"Please let me know the result. 🙂","timestamp":"2023-01-07T20:55:00+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_dd1b71ddf0b232c3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7335e1b8cf6ea33b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j3dm65w","thanks_reply_id":"j3doqsy","post_score":1,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_b327b63897efef25","answerer_user_id":"anon_e196a5e5369314b4","subreddit":"LanguageTechnology","timestamp":"2023-01-12T02:00:03+00:00","post_id":"109n1j9","question":"What are the best NLP courses you've ever taken online?\n\nI am looking for recommendations","preferred_answer":"I collect some resources about NLP It may help you\n\nhttps://coursesteach.com/course/view.php?id=46","full_conversation":[{"role":"OP","user_id":"anon_b327b63897efef25","comment_id":"109n1j9","kind":"post","text":"What are the best NLP courses you've ever taken online?\n\nI am looking for recommendations","timestamp":"2023-01-12T02:00:03+00:00","score":6},{"role":"answerer","user_id":"anon_e196a5e5369314b4","comment_id":"j40g2jl","kind":"comment","text":"I collect some resources about NLP It may help you\n\nhttps://coursesteach.com/course/view.php?id=46","timestamp":"2023-01-12T08:45:00+00:00","score":1},{"role":"OP","user_id":"anon_b327b63897efef25","comment_id":"j40sgqq","kind":"comment","text":"thanks! have you watched all these courses? which ones are the best?","timestamp":"2023-01-12T11:30:47+00:00","score":1},{"role":"answerer","user_id":"anon_e196a5e5369314b4","comment_id":"j44wg4k","kind":"comment","text":"I started the below one and i think it is good\n\nhttps://www.coursera.org/specializations/natural-language-processing?ranMID=40328&ranEAID=Vrr1tRSwXGM&ranSiteID=Vrr1tRSwXGM-6zJ9iCrmaQbUmLG\\_mYtO1A&siteID=Vrr1tRSwXGM-6zJ9iCrmaQbUmLG\\_mYtO1A&utm\\_content=10&utm\\_medium=partners&utm\\_source=linkshare&utm\\_campaign=Vrr1tRSwXGM","timestamp":"2023-01-13T04:32:35+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b327b63897efef25","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e196a5e5369314b4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j40g2jl","thanks_reply_id":"j40sgqq","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_46c65452e3b51b1f","answerer_user_id":"anon_d25654f4502f77ee","subreddit":"LanguageTechnology","timestamp":"2023-01-19T10:56:57+00:00","post_id":"10fyues","question":"Splitting words to better isolate meanings?\n\nHi all.\n\nI'm new to NLP but have done some very basic ML project in the past like deep Q-learning for inverted pendulum problem etc, and so have some very basic intuitions about training data and architectures. I'm currently trying to apply doc2vec in Python/gensim based on [this tutorial](https://radimrehurek.com/gensim/wiki.html). I am still at the \"Preparing the Corpus\" phase (which takes a long time), but I can see the document of word IDs/occurrences and I have some concerns.\n\nFirst of all, there are a lot of words that I don't recognize as English words. Perhaps they are something like names or Latin words. Usually they have small counts (in my case <600). I thought maybe I could remove these non-words from the corpus by increasing the occurrence threshold whereby a word with low occurrence would be omitted. Unfortunately there are some actual English words that would be lost in this case, for example \"suspenders\" (493).\n\nThis leads to my next observation. \"suspenders\" contains the very common word \"suspend\" modified by the suffix \"ers\", and in fact all words modified by \"ers\" are modified in a vectorially-similar way. So it would seem reasonable to treat these suffix as words themselves, such as \"ly\", \"ers\", \"ed\", \"ing\", and \"s\". Perhaps I could modify the corpus by adding a special character before these suffixes that would cause them to be treated as separate words (apostrophe?). For me this seems to suggest that English is not ideal for \\_2vec algorithms, and that a better language would not concatenate words the way English does. Thai, for example, allegedly consists only of monosyllabic words, such that \"going\" in Thai would actually be 2 words, so I wonder if \\_2vec might work better in Thai than in English.\n\nAnyway, if \"suspend\" and \"ers\" were considered separate words, I wouldn't have the problem of losing words like \"suspenders\", because both \"suspend\" and \"ers\" would have sufficiently high counts. The downside is that I wouldn't be able to validate the algorithm using the common method of comparing the difference vectors between words with and without these suffixes, as I have read is sometimes done (is there a name for this?)\n\nSo my question is how this problem has been or should be dealt with. Should I create a database of prefixes and suffixes and split words based on these? Is splitting them with apostrophe okay in that case? And then finally the very practical question (for those who are well versed in gensim) of where in the gensim code I might make these modifications? Or can I make changes to the wordID.txt file directly and just reprocess the model somehow?\n\nThank you for any advice or insight you can provide.","preferred_answer":"If you're mainly using LSA/LDA from the gensim link, then you might try stemming or lemmatizing. There are implementations in NLTK and spacy.\n\nFor neural-network-based sequence modeling, it's common to address the problem with byte-pair encoding or WordPiece. You could probably use that with LSA/LDA but it might be tougher to read and interpret.","full_conversation":[{"role":"OP","user_id":"anon_46c65452e3b51b1f","comment_id":"10fyues","kind":"post","text":"Splitting words to better isolate meanings?\n\nHi all.\n\nI'm new to NLP but have done some very basic ML project in the past like deep Q-learning for inverted pendulum problem etc, and so have some very basic intuitions about training data and architectures. I'm currently trying to apply doc2vec in Python/gensim based on [this tutorial](https://radimrehurek.com/gensim/wiki.html). I am still at the \"Preparing the Corpus\" phase (which takes a long time), but I can see the document of word IDs/occurrences and I have some concerns.\n\nFirst of all, there are a lot of words that I don't recognize as English words. Perhaps they are something like names or Latin words. Usually they have small counts (in my case <600). I thought maybe I could remove these non-words from the corpus by increasing the occurrence threshold whereby a word with low occurrence would be omitted. Unfortunately there are some actual English words that would be lost in this case, for example \"suspenders\" (493).\n\nThis leads to my next observation. \"suspenders\" contains the very common word \"suspend\" modified by the suffix \"ers\", and in fact all words modified by \"ers\" are modified in a vectorially-similar way. So it would seem reasonable to treat these suffix as words themselves, such as \"ly\", \"ers\", \"ed\", \"ing\", and \"s\". Perhaps I could modify the corpus by adding a special character before these suffixes that would cause them to be treated as separate words (apostrophe?). For me this seems to suggest that English is not ideal for \\_2vec algorithms, and that a better language would not concatenate words the way English does. Thai, for example, allegedly consists only of monosyllabic words, such that \"going\" in Thai would actually be 2 words, so I wonder if \\_2vec might work better in Thai than in English.\n\nAnyway, if \"suspend\" and \"ers\" were considered separate words, I wouldn't have the problem of losing words like \"suspenders\", because both \"suspend\" and \"ers\" would have sufficiently high counts. The downside is that I wouldn't be able to validate the algorithm using the common method of comparing the difference vectors between words with and without these suffixes, as I have read is sometimes done (is there a name for this?)\n\nSo my question is how this problem has been or should be dealt with. Should I create a database of prefixes and suffixes and split words based on these? Is splitting them with apostrophe okay in that case? And then finally the very practical question (for those who are well versed in gensim) of where in the gensim code I might make these modifications? Or can I make changes to the wordID.txt file directly and just reprocess the model somehow?\n\nThank you for any advice or insight you can provide.","timestamp":"2023-01-19T10:56:57+00:00","score":0},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"j50i3pv","kind":"comment","text":"If you're mainly using LSA/LDA from the gensim link, then you might try stemming or lemmatizing. There are implementations in NLTK and spacy.\n\nFor neural-network-based sequence modeling, it's common to address the problem with byte-pair encoding or WordPiece. You could probably use that with LSA/LDA but it might be tougher to read and interpret.","timestamp":"2023-01-19T15:33:40+00:00","score":1},{"role":"OP","user_id":"anon_46c65452e3b51b1f","comment_id":"j53mw1j","kind":"comment","text":"Thank you. I'll look into byte-pair encoding and WordPiece, although I am concerned about how byte-pair encoding would break apart a word like \"unfriendly\" in a meaningful way. This will always be a bigger problem for some words than for others. I feel like ideally the wordIDs would not represent English words or parts of English words, but rather words in an optimized language that doesn't have all these ideosyncrasys (a sort of machine language presumably learned during training).","timestamp":"2023-01-20T03:57:33+00:00","score":1},{"role":"answerer","user_id":"anon_d25654f4502f77ee","comment_id":"j54dbhk","kind":"comment","text":"Yeah it doesn't always break words into linguistically meaningful pieces. Though in practice it often splits on morpheme boundaries anyway.","timestamp":"2023-01-20T08:36:27+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_46c65452e3b51b1f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d25654f4502f77ee","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j50i3pv","thanks_reply_id":"j53mw1j","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_c3a40cbd98630241","answerer_user_id":"anon_180811b0098f7b14","subreddit":"LanguageTechnology","timestamp":"2023-01-25T23:00:41+00:00","post_id":"10lci6h","question":"Bi-Encoder with BERT does not learn\n\nMy data consists of 15k question and answer pairs. I am using a bi-encoder with a pre-trained BERT model, to obtain the most fitting answer for a new question. Each question/answer pair has a category name, which I added to the beginning of each question and answer. I'm using a qrels file as well, which has the relevancy = 1 for all the question/answer pairs, and that's about it.\n\nSame dataset gave me acceptable mean metrics on BM25 (0.4 recall). But the bi-encoder fails to learn anything meaningful, all metrics are nearly zero after training for >10 epochs, batch size being 16. \n\nWhat could be the possible causes? Where should I start looking at?","preferred_answer":"> Since the model should be calculating the similarity of each query to each response, wouldn't the category label words contribute to a better matching?\n\nIt certainly would if the task was to predict a category, but if you're trying to predict a specific answer (the best one), then the category mention will be correlated both with the correct answer AND a bunch of worse, incorrect answers, and might skew the model towards any of those instead of the correct one.\n\nThink of the process you'd follow to find the right answer: if you knew the category of a question, would that help you find the right answer? Not yet: at that point, you'd have a bunch of candidates from the same category, but would not be able to choose one of them yet (for that, you'd need to look at the rest of the words in each question/answer, and ignore the category, which you've already used).\n\nIf anything, the category information can help you tell one category apart from the rest, and get **all** the answers associated with that category as the candidate answers for the question. But at this point you'd still have too many candidates, and would need some way of finding the right answer in this subset. In this sub-problem, the category information is not contributing anything (probably the opposite).","full_conversation":[{"role":"OP","user_id":"anon_c3a40cbd98630241","comment_id":"10lci6h","kind":"post","text":"Bi-Encoder with BERT does not learn\n\nMy data consists of 15k question and answer pairs. I am using a bi-encoder with a pre-trained BERT model, to obtain the most fitting answer for a new question. Each question/answer pair has a category name, which I added to the beginning of each question and answer. I'm using a qrels file as well, which has the relevancy = 1 for all the question/answer pairs, and that's about it.\n\nSame dataset gave me acceptable mean metrics on BM25 (0.4 recall). But the bi-encoder fails to learn anything meaningful, all metrics are nearly zero after training for >10 epochs, batch size being 16. \n\nWhat could be the possible causes? Where should I start looking at?","timestamp":"2023-01-25T23:00:41+00:00","score":1},{"role":"answerer","user_id":"anon_180811b0098f7b14","comment_id":"j60lon9","kind":"comment","text":"> Since the model should be calculating the similarity of each query to each response, wouldn't the category label words contribute to a better matching?\n\nIt certainly would if the task was to predict a category, but if you're trying to predict a specific answer (the best one), then the category mention will be correlated both with the correct answer AND a bunch of worse, incorrect answers, and might skew the model towards any of those instead of the correct one.\n\nThink of the process you'd follow to find the right answer: if you knew the category of a question, would that help you find the right answer? Not yet: at that point, you'd have a bunch of candidates from the same category, but would not be able to choose one of them yet (for that, you'd need to look at the rest of the words in each question/answer, and ignore the category, which you've already used).\n\nIf anything, the category information can help you tell one category apart from the rest, and get **all** the answers associated with that category as the candidate answers for the question. But at this point you'd still have too many candidates, and would need some way of finding the right answer in this subset. In this sub-problem, the category information is not contributing anything (probably the opposite).","timestamp":"2023-01-26T21:32:12+00:00","score":1},{"role":"OP","user_id":"anon_c3a40cbd98630241","comment_id":"j61eoq5","kind":"comment","text":"Makes total sense now, thank you! I guess this means there is no other way to utilize the categories (except balancing the dataset) ?","timestamp":"2023-01-27T00:49:01+00:00","score":2},{"role":"answerer","user_id":"anon_180811b0098f7b14","comment_id":"j62exsf","kind":"comment","text":"Definitely for balancing the dataset, but also if you wanted to try a two-step approach: 1) assign a category first, 2) choose the best answer from that category afterwards.\n\nI mean, if you're given the categories, that's useful data anyway, as it will help you choose the subset of answers associated with that category from the set of all questions for all categories. And you have a lot more data at the category level (= all questions/answers for that category), so you can probably be more confident about category classifications and that might improve the overall model.\n\nFor instance, even now, state-of-the-art question answering systems work in two steps: 1) retrieving candidate answers, 2) re-ranking them with a Transformer to find the most relevant one given the answer.\n\nThe architecture you described in your original post takes care of 2, and category information would definitely help with 1 (but only if you decide to implement that step; if not implemented, it's just noise for the 2 step).","timestamp":"2023-01-27T05:42:56+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c3a40cbd98630241","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_180811b0098f7b14","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j60lon9","thanks_reply_id":"j61eoq5","post_score":1,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_8ed4a51060f09326","answerer_user_id":"anon_3ada631270837d95","subreddit":"LanguageTechnology","timestamp":"2023-02-09T14:05:50+00:00","post_id":"10xvkhm","question":"Topic classification on text data with no/few labels\n\nI would like to achieve a classification of a text input into predefined categories.\n\nFrom what I have understand unsupervised approach are unfeasible if my target label is something very rare in pretrained models (I have labels about specific industrial processes).\n\nIs this true?\n\n​\n\nOtherwise I could try an approach in which I label for example 1000 input texts using all the different labels and use a supervised approach with very few labeled data. Should this help someway the learning process? And what methods could I use in this case?","preferred_answer":"Hey, what you are talking about is called few/zero shot classification. \n\nTry either sentence encoders + spacy (classy classification extension) or BART model from HuggingFace for zero shot classification. \n\nI had similar use case to yours and was able to achieve pretty nice performance using it. It’s pretty straightforward, for spacy just follow the tutorial written by extension maintainers and fire hugging face you can use a predefined pipeline.","full_conversation":[{"role":"OP","user_id":"anon_8ed4a51060f09326","comment_id":"10xvkhm","kind":"post","text":"Topic classification on text data with no/few labels\n\nI would like to achieve a classification of a text input into predefined categories.\n\nFrom what I have understand unsupervised approach are unfeasible if my target label is something very rare in pretrained models (I have labels about specific industrial processes).\n\nIs this true?\n\n​\n\nOtherwise I could try an approach in which I label for example 1000 input texts using all the different labels and use a supervised approach with very few labeled data. Should this help someway the learning process? And what methods could I use in this case?","timestamp":"2023-02-09T14:05:50+00:00","score":8},{"role":"answerer","user_id":"anon_3ada631270837d95","comment_id":"j7vbrt6","kind":"comment","text":"Hey, what you are talking about is called few/zero shot classification. \n\nTry either sentence encoders + spacy (classy classification extension) or BART model from HuggingFace for zero shot classification. \n\nI had similar use case to yours and was able to achieve pretty nice performance using it. It’s pretty straightforward, for spacy just follow the tutorial written by extension maintainers and fire hugging face you can use a predefined pipeline.","timestamp":"2023-02-09T17:49:18+00:00","score":3},{"role":"OP","user_id":"anon_8ed4a51060f09326","comment_id":"j7yk23w","kind":"comment","text":"Thank you for the response! \nI will surely try BART and other models for zero/few shot classification, they seems pretty intuitive.\n\nInstead can you give more details about sentence encoders + spacy (classy classification extension)?","timestamp":"2023-02-10T09:03:57+00:00","score":1},{"role":"answerer","user_id":"anon_3ada631270837d95","comment_id":"j8cqobi","kind":"comment","text":"Hey there! Sorry for my slow response. You can just follow great tutorial: https://spacy.io/universe/project/classyclassification/\n\nOr watch a video from 🤗: https://m.youtube.com/watch?v=8h27lV8v8BU\n\nHere is a website: https://www.sbert.netindex.html/ \n\nGood luck!","timestamp":"2023-02-13T09:44:59+00:00","score":3},{"role":"OP","user_id":"anon_8ed4a51060f09326","comment_id":"j8ffifg","kind":"comment","text":"Thank you! No problem at all for the time, you gave me very useful resources!","timestamp":"2023-02-13T22:24:50+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_8ed4a51060f09326","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3ada631270837d95","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j7vbrt6","thanks_reply_id":"j7yk23w","post_score":8,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_71972ebf896df3a9","answerer_user_id":"anon_64e033f27f8b462c","subreddit":"LanguageTechnology","timestamp":"2023-02-18T02:39:19+00:00","post_id":"1154sve","question":"Looking for thought-leaders/researchers to contribute to a weekly NLP newsletter\n\nHey everyone, \n\n\nI'm starting up a weekly newsletter aimed at teaching writers how to use NLP models and language technologies to increase their productivity as well as prepare them for how these technologies are going to rapidly change the world of writing. \n\n\nThe newsletter is called \"The Pen & Pixel: AI Authors Newsletter\" - it features 1 creative prompt idea, 1 industry insight as well as news insights from the world of NLP every week. \n\n\nHere is the mock landing page for the newsletter: [https://mailchi.mp/e6280a35827d/penandpixelnewsletter](https://mailchi.mp/e6280a35827d/penandpixelnewsletter) \n\n\nThe \"insight\" will be based on a short and simple question. Totally happy to work out compensation as well as plug your project, product or study you're working on in the newsletter. \n\n\nThe newsletter currently has a subscriber count of 4 (lol) but I'm yet to market it properly and can see it growing pretty steadily over the next 12 months. \n\n\nHoping to hear from any thought-leaders, researchers, linguistics students or developers working on NLP models who can lend some of their expertise in the field to educating the community. \n\n\nThanks for reading and thanks to anyone who wishes to contribute.","preferred_answer":"This is now the fourth new AI newsletter today. The other three are:\n\nhttps://www.reddit.com/r/singularity/comments/114z90l/aideology_newsletter/\n\nhttps://www.reddit.com/r/machinelearningnews/comments/114vlmy/ai_news_roundup_feb_17_2023/\n\nhttps://www.reddit.com/r/singularity/comments/114mkyl/weekly_piece_of_future_3_insights_about_robotics/\n\nWhere does this all come from? From that news filtering ad that's promoted on Reddit for about one week now?","full_conversation":[{"role":"OP","user_id":"anon_71972ebf896df3a9","comment_id":"1154sve","kind":"post","text":"Looking for thought-leaders/researchers to contribute to a weekly NLP newsletter\n\nHey everyone, \n\n\nI'm starting up a weekly newsletter aimed at teaching writers how to use NLP models and language technologies to increase their productivity as well as prepare them for how these technologies are going to rapidly change the world of writing. \n\n\nThe newsletter is called \"The Pen & Pixel: AI Authors Newsletter\" - it features 1 creative prompt idea, 1 industry insight as well as news insights from the world of NLP every week. \n\n\nHere is the mock landing page for the newsletter: [https://mailchi.mp/e6280a35827d/penandpixelnewsletter](https://mailchi.mp/e6280a35827d/penandpixelnewsletter) \n\n\nThe \"insight\" will be based on a short and simple question. Totally happy to work out compensation as well as plug your project, product or study you're working on in the newsletter. \n\n\nThe newsletter currently has a subscriber count of 4 (lol) but I'm yet to market it properly and can see it growing pretty steadily over the next 12 months. \n\n\nHoping to hear from any thought-leaders, researchers, linguistics students or developers working on NLP models who can lend some of their expertise in the field to educating the community. \n\n\nThanks for reading and thanks to anyone who wishes to contribute.","timestamp":"2023-02-18T02:39:19+00:00","score":7},{"role":"answerer","user_id":"anon_64e033f27f8b462c","comment_id":"j90ea2h","kind":"comment","text":"This is now the fourth new AI newsletter today. The other three are:\n\nhttps://www.reddit.com/r/singularity/comments/114z90l/aideology_newsletter/\n\nhttps://www.reddit.com/r/machinelearningnews/comments/114vlmy/ai_news_roundup_feb_17_2023/\n\nhttps://www.reddit.com/r/singularity/comments/114mkyl/weekly_piece_of_future_3_insights_about_robotics/\n\nWhere does this all come from? From that news filtering ad that's promoted on Reddit for about one week now?","timestamp":"2023-02-18T07:08:25+00:00","score":3},{"role":"OP","user_id":"anon_71972ebf896df3a9","comment_id":"j90hs9j","kind":"comment","text":"?\n\nIf you could expand on or clarify what you’re trying to say I would appreciate it.","timestamp":"2023-02-18T07:54:25+00:00","score":0},{"role":"answerer","user_id":"anon_64e033f27f8b462c","comment_id":"j90idgl","kind":"comment","text":"On the 50 subreddits I'm subscribed to for 7 years now, there is typically one new AI or robotics newsletter announced per year.\n\nToday there were four in a row.\n\nLast week there was a company https://www.reddit.com/user/OAT-LY/comments/112tzgp/megathread_hey_reddit_this_is_oatly_weve_sent_out/ promoting ads on Reddit which I guess were about personalized news filtering. I am wondering if that extremely rare event of four new newsletters on a single day has something to do with that ad.","timestamp":"2023-02-18T08:02:13+00:00","score":4},{"role":"OP","user_id":"anon_71972ebf896df3a9","comment_id":"j90jkc8","kind":"comment","text":"Ah okay, well, my apologies for adding to the pile on/repetition.\n\nI can confirm that I’m not using the service you’ve named in your comment. Just putting out the call organically through relevant subs.\n\nThanks for clarifying 🙂","timestamp":"2023-02-18T08:18:37+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_71972ebf896df3a9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_64e033f27f8b462c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j90ea2h","thanks_reply_id":"j90hs9j","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_7e46766fa18991b6","answerer_user_id":"anon_8630697a7141eed5","subreddit":"LanguageTechnology","timestamp":"2023-02-19T00:10:15+00:00","post_id":"115wa8b","question":"BERT-Based Clustering on a Corpus of Genre Samples Kinda Sucks. Why?\n\nI'm comparing BERT-embeddings vs. good ole' fashioned TF-IDF to cluster a corpus of documents (FROWN Corpus of Contemporary English w/ 15 genres across 500 documents) using K-means. I'm surprised to see how poorly the BERT-tokenized effort does. \n\nI'm using BertTokenizer on 510-token length chunks, discarding chunks under 50 tokens (code below), and then using K-means after an elbow plot, winding up 278, 512-token total document chunks. The results are surprisingly (to me) bad:\n\n>Homogeneity: 0.3745 \n> \n>Completeness: 0.3719 \n> \n>Silhouette Score: 0.2542\n\nIt's a little better than TF-IDF on the same documents (500 docs using TFIDFVectorizer) but still:\n\n>Homogeneity: 0.3104 \n> \n>Completeness: 0.3877 \n> \n>Silhouette Score: 0.0002\n\nIs the problem K-means can't take advantage of BERT embeddings? Or something else maybe? Would be grateful for any insight.\n\n**Code**:\n\n #import pandas to store our data and then our vecotrized data in dataframes (tabular format)\n import pandas as pd\n \n # transformers is a kind of easy button that has lots of existing models, tools, and pipelines from HuggingFace (check out https://huggingface.co/)\n # There are lots of NLP applications for transformers, and you can often get a complex task done with a single line of code using Hugging Face\n from transformers import BertModel, BertTokenizer\n \n # torch is a PyTorch deep learning framework for array operations and math functions, & efficiently do math on GPU's.\n import torch\n \n # Load csv file into dataframe\n # In my example, 30 documents, 10 each selections from Edgar Allen Poe, Ukraine war reporting, & Russian trolls on Twitter\n df = pd.read_csv('/datasets/frown_labeled_text/FROWN_Labeled_Text_byGenre.csv')\n \n # Initialize BERT model and tokenizer\n bert = BertModel.from_pretrained('bert-base-uncased')\n tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')\n \n # Tokenize and encode chunks of documents\n chunked_vectors = []\n chunked_genres = []\n num_chunked_docs = 0 # Counter for number of chunked documents\n for _, row in df.iterrows():\n text = row[\"TEXT\"]\n genre = row[\"CODE\"]\n tokenized_text = tokenizer.tokenize(text)\n for i in range(0, len(tokenized_text), 510):\n chunk = tokenized_text[i:i+510]\n if len(chunk) < 50:\n continue\n num_chunked_docs += 1 # To count # of document chunks we create in this function\n encoded_chunk = tokenizer.encode(chunk, add_special_tokens=True, max_length=510, truncation=True)\n input_ids = torch.tensor(encoded_chunk).unsqueeze(0)\n pooled_output = bert(input_ids)[1]\n chunked_vectors.append(pooled_output.squeeze(0).tolist())\n chunked_genres.append(genre)\n \n # Create dataframe with vectors and genre\n cluster_df = pd.DataFrame(chunked_vectors)\n cluster_df[\"CODE\"] = chunked_genres\n \n # Import K-menas for clustering and matplotlib for visualzing \n from sklearn.cluster import KMeans\n import matplotlib.pyplot as plt\n \n # Create a list of WCSS for different k values\n wcss = []\n for i in range(4, 20):\n kmeans = KMeans(n_clusters=i, init='k-means++', max_iter=300, n_init=10, random_state=0)\n kmeans.fit(cluster_df.drop(\"CODE\", axis=1))\n wcss.append(kmeans.inertia_)\n \n # Plot WCSS for each k value\n plt.plot(range(4, 20), wcss)\n plt.title('Elbow Method')\n plt.xlabel('Number of clusters')\n plt.ylabel('WCSS')\n plt.show()\n \n # Import clustering evaluzation metrics and numpy to handle arrays\n from sklearn.metrics import homogeneity_score, completeness_score, silhouette_score\n import numpy as np\n \n # Fit KMeans to the data (manually enter the number you got from the elbow plot, \"15\" in my case)\n optimal_k = 15\n kmeans = KMeans(n_clusters=optimal_k, init='k-means++', max_iter=300, n_init=10, random_state=0)\n cluster_df[\"label\"] = kmeans.fit_predict(cluster_df.drop(\"CODE\", axis=1))\n \n \n # Create a color map to map genres to colors (remember the original data has ground truth: each document is labled by genre)\n genre_list = cluster_df[\"CODE\"].unique()\n genre_colors = {genre: i for i, genre in enumerate(genre_list)}\n cluster_df[\"color\"] = cluster_df[\"CODE\"].apply(lambda x: genre_colors[x])\n \n # Plot the clusters\n fig, ax = plt.subplots()\n for genre, x, y in zip(cluster_df[\"CODE\"], cluster_df[0], cluster_df[1]):\n ax.scatter(x, y, label=genre if genre not in ax.get_legend_handles_labels()[1] else None, color = 'C{}'.format(genre_colors[genre]))\n \n # Show the legend\n leg = ax.legend(frameon=True, framealpha=1)\n for lh in leg.legendHandles: \n lh._sizes = [150]\n \n # Display the cluster plot\n plt.show()\n \n \n # Evaluate the clusters\n homogeneity = homogeneity_score(cluster_df[\"CODE\"], cluster_df[\"label\"])\n completeness = completeness_score(cluster_df[\"CODE\"], cluster_df[\"label\"])\n silhouette = silhouette_score(cluster_df.drop(\"CODE\", axis=1), cluster_df[\"label\"])\n \n print(\"Homogeneity: {:.4f}\".format(homogeneity))\n print(\"Completeness: {:.4f}\".format(completeness))\n print(\"Silhouette Score: {:.4f}\".format(silhouette))","preferred_answer":"Bert wasn't designed to make embedding for clustering. We have sentences-transforners[https://www.sbert.net/] for that.","full_conversation":[{"role":"OP","user_id":"anon_7e46766fa18991b6","comment_id":"115wa8b","kind":"post","text":"BERT-Based Clustering on a Corpus of Genre Samples Kinda Sucks. Why?\n\nI'm comparing BERT-embeddings vs. good ole' fashioned TF-IDF to cluster a corpus of documents (FROWN Corpus of Contemporary English w/ 15 genres across 500 documents) using K-means. I'm surprised to see how poorly the BERT-tokenized effort does. \n\nI'm using BertTokenizer on 510-token length chunks, discarding chunks under 50 tokens (code below), and then using K-means after an elbow plot, winding up 278, 512-token total document chunks. The results are surprisingly (to me) bad:\n\n>Homogeneity: 0.3745 \n> \n>Completeness: 0.3719 \n> \n>Silhouette Score: 0.2542\n\nIt's a little better than TF-IDF on the same documents (500 docs using TFIDFVectorizer) but still:\n\n>Homogeneity: 0.3104 \n> \n>Completeness: 0.3877 \n> \n>Silhouette Score: 0.0002\n\nIs the problem K-means can't take advantage of BERT embeddings? Or something else maybe? Would be grateful for any insight.\n\n**Code**:\n\n #import pandas to store our data and then our vecotrized data in dataframes (tabular format)\n import pandas as pd\n \n # transformers is a kind of easy button that has lots of existing models, tools, and pipelines from HuggingFace (check out https://huggingface.co/)\n # There are lots of NLP applications for transformers, and you can often get a complex task done with a single line of code using Hugging Face\n from transformers import BertModel, BertTokenizer\n \n # torch is a PyTorch deep learning framework for array operations and math functions, & efficiently do math on GPU's.\n import torch\n \n # Load csv file into dataframe\n # In my example, 30 documents, 10 each selections from Edgar Allen Poe, Ukraine war reporting, & Russian trolls on Twitter\n df = pd.read_csv('/datasets/frown_labeled_text/FROWN_Labeled_Text_byGenre.csv')\n \n # Initialize BERT model and tokenizer\n bert = BertModel.from_pretrained('bert-base-uncased')\n tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')\n \n # Tokenize and encode chunks of documents\n chunked_vectors = []\n chunked_genres = []\n num_chunked_docs = 0 # Counter for number of chunked documents\n for _, row in df.iterrows():\n text = row[\"TEXT\"]\n genre = row[\"CODE\"]\n tokenized_text = tokenizer.tokenize(text)\n for i in range(0, len(tokenized_text), 510):\n chunk = tokenized_text[i:i+510]\n if len(chunk) < 50:\n continue\n num_chunked_docs += 1 # To count # of document chunks we create in this function\n encoded_chunk = tokenizer.encode(chunk, add_special_tokens=True, max_length=510, truncation=True)\n input_ids = torch.tensor(encoded_chunk).unsqueeze(0)\n pooled_output = bert(input_ids)[1]\n chunked_vectors.append(pooled_output.squeeze(0).tolist())\n chunked_genres.append(genre)\n \n # Create dataframe with vectors and genre\n cluster_df = pd.DataFrame(chunked_vectors)\n cluster_df[\"CODE\"] = chunked_genres\n \n # Import K-menas for clustering and matplotlib for visualzing \n from sklearn.cluster import KMeans\n import matplotlib.pyplot as plt\n \n # Create a list of WCSS for different k values\n wcss = []\n for i in range(4, 20):\n kmeans = KMeans(n_clusters=i, init='k-means++', max_iter=300, n_init=10, random_state=0)\n kmeans.fit(cluster_df.drop(\"CODE\", axis=1))\n wcss.append(kmeans.inertia_)\n \n # Plot WCSS for each k value\n plt.plot(range(4, 20), wcss)\n plt.title('Elbow Method')\n plt.xlabel('Number of clusters')\n plt.ylabel('WCSS')\n plt.show()\n \n # Import clustering evaluzation metrics and numpy to handle arrays\n from sklearn.metrics import homogeneity_score, completeness_score, silhouette_score\n import numpy as np\n \n # Fit KMeans to the data (manually enter the number you got from the elbow plot, \"15\" in my case)\n optimal_k = 15\n kmeans = KMeans(n_clusters=optimal_k, init='k-means++', max_iter=300, n_init=10, random_state=0)\n cluster_df[\"label\"] = kmeans.fit_predict(cluster_df.drop(\"CODE\", axis=1))\n \n \n # Create a color map to map genres to colors (remember the original data has ground truth: each document is labled by genre)\n genre_list = cluster_df[\"CODE\"].unique()\n genre_colors = {genre: i for i, genre in enumerate(genre_list)}\n cluster_df[\"color\"] = cluster_df[\"CODE\"].apply(lambda x: genre_colors[x])\n \n # Plot the clusters\n fig, ax = plt.subplots()\n for genre, x, y in zip(cluster_df[\"CODE\"], cluster_df[0], cluster_df[1]):\n ax.scatter(x, y, label=genre if genre not in ax.get_legend_handles_labels()[1] else None, color = 'C{}'.format(genre_colors[genre]))\n \n # Show the legend\n leg = ax.legend(frameon=True, framealpha=1)\n for lh in leg.legendHandles: \n lh._sizes = [150]\n \n # Display the cluster plot\n plt.show()\n \n \n # Evaluate the clusters\n homogeneity = homogeneity_score(cluster_df[\"CODE\"], cluster_df[\"label\"])\n completeness = completeness_score(cluster_df[\"CODE\"], cluster_df[\"label\"])\n silhouette = silhouette_score(cluster_df.drop(\"CODE\", axis=1), cluster_df[\"label\"])\n \n print(\"Homogeneity: {:.4f}\".format(homogeneity))\n print(\"Completeness: {:.4f}\".format(completeness))\n print(\"Silhouette Score: {:.4f}\".format(silhouette))","timestamp":"2023-02-19T00:10:15+00:00","score":9},{"role":"answerer","user_id":"anon_8630697a7141eed5","comment_id":"j94ql0w","kind":"comment","text":"Bert wasn't designed to make embedding for clustering. We have sentences-transforners[https://www.sbert.net/] for that.","timestamp":"2023-02-19T05:45:26+00:00","score":8},{"role":"OP","user_id":"anon_7e46766fa18991b6","comment_id":"j961ytk","kind":"comment","text":"Thanks. Do you mean using sbert to get an embedding for each sentence and then averaging the sentence embeddings to represent the document?","timestamp":"2023-02-19T15:08:06+00:00","score":1},{"role":"answerer","user_id":"anon_8630697a7141eed5","comment_id":"j96f8km","kind":"comment","text":"What I meant is that sentence transformer are better at embedding representation than bert. What i suggest you do is find a Pre-trained sentence transformer or TopicBert model for lage sentences 512, 256 (The sbert model only takes an input of 128, so don't use that) n use that instead. Bert is just not meant to be used for k-mean clustering. Bert embeddings being good for classification tasks is like a unintended \"by-product\" of it's traning. It doesn't mean it's a good embedding extraction model.","timestamp":"2023-02-19T16:43:49+00:00","score":2},{"role":"OP","user_id":"anon_7e46766fa18991b6","comment_id":"j96kil1","kind":"comment","text":">Bert embeddings being good for classification tasks is like a unintended \"by-product\" of it's traning. It doesn't mean it's a good embedding extraction model.\n\nThat is super helpful conceptually. I went back and used nltk to tokenize sentences from my documents, and then used paraphrase-distilroberta-base-v1 as a model to encode chunks =< 510 tokens. That performed way better than the base BERT:\n\n>Homogeneity: 0.5055 \n> \n>Completeness: 0.4749 \n> \n>Silhouette Score: 0.0469\n\nAnd there were some visible clusters when I used PCA, like science writing and religious texts. I think what u/Brudaks said makes sense: the human-interpretable difference here is genre, a \"howness\" feature set, not an \"aboutness\" feature set. And those hotness features are relatively sparse (the elbow is around 400-500 words length). So I'm applying a semantic \"aboutness\" model when my problem is essentially a pragmatics \"howness\" problem.\n\n\\[Edit: I can't get the code block formatting feature to work right it keeps mangling the lines\\]\n\n from sentence_transformers import SentenceTransformer import nltk nltk.download('punkt')\n Load csv file into dataframe\n df = pd.read_csv('/datasets/frown_labeled_text/FROWN_Labeled_Text_byGenre.csv')\n Convert feature names to strings\n df.columns = df.columns.astype(str)\n Initialize SBERT model\n model = SentenceTransformer('paraphrase-distilroberta-base-v1')\n Tokenize and encode chunks of documents\n chunked_vectors = [] chunked_genres = [] num_chunked_docs = 0 # Counter for number of chunked documents for _, row in df.iterrows(): text = row[\"TEXT\"] genre = row[\"CODE\"] sentences = nltk.sent_tokenize(text) sentence_chunks = [] for sentence in sentences: if len(sentence) < 50: continue sentence_chunks.append(sentence) if len(' '.join(sentence_chunks)) >= 510: # Encode the current chunk of sentences encoded_chunk = model.encode(' '.join(sentence_chunks), convert_to_tensor=True) chunked_vectors.append(encoded_chunk.tolist()) chunked_genres.append(genre) sentence_chunks = [] num_chunked_docs += 1 # To count # of document chunks we create in this function if len(sentence_chunks) > 0: # Encode the last chunk of sentences encoded_chunk = model.encode(' '.join(sentence_chunks), convert_to_tensor=True) chunked_vectors.append(encoded_chunk.tolist()) chunked_genres.append(genre) num_chunked_docs += 1\n Create dataframe with vectors and genre\n cluster_df = pd.DataFrame(chunked_vectors) cluster_df[\"CODE\"] = chunked_genres","timestamp":"2023-02-19T17:20:05+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_7e46766fa18991b6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8630697a7141eed5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"j94ql0w","thanks_reply_id":"j961ytk","post_score":9,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_081e4d4b93cbe547","answerer_user_id":"anon_cc7b197748426cf7","subreddit":"LanguageTechnology","timestamp":"2023-02-27T14:47:15+00:00","post_id":"11ddkq9","question":"how important is linguistic ability and CS ability in NLP, respectively?\n\nHello everyone. I am a high school graduate and I am interested in going into NLP research after I finish my bachelor's. I am wondering how important linguistic ability is in NLP research compared to CS knowledge/talent. Which is more important in Coursework? Which is more important in writing your own paper?","preferred_answer":"Going against the grain here, but recent NLP MSc graduate here, currently working in the industry in an engineering role. I have a background grounded in computer science and not much linguistics knowledge. \n\nThe amount of non-CS people I've seen write shoddy code and then struggle to debug it well is kind of shocking. You don't need much CS knowledge necessarily, but you need a good foundation.\n\nLinguistics honestly hasn't come up much (because as Magikey says, the current SotA approach is just giant statistical models), but you're not going to be manually do matrix multiplication either. \n\nA healhty foundation in all three is useful, but I'd honestly prioritise CS because that's what you're actually going to be using day-to-day in a lot of cases. Some of that will be my natural bias, though.","full_conversation":[{"role":"OP","user_id":"anon_081e4d4b93cbe547","comment_id":"11ddkq9","kind":"post","text":"how important is linguistic ability and CS ability in NLP, respectively?\n\nHello everyone. I am a high school graduate and I am interested in going into NLP research after I finish my bachelor's. I am wondering how important linguistic ability is in NLP research compared to CS knowledge/talent. Which is more important in Coursework? Which is more important in writing your own paper?","timestamp":"2023-02-27T14:47:15+00:00","score":1},{"role":"answerer","user_id":"anon_cc7b197748426cf7","comment_id":"jago1vy","kind":"comment","text":"Going against the grain here, but recent NLP MSc graduate here, currently working in the industry in an engineering role. I have a background grounded in computer science and not much linguistics knowledge. \n\nThe amount of non-CS people I've seen write shoddy code and then struggle to debug it well is kind of shocking. You don't need much CS knowledge necessarily, but you need a good foundation.\n\nLinguistics honestly hasn't come up much (because as Magikey says, the current SotA approach is just giant statistical models), but you're not going to be manually do matrix multiplication either. \n\nA healhty foundation in all three is useful, but I'd honestly prioritise CS because that's what you're actually going to be using day-to-day in a lot of cases. Some of that will be my natural bias, though.","timestamp":"2023-03-01T08:15:07+00:00","score":1},{"role":"OP","user_id":"anon_081e4d4b93cbe547","comment_id":"jahrg3i","kind":"comment","text":"Thanks for the insight? And just to be clear, by CS you mean mainly mathematical theories used in CS, not just coding language fluency?","timestamp":"2023-03-01T15:10:47+00:00","score":1},{"role":"answerer","user_id":"anon_cc7b197748426cf7","comment_id":"jai8bam","kind":"comment","text":"Honestly, I'm more referring to fluency. Having an idea and being able to write the code to support it, rather than any specific algorithms or theories.","timestamp":"2023-03-01T16:59:59+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_081e4d4b93cbe547","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_cc7b197748426cf7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jago1vy","thanks_reply_id":"jahrg3i","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_c19f50b5635405a0","answerer_user_id":"anon_a7740bacf1f97813","subreddit":"LanguageTechnology","timestamp":"2023-02-28T09:15:02+00:00","post_id":"11e1mf8","question":"Generative Models in Production in Highly Regulated Industries\n\nDear all,\nI am wondering if there is any review/survey that discusses pros and cons of generative models in production, specifically in healthcare industry?\n\nI have my initial reservations about it, specifically about models hallucinating and not sure how risky end-user is served raw output. \n\nWhat are your thoughts in general?","preferred_answer":"Woe unto the practitioner that allows PHI to be input into any of these models.\n\nOutside that, I'm not able to think of a good use of these models in healthcare. The field cannot afford to accept the hallucinations. If you ask it for help studying as a student, you'll never be able to tell if it's real or not; if you just use it to get a list of possible diagnoses, for example, then you'd get better answers in a Google search.\n\nThese LLMs can be good for low-stakes situations like customer service (although they could become high stakes if it scares you customers) or toys like Roblox (although not yet, because they've been trained on violent racist sexist data too!). Anything where you need an accurate answer I would pass on; the models are great at generating bullshit and not great at saying \"i don't know\".","full_conversation":[{"role":"OP","user_id":"anon_c19f50b5635405a0","comment_id":"11e1mf8","kind":"post","text":"Generative Models in Production in Highly Regulated Industries\n\nDear all,\nI am wondering if there is any review/survey that discusses pros and cons of generative models in production, specifically in healthcare industry?\n\nI have my initial reservations about it, specifically about models hallucinating and not sure how risky end-user is served raw output. \n\nWhat are your thoughts in general?","timestamp":"2023-02-28T09:15:02+00:00","score":3},{"role":"answerer","user_id":"anon_a7740bacf1f97813","comment_id":"jac2erx","kind":"comment","text":"Woe unto the practitioner that allows PHI to be input into any of these models.\n\nOutside that, I'm not able to think of a good use of these models in healthcare. The field cannot afford to accept the hallucinations. If you ask it for help studying as a student, you'll never be able to tell if it's real or not; if you just use it to get a list of possible diagnoses, for example, then you'd get better answers in a Google search.\n\nThese LLMs can be good for low-stakes situations like customer service (although they could become high stakes if it scares you customers) or toys like Roblox (although not yet, because they've been trained on violent racist sexist data too!). Anything where you need an accurate answer I would pass on; the models are great at generating bullshit and not great at saying \"i don't know\".","timestamp":"2023-02-28T10:27:25+00:00","score":3},{"role":"OP","user_id":"anon_c19f50b5635405a0","comment_id":"jac4jrd","kind":"comment","text":"Thank you for articulation. As you can see from the post, I really do share this sentiment towards it. Almost brings me to a point of thinking of changing jobs because this “vision” is driving me crazy.","timestamp":"2023-02-28T10:57:53+00:00","score":2},{"role":"answerer","user_id":"anon_a7740bacf1f97813","comment_id":"jacuz30","kind":"comment","text":"You're not the only one. Luckily for all of us (at least in this case), healthcare is a regulated and quite conservative industry. People will get mad if an \"AI\" tells them they have a mole when they have a tumor and vice-versa. I fully expect there to be some horrific snake oil and probably malpractice to come out of this, but I have hope that it will mostly be caught and punished, by the market if not by the courts. I am not so optimistic for other industries.","timestamp":"2023-02-28T15:03:05+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c19f50b5635405a0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a7740bacf1f97813","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jac2erx","thanks_reply_id":"jac4jrd","post_score":3,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_9d6d14de64897fb3","answerer_user_id":"anon_8630697a7141eed5","subreddit":"LanguageTechnology","timestamp":"2023-03-06T14:06:50+00:00","post_id":"11jzvd2","question":"Research\n\nHi ... In your opinion, what are the best research papers in NLP that have come out in the past year?","preferred_answer":"Depends on person to person. But for me the best two are:- \n\nRethinking the Role of Demonstrations: What Makes In-Context Learning Work?\n\nChain-of-Thought Prompting Elicits Reasoning in Large Language Models","full_conversation":[{"role":"OP","user_id":"anon_9d6d14de64897fb3","comment_id":"11jzvd2","kind":"post","text":"Research\n\nHi ... In your opinion, what are the best research papers in NLP that have come out in the past year?","timestamp":"2023-03-06T14:06:50+00:00","score":5},{"role":"answerer","user_id":"anon_8630697a7141eed5","comment_id":"jb54yi9","kind":"comment","text":"Depends on person to person. But for me the best two are:- \n\nRethinking the Role of Demonstrations: What Makes In-Context Learning Work?\n\nChain-of-Thought Prompting Elicits Reasoning in Large Language Models","timestamp":"2023-03-06T14:46:24+00:00","score":3},{"role":"OP","user_id":"anon_9d6d14de64897fb3","comment_id":"jb5oefa","kind":"comment","text":"Thanks for the rec! \n\n&#x200B;\n\nAny other good papers on large language models you can think of?","timestamp":"2023-03-06T16:59:05+00:00","score":1},{"role":"answerer","user_id":"anon_8630697a7141eed5","comment_id":"jb60p42","kind":"comment","text":"https://github.com/promptslab/Awesome-Prompt-Engineering","timestamp":"2023-03-06T18:22:28+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9d6d14de64897fb3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8630697a7141eed5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jb54yi9","thanks_reply_id":"jb5oefa","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_6b980150447f33bc","answerer_user_id":"anon_7e46766fa18991b6","subreddit":"LanguageTechnology","timestamp":"2023-03-11T13:28:50+00:00","post_id":"11ok7ug","question":"Best approach for sarcasm subcategory classification?\n\nHi All,\n\nI am currently working on my thesis which is attempting to build on existing research in the field of sarcasm detection within NLP and sentiment analysis. The task outlined is to basically build a model which can identify subcategories of sarcasm (e.g. irony, overstatement, rhetorical questions etc.). The dataset includes values for whether a phrase is sarcastic or not, and which subcategories the phrase fits into (there can be overlap between categories). I have fine-tuned BERT for sarcasm detection and this works fine but that isn't really the task. My questions are twofold essentially:\n\n\\- Is the solely transformer-based approach useful in this instance, given that it could build on existing research where previous scores obtained in this task were fairly low. If so, does anyone have any resources on how to build a multi-subclass classification model, or would it be better to build separate models for each task?\n\n\\- Would attempting to use a rule-based approach be more valuable e.g. using vector semantics and embeddings to attempt to identify the subcategories using this approach, and if so are there any particular resources I should have a look at to understand how to implement this in code? I am currently reading Jurafsky & Martin's 3rd draft of Speech and Language Processing, but I am unclear on how I could use this to categorise the subcategories which are difficult to define by linguistic experts as it is?\n\nI'm sorry if this is a bit rambling and all over the place, I'm feeling pretty lost and stressed, but happy to answer any questions and try to clarify anything :)","preferred_answer":"Different discourse layers have different functions, so while there are mutual entailments, trying to represent documents using features at the lexical, lexicogrammatical (stance & style), or thematic level capture different things. In particular:\n\n* Word-level features tend to best capture *aboutness* content: the semantic function of discourse.\n* Stance/style features tend to best capture *howness*: the genre and rhetorical moves that let speakers get things done (the pragmatic function of discourse).\n\nTransformers seem well adapted to capturing semantic content, and some pragmatics through entailments (e.g. prosody). But they don't do very well capturing socio-cultural content and pragmatics, like persuasive techniques. Stance tends to be cumulative over discourse, so the signals are spread out over distance, but also across lexicalizations: think of all the ways to hedge (\"I think,\" \"maybe, \"I guess,\" \"It appears,\" and so on).\n\nWe've had a lot of success using rhetorical dictionaries w/ BOW approaches to capture pragmatics, in particular to do so w/ interpretability. So for example in a forensic exercise to identify [Russian trolls interfering with elections](https://www.rand.org/pubs/research_reports/RRA519-1.html), using 119 interpretable stance-level features (certainty, uncertainty, intensity, urgency, social closeness, social distance, etc.), does a good job not only classifying accounts, but also capturing the rhetorical strategies right/left-wing trolls use to motivate and outrage.\n\nAnother options is hybrid models, e.g. a transformer model paired with a stance model--the former captures semantic content, the latter pragmatic moves, thus providing improved performance and interpretability. Here's an example using [a hybrid model to distinguish between different conspiracy theories by adherence](https://www.rand.org/pubs/research_reports/RRA676-1.html), i.e. support of the conspiracy theory not simply discussing the theory.","full_conversation":[{"role":"OP","user_id":"anon_6b980150447f33bc","comment_id":"11ok7ug","kind":"post","text":"Best approach for sarcasm subcategory classification?\n\nHi All,\n\nI am currently working on my thesis which is attempting to build on existing research in the field of sarcasm detection within NLP and sentiment analysis. The task outlined is to basically build a model which can identify subcategories of sarcasm (e.g. irony, overstatement, rhetorical questions etc.). The dataset includes values for whether a phrase is sarcastic or not, and which subcategories the phrase fits into (there can be overlap between categories). I have fine-tuned BERT for sarcasm detection and this works fine but that isn't really the task. My questions are twofold essentially:\n\n\\- Is the solely transformer-based approach useful in this instance, given that it could build on existing research where previous scores obtained in this task were fairly low. If so, does anyone have any resources on how to build a multi-subclass classification model, or would it be better to build separate models for each task?\n\n\\- Would attempting to use a rule-based approach be more valuable e.g. using vector semantics and embeddings to attempt to identify the subcategories using this approach, and if so are there any particular resources I should have a look at to understand how to implement this in code? I am currently reading Jurafsky & Martin's 3rd draft of Speech and Language Processing, but I am unclear on how I could use this to categorise the subcategories which are difficult to define by linguistic experts as it is?\n\nI'm sorry if this is a bit rambling and all over the place, I'm feeling pretty lost and stressed, but happy to answer any questions and try to clarify anything :)","timestamp":"2023-03-11T13:28:50+00:00","score":12},{"role":"answerer","user_id":"anon_7e46766fa18991b6","comment_id":"jbvg70u","kind":"comment","text":"Different discourse layers have different functions, so while there are mutual entailments, trying to represent documents using features at the lexical, lexicogrammatical (stance & style), or thematic level capture different things. In particular:\n\n* Word-level features tend to best capture *aboutness* content: the semantic function of discourse.\n* Stance/style features tend to best capture *howness*: the genre and rhetorical moves that let speakers get things done (the pragmatic function of discourse).\n\nTransformers seem well adapted to capturing semantic content, and some pragmatics through entailments (e.g. prosody). But they don't do very well capturing socio-cultural content and pragmatics, like persuasive techniques. Stance tends to be cumulative over discourse, so the signals are spread out over distance, but also across lexicalizations: think of all the ways to hedge (\"I think,\" \"maybe, \"I guess,\" \"It appears,\" and so on).\n\nWe've had a lot of success using rhetorical dictionaries w/ BOW approaches to capture pragmatics, in particular to do so w/ interpretability. So for example in a forensic exercise to identify [Russian trolls interfering with elections](https://www.rand.org/pubs/research_reports/RRA519-1.html), using 119 interpretable stance-level features (certainty, uncertainty, intensity, urgency, social closeness, social distance, etc.), does a good job not only classifying accounts, but also capturing the rhetorical strategies right/left-wing trolls use to motivate and outrage.\n\nAnother options is hybrid models, e.g. a transformer model paired with a stance model--the former captures semantic content, the latter pragmatic moves, thus providing improved performance and interpretability. Here's an example using [a hybrid model to distinguish between different conspiracy theories by adherence](https://www.rand.org/pubs/research_reports/RRA676-1.html), i.e. support of the conspiracy theory not simply discussing the theory.","timestamp":"2023-03-12T00:55:41+00:00","score":1},{"role":"OP","user_id":"anon_6b980150447f33bc","comment_id":"jbxc7rv","kind":"comment","text":"Thank you so so much! I have actually been reading quite a lot around semantic embeddings/analysis as part of an RBA, so the hybrid model suggestion is actually very interesting. I managed to get a fine-tuned version of Electra running on the task yesterday which was producing multi-category outputs, but I haven't come across stance models yet and so will do some digging on that and maybe try to implement something similar.\n\nYou are an absolute legend thank you so so much!!","timestamp":"2023-03-12T13:21:04+00:00","score":2},{"role":"answerer","user_id":"anon_7e46766fa18991b6","comment_id":"jc0jnwl","kind":"comment","text":"I use a custom tagger w/ a specific version of a stance taxonomy out of Carnegie Mellon University, but they also have a public spaCy model you can use. It tags POS but also a bunch of rhetorical categories: https://docuscospacy.readthedocs.io/en/latest/docuscope.html","timestamp":"2023-03-13T03:37:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6b980150447f33bc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7e46766fa18991b6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jbvg70u","thanks_reply_id":"jbxc7rv","post_score":12,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_8f9b4525f331c842","answerer_user_id":"anon_6dfa04649c4f6db1","subreddit":"LanguageTechnology","timestamp":"2023-03-18T08:19:08+00:00","post_id":"11uia4r","question":"Wanna team-up for Quantum NLP projects?\n\nI recently started reading about Quantum NLP. A very experimental and new field in Natural Language Processing. There are only a handful or research papers out there to aid in the knowledge of Quantum NLP, even universities such as MIT, Harvard and Stanford aren't capable or fully understand Quantum NLP yet. Only a few Quantum Computing research labs have the surface-intermediate understanding of Quantum NLP such as Cambridge Quantum. \n\n\nI have read some of the most recent and important Quantum NLP papers and used **lambeq the only python library capable enough to do Quantum NLP.** Fast forward, I have implemented a basic Quantum NLP project where I classify sentences using Quantum NLP. \n\nI couldn't find many people who are interested in Quantum NLP, that's why, I was looking forward if someone is interested in Quantum NLP in this thread and has previous experience working with NLP itself then we can make a small team and study more advanced topics on Quantum NLP and do cool projects in our pastime. \n\n**GitHub repo link:** [https://github.com/sleepingcat4/Quantum-NLP](https://github.com/sleepingcat4/Quantum-NLP) \n\n\nIf you're interested in teaming-up, kindly send me a message on **reddit or discord: sleeping\\_cat4#8182**","preferred_answer":"The readme is pretty clear and well written. It would be nice to include a brief intro -here or there- to Quantum NLP, its what and why.","full_conversation":[{"role":"OP","user_id":"anon_8f9b4525f331c842","comment_id":"11uia4r","kind":"post","text":"Wanna team-up for Quantum NLP projects?\n\nI recently started reading about Quantum NLP. A very experimental and new field in Natural Language Processing. There are only a handful or research papers out there to aid in the knowledge of Quantum NLP, even universities such as MIT, Harvard and Stanford aren't capable or fully understand Quantum NLP yet. Only a few Quantum Computing research labs have the surface-intermediate understanding of Quantum NLP such as Cambridge Quantum. \n\n\nI have read some of the most recent and important Quantum NLP papers and used **lambeq the only python library capable enough to do Quantum NLP.** Fast forward, I have implemented a basic Quantum NLP project where I classify sentences using Quantum NLP. \n\nI couldn't find many people who are interested in Quantum NLP, that's why, I was looking forward if someone is interested in Quantum NLP in this thread and has previous experience working with NLP itself then we can make a small team and study more advanced topics on Quantum NLP and do cool projects in our pastime. \n\n**GitHub repo link:** [https://github.com/sleepingcat4/Quantum-NLP](https://github.com/sleepingcat4/Quantum-NLP) \n\n\nIf you're interested in teaming-up, kindly send me a message on **reddit or discord: sleeping\\_cat4#8182**","timestamp":"2023-03-18T08:19:08+00:00","score":11},{"role":"answerer","user_id":"anon_6dfa04649c4f6db1","comment_id":"jcoo55k","kind":"comment","text":"The readme is pretty clear and well written. It would be nice to include a brief intro -here or there- to Quantum NLP, its what and why.","timestamp":"2023-03-18T11:33:04+00:00","score":7},{"role":"OP","user_id":"anon_8f9b4525f331c842","comment_id":"jcooevs","kind":"comment","text":"Thanks! I was writing a lot of Quantum Computing projects that day so didn't get the time to add a brief intro. By the way, you are interested in teaming-up? To create Quantum NLP projects with me","timestamp":"2023-03-18T11:36:14+00:00","score":-2},{"role":"answerer","user_id":"anon_6dfa04649c4f6db1","comment_id":"jcotgv8","kind":"comment","text":"Hard to estimate my interest when I don't know what it is yet","timestamp":"2023-03-18T12:30:55+00:00","score":6},{"role":"OP","user_id":"anon_8f9b4525f331c842","comment_id":"jcottp0","kind":"comment","text":"I believe that'll be for anyone who reads my post. Like I mentioned it is an extremely new field and not really marketed like other fields of Computer Science. \n\n\nThat's why, no matter who shows interested in Quantum NLP they have to read and study a lot before we get to do actual projects. I started Quantum NLP 2 months ago and Quantum Computing about 6 months ago. Quantum Computing is fun and has lot more opportunities than AI as AI moved from benchtop to labs as it advanced to its current condition.","timestamp":"2023-03-18T12:34:19+00:00","score":-3},{"role":"answerer","user_id":"anon_6dfa04649c4f6db1","comment_id":"jcpdxds","kind":"comment","text":"I get the \"doing your own research is a pre-requisite\" pov and I adhere to it. But there is value in a quick outline of the subject because we're all at different points in life. For example I'm preparing my thesis defense due in a couple weeks, so I can't allow myself to digress on such a subject. I just guiltily allow myself a few drift offs on reddit here and there.","timestamp":"2023-03-18T15:14:57+00:00","score":7},{"role":"OP","user_id":"anon_8f9b4525f331c842","comment_id":"jcpeuqr","kind":"comment","text":"Mhmm! I think you might be getting me wrong. I don't except anyone to start reading about Quantum NLP from tomorrow after we team-up. It is basically a pastime.\n\nI am looking for people who might be interested in creating Quantum NLP projects in their pastime so there's no hard time-limit. You can start after few weeks or after an month. Since the goal isn't churning research papers yet or any short-time collaboration rather long time collaboration so if you're interested, we can team-up and you can start when have time but we both share a common repo/org so that we both can be updated on our Quantum NLP progress/updates","timestamp":"2023-03-18T15:21:35+00:00","score":-2}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_8f9b4525f331c842","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6dfa04649c4f6db1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jcoo55k","thanks_reply_id":"jcooevs","post_score":11,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_093a052700ea1d13","answerer_user_id":"anon_8f2b2a036600da9c","subreddit":"LanguageTechnology","timestamp":"2023-03-20T20:25:22+00:00","post_id":"11wuo4y","question":"Where does the input sentence length is dealt with in a transformer?\n\nSomeone understands why the vector size still depends on the sequence length after the positional encoding in a transformer? I thought it needed to be independent from the sequence length at one point?","preferred_answer":"Yes, the input size is the dimensionality of the embedding.\n\nSo if we have the sentence \"The fox ran\", we encode that into 3 embeddings, one for each token. This embeddings have a dimensionality (lets say 768). So we are inputting 3 embeddings of 768. The multi-headed attention then outputs 3 embeddings of 768. Then it is the feedforward layer. This input takes in the dimensionality size as its input, which is always 768. Then, we input each token one at a time to this neural network, so it is 3 inputs of size 768, which is the input size of the neural network. We take each output (we inputted 3, we get 3 back) for a final set of 3 representations.\n\nI strongly recommend reading the link I posted earlier, it shows how it works visually, which can be very helpful.","full_conversation":[{"role":"OP","user_id":"anon_093a052700ea1d13","comment_id":"11wuo4y","kind":"post","text":"Where does the input sentence length is dealt with in a transformer?\n\nSomeone understands why the vector size still depends on the sequence length after the positional encoding in a transformer? I thought it needed to be independent from the sequence length at one point?","timestamp":"2023-03-20T20:25:22+00:00","score":9},{"role":"answerer","user_id":"anon_8f2b2a036600da9c","comment_id":"jdev396","kind":"comment","text":"Yes, the input size is the dimensionality of the embedding.\n\nSo if we have the sentence \"The fox ran\", we encode that into 3 embeddings, one for each token. This embeddings have a dimensionality (lets say 768). So we are inputting 3 embeddings of 768. The multi-headed attention then outputs 3 embeddings of 768. Then it is the feedforward layer. This input takes in the dimensionality size as its input, which is always 768. Then, we input each token one at a time to this neural network, so it is 3 inputs of size 768, which is the input size of the neural network. We take each output (we inputted 3, we get 3 back) for a final set of 3 representations.\n\nI strongly recommend reading the link I posted earlier, it shows how it works visually, which can be very helpful.","timestamp":"2023-03-23T21:58:18+00:00","score":1},{"role":"OP","user_id":"anon_093a052700ea1d13","comment_id":"jdfu8c2","kind":"comment","text":"Ohhh I do realize now. Thank you so much. So you have as many queries, keys and values as you have words?","timestamp":"2023-03-24T02:08:27+00:00","score":1},{"role":"answerer","user_id":"anon_8f2b2a036600da9c","comment_id":"jdfujyf","kind":"comment","text":"Basically yes. Technically if it is multiheaded attention you may have more (i.e. 10 heads means 10 queries for each word).","timestamp":"2023-03-24T02:10:55+00:00","score":1},{"role":"OP","user_id":"anon_093a052700ea1d13","comment_id":"jdgxrox","kind":"comment","text":"Thank you so much for being patient enough to explain everything to me!","timestamp":"2023-03-24T09:33:56+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_093a052700ea1d13","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8f2b2a036600da9c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jdev396","thanks_reply_id":"jdfu8c2","post_score":9,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_6b980150447f33bc","answerer_user_id":"anon_3aa37d6cc70e86a8","subreddit":"LanguageTechnology","timestamp":"2023-03-26T11:57:08+00:00","post_id":"122jvu9","question":"Pre-trained Electra consistently producing Precision and Accuracy metrics of 0, does anyone have any suggestions on how to resolve?\n\nHi all I'm back with more questions :)\n\nI am currently doing my dissertation which is a binary multi-label classification task for sarcasm subcategory detection. I have implemented Electra as I want to assess the efficacy of this model for this particular task. There is a set dataset provided for the task of \\~4000 samples of training data and \\~1400 samples of testing data. F1 score is outlined as the prerequisite evaluation metric, so I have implemented Precision and Accuracy as the metrics when fitting the model. Each time I have trained the model, these metrics start at 0 and do not increase, meaning that when I am trying to predict on the test data, all predictions end up being 0 and thus my F1 score is consistently 0.0.\n\nDoes anyone have any suggestions on how to resolve this?\n\nN.B. - I am aware that the model is likely underfitting, and am looking into data augmentation techniques or potentially fine tuning the model on a general sarcasm detection dataset, then fine tuning it again for this subtask, however the issue with the 6 labels in the dataset is that I don't know how I would augment data whilst maintaining some semblance of the dataset already outlined.\n\nN.B. 2 - I have attached a [photo](https://imgur.com/a/iq9h12i)of my existing model architecture, but am unsure whether this is correct, as it doesn't seem like the input is being fed to the actual Electra model or the architecture itself may be too simple for the task.\n\nHappy to answer any questions to clarify anything that doesn't make sense :)","preferred_answer":"Some basic questions:\n\n1) Is loss going down on the training set? If no, something is hosed.\n\n2) Can you get it to trivially overfit? Meaning, set train=val (and, optionally, set train to something really trivial like 10-100 examples) and see accuracy/f1 go to ~100%?\n\nIf you can't do the above, something is almost certainly broken in your implementation.","full_conversation":[{"role":"OP","user_id":"anon_6b980150447f33bc","comment_id":"122jvu9","kind":"post","text":"Pre-trained Electra consistently producing Precision and Accuracy metrics of 0, does anyone have any suggestions on how to resolve?\n\nHi all I'm back with more questions :)\n\nI am currently doing my dissertation which is a binary multi-label classification task for sarcasm subcategory detection. I have implemented Electra as I want to assess the efficacy of this model for this particular task. There is a set dataset provided for the task of \\~4000 samples of training data and \\~1400 samples of testing data. F1 score is outlined as the prerequisite evaluation metric, so I have implemented Precision and Accuracy as the metrics when fitting the model. Each time I have trained the model, these metrics start at 0 and do not increase, meaning that when I am trying to predict on the test data, all predictions end up being 0 and thus my F1 score is consistently 0.0.\n\nDoes anyone have any suggestions on how to resolve this?\n\nN.B. - I am aware that the model is likely underfitting, and am looking into data augmentation techniques or potentially fine tuning the model on a general sarcasm detection dataset, then fine tuning it again for this subtask, however the issue with the 6 labels in the dataset is that I don't know how I would augment data whilst maintaining some semblance of the dataset already outlined.\n\nN.B. 2 - I have attached a [photo](https://imgur.com/a/iq9h12i)of my existing model architecture, but am unsure whether this is correct, as it doesn't seem like the input is being fed to the actual Electra model or the architecture itself may be too simple for the task.\n\nHappy to answer any questions to clarify anything that doesn't make sense :)","timestamp":"2023-03-26T11:57:08+00:00","score":8},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"jdsoxuf","kind":"comment","text":"Some basic questions:\n\n1) Is loss going down on the training set? If no, something is hosed.\n\n2) Can you get it to trivially overfit? Meaning, set train=val (and, optionally, set train to something really trivial like 10-100 examples) and see accuracy/f1 go to ~100%?\n\nIf you can't do the above, something is almost certainly broken in your implementation.","timestamp":"2023-03-26T21:56:32+00:00","score":3},{"role":"OP","user_id":"anon_6b980150447f33bc","comment_id":"jdzkkyt","kind":"comment","text":"Hi sorry I forgot about this post am idiot but thank you so much for your response!\n\n&#x200B;\n\n1. Loss is hovering at similar scores after implementing Precision and Recall as metrics, with these metrics not increasing from 0 even over many epochs.\n2. I can try this but could I clarify - does this mean setting the amount of training data to equal that of validation data? I will try and train on smaller sets of examples and see how it goes.","timestamp":"2023-03-28T10:34:15+00:00","score":1},{"role":"answerer","user_id":"anon_3aa37d6cc70e86a8","comment_id":"je116ko","kind":"comment","text":"> I can try this but could I clarify - does this mean setting the amount of training data to equal that of validation data? I will try and train on smaller sets of examples and see how it goes.\n\nBasically.\n\nThere is nothing deeply scientific here--just trying to set things up in a way that is so trivial that the model *must* be able to solve it (if it is a good model).\n\nSo do something like take 100 labels and train. If you can't get loss to converge to zero (after doing many, many epochs), probably something is wrong with your build-out.","timestamp":"2023-03-28T17:15:26+00:00","score":1},{"role":"OP","user_id":"anon_6b980150447f33bc","comment_id":"je4b90g","kind":"comment","text":"Thank you so much for your advice I really appreciate it!","timestamp":"2023-03-29T09:27:15+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_6b980150447f33bc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3aa37d6cc70e86a8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jdsoxuf","thanks_reply_id":"jdzkkyt","post_score":8,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_e9bf75fe351be2bb","answerer_user_id":"anon_710ae60ecf8e2389","subreddit":"LanguageTechnology","timestamp":"2023-03-30T16:48:41+00:00","post_id":"126sjj0","question":"for comparing the semantic distance of different words, what word embedding should I choose in 2023?\n\nContext: I had a relatively small corpus like The New York Times Annotated Corpus devided into different years so that I should have a few sub-corpus with less text.\n\nP.S. NYT corpus have over 1.8 million articles written in 20 years.","preferred_answer":"You will get models sensitive to different axes of semantics according to what you choose:\n\n* Word2Vec - basic similarness including hypernoym etc relations, struggles with polysemy\n* SentenceTransformers like Mini-v2 - similarness amongst similar things, similar themes, similar adjectives too\n* Generative models (e.g. GPT-J, old OpenAI embeddings) - sensitive to adjectives and how tokens change entire meaning of sentences (e.g. sensitive to 'not')\n* Purpose-specific SBERT models/crossencoders - depends on order and more nuanced outputs like if one sentence depends on another or not (for special use cases)\n\nThe latter 3 have a more up to date vocabulary. There are also multilingual options.","full_conversation":[{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"126sjj0","kind":"post","text":"for comparing the semantic distance of different words, what word embedding should I choose in 2023?\n\nContext: I had a relatively small corpus like The New York Times Annotated Corpus devided into different years so that I should have a few sub-corpus with less text.\n\nP.S. NYT corpus have over 1.8 million articles written in 20 years.","timestamp":"2023-03-30T16:48:41+00:00","score":9},{"role":"answerer","user_id":"anon_710ae60ecf8e2389","comment_id":"jebi8w5","kind":"comment","text":"You will get models sensitive to different axes of semantics according to what you choose:\n\n* Word2Vec - basic similarness including hypernoym etc relations, struggles with polysemy\n* SentenceTransformers like Mini-v2 - similarness amongst similar things, similar themes, similar adjectives too\n* Generative models (e.g. GPT-J, old OpenAI embeddings) - sensitive to adjectives and how tokens change entire meaning of sentences (e.g. sensitive to 'not')\n* Purpose-specific SBERT models/crossencoders - depends on order and more nuanced outputs like if one sentence depends on another or not (for special use cases)\n\nThe latter 3 have a more up to date vocabulary. There are also multilingual options.","timestamp":"2023-03-30T20:23:27+00:00","score":3},{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"jerraky","kind":"comment","text":"thank you very much for your detailed reply! the main purpose of mine is to find group stereotypes, e.g. gender, ethnicity. Discover, what adjective is used to describe female/ male, and what job does each gender is frequently associated with. I wonder Which word embedding is best used for this goal? \nI have seen paper using fasttext and word2vec. Are they still the better choice presently?","timestamp":"2023-04-03T10:41:47+00:00","score":1},{"role":"answerer","user_id":"anon_710ae60ecf8e2389","comment_id":"jet0btm","kind":"comment","text":"No worries!\n\nWhen you say associated, there are a couple of ways to measure that, which change what you'd aim to do.\n\n**a) Pre-2k** If you want to associate co-occurence (more or less, correlation), you could do this for your own given corpus of text (a body of text to analyse for the relations, where you could input known stereotype tags like 'man' and see what co-occurs more than others in the group (e.g. woman). Psychology research tends to do this. This is not necessarily a rigorous method due to the importance of words like 'not' in sentences, tone and sarcasm which are not detected well (whereas for b below, they are better 'detected'). Nonetheless, major research papers like those \"virtually modelling whether psychology studies will replicate\" end up with press and popularity with this method.\n\n **b) Transformers/embedding models** You can measure the bias\\* of models around gender in complex ways for more advanced models. Some papers use the OpenAI API-based GPT models, and see how the log\\_probs\\*\\* change for different possible ethnicities. These reveal deeper biases in the models so to say and what they have learned from their training data. The SBERT library (sentence\\_transformers) may also be interesting.\n\n**c) Pre-transformer approaches** Lastly, you could use fasttext(can't speak much to this due to lacking experience) or word2vec, to look at how the vectors there exist in vector space, particularly in terms of cosine similarity.\n\nFor example, an absolute classic example is that the embeddings for these words work in this fashion: \"King - Man + Woman = Queen!\"\n\nYou could explore how this holds up with negative stereotypes. Imagine changing the \"Queen\" / \"King\" into specific jobs etc. (A number of papers have done this)\n\n\\*Bias as in the more sociological definition and not meaning Bias/Variance of the weights\n\n\\*\\* log\\_probs are the probabilities(kind of) for outputting each possible token(word) as a continuation in a sentence.","timestamp":"2023-04-03T16:48:19+00:00","score":2},{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"jetr5pu","kind":"comment","text":"thank you again for sharing these knowledge. \nUpon reading your answer, I think I should choose between sBERT and fasttext. Fasttext is relative easy to use and can capture 'not' relationship in my understanding.\nHowever, as I am more ignorent to sBERT, could you please elaborate on sBERT or provide names of some papers using it to fulfill similar goals?\n\nmy goal is the following, if it does not bother you so much:\nI wish to capture group bias by finding adj words closest to, for example, man or woman( I know a way to do this is to compute the cosine similarity in fasttext wordembeddings), and maybe doing sentimental analysis and topic modelling for each paragraph containing these words( man or woman etc.).\n\nAlso, I wish to run these models on my own corpora so that I can compare the gender bias in different corpus. It seems to me that sBERT can be fine-tuned on custom corpus, in contrast to fasttext that is trained on each corpus from scratch. Would this fine-tune ineffecitve given that I have only small corpora?","timestamp":"2023-04-03T19:43:41+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e9bf75fe351be2bb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_710ae60ecf8e2389","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jebi8w5","thanks_reply_id":"jerraky","post_score":9,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_beaafc2460260060","answerer_user_id":"anon_d95ebf07665340b9","subreddit":"LanguageTechnology","timestamp":"2023-04-08T10:27:21+00:00","post_id":"12fhw02","question":"[D] Why does the decoder-only architecture for the GPT models work better than using an encoder for the prompt?\n\nI would imagine there's both compressional and computational advantages of using an encoder for the input. The representations would be able to get information from all the tokens in the prompt instead of only the previous tokens, and more computations would be done in parallel.\n\nThe only thing I can think of is that you can use the same weights for both the prompt and output.","preferred_answer":"to my understanding, encoder - decoder architecture is suitable typically when you have fixed paired input. \n\nwhat encoder does is it takes input, transforms it to the state where it can be consumed by decoder in it's entirety. also it will be kept static for a one decoding parse.\n\nwhen I do auto regressive task like predicting next token given previous token, see that the above stuff which is provided by encoder is already present with us in the form of embeddings of previous tokens ( the state or embedding values of previous tokens will be un-changed while the current token is being predicted,right?) \n\nI hope i haven't confused you more. feel free to ask in case of any doubt.","full_conversation":[{"role":"OP","user_id":"anon_beaafc2460260060","comment_id":"12fhw02","kind":"post","text":"[D] Why does the decoder-only architecture for the GPT models work better than using an encoder for the prompt?\n\nI would imagine there's both compressional and computational advantages of using an encoder for the input. The representations would be able to get information from all the tokens in the prompt instead of only the previous tokens, and more computations would be done in parallel.\n\nThe only thing I can think of is that you can use the same weights for both the prompt and output.","timestamp":"2023-04-08T10:27:21+00:00","score":30},{"role":"answerer","user_id":"anon_d95ebf07665340b9","comment_id":"jffihku","kind":"comment","text":"to my understanding, encoder - decoder architecture is suitable typically when you have fixed paired input. \n\nwhat encoder does is it takes input, transforms it to the state where it can be consumed by decoder in it's entirety. also it will be kept static for a one decoding parse.\n\nwhen I do auto regressive task like predicting next token given previous token, see that the above stuff which is provided by encoder is already present with us in the form of embeddings of previous tokens ( the state or embedding values of previous tokens will be un-changed while the current token is being predicted,right?) \n\nI hope i haven't confused you more. feel free to ask in case of any doubt.","timestamp":"2023-04-08T10:52:19+00:00","score":14},{"role":"OP","user_id":"anon_beaafc2460260060","comment_id":"jfhg124","kind":"comment","text":"Thanks for the explanation. \n\nWhy would the encoder-decoder be more suitable to fixed paired inputs? \n\nThe 2nd and 3rd paragraphs makes sense to me, unless I have a blindspot, but I still don't see how a decoder would be advantageous over an encoder for consuming the prompt.","timestamp":"2023-04-08T19:50:37+00:00","score":3},{"role":"answerer","user_id":"anon_d95ebf07665340b9","comment_id":"jfhkk4s","kind":"comment","text":"let me rephrase what i meant by paired inputs \n\nIn general, ML inputs are like this where Xi is sample from some distribution and yi is either a class or a numeral (let's say label) ... your task would be to train a network which given Xi ..pops up yi\n\nNow assume that there are two distribution, X and T and you have data points like , .... and task is that given Xi the network should Output Yi ...this kind of task and corresponding input is what I ment by paired input. Classic example of this us Machine translation where Xi is sentences in language 1 and and Ti is translated sentences in language 2. but it's not limited to just NLP ... Xi could be an image and Ti could be a text or vice versa.\n\nEncoder decoder are typically used for task like above.\n\nThat being said you can very well use just a decoder only network for machine translation... How ?\n\njust train the decoder in such way that you put Xi as a promt and the Ti will be predicted token by token.. then question arises why Transformer people used encoder... that's because sequence length of decoder. It would be too large in the above case where we simply use Xi as promt. \n\nBut the actual prompts doesn't have un manageable sequence length + prompts (token of prompts) are generally from the same distribution as their corresponding Ti ( by that I mean generally the language of prompt and output is same)\n\nbecause of above two advantage decoder only network is used in LLMs\n\nIn addition you can read a blog or article by andrej Karpathy on GPT .. (nanoGPT or minGPT i don't recall exactly) where he explains like prompt help gpt to locate the point in embedding space space from where it to start writing. I'll paste a link if i have that in my history or bookmark else you have to google it. that explanation was good enough for me.\n\n\nWith all that, Just in case you stumble upon such data set where prompt size is super duper large, there you can actually use encoder decoder way of doing the fine-tuning.","timestamp":"2023-04-08T20:24:02+00:00","score":1},{"role":"OP","user_id":"anon_beaafc2460260060","comment_id":"jfhu9e0","kind":"comment","text":"From the explanation above, I'm feeling like there's an assumption, that for an encoder-decoder model, the input tokens Xi are different from the output tokens Ti. That's what I'm getting when you wrote \"But the actual prompts doesn't have un manageable sequence length + prompts (token of prompts) are generally from the same distribution as their corresponding Ti ( by that I mean generally the language of prompt and output is same)\" as a reason for decoder-only networks. \n\nI also feel that there's another assumption that for the encoder-decoder model the length of the output must be the same as the length of the input, in terms of tokens. Is that true?","timestamp":"2023-04-08T21:35:42+00:00","score":1},{"role":"answerer","user_id":"anon_d95ebf07665340b9","comment_id":"jfhvrab","kind":"comment","text":"that's not true ... both input output sequence length can be of any size, doesn't have to be same .... also no one to one correspondence to token is required.","timestamp":"2023-04-08T21:46:50+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_beaafc2460260060","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d95ebf07665340b9","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jffihku","thanks_reply_id":"jfhg124","post_score":30,"answer_score":14,"preferred_answer_is_top_level":true}} {"user_id":"anon_9eefd754531f6597","answerer_user_id":"anon_0269a0af524be0a7","subreddit":"LanguageTechnology","timestamp":"2023-04-12T19:26:12+00:00","post_id":"12jvz8b","question":"Specializing in NLU?\n\nI don’t see that many job descriptions for NLU (compared to NLP), but I think considering my background in linguistics, it might make more sense to bet on that. \n\nAnyone who works in the field and can give me some tips on how to learn more about it? I‘ve found the Stanford NLU course, but is there something better out there to start and get practice?\n\nGenerally, I am wondering which jobs can actually benefit from linguists, since I see a lot of people working in NLP coming from CS degrees.","preferred_answer":"NLU appears to be another ill-defined buzzword which doesn't mean much. It's just another acronym you may need on your resume so recruiters will find it. That's what it looks like to me; I've been doing this for many years.\n\nMany industry terms are like this, used in imprecise ways often due to dictates of marketing.\n\nNLP/U is basically machine learning with human language. A lot of CS people do it because ML requires skills closer to what CS students typically acquire in school and hone in their careers.\n\nThis isn't to say a linguistics background is useless. Far from it. I studied to be a linguist myself. There are many kinds of linguists though, and many varied specializations. Some involve a lot of statistics for instance, some rigorous formal math-like work, while some are not very different from humanities, meaning they provide little or no relevant preparation for NLP work.\n\nIn part because a lot of linguistics education people get is closer to the humanities side of things, when you do see \"linguist\" jobs advertised in ML, it's usually these annotation jobs. Essentially this involves creating training data to be fed into the models and/or evaluating the results from the models. This is boring, undervalued work which does not pay particularly well and usually doesn't offer much upward mobility. These can be ok if you just need to make a little money for a bit but I wouldn't recommend them if you have other options.","full_conversation":[{"role":"OP","user_id":"anon_9eefd754531f6597","comment_id":"12jvz8b","kind":"post","text":"Specializing in NLU?\n\nI don’t see that many job descriptions for NLU (compared to NLP), but I think considering my background in linguistics, it might make more sense to bet on that. \n\nAnyone who works in the field and can give me some tips on how to learn more about it? I‘ve found the Stanford NLU course, but is there something better out there to start and get practice?\n\nGenerally, I am wondering which jobs can actually benefit from linguists, since I see a lot of people working in NLP coming from CS degrees.","timestamp":"2023-04-12T19:26:12+00:00","score":9},{"role":"answerer","user_id":"anon_0269a0af524be0a7","comment_id":"jg287rx","kind":"comment","text":"NLU appears to be another ill-defined buzzword which doesn't mean much. It's just another acronym you may need on your resume so recruiters will find it. That's what it looks like to me; I've been doing this for many years.\n\nMany industry terms are like this, used in imprecise ways often due to dictates of marketing.\n\nNLP/U is basically machine learning with human language. A lot of CS people do it because ML requires skills closer to what CS students typically acquire in school and hone in their careers.\n\nThis isn't to say a linguistics background is useless. Far from it. I studied to be a linguist myself. There are many kinds of linguists though, and many varied specializations. Some involve a lot of statistics for instance, some rigorous formal math-like work, while some are not very different from humanities, meaning they provide little or no relevant preparation for NLP work.\n\nIn part because a lot of linguistics education people get is closer to the humanities side of things, when you do see \"linguist\" jobs advertised in ML, it's usually these annotation jobs. Essentially this involves creating training data to be fed into the models and/or evaluating the results from the models. This is boring, undervalued work which does not pay particularly well and usually doesn't offer much upward mobility. These can be ok if you just need to make a little money for a bit but I wouldn't recommend them if you have other options.","timestamp":"2023-04-13T06:05:02+00:00","score":8},{"role":"OP","user_id":"anon_9eefd754531f6597","comment_id":"jg2o21l","kind":"comment","text":"Thanks for helping me clear this up! I’m currently following a NLP course by DeepLearning.AI, but I’m already a bit frustrated looking at job descriptions. It seems that there are no “Junior” positions for ML and all companies want at least 2 years of experience.","timestamp":"2023-04-13T09:45:48+00:00","score":1},{"role":"answerer","user_id":"anon_0269a0af524be0a7","comment_id":"jg3s1lg","kind":"comment","text":"This is unfortunately the case in many areas, even software engineering to a lesser degree. Getting that first job isn't easy. Also, some of the recent layoffs were in ML depts and the bank runs have probably cooled off the startup market considerably. It's not a great time to be looking for a job. But if you stick with it you'll find something. Good luck!","timestamp":"2023-04-13T15:26:22+00:00","score":5}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9eefd754531f6597","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0269a0af524be0a7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jg287rx","thanks_reply_id":"jg2o21l","post_score":9,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_6880a13efcd98046","answerer_user_id":"anon_8a084c422ce60a3c","subreddit":"LanguageTechnology","timestamp":"2023-04-22T10:08:14+00:00","post_id":"12v1epp","question":"Any ideas for NLP end-to-end projects or blogs for a beginner with a linguistics background to boost their CV?\n\nHey everyone,\n\nI'm a beginner in the field of Natural Language Processing with a background in linguistics. I'm trying to add some impressive projects to my CV and expand my knowledge in the field.\n\nI was wondering if anyone has any suggestions for end-to-end projects in NLP or any blogs that I could work on? I'm looking for projects that are both challenging and rewarding and can showcase my skills to potential employers.\n\nAny suggestions or ideas would be greatly appreciated! Thanks in advance.","preferred_answer":"Create a knowledge graph with just text?\n\nIt'll require quite abit of steps. Entity recognition, entity disambiguation, entity-linking, part of speech tagging, etc.\n\nOr maybe network graph (looks cool but I dont particularly think it'll be too difficult).\n\nOr some sort of topic modelling/clustering with news. Useful, and pretty easy.\n\nMake a question-answering chat bot?","full_conversation":[{"role":"OP","user_id":"anon_6880a13efcd98046","comment_id":"12v1epp","kind":"post","text":"Any ideas for NLP end-to-end projects or blogs for a beginner with a linguistics background to boost their CV?\n\nHey everyone,\n\nI'm a beginner in the field of Natural Language Processing with a background in linguistics. I'm trying to add some impressive projects to my CV and expand my knowledge in the field.\n\nI was wondering if anyone has any suggestions for end-to-end projects in NLP or any blogs that I could work on? I'm looking for projects that are both challenging and rewarding and can showcase my skills to potential employers.\n\nAny suggestions or ideas would be greatly appreciated! Thanks in advance.","timestamp":"2023-04-22T10:08:14+00:00","score":14},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"jh9appu","kind":"comment","text":"Create a knowledge graph with just text?\n\nIt'll require quite abit of steps. Entity recognition, entity disambiguation, entity-linking, part of speech tagging, etc.\n\nOr maybe network graph (looks cool but I dont particularly think it'll be too difficult).\n\nOr some sort of topic modelling/clustering with news. Useful, and pretty easy.\n\nMake a question-answering chat bot?","timestamp":"2023-04-22T11:19:30+00:00","score":6},{"role":"OP","user_id":"anon_6880a13efcd98046","comment_id":"jh9awlz","kind":"comment","text":"Thank you for your response! Those are great ideas for NLP projects. I particularly like the idea of creating a knowledge graph with just text, as it seems like it would require a lot of different NLP techniques to complete.\n\nI also appreciate the suggestion of creating a question-answering chatbot, which I think could be both challenging and practical.\n\nDo you have any resources or tutorials that you would recommend for someone just starting out with these types of projects? Any advice would be greatly appreciated!","timestamp":"2023-04-22T11:21:52+00:00","score":1},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"jh9f8t1","kind":"comment","text":"https://youtu.be/L8U-pm-vZ4c\n\nI like this guy's content.","timestamp":"2023-04-22T12:12:14+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6880a13efcd98046","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a084c422ce60a3c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jh9appu","thanks_reply_id":"jh9awlz","post_score":14,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_bda4e24ede6e3935","answerer_user_id":"anon_d1607d317b158605","subreddit":"LanguageTechnology","timestamp":"2023-04-25T16:41:32+00:00","post_id":"12yophy","question":"Is it a good idea to go into NLP/Computational Lingustics now?\n\nI'm preparing to apply for some Master's programs in NLP, but I'm having second thoughts, mainly because of the whole GPT situation. The areas that initially interested me (like text mining or sentiment analysis) seem like they've been taken over by large language models. \n\nI've always liked programming and figured going into NLP would be a good idea to use my Linguistics degree. Is that not the case anymore?","preferred_answer":"In that case, I'd recommend a more general degree like a Computer Science MS or a Data Science MS - it'll expand your options considerably and won't exclude you from taking an NLP job if you can get it. \n\n\nI've worked in industry doing NLP for close to a decade now doing applied problems (e.g., customer understanding systems), and watched as the space has become more and more commoditized (meaning for most standard tasks people want to do in industry, there are cheap off the shelf solutions they can just pay for instead of hiring a specialist). \n\n\nDeep research specialization will still be needed for the cutting edge and for very large companies that can get value out of squeezing an extra percent or two of performance out of a system, as well as companies whose primary product is something NLP related, but many jobs many people will be defaulting to people just calling LLM APIs I'm afraid. \n\n\nAs for linguistics knowledge.... the industry/applied route relied heavily on that in the early days of NLP when you needed to do sophisticated feature engineering to make good system. These days that's far less important. You can't be dumb about language, but going deep on linguistics doesn't add much to the majority of industry applied problems when you have a huge model that already has a sophisticated naturalistic understanding of language that can interpret it into any task you can think of. \n\n\nGood luck! NLP is a more fun place to be than ever, but it's rapidly changing!","full_conversation":[{"role":"OP","user_id":"anon_bda4e24ede6e3935","comment_id":"12yophy","kind":"post","text":"Is it a good idea to go into NLP/Computational Lingustics now?\n\nI'm preparing to apply for some Master's programs in NLP, but I'm having second thoughts, mainly because of the whole GPT situation. The areas that initially interested me (like text mining or sentiment analysis) seem like they've been taken over by large language models. \n\nI've always liked programming and figured going into NLP would be a good idea to use my Linguistics degree. Is that not the case anymore?","timestamp":"2023-04-25T16:41:32+00:00","score":26},{"role":"answerer","user_id":"anon_d1607d317b158605","comment_id":"jht0pen","kind":"comment","text":"In that case, I'd recommend a more general degree like a Computer Science MS or a Data Science MS - it'll expand your options considerably and won't exclude you from taking an NLP job if you can get it. \n\n\nI've worked in industry doing NLP for close to a decade now doing applied problems (e.g., customer understanding systems), and watched as the space has become more and more commoditized (meaning for most standard tasks people want to do in industry, there are cheap off the shelf solutions they can just pay for instead of hiring a specialist). \n\n\nDeep research specialization will still be needed for the cutting edge and for very large companies that can get value out of squeezing an extra percent or two of performance out of a system, as well as companies whose primary product is something NLP related, but many jobs many people will be defaulting to people just calling LLM APIs I'm afraid. \n\n\nAs for linguistics knowledge.... the industry/applied route relied heavily on that in the early days of NLP when you needed to do sophisticated feature engineering to make good system. These days that's far less important. You can't be dumb about language, but going deep on linguistics doesn't add much to the majority of industry applied problems when you have a huge model that already has a sophisticated naturalistic understanding of language that can interpret it into any task you can think of. \n\n\nGood luck! NLP is a more fun place to be than ever, but it's rapidly changing!","timestamp":"2023-04-26T16:52:23+00:00","score":3},{"role":"OP","user_id":"anon_bda4e24ede6e3935","comment_id":"jhtjo53","kind":"comment","text":"Thanks! Because of my undergraduate degree it's pretty much impossible for me to get into a CS or Date Science MS. I figured that, in the worst case scenario, I'd graduate from an NLP Master's with a few projects, programming and ML experience under my belt, and would be able to find a job as a software engineer or something similar. I am fully prepared for the lack of linguistics, though.","timestamp":"2023-04-26T18:54:41+00:00","score":2},{"role":"answerer","user_id":"anon_d1607d317b158605","comment_id":"ji0y92z","kind":"comment","text":"Georgia Tech online CS program MS seems pretty accessible, and it’s a good school. You might check it out","timestamp":"2023-04-28T07:16:33+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bda4e24ede6e3935","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d1607d317b158605","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jht0pen","thanks_reply_id":"jhtjo53","post_score":26,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_d86be007bf624d3b","answerer_user_id":"anon_b913ab200a03590e","subreddit":"LanguageTechnology","timestamp":"2023-04-25T22:19:00+00:00","post_id":"12yy0ok","question":"Best pathway for Domain Adaptation with Sentence Transformers?\n\nHi everyone,\n\nCurrently trying to build a semantic search model for a medical application. I have been working in the NLP space in medicine for a while now and have been reliant on my trusty fine-tuned BERT MLM for quite a few downstream tasks. I'm looking to tackle semantic search now and I'm just curious if I'm going about it the right way.\n\nThese are the primary resources that I've been reading into: \n\nhttps://www.sbert.net/examples/unsupervised_learning/README.html\n\nhttps://www.sbert.net/examples/domain_adaptation/README.html\n\nhttps://www.sbert.net/examples/training/ms_marco/README.html\n\nMS MARCO is specifically interesting to me because I will be doing asymmetric search of reports with small keyword queries, like looking for diagnosis or procedures or outcomes.\n\nTo that end, my plan was to:\n\n1) Utilize my corpus-tuned MLM as a backbone for my bi-encoder.\n\n2) Train a bi-encoder using MS MARCO\n\n3) Using Generated Pseudo Labels from a corpus of medical reports to fine-tune the bi-encoder above\n\n4) Throw generated pseudo label pairs into a labelling software and build a dataset big enough to train a cross-encoder as a back-up.\n\nI went ahead and trained using both MNRL and MarginMSE with MS MARCO and found that my model performed quite poorly afterwards. I guess this isn't that unexpected, as the MS MARCO data are all sorts of Bing queries, and my MLM is very domain specific. However, before I spend a bunch of time going to step 3, I just want to make sure that my logic is sound. Is there a better way to build a domain-specific semantic search model other than Sentence-Transformers and is my line of thinking around asymmetric search correct?","preferred_answer":"If you have the funds generate a bunch of query answer pairs using a strong llm like gpt3.5, check out the promptgator and inpars papers.","full_conversation":[{"role":"OP","user_id":"anon_d86be007bf624d3b","comment_id":"12yy0ok","kind":"post","text":"Best pathway for Domain Adaptation with Sentence Transformers?\n\nHi everyone,\n\nCurrently trying to build a semantic search model for a medical application. I have been working in the NLP space in medicine for a while now and have been reliant on my trusty fine-tuned BERT MLM for quite a few downstream tasks. I'm looking to tackle semantic search now and I'm just curious if I'm going about it the right way.\n\nThese are the primary resources that I've been reading into: \n\nhttps://www.sbert.net/examples/unsupervised_learning/README.html\n\nhttps://www.sbert.net/examples/domain_adaptation/README.html\n\nhttps://www.sbert.net/examples/training/ms_marco/README.html\n\nMS MARCO is specifically interesting to me because I will be doing asymmetric search of reports with small keyword queries, like looking for diagnosis or procedures or outcomes.\n\nTo that end, my plan was to:\n\n1) Utilize my corpus-tuned MLM as a backbone for my bi-encoder.\n\n2) Train a bi-encoder using MS MARCO\n\n3) Using Generated Pseudo Labels from a corpus of medical reports to fine-tune the bi-encoder above\n\n4) Throw generated pseudo label pairs into a labelling software and build a dataset big enough to train a cross-encoder as a back-up.\n\nI went ahead and trained using both MNRL and MarginMSE with MS MARCO and found that my model performed quite poorly afterwards. I guess this isn't that unexpected, as the MS MARCO data are all sorts of Bing queries, and my MLM is very domain specific. However, before I spend a bunch of time going to step 3, I just want to make sure that my logic is sound. Is there a better way to build a domain-specific semantic search model other than Sentence-Transformers and is my line of thinking around asymmetric search correct?","timestamp":"2023-04-25T22:19:00+00:00","score":9},{"role":"answerer","user_id":"anon_b913ab200a03590e","comment_id":"jhqcgxi","kind":"comment","text":"If you have the funds generate a bunch of query answer pairs using a strong llm like gpt3.5, check out the promptgator and inpars papers.","timestamp":"2023-04-26T01:37:19+00:00","score":2},{"role":"OP","user_id":"anon_d86be007bf624d3b","comment_id":"jhsuc9q","kind":"comment","text":"That is fantastic, thank you so much for the reading material. Just had a quick glance through Promptgator, it's a great use of an LLM to speed up the process; I guess as a pre-cursor to spending the money to use gpt3.5, I can simulate it using the GPL technique from sbert. Obviously it'll be shit in comparison but if it shows evidence that domain-specific pseudo-labelling can improve the performance significantly, then I can utilize the technique from Promptgator to create an incredibly high quality dataset.","timestamp":"2023-04-26T16:10:49+00:00","score":2},{"role":"answerer","user_id":"anon_b913ab200a03590e","comment_id":"jhsxah8","kind":"comment","text":"Good luck! just a heads up the GPL method requires a good cross encoder to properly label negative passages, so you may want to make sure that an sbert out of the box cross encoder scores your generated query answer pairs well.","timestamp":"2023-04-26T16:30:05+00:00","score":2},{"role":"OP","user_id":"anon_d86be007bf624d3b","comment_id":"jht2k36","kind":"comment","text":"The base MS Marco cross-encoder actually does quite well as a re-ranker for the test queries I've done so far using my pre-GPL models! \n\nAnnoyingly, when I use the MSMarco Cross Encoder training script with my MLM, the results are awful. It seemingly does well against the evaluation script, but against real world data, it feels like it has lost its domain knowledge and just predicts 0% for everything.","timestamp":"2023-04-26T17:04:19+00:00","score":1},{"role":"answerer","user_id":"anon_b913ab200a03590e","comment_id":"jhtebbz","kind":"comment","text":"Are you using one of these?\nhttps://github.com/UKPLab/sentence-transformers/blob/master/examples/training/ms_marco/train_bi-encoder_mnrl.py\nhttps://github.com/UKPLab/sentence-transformers/blob/master/examples/training/ms_marco/train_bi-encoder_mnrl.py","timestamp":"2023-04-26T18:20:03+00:00","score":1},{"role":"OP","user_id":"anon_d86be007bf624d3b","comment_id":"jhtphyo","kind":"comment","text":"https://github.com/UKPLab/sentence-transformers/blob/master/examples/training/ms_marco/train_bi-encoder_mnrl.py\n\nhttps://github.com/UKPLab/sentence-transformers/blob/master/examples/training/ms_marco/train_bi-encoder_margin-mse.py\n\nI used these to train my initial MNRL and MarginMSE bi-encoders. \n\nhttps://github.com/UKPLab/sentence-transformers/blob/master/examples/training/ms_marco/train_cross-encoder_scratch.py\n\nI used this to train the cross encoder.","timestamp":"2023-04-26T19:31:44+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_d86be007bf624d3b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b913ab200a03590e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jhqcgxi","thanks_reply_id":"jhsuc9q","post_score":9,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_81f72289cbd560cb","answerer_user_id":"anon_fd834b92314ba53d","subreddit":"LanguageTechnology","timestamp":"2023-04-27T12:49:04+00:00","post_id":"130l3wi","question":"LSA/LSI in modern semantic search/QA\n\nAfter many years in speech technology I have recently found a new interest in NLP and semantic search/QA.\n\nI don’t have any real world experience of this domain so I am wondering about how LSI/LSA fit in with modern solutions based on word/document embeddings and neural network language models.\n\nDo people still use LSA/LSI in the pipeline or is it more used in exploratory data analysis?","preferred_answer":"AFAIK, not very common anymore.\nTheir main use of LSA in IR was to create essentially embeddings.\nAs you are new to the field, a small historical overview on why LSI came to be, why it was used and how it’s (mostly) outdated now:\n\nSearch is about finding relevant documents to a query. In most common cases, documents and queries are pieces of text, with queries being considerably smaller than the documents.\n\nSo, imagine a user query “siamese cat”. most IR techniques were (and still are) focused in finding all documents that contains “cat” and “siamese”, and then rank them according to some ruling. For instance, you may want to rank documents with with more occurrences of “siamese” and “cat” a higher score (TF). You may also want to give documents with the rarer word, like siamese , a higher score (IDF). You may also want to give a higher score to documents with “Siamese” and “cat” closer together, and so on.\n\nThe problem is that users are REALLY bad at transforming their information need (e.g. “I want to know how a Siamese cat behaves and how different it is from a Cornish Rex”) into a few words (“siamese cat”). This is called the “vocabulary mismatch” problem, where the vocabulary of the query and the vocabulary of a relevant document don’t align. So, tradicional methods like BM25 would not rank documents that could be relevant in high enough positions. \n\nFor decades, IR was all about trying to solving this problem. How do we rewrite the user query (or the documents) to create better matches? Things like thesaurus, query expansions, lemmatization, is all about trying to fix this. \n\nAnother approach is to use the *semantics* of the query and documents instead of the *syntactic*. Here is where things like LSI come in hand. Starting from the term count vector (i.e., a vector with a potentially enormous dimension where each position is the number of times each term appear in the document), LSI creates a smaller vector where each dimension don't necessarily have a specific meaning, but rather the whole vector have a semantic meaning. This way, a document with semantically similar meaning, but syntactic different representation (I.e., different terms) could be matched to queries with different terms, but similar meaning. \n\nThe problem is that nowadays we have other methods that are considerably better at doing the exact same thing (transforming a document/query) into a numerical vector with that captures the semantics of the text, alleviating (but not solving!) the vocabulary mismatch problem. Things like Word2Vec and transformers models do a way better job at this than LSI/LSA. \n\nSo, while LSA may be useful to quickly understand a new corpus, it was mostly superseded by neural models based on pre-trained language models for creating embeddings.","full_conversation":[{"role":"OP","user_id":"anon_81f72289cbd560cb","comment_id":"130l3wi","kind":"post","text":"LSA/LSI in modern semantic search/QA\n\nAfter many years in speech technology I have recently found a new interest in NLP and semantic search/QA.\n\nI don’t have any real world experience of this domain so I am wondering about how LSI/LSA fit in with modern solutions based on word/document embeddings and neural network language models.\n\nDo people still use LSA/LSI in the pipeline or is it more used in exploratory data analysis?","timestamp":"2023-04-27T12:49:04+00:00","score":6},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"jhxgh45","kind":"comment","text":"AFAIK, not very common anymore.\nTheir main use of LSA in IR was to create essentially embeddings.\nAs you are new to the field, a small historical overview on why LSI came to be, why it was used and how it’s (mostly) outdated now:\n\nSearch is about finding relevant documents to a query. In most common cases, documents and queries are pieces of text, with queries being considerably smaller than the documents.\n\nSo, imagine a user query “siamese cat”. most IR techniques were (and still are) focused in finding all documents that contains “cat” and “siamese”, and then rank them according to some ruling. For instance, you may want to rank documents with with more occurrences of “siamese” and “cat” a higher score (TF). You may also want to give documents with the rarer word, like siamese , a higher score (IDF). You may also want to give a higher score to documents with “Siamese” and “cat” closer together, and so on.\n\nThe problem is that users are REALLY bad at transforming their information need (e.g. “I want to know how a Siamese cat behaves and how different it is from a Cornish Rex”) into a few words (“siamese cat”). This is called the “vocabulary mismatch” problem, where the vocabulary of the query and the vocabulary of a relevant document don’t align. So, tradicional methods like BM25 would not rank documents that could be relevant in high enough positions. \n\nFor decades, IR was all about trying to solving this problem. How do we rewrite the user query (or the documents) to create better matches? Things like thesaurus, query expansions, lemmatization, is all about trying to fix this. \n\nAnother approach is to use the *semantics* of the query and documents instead of the *syntactic*. Here is where things like LSI come in hand. Starting from the term count vector (i.e., a vector with a potentially enormous dimension where each position is the number of times each term appear in the document), LSI creates a smaller vector where each dimension don't necessarily have a specific meaning, but rather the whole vector have a semantic meaning. This way, a document with semantically similar meaning, but syntactic different representation (I.e., different terms) could be matched to queries with different terms, but similar meaning. \n\nThe problem is that nowadays we have other methods that are considerably better at doing the exact same thing (transforming a document/query) into a numerical vector with that captures the semantics of the text, alleviating (but not solving!) the vocabulary mismatch problem. Things like Word2Vec and transformers models do a way better job at this than LSI/LSA. \n\nSo, while LSA may be useful to quickly understand a new corpus, it was mostly superseded by neural models based on pre-trained language models for creating embeddings.","timestamp":"2023-04-27T15:20:29+00:00","score":5},{"role":"OP","user_id":"anon_81f72289cbd560cb","comment_id":"jhy1fdt","kind":"comment","text":"Thanks for this great answer! It’s as I suspected then. There are still a lot of references to LSA/LSI on the web regarding semantic search, but I guess it’s a good introduction to distributional semantic models still even though it’s a bit out dated.","timestamp":"2023-04-27T17:35:52+00:00","score":2},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"jhyd9wr","kind":"comment","text":"It's useful to understand a bunch of concepts related to it, that most \"semantic search\" approaches ignore, like exact matches, TF-IDF, what matching and ranking actually means, re-ranking, etc. Things that are VERY important in practice but most online tutorials on \"semantic search\" completely ignore (mostly from people with no IR background at all). \n\nPersonally, I don't like the name \"semantic search\". Every search is semantic by definition, and it has always been. The core of IR has always been to understand the semantic of the user information need expressed by a query and find documents that are relevant to that information need. Calling ANN search over document embeddings \"semantic search\" looks great on a investor pitch or in a paper, but ignores decades of \"semantic search\" research. (End of my ranting)","timestamp":"2023-04-27T18:53:21+00:00","score":2},{"role":"OP","user_id":"anon_81f72289cbd560cb","comment_id":"jhyhxe7","kind":"comment","text":"Heh, I see your point :)","timestamp":"2023-04-27T19:23:53+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_81f72289cbd560cb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fd834b92314ba53d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jhxgh45","thanks_reply_id":"jhy1fdt","post_score":6,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_05ea0f0eef9134ca","answerer_user_id":"anon_5cc02282fe511e5f","subreddit":"LanguageTechnology","timestamp":"2023-04-28T12:54:41+00:00","post_id":"131qxlv","question":"How far do you think we are from seeing a non-coding interface for market researchers to leverage NLP?\n\nNon-coder with limited understanding of NLP here. Would like this community's thoughts on this situation:\n\nLet's assume that you are a market researcher for a firm. The job is to constantly talk to consumers (online or otherwise) and ask open ended questions to gauge responses. The spoken words are transcribed or recorded for teams to read/listen and generate insights. There is a lot of text data and there are specialists who have built mental frameworks over decades to understand how consumer behaviour impacts business. \n\nIn the recent months, we have seen rapid advances in processing text data. Apps are being built to respond to customer queries (chatbots) or information retrieval (search) or generate summaries. Most of these tools need heavy dependency on developers for maintenance and constant remodeling. \n\nHowever, market researchers are sitting on tons of text data which are prime for automation. Instead of 2 researchers sitting through hours of interviews, it is theoretically possible for NLP tools to process the text for finding trends and summarise insights. However, marker researchers neither understand Python nor are they conversant with any coding. Therefore, would it be possible that in the future there can be self serving tools that transfer the power to end consumer? \n\nIn a very crude sense, here are some use cases:\n1. Researcher has text data where 10 open ended questions were posed to 20 respondents. These responses were (somehow) tagged and cleaned allowing for researchers to view network graphs and visualise clusters. They would be able to do actions like (a) drag and drop responses across questions (b) Compare trends across respondents (c) Find cohorts of users with similar tastes.\n\n2. Brands have a lot of literature about what the values they stand for and their implied positioning in the consumers mind. We could use this as a text input and map it against consumer responses to find need gaps. \n\nI come from a market research background and to my understanding these two use cases require significant code development across days or weeks. Are there any companies, firms that are working to bridge this gap?","preferred_answer":"All of this is possible, some of it being done, and not very expensive. It sounds like a great idea to seek funding.\n\nThere is no universal point-and-click solution as far as I know, like Excel or spss. However r/advertising is probably a better place to ask.","full_conversation":[{"role":"OP","user_id":"anon_05ea0f0eef9134ca","comment_id":"131qxlv","kind":"post","text":"How far do you think we are from seeing a non-coding interface for market researchers to leverage NLP?\n\nNon-coder with limited understanding of NLP here. Would like this community's thoughts on this situation:\n\nLet's assume that you are a market researcher for a firm. The job is to constantly talk to consumers (online or otherwise) and ask open ended questions to gauge responses. The spoken words are transcribed or recorded for teams to read/listen and generate insights. There is a lot of text data and there are specialists who have built mental frameworks over decades to understand how consumer behaviour impacts business. \n\nIn the recent months, we have seen rapid advances in processing text data. Apps are being built to respond to customer queries (chatbots) or information retrieval (search) or generate summaries. Most of these tools need heavy dependency on developers for maintenance and constant remodeling. \n\nHowever, market researchers are sitting on tons of text data which are prime for automation. Instead of 2 researchers sitting through hours of interviews, it is theoretically possible for NLP tools to process the text for finding trends and summarise insights. However, marker researchers neither understand Python nor are they conversant with any coding. Therefore, would it be possible that in the future there can be self serving tools that transfer the power to end consumer? \n\nIn a very crude sense, here are some use cases:\n1. Researcher has text data where 10 open ended questions were posed to 20 respondents. These responses were (somehow) tagged and cleaned allowing for researchers to view network graphs and visualise clusters. They would be able to do actions like (a) drag and drop responses across questions (b) Compare trends across respondents (c) Find cohorts of users with similar tastes.\n\n2. Brands have a lot of literature about what the values they stand for and their implied positioning in the consumers mind. We could use this as a text input and map it against consumer responses to find need gaps. \n\nI come from a market research background and to my understanding these two use cases require significant code development across days or weeks. Are there any companies, firms that are working to bridge this gap?","timestamp":"2023-04-28T12:54:41+00:00","score":6},{"role":"answerer","user_id":"anon_5cc02282fe511e5f","comment_id":"ji51wcr","kind":"comment","text":"All of this is possible, some of it being done, and not very expensive. It sounds like a great idea to seek funding.\n\nThere is no universal point-and-click solution as far as I know, like Excel or spss. However r/advertising is probably a better place to ask.","timestamp":"2023-04-29T02:58:54+00:00","score":2},{"role":"OP","user_id":"anon_05ea0f0eef9134ca","comment_id":"ji59ssf","kind":"comment","text":"Thanks for ur inputs. Funding is something I'm not looking at right now. I'm first trying to build a prototype. Would u be able to guide me thru any existing tools u may have come across?","timestamp":"2023-04-29T04:10:57+00:00","score":1},{"role":"answerer","user_id":"anon_5cc02282fe511e5f","comment_id":"ji5bxls","kind":"comment","text":"No problem! I'm a consultant and I can't provide that kind of guidance for free, but if you have broader questions and you post them on this platform, I'll be happy to help if I can.","timestamp":"2023-04-29T04:31:59+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_05ea0f0eef9134ca","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5cc02282fe511e5f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ji51wcr","thanks_reply_id":"ji59ssf","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4c553590a59ddc34","answerer_user_id":"anon_38e4ae68cb7139de","subreddit":"LanguageTechnology","timestamp":"2023-04-28T12:59:33+00:00","post_id":"131r1jp","question":"Who uses the INCEpTION platform to manually annotate their language data?\n\n[INCEpTION platform](https://inception-project.github.io/)\n\nWe use it all the time where I work, but what what about other workplaces? Is INCEpTION a big, established deal for NLP data collection needs and something which most NLP researchers/professionals have heard of? Or is it just some random thing on the internet that I just happen to use and which may fizzle out tomorrow?\n\nThe reason I ask is that I’m considering creating an open-source project to complement INCEpTION. But it will be quite time-consuming and involved, so I won’t do it if there’s no market for it.\n\nThanks!","preferred_answer":"I do! Love its integrations. Used it for a few years now.","full_conversation":[{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"131r1jp","kind":"post","text":"Who uses the INCEpTION platform to manually annotate their language data?\n\n[INCEpTION platform](https://inception-project.github.io/)\n\nWe use it all the time where I work, but what what about other workplaces? Is INCEpTION a big, established deal for NLP data collection needs and something which most NLP researchers/professionals have heard of? Or is it just some random thing on the internet that I just happen to use and which may fizzle out tomorrow?\n\nThe reason I ask is that I’m considering creating an open-source project to complement INCEpTION. But it will be quite time-consuming and involved, so I won’t do it if there’s no market for it.\n\nThanks!","timestamp":"2023-04-28T12:59:33+00:00","score":15},{"role":"answerer","user_id":"anon_38e4ae68cb7139de","comment_id":"ji47vvg","kind":"comment","text":"I do! Love its integrations. Used it for a few years now.","timestamp":"2023-04-28T23:08:26+00:00","score":1},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"ji4aziw","kind":"comment","text":"Good to know, thanks for the reply!\n\nDespite the dearth of other replies, the reasonable amount of upvotes for this relatively niche sub suggests to me that there are a decent amount of users. Or at least, that it's not the case that no one besides us has ever heard of INCEpTION...\n\nWhat are some of the integrations you like best, and why?\n\nAlso, what are some of the pain points you've experienced?","timestamp":"2023-04-28T23:32:00+00:00","score":1},{"role":"answerer","user_id":"anon_38e4ae68cb7139de","comment_id":"ji4i99j","kind":"comment","text":"My favorite is using OpenSearch as a document repository is fantastic since that's where my documents to annotate usually are. (I think it supports Apache Solr, too.) It also supports a lot of export formats. I also like using OpenNLP models as a recommender. I haven't annotated PDFs in it as much, but when I have I have been happy with it, too. It's been a crucial part of our annotation pipeline.\n\nEditing because I forgot to add pain points. The UI can be confusing at first. Once you get used to it, it makes sense. Updates are released frequently which is great, but if you like to always have the newest version of things, you can find yourself updating a lot. Nothing that can't be automated but just make sure to have backups. Installing on EC2 with nightly EBS lifecycle snapshots and the database in RDS helps with that.","timestamp":"2023-04-29T00:26:50+00:00","score":1},{"role":"OP","user_id":"anon_4c553590a59ddc34","comment_id":"ji4rgwm","kind":"comment","text":"Thanks for the detailed response.\n\nMind if I DM you with some followups? Nothing urgent or anything. I'd just like to describe the open-source project I'm proposing and see if it's something you might find useful or amenable to your INCePTION workflow/needs.","timestamp":"2023-04-29T01:36:39+00:00","score":1},{"role":"answerer","user_id":"anon_38e4ae68cb7139de","comment_id":"ji67s8r","kind":"comment","text":"Not at all. Happy to help.","timestamp":"2023-04-29T11:35:02+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_4c553590a59ddc34","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_38e4ae68cb7139de","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ji47vvg","thanks_reply_id":"ji4aziw","post_score":15,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_790f88e649ba7aec","answerer_user_id":"anon_5cc02282fe511e5f","subreddit":"LanguageTechnology","timestamp":"2023-04-29T01:21:35+00:00","post_id":"132fjyr","question":"What Language Tech exists that can aid auto-assessing content quality?\n\nI manage a large workforce of content writers and also mixing in AI content where appropriate. I am looking for ways/heuristics to assess subjective \"quality\" of the writing, mostly to identify outliers. I already use experience metrics like time on site, bounce rate, scroll depth etc on the content they produce as well as [originality.ai](https://originality.ai/) checking for AI writing/plagiarism (AI detection only \"works\" in English though).\n\nI am wondering if there are any additional APIs that could help me with getting automated metrics around readability of content, writing maturity (ie. written for 3rd graders), factual correctness? To be honest open to learning from the tools what is possible to assess.\n\nThe content length is usually somewhere around 2500 words that I can feed into. The domain would be diverese from sports, to sustainability, to YMYL.","preferred_answer":"Hi OP. All of that is super possible with the current technology--and quick and easy to develop, quite frankly. If there is no obvious path forward for your engineers, you need to consider retooling your approach to NLP analytics.\n\nMost of the current free APIs are pretty bad. I worked with the Department of Education three months ago, and it was shocking. Even the paid services are inaccurate for all but the most common use cases. \n\nBoost is an interesting open-source project and works really well with your type of content: \nhttps://github.com/adrian-dip/boost\n\nThe model can't provide the granular metrics that you want--only predict if people are going to like and share your content. But you could implement the granularity very easily if you can use pytorch.","full_conversation":[{"role":"OP","user_id":"anon_790f88e649ba7aec","comment_id":"132fjyr","kind":"post","text":"What Language Tech exists that can aid auto-assessing content quality?\n\nI manage a large workforce of content writers and also mixing in AI content where appropriate. I am looking for ways/heuristics to assess subjective \"quality\" of the writing, mostly to identify outliers. I already use experience metrics like time on site, bounce rate, scroll depth etc on the content they produce as well as [originality.ai](https://originality.ai/) checking for AI writing/plagiarism (AI detection only \"works\" in English though).\n\nI am wondering if there are any additional APIs that could help me with getting automated metrics around readability of content, writing maturity (ie. written for 3rd graders), factual correctness? To be honest open to learning from the tools what is possible to assess.\n\nThe content length is usually somewhere around 2500 words that I can feed into. The domain would be diverese from sports, to sustainability, to YMYL.","timestamp":"2023-04-29T01:21:35+00:00","score":0},{"role":"answerer","user_id":"anon_5cc02282fe511e5f","comment_id":"ji50fn6","kind":"comment","text":"Hi OP. All of that is super possible with the current technology--and quick and easy to develop, quite frankly. If there is no obvious path forward for your engineers, you need to consider retooling your approach to NLP analytics.\n\nMost of the current free APIs are pretty bad. I worked with the Department of Education three months ago, and it was shocking. Even the paid services are inaccurate for all but the most common use cases. \n\nBoost is an interesting open-source project and works really well with your type of content: \nhttps://github.com/adrian-dip/boost\n\nThe model can't provide the granular metrics that you want--only predict if people are going to like and share your content. But you could implement the granularity very easily if you can use pytorch.","timestamp":"2023-04-29T02:46:58+00:00","score":1},{"role":"OP","user_id":"anon_790f88e649ba7aec","comment_id":"ji5l2am","kind":"comment","text":"Thank you for the input. When you say current technology, are you referring to anything in particular like LLMs such as GPT-4?","timestamp":"2023-04-29T06:15:37+00:00","score":1},{"role":"answerer","user_id":"anon_5cc02282fe511e5f","comment_id":"ji79tue","kind":"comment","text":"It may be well worth trying GPT-like models, but that is not the correct architecture for any of the tasks you listed. \n\nLLMs/GPT4 are not good for those things in few-shot regimes and will produce innacurate and/or very strange results that may seem legitimate to the untrained eye. So it may give results that look good, but a 3rd grade teacher (to use your example) would say that the product is bad and some of the results are weird or inappropriate.\n\n Also it would be very inconsistent. This has to do with the way SOTA models are trained.","timestamp":"2023-04-29T16:48:01+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_790f88e649ba7aec","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_5cc02282fe511e5f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ji50fn6","thanks_reply_id":"ji5l2am","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_3f9efaf2888fbffa","answerer_user_id":"anon_fe1a4913f4065edd","subreddit":"LanguageTechnology","timestamp":"2023-05-01T09:28:06+00:00","post_id":"134hm0l","question":"Why Language Models Hallucinate\n\nHi there,\n\nI have made a video [here](https://youtu.be/R5YRdJGeZTM) where I explain the possible reasons behind language models' hallucinations.\n\nI hope it may be of use to some of you out there. Feedback is more than welcomed! :)","preferred_answer":"Very nice. You have a small error in one of the first slides title. Take care","full_conversation":[{"role":"OP","user_id":"anon_3f9efaf2888fbffa","comment_id":"134hm0l","kind":"post","text":"Why Language Models Hallucinate\n\nHi there,\n\nI have made a video [here](https://youtu.be/R5YRdJGeZTM) where I explain the possible reasons behind language models' hallucinations.\n\nI hope it may be of use to some of you out there. Feedback is more than welcomed! :)","timestamp":"2023-05-01T09:28:06+00:00","score":11},{"role":"answerer","user_id":"anon_fe1a4913f4065edd","comment_id":"jif9zsg","kind":"comment","text":"Very nice. You have a small error in one of the first slides title. Take care","timestamp":"2023-05-01T12:35:48+00:00","score":6},{"role":"OP","user_id":"anon_3f9efaf2888fbffa","comment_id":"jifaj7l","kind":"comment","text":"Thank you! Where exactly is that error?","timestamp":"2023-05-01T12:40:46+00:00","score":1},{"role":"answerer","user_id":"anon_fe1a4913f4065edd","comment_id":"jifaqij","kind":"comment","text":"Title of second slide!","timestamp":"2023-05-01T12:42:38+00:00","score":2},{"role":"OP","user_id":"anon_3f9efaf2888fbffa","comment_id":"jifc09n","kind":"comment","text":"Oh, yeah, there's a typo. Thanks for pointing that out!","timestamp":"2023-05-01T12:54:04+00:00","score":2},{"role":"answerer","user_id":"anon_fe1a4913f4065edd","comment_id":"jifc3ek","kind":"comment","text":"A typo or an hallucination? :)","timestamp":"2023-05-01T12:54:48+00:00","score":7},{"role":"OP","user_id":"anon_3f9efaf2888fbffa","comment_id":"jifiq56","kind":"comment","text":"Haha, you've got me. :)","timestamp":"2023-05-01T13:49:24+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_3f9efaf2888fbffa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fe1a4913f4065edd","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jif9zsg","thanks_reply_id":"jifaj7l","post_score":11,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_e9bf75fe351be2bb","answerer_user_id":"anon_3fb32a1c929a1474","subreddit":"LanguageTechnology","timestamp":"2023-05-01T17:43:57+00:00","post_id":"134vh0e","question":"where to find English word lists?\n\nHi guys, I need to find lists of English word that are grouped into categories like adjeective, noun, verb or better, positive adjective and so on. I have found several Github repositories, but it seems the list is not so complete.","preferred_answer":"https://wordnet.princeton.edu/","full_conversation":[{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"134vh0e","kind":"post","text":"where to find English word lists?\n\nHi guys, I need to find lists of English word that are grouped into categories like adjeective, noun, verb or better, positive adjective and so on. I have found several Github repositories, but it seems the list is not so complete.","timestamp":"2023-05-01T17:43:57+00:00","score":2},{"role":"answerer","user_id":"anon_3fb32a1c929a1474","comment_id":"jigobgo","kind":"comment","text":"https://wordnet.princeton.edu/","timestamp":"2023-05-01T18:30:57+00:00","score":6},{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"jikr9dr","kind":"comment","text":"Thank you for your answer! I downloaded wordnet 2.1, but I dont know how to extract word lists out to my python script. Any insight?","timestamp":"2023-05-02T15:50:52+00:00","score":1},{"role":"answerer","user_id":"anon_3fb32a1c929a1474","comment_id":"jikshq2","kind":"comment","text":"Just study the library or use Chatgpt. It gives something like:\n\nyou can extract a list of all English words with their part-of-speech (POS) tags from WordNet using the NLTK library in Python. Here's how you can do it:\n\n```\nfrom nltk.corpus import wordnet as wn\n\nall_words = set(word.lower() for word in wn.words())\n\npos_tags = {}\nfor word in all_words:\n synsets = wn.synsets(word)\n for synset in synsets:\n pos = synset.pos()\n if pos not in pos_tags:\n pos_tags[pos] = set()\n pos_tags[pos].add(word)\n\nprint(pos_tags)\n```\n\n\nIn this code, we first get a set of all English words in WordNet using the words() method. We then loop through each word and get its synsets using the synsets() method. For each synset, we get its POS using the pos() method and add the word to the set of words with that POS tag.\n\nFinally, we print out the resulting dictionary pos_tags, where each key is a POS tag and the value is a set of all the words with that POS tag.\n\nNote that this code may take some time to run, as it loops through all the words in WordNet. Additionally, WordNet may not have all English words in its database, so the resulting list may not be comprehensive.","timestamp":"2023-05-02T15:58:52+00:00","score":3},{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"jit4xoy","kind":"comment","text":"Thank you very much, this is exaltly what I needed!","timestamp":"2023-05-04T09:08:00+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e9bf75fe351be2bb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3fb32a1c929a1474","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jigobgo","thanks_reply_id":"jikr9dr","post_score":2,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_9eefd754531f6597","answerer_user_id":"anon_75af0677e68282f4","subreddit":"LanguageTechnology","timestamp":"2023-05-14T11:01:29+00:00","post_id":"13h9avo","question":"Rhetorical Structure Parsers that run on Python?\n\nI am interested in using Rhetorical Structure Parsers (RSPs) to do sentiment analysis. For my thesis, I am going to be using lexicon-based models (VADER and SO-CAL) and test whether RSPs improve accuracy consistently or whether it depends on rhetorical complexity (I am testing three different domains for this).\n\nI did find a few RSP options which run on Java and Scala, but I did not manage to run them even using a wrapper. Some examples:[https://github.com/allenai/processors-corenlp](https://github.com/allenai/processors-corenlp)\n\n[https://github.com/jiyfeng/DPLP](https://github.com/jiyfeng/DPLP)\n\nAny ideas of a RSP that I could use? The DPLP model is supposed to run on Python actually, but its documentation is very poor and I could not make it work after a whole week trying.","preferred_answer":"Hi! The latest end-to-end RST parser for English I used was from the paper \"Adversarial Learning for Discourse Rhetorical Structure Parsing\".\n\n* Their original repo: [Adversarial Learning for Discourse Rhetorical Structure Parsing](https://github.com/NLP-Discourse-SoochowU/sota_end2end_parser)\n* I made a Docker image from their code and RST-DT model (this allows you to quickly deploy everything onto a local computer or a remote server with more powerful hardware): [https://hub.docker.com/repository/docker/tchewik/isanlp\\_zhang21](https://hub.docker.com/repository/docker/tchewik/isanlp_zhang21)\n\nThere are possibly some options made in 2022-2023 with open code and models, look for \"RST parser\", not \"RSP\".","full_conversation":[{"role":"OP","user_id":"anon_9eefd754531f6597","comment_id":"13h9avo","kind":"post","text":"Rhetorical Structure Parsers that run on Python?\n\nI am interested in using Rhetorical Structure Parsers (RSPs) to do sentiment analysis. For my thesis, I am going to be using lexicon-based models (VADER and SO-CAL) and test whether RSPs improve accuracy consistently or whether it depends on rhetorical complexity (I am testing three different domains for this).\n\nI did find a few RSP options which run on Java and Scala, but I did not manage to run them even using a wrapper. Some examples:[https://github.com/allenai/processors-corenlp](https://github.com/allenai/processors-corenlp)\n\n[https://github.com/jiyfeng/DPLP](https://github.com/jiyfeng/DPLP)\n\nAny ideas of a RSP that I could use? The DPLP model is supposed to run on Python actually, but its documentation is very poor and I could not make it work after a whole week trying.","timestamp":"2023-05-14T11:01:29+00:00","score":6},{"role":"answerer","user_id":"anon_75af0677e68282f4","comment_id":"jk8p6nh","kind":"comment","text":"Hi! The latest end-to-end RST parser for English I used was from the paper \"Adversarial Learning for Discourse Rhetorical Structure Parsing\".\n\n* Their original repo: [Adversarial Learning for Discourse Rhetorical Structure Parsing](https://github.com/NLP-Discourse-SoochowU/sota_end2end_parser)\n* I made a Docker image from their code and RST-DT model (this allows you to quickly deploy everything onto a local computer or a remote server with more powerful hardware): [https://hub.docker.com/repository/docker/tchewik/isanlp\\_zhang21](https://hub.docker.com/repository/docker/tchewik/isanlp_zhang21)\n\nThere are possibly some options made in 2022-2023 with open code and models, look for \"RST parser\", not \"RSP\".","timestamp":"2023-05-15T14:22:55+00:00","score":2},{"role":"OP","user_id":"anon_9eefd754531f6597","comment_id":"jk8shae","kind":"comment","text":"That’s awesome!! I will definitely have a look after work. Thank you :D","timestamp":"2023-05-15T14:47:36+00:00","score":2},{"role":"answerer","user_id":"anon_75af0677e68282f4","comment_id":"jk8wk4s","kind":"comment","text":"I'm glad to help! We also did [a study on sentiment analysis and RST](https://github.com/tchewik/discourse-aware-classification) (stance detection part there is actually a sentiment analysis task)... the corpus, however, lacked much rhetorical complexity.","timestamp":"2023-05-15T15:18:23+00:00","score":2},{"role":"OP","user_id":"anon_9eefd754531f6597","comment_id":"jk915wa","kind":"comment","text":"I'll check that out as well, cheers! Btw, I'm trying to set-up the parser without docker, but I'm having issues downloading the pre-trained models on Baidu. Any idea how to get it from the website? It tells me to install Baidu on my computer first and then it's a software all in Chinese..","timestamp":"2023-05-15T16:02:17+00:00","score":1},{"role":"answerer","user_id":"anon_75af0677e68282f4","comment_id":"jk92lpc","kind":"comment","text":"[Here](https://github.com/NLP-Discourse-SoochowU/sota_end2end_parser/issues/2)\n\nThe models are also included in docker image","timestamp":"2023-05-15T16:15:35+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_9eefd754531f6597","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_75af0677e68282f4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jk8p6nh","thanks_reply_id":"jk8shae","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_cd9de13bc0178f43","answerer_user_id":"anon_723a623418e687ef","subreddit":"LanguageTechnology","timestamp":"2023-07-03T09:48:00+00:00","post_id":"14pei64","question":"What is known about the technological basis (models being used) of Azure Form Recognizer?","preferred_answer":"Never used it before. Just based on the product page, I would guess it uses microsoft's TrOCR, [layoutlmv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3) and [table transformer](https://huggingface.co/microsoft/table-transformer-detection).\n\nAnd maybe UDOP: Unifying Vision, Text, and Layout for Universal Document Processing \nhttps://twitter.com/ZinengTang/status/1635456628899332096","full_conversation":[{"role":"OP","user_id":"anon_cd9de13bc0178f43","comment_id":"14pei64","kind":"post","text":"What is known about the technological basis (models being used) of Azure Form Recognizer?","timestamp":"2023-07-03T09:48:00+00:00","score":3},{"role":"answerer","user_id":"anon_723a623418e687ef","comment_id":"jqhlfez","kind":"comment","text":"Never used it before. Just based on the product page, I would guess it uses microsoft's TrOCR, [layoutlmv3](https://huggingface.co/docs/transformers/model_doc/layoutlmv3) and [table transformer](https://huggingface.co/microsoft/table-transformer-detection).\n\nAnd maybe UDOP: Unifying Vision, Text, and Layout for Universal Document Processing \nhttps://twitter.com/ZinengTang/status/1635456628899332096","timestamp":"2023-07-03T10:17:25+00:00","score":2},{"role":"OP","user_id":"anon_cd9de13bc0178f43","comment_id":"jqi3w0g","kind":"comment","text":"Very interesting and helpful. Thanks!\n\nNot familiar with those ones. Are they state of the art in your opinion?","timestamp":"2023-07-03T13:25:05+00:00","score":1},{"role":"answerer","user_id":"anon_723a623418e687ef","comment_id":"jqi4n81","kind":"comment","text":"UDOP is very recent result.\n\nThere is also google's pix2struct. \n\nI think Chinese's paddlestruct is built on top of layoutlmv1. I didnt look too much into layoutlmv3 because only version 1 is for commerical use.","timestamp":"2023-07-03T13:31:18+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_cd9de13bc0178f43","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_723a623418e687ef","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jqhlfez","thanks_reply_id":"jqi3w0g","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_4c595171f005440c","answerer_user_id":"anon_f4da7210b1f2f886","subreddit":"LanguageTechnology","timestamp":"2023-07-06T21:28:09+00:00","post_id":"14smf38","question":"Any models that can do sentence level similarity matching considering context within a documentation?\n\nHi,\n\nI have been searching for ways to perform sentence-by-sentence similarity comparison across two documents. So far I have tried some transformer embedding models + cosine similarity, as well as prompt engineering using ChatGPT (0-shot and few-shot). The result is not great: a lot of false positives and false negatives. \n\nI think the reason is probably the domain is a little too specific such that models trained on generic corpus cannot tell the difference in nuisances (or I have done very bad implementation).\n\nCurrently I am thinking on ways to incorporate more context and label information into the process. I have thought about using knowledge graph or knowledge embedding to enrich the input text (or input embedding). I have also read about models other than LLM or BERT to do long text similarity comparison. The specific information I think that might help would be some document-level classificiation, industry/author external knowledge and even the hierarchy of the document (header, subheader and where the sentence to be compared falls within the sections). But I am really not familiar with anything outside of simple sentence similarity scoring , so I am not even sure where I could start.\n\nAny pointers would be appreciated!\n\n​\n\n​","preferred_answer":"Try: Sentence Transformers, SBERT. You can get cos results","full_conversation":[{"role":"OP","user_id":"anon_4c595171f005440c","comment_id":"14smf38","kind":"post","text":"Any models that can do sentence level similarity matching considering context within a documentation?\n\nHi,\n\nI have been searching for ways to perform sentence-by-sentence similarity comparison across two documents. So far I have tried some transformer embedding models + cosine similarity, as well as prompt engineering using ChatGPT (0-shot and few-shot). The result is not great: a lot of false positives and false negatives. \n\nI think the reason is probably the domain is a little too specific such that models trained on generic corpus cannot tell the difference in nuisances (or I have done very bad implementation).\n\nCurrently I am thinking on ways to incorporate more context and label information into the process. I have thought about using knowledge graph or knowledge embedding to enrich the input text (or input embedding). I have also read about models other than LLM or BERT to do long text similarity comparison. The specific information I think that might help would be some document-level classificiation, industry/author external knowledge and even the hierarchy of the document (header, subheader and where the sentence to be compared falls within the sections). But I am really not familiar with anything outside of simple sentence similarity scoring , so I am not even sure where I could start.\n\nAny pointers would be appreciated!\n\n​\n\n​","timestamp":"2023-07-06T21:28:09+00:00","score":8},{"role":"answerer","user_id":"anon_f4da7210b1f2f886","comment_id":"jr7v65q","kind":"comment","text":"Try: Sentence Transformers, SBERT. You can get cos results","timestamp":"2023-07-09T00:20:04+00:00","score":1},{"role":"OP","user_id":"anon_4c595171f005440c","comment_id":"jr8id0w","kind":"comment","text":"Thank you for your suggestion. I have tried those and I think they are missing the context. I need to find a way to encode some context if I want to use embedding models like them.","timestamp":"2023-07-09T03:41:28+00:00","score":1},{"role":"answerer","user_id":"anon_f4da7210b1f2f886","comment_id":"jr8me24","kind":"comment","text":"Yeah, then maybe you should finetune the models, have you also done them too","timestamp":"2023-07-09T04:20:20+00:00","score":1},{"role":"OP","user_id":"anon_4c595171f005440c","comment_id":"jr8qodp","kind":"comment","text":"Got it. I don't have enough data for fine tuning at this moment though. Probably need to make a case to manager to prove that collecting data for fine tuning is worth it. Kind stuck on that path.","timestamp":"2023-07-09T05:04:30+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_4c595171f005440c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f4da7210b1f2f886","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jr7v65q","thanks_reply_id":"jr8id0w","post_score":8,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_e9bf75fe351be2bb","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2023-07-10T22:01:15+00:00","post_id":"14w7v40","question":"English corpora covering historical text?\n\ncontext: I wish to do a diachronic study on an American english corpus (I need full text). I found these two dataset (proquest historical news data and news bank data), though not free, offer enough tokens with year information. \nI wonder anyone has the experience or information buying these two? How much are they?\nOr, can you give me any information on other English corpora covering historical text data? (such as COHA)","preferred_answer":"If you go with COHA make sure to check out CCOHA, which is the same data but cleaned.","full_conversation":[{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"14w7v40","kind":"post","text":"English corpora covering historical text?\n\ncontext: I wish to do a diachronic study on an American english corpus (I need full text). I found these two dataset (proquest historical news data and news bank data), though not free, offer enough tokens with year information. \nI wonder anyone has the experience or information buying these two? How much are they?\nOr, can you give me any information on other English corpora covering historical text data? (such as COHA)","timestamp":"2023-07-10T22:01:15+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"jribwkg","kind":"comment","text":"If you go with COHA make sure to check out CCOHA, which is the same data but cleaned.","timestamp":"2023-07-11T07:27:11+00:00","score":1},{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"jrrnh62","kind":"comment","text":"Thank you. but I noticed what CCOHA did not do is to correct OCR errors in the earlier text. Any way or paper trying to do this?","timestamp":"2023-07-13T05:22:19+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"jrrv0qo","kind":"comment","text":"Not that I know of. But slight OCR issues are shown to not have a real impact on text analyses, see eg https://researchportal.helsinki.fi/en/publications/quantifying-the-impact-of-dirty-ocr-on-historical-text-analysis-e","timestamp":"2023-07-13T06:53:52+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e9bf75fe351be2bb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jribwkg","thanks_reply_id":"jrrnh62","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_1448a2bc6ef51d6a","answerer_user_id":"anon_17e0dd3652f6e2cd","subreddit":"LanguageTechnology","timestamp":"2023-07-18T09:09:06+00:00","post_id":"152t8kx","question":"Help: trying to fine-tune zero shot inference model for medical paper abstract classification\n\nHello,\n\n​\n\nI am beginner with NLP as well with this subreddit so sorry if I am formatting my post in a inproper way. For my work purposes I decided to investigate how could I apply NLP in order to classify the medical paper abstracts into particular groups of dentistry. I identified 8 different classes ('labels') that I would use. As a benchmark, I decided to try out zero-shot inference model at HuggingFace, namely, 'facebook/bart-large-mnl'. The results were decent yet not very impressive so I decided to investigate if I could at least slightly improve the results (even on the training data itself) by fine-tuning to \\~60 abstracts with a particular class provided. \n\n​\n\nI am to some extent aware of the problems working with such large models, e.g. I could only train on batch\\_size = 1-4 without exceeding memory limitations. I also havent played around with hyperparameters much because I have a feeling they are not the reasons for my problems. \n\n​\n\nSo I trained for 1-4 epochs on those 60 abstracts with particular label, following some suggestions online I think I managed to preprocess this dataset into a proper NLI problem, i.e. 3 labels (in fact, 2: entailment and contradiction) and then increase my dataset size by artificially including contradiction examples, taking same abstract, providing a wrong hypothesis (i.e. a wrong class) and then providing a label with value 0: contradiction. \n\n​\n\nUnfortunately, independent of number of epochs, if I try to predict the field of dentistry with the fine tuned model via zero shot classification pipeline, the output probabilities are all \\~0.125 which is almost random guessing. I was cautious that this might happen because abstracts are very long and vary in size, so I instead tried out running the same training on medical paper titles instead yet I encountered the same thing - output probabilities converging to random guessing. \n\n​\n\nDoes anyone have an idea what could be the reason for this? As I said, I am a beginner so it certainly could be some simple error breaking everything up, but I tried to implement my code to the best of my understanding using whatever limited resources I could find on the huggingface forums and stackoverflow.","preferred_answer":"Just posting to say I have the exact same project in my pipeline, only the topic is different (neurology). Please share any breakthroughs you may have, and I will try to remember this post when I get around to giving it a crack and let you know if I have any success. In the past I have tried to do this based on keywords, and I had pretty decent results with that. If you think about it, besides keywords what other information is there really in the abstract that can help with classifying the papers? In my case, I also classified the journals and included that information, which improved accuracy a lot.\n\nSome ideas/links:\n\nSBERT\nhttps://www.sbert.net/docs/pretrained_models.html\n\nText Embedding Benchmark leaderboard\nhttps://huggingface.co/spaces/mteb/leaderboard\n\nAn alternative approach is to use a large language model. They are actually not that good at embedding, and they are computationally expensive, but still I am curious my self to try it out. You could try to run a local model with 3-5 few-shot examples and guidance (https://github.com/microsoft/guidance) to force it to output one of your classes, or use the OpenAI API.\n\nLocal models\n/r/LocalLLaMA","full_conversation":[{"role":"OP","user_id":"anon_1448a2bc6ef51d6a","comment_id":"152t8kx","kind":"post","text":"Help: trying to fine-tune zero shot inference model for medical paper abstract classification\n\nHello,\n\n​\n\nI am beginner with NLP as well with this subreddit so sorry if I am formatting my post in a inproper way. For my work purposes I decided to investigate how could I apply NLP in order to classify the medical paper abstracts into particular groups of dentistry. I identified 8 different classes ('labels') that I would use. As a benchmark, I decided to try out zero-shot inference model at HuggingFace, namely, 'facebook/bart-large-mnl'. The results were decent yet not very impressive so I decided to investigate if I could at least slightly improve the results (even on the training data itself) by fine-tuning to \\~60 abstracts with a particular class provided. \n\n​\n\nI am to some extent aware of the problems working with such large models, e.g. I could only train on batch\\_size = 1-4 without exceeding memory limitations. I also havent played around with hyperparameters much because I have a feeling they are not the reasons for my problems. \n\n​\n\nSo I trained for 1-4 epochs on those 60 abstracts with particular label, following some suggestions online I think I managed to preprocess this dataset into a proper NLI problem, i.e. 3 labels (in fact, 2: entailment and contradiction) and then increase my dataset size by artificially including contradiction examples, taking same abstract, providing a wrong hypothesis (i.e. a wrong class) and then providing a label with value 0: contradiction. \n\n​\n\nUnfortunately, independent of number of epochs, if I try to predict the field of dentistry with the fine tuned model via zero shot classification pipeline, the output probabilities are all \\~0.125 which is almost random guessing. I was cautious that this might happen because abstracts are very long and vary in size, so I instead tried out running the same training on medical paper titles instead yet I encountered the same thing - output probabilities converging to random guessing. \n\n​\n\nDoes anyone have an idea what could be the reason for this? As I said, I am a beginner so it certainly could be some simple error breaking everything up, but I tried to implement my code to the best of my understanding using whatever limited resources I could find on the huggingface forums and stackoverflow.","timestamp":"2023-07-18T09:09:06+00:00","score":8},{"role":"answerer","user_id":"anon_17e0dd3652f6e2cd","comment_id":"jsfukq6","kind":"comment","text":"Just posting to say I have the exact same project in my pipeline, only the topic is different (neurology). Please share any breakthroughs you may have, and I will try to remember this post when I get around to giving it a crack and let you know if I have any success. In the past I have tried to do this based on keywords, and I had pretty decent results with that. If you think about it, besides keywords what other information is there really in the abstract that can help with classifying the papers? In my case, I also classified the journals and included that information, which improved accuracy a lot.\n\nSome ideas/links:\n\nSBERT\nhttps://www.sbert.net/docs/pretrained_models.html\n\nText Embedding Benchmark leaderboard\nhttps://huggingface.co/spaces/mteb/leaderboard\n\nAn alternative approach is to use a large language model. They are actually not that good at embedding, and they are computationally expensive, but still I am curious my self to try it out. You could try to run a local model with 3-5 few-shot examples and guidance (https://github.com/microsoft/guidance) to force it to output one of your classes, or use the OpenAI API.\n\nLocal models\n/r/LocalLLaMA","timestamp":"2023-07-18T11:18:26+00:00","score":3},{"role":"OP","user_id":"anon_1448a2bc6ef51d6a","comment_id":"jsfv8fk","kind":"comment","text":"Thanks for the reply, its nice to know someone understands the case! What I am particularly interested in is why are my predictions converging to random guessing, regardless of whether I use titles or abstracts... I believe I have problems within my code or how I train the model.","timestamp":"2023-07-18T11:25:16+00:00","score":2},{"role":"answerer","user_id":"anon_17e0dd3652f6e2cd","comment_id":"jsfvtc9","kind":"comment","text":"Unfortunately I cant really help you there, except to say something seems off yes. My mind is elsewhere at the moment, and I am by far an expert! (Still learning my self). Hopefully some of the briliant minds in here will have some insights!","timestamp":"2023-07-18T11:31:26+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1448a2bc6ef51d6a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_17e0dd3652f6e2cd","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jsfukq6","thanks_reply_id":"jsfv8fk","post_score":8,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_c991f5ff19ed869b","answerer_user_id":"anon_e30b24329fb9f658","subreddit":"LanguageTechnology","timestamp":"2023-07-30T20:34:00+00:00","post_id":"15dvofv","question":"How to extract relevant passages from a text document using multiple additional text documents as context to inform \"relevance\".\n\nI'm a developer that's relatively new to this space looking to solve a very challenging problem. I'm looking to build a tool that can pick out relevant passages from a source text document (which could be hundreds of pages in length). To help the model understand what is relevant, I want to have it consume other text documents of varying formats and length (pdf, docx, etc.), then use the context from \"understanding\" those documents to pull out passages form the source document that seem \"relevant\".\n\nI will need to perform this operation in isolation, meaning, the source document and \"context\" documents will need to be run once without the need to retrain the base model. Each execution will theoretically be run against a new set of source/context documents without previous executions/documents tainting the output of the current one.\n\nExample: the source document could be an interview transcript, with the \"context\" documents containing information relevant to the specific subject matter of the interview.\n\nI know this is a very challenging problem that could take a long time to build (and could be very expensive to run), so I'm hoping folks with more relevant expertise in this area could possibly point me in the right direction to some potential tools and/or approaches. I'll eventually be able to secure more resources and experts to help with this once I can start to prove out the basic concept.\n\nI'm starting to play around with langchain/chroma applied over top of a base pre-trained LLM, but the amount of data from these context documents could be very large (dozens or even hundreds of text documents that could be dozens or hundreds of pages in length), which is where I'm struggling to find information that can inform my approach here.","preferred_answer":"This [Gist](https://gist.github.com/mburde7/73076b2e05b001a2779d812451b0b3ff) should have most of what you are looking for. \n\nYou basically need to chunk each text into smaller pieces with some overlap. Then use OpenAI embeddings to create embedding vectors to do cosine similarity. I included an \"embellish\" function that you may or may not want to use.","full_conversation":[{"role":"OP","user_id":"anon_c991f5ff19ed869b","comment_id":"15dvofv","kind":"post","text":"How to extract relevant passages from a text document using multiple additional text documents as context to inform \"relevance\".\n\nI'm a developer that's relatively new to this space looking to solve a very challenging problem. I'm looking to build a tool that can pick out relevant passages from a source text document (which could be hundreds of pages in length). To help the model understand what is relevant, I want to have it consume other text documents of varying formats and length (pdf, docx, etc.), then use the context from \"understanding\" those documents to pull out passages form the source document that seem \"relevant\".\n\nI will need to perform this operation in isolation, meaning, the source document and \"context\" documents will need to be run once without the need to retrain the base model. Each execution will theoretically be run against a new set of source/context documents without previous executions/documents tainting the output of the current one.\n\nExample: the source document could be an interview transcript, with the \"context\" documents containing information relevant to the specific subject matter of the interview.\n\nI know this is a very challenging problem that could take a long time to build (and could be very expensive to run), so I'm hoping folks with more relevant expertise in this area could possibly point me in the right direction to some potential tools and/or approaches. I'll eventually be able to secure more resources and experts to help with this once I can start to prove out the basic concept.\n\nI'm starting to play around with langchain/chroma applied over top of a base pre-trained LLM, but the amount of data from these context documents could be very large (dozens or even hundreds of text documents that could be dozens or hundreds of pages in length), which is where I'm struggling to find information that can inform my approach here.","timestamp":"2023-07-30T20:34:00+00:00","score":12},{"role":"answerer","user_id":"anon_e30b24329fb9f658","comment_id":"ju4tvpa","kind":"comment","text":"This [Gist](https://gist.github.com/mburde7/73076b2e05b001a2779d812451b0b3ff) should have most of what you are looking for. \n\nYou basically need to chunk each text into smaller pieces with some overlap. Then use OpenAI embeddings to create embedding vectors to do cosine similarity. I included an \"embellish\" function that you may or may not want to use.","timestamp":"2023-07-30T23:10:28+00:00","score":1},{"role":"OP","user_id":"anon_c991f5ff19ed869b","comment_id":"ju78xrp","kind":"comment","text":"Thanks for sharing this. The major distinction that I’ll need to figure out is how to prompt the model for “any and all relevant passages” based on the context docs provided. It looks like this gist is more about answering questions in individual prompts about the initial corpus. Some of this could still be helpful, so I appreciate it!","timestamp":"2023-07-31T13:35:38+00:00","score":2},{"role":"answerer","user_id":"anon_e30b24329fb9f658","comment_id":"ju7ctht","kind":"comment","text":"Yeah you'd need to tweak the cosine similarity portion - right now I return a set number of chunks, but you could return only text that is above a similarity threshold. [This](https://github.com/karpathy/randomfun/blob/master/knn_vs_svm.ipynb) is a further improvement on the embedding matching, which will separate the text chunks into more distinct \"similar\" and \"dissimilar\" groups.","timestamp":"2023-07-31T14:03:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c991f5ff19ed869b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e30b24329fb9f658","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ju4tvpa","thanks_reply_id":"ju78xrp","post_score":12,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_3a6c71de7ee511ef","answerer_user_id":"anon_17e0dd3652f6e2cd","subreddit":"LanguageTechnology","timestamp":"2023-08-05T21:13:13+00:00","post_id":"15j6wn7","question":"How to extract specific data from a paragraph?","preferred_answer":"Alright, I did some testing. I made a system prompt with one example (ideally you want 3 examples for few shot prompting). I asked it to output the answer in the format NUMBER,UNIT as that will make sure you always get \"kilometers\" instead og some \"km\", some \"kilometer\", etc. Also I made it comma separated, but you can make it what you will basically. I use a Ø as a stop character, because small models don't know when to shut up and only despite an instruction in the prompt to only output what you want and nothing more. (Bigger models will often respect this and you wont need a stop word or character). Depending on your implementation, the stop character will be stripped, or you can do it your self in your implementation.\n\nSystem prompt:\n\nYou are a text extraction bot. Your task is to extract only one sentence that describe the distance in time or space to an airport from the input. Your output must only be in the format NUMBER,UNITØ for example 5,minutesØ or 20,kilometersØ. Your output MUST only consist of this, nothing else. Example input: Why Buy in The Melia?\\nSpacious Living/dining Areas And Large Balconies\\nScenic View Of The Aravallis\\nAir-conditioned Apartments\\nHigh Quality Imported Tiles And Wooden Flooring\\nModular Kitchen Cabinetry\\\\nEco-friendly Design & Material Use\\nWater Harvesting, Solar Water Heating\\nOutdoor Solar Lighting\\nCctv Surveillance And Recording\\nBoom Barriers / Access Control \\nLocation Advantages:South of Gurgaon is well connected to Gurgaon and the National Capital by the National Highway 248A\\nSohna has a proposed 60 meter wide sector road that connects 5 sectors of Sohna\\nAccessible from Udyog Vihar, Cyber City, IFFCO Chowk, Rajeev Chowk, NH8, Subhash Chowk and Hero Honda Chowk.\\nHospitals like Medanta, Artemis, Paras, Fortis, Max, etc. are also located within 25-30 minutes. \\nMalls on MG Road : 20 minutes away\\nMetro Station at HUDA City Center : 20 minutes away\\nIGI International Terminal (T3 Terminal) : 30 minutes away\\nKMPL Expressway : 5 minutes away\\nMedanta/ Artemis/ Max/ Fortis/ Paras Super- specialty Hospitals : 15-25 minutes away\\nRenowned ISCE/ IB Schools : 2 minutes away\\n+17 more\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nDownload Brochure\\nAnswer:5,minutesØ]\\n\n\nUser prompt:\n\nExtract the number and unit from the following text:\n[Why Buy in DLF Imperial Residences?\\nA short drive from DLF Cybercity\\nOne home per floor ensuring maximum usable area\\nEnhanced floor-to-floor height up to 3.2 meters\\nHome automation**\\nExquisite terrace garden**\\nFully fitted modular-kitchen with appliances\\nLocation Advantage:American Montessori Public School, DLF City Phase II 0.5 Km\\nShiv Nadar School, DLF City Phase I 4.0 Km\\nNeelkanth Hospital 2.5 Km\\nDLF Cybercity 2.1 Km\\nMG Road, Gurugram (Malls) 1.0 Km\\nGalleria Market, DLF City Phase IV 3.5 Km\\nMG Road Metro Station 1.0 Km\\nSikanderpur Metro Station 1.0 Km\\nDLF City Phase II Metro Station 1.0 Km\\nIndira Gandhi International Airport, New Delhi 12.0 Km\\n+13 more\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nDownload Brochure]\n\nModel output:\n12,kilometers\n\nAll model sizes I tried did this correctly, the smallest one I tried was StableBeluga-13B. \nThe model: https://huggingface.co/stabilityai/StableBeluga-13B\n\nI ran the model on a 1070 Ti + CPU in GGML-format. If you have a GPU with enough VRAM you can run in as GPTQ and get very good speeds.\n\nLet me know if you have any more questions.","full_conversation":[{"role":"OP","user_id":"anon_3a6c71de7ee511ef","comment_id":"15j6wn7","kind":"post","text":"How to extract specific data from a paragraph?","timestamp":"2023-08-05T21:13:13+00:00","score":8},{"role":"answerer","user_id":"anon_17e0dd3652f6e2cd","comment_id":"jv2l3u8","kind":"comment","text":"Alright, I did some testing. I made a system prompt with one example (ideally you want 3 examples for few shot prompting). I asked it to output the answer in the format NUMBER,UNIT as that will make sure you always get \"kilometers\" instead og some \"km\", some \"kilometer\", etc. Also I made it comma separated, but you can make it what you will basically. I use a Ø as a stop character, because small models don't know when to shut up and only despite an instruction in the prompt to only output what you want and nothing more. (Bigger models will often respect this and you wont need a stop word or character). Depending on your implementation, the stop character will be stripped, or you can do it your self in your implementation.\n\nSystem prompt:\n\nYou are a text extraction bot. Your task is to extract only one sentence that describe the distance in time or space to an airport from the input. Your output must only be in the format NUMBER,UNITØ for example 5,minutesØ or 20,kilometersØ. Your output MUST only consist of this, nothing else. Example input: Why Buy in The Melia?\\nSpacious Living/dining Areas And Large Balconies\\nScenic View Of The Aravallis\\nAir-conditioned Apartments\\nHigh Quality Imported Tiles And Wooden Flooring\\nModular Kitchen Cabinetry\\\\nEco-friendly Design & Material Use\\nWater Harvesting, Solar Water Heating\\nOutdoor Solar Lighting\\nCctv Surveillance And Recording\\nBoom Barriers / Access Control \\nLocation Advantages:South of Gurgaon is well connected to Gurgaon and the National Capital by the National Highway 248A\\nSohna has a proposed 60 meter wide sector road that connects 5 sectors of Sohna\\nAccessible from Udyog Vihar, Cyber City, IFFCO Chowk, Rajeev Chowk, NH8, Subhash Chowk and Hero Honda Chowk.\\nHospitals like Medanta, Artemis, Paras, Fortis, Max, etc. are also located within 25-30 minutes. \\nMalls on MG Road : 20 minutes away\\nMetro Station at HUDA City Center : 20 minutes away\\nIGI International Terminal (T3 Terminal) : 30 minutes away\\nKMPL Expressway : 5 minutes away\\nMedanta/ Artemis/ Max/ Fortis/ Paras Super- specialty Hospitals : 15-25 minutes away\\nRenowned ISCE/ IB Schools : 2 minutes away\\n+17 more\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nDownload Brochure\\nAnswer:5,minutesØ]\\n\n\nUser prompt:\n\nExtract the number and unit from the following text:\n[Why Buy in DLF Imperial Residences?\\nA short drive from DLF Cybercity\\nOne home per floor ensuring maximum usable area\\nEnhanced floor-to-floor height up to 3.2 meters\\nHome automation**\\nExquisite terrace garden**\\nFully fitted modular-kitchen with appliances\\nLocation Advantage:American Montessori Public School, DLF City Phase II 0.5 Km\\nShiv Nadar School, DLF City Phase I 4.0 Km\\nNeelkanth Hospital 2.5 Km\\nDLF Cybercity 2.1 Km\\nMG Road, Gurugram (Malls) 1.0 Km\\nGalleria Market, DLF City Phase IV 3.5 Km\\nMG Road Metro Station 1.0 Km\\nSikanderpur Metro Station 1.0 Km\\nDLF City Phase II Metro Station 1.0 Km\\nIndira Gandhi International Airport, New Delhi 12.0 Km\\n+13 more\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nDownload Brochure]\n\nModel output:\n12,kilometers\n\nAll model sizes I tried did this correctly, the smallest one I tried was StableBeluga-13B. \nThe model: https://huggingface.co/stabilityai/StableBeluga-13B\n\nI ran the model on a 1070 Ti + CPU in GGML-format. If you have a GPU with enough VRAM you can run in as GPTQ and get very good speeds.\n\nLet me know if you have any more questions.","timestamp":"2023-08-06T20:08:37+00:00","score":2},{"role":"OP","user_id":"anon_3a6c71de7ee511ef","comment_id":"jv2psza","kind":"comment","text":"Thank you very much for the help bro.\n\nI am a beginner so,this means a lot to me.\n\nSince I am a beginner,can you please tell me how to use these models in google colab?Or at least tell me any resources to do the same.\n\nMy system is not very high end,hence I use the free version of google colab.\n\nThanks once again for the help","timestamp":"2023-08-06T20:40:33+00:00","score":1},{"role":"answerer","user_id":"anon_17e0dd3652f6e2cd","comment_id":"jv4yjyk","kind":"comment","text":"I dont use google colab, but if you search in /r/LocalLLaMA/ there are many threads about cloud providers. That said, the only reason to run local models is flexibility and cost, otherwise you will get faster results just using the OpenAI API.\n\nhttps://openai.com/blog/openai-api\n\nI highly reccomend you also get ChatGPT Plus. The GPT-4 version of ChatGPT makes much better code and is overall a much better pair programmer.\n\nIf you give ChatGPT-4 my prompts and ask it to write you a python program that uses the OpenAI API to perform the extraction using GPT 3.5 Turbo, you'll probably get a solution that works better and is cheaper than hosting a local model in the cloud.","timestamp":"2023-08-07T08:59:06+00:00","score":2},{"role":"OP","user_id":"anon_3a6c71de7ee511ef","comment_id":"jv6h2yx","kind":"comment","text":"Oh I understand now.\n\nHowever,being just a student,I can't spend money on getting OpenAI API keys or ChatGPT Plus.\n\nSo,I'll probably stick to the free ones.\n\nThanks for the help : )","timestamp":"2023-08-07T16:42:07+00:00","score":1},{"role":"answerer","user_id":"anon_17e0dd3652f6e2cd","comment_id":"jv6mzn8","kind":"comment","text":"Its an amazing private teacher, well worth it if you can afford it. For one, it produces code that works. :) As for local models, you can run them on low end hardware also if you have time to wait. I have seen people mention a $5 deal for a vm with a high end gpu, worth checking out. The price per token for gpt 3,5 is really low btw, probably wont cost you much at all.","timestamp":"2023-08-07T17:19:10+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_3a6c71de7ee511ef","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_17e0dd3652f6e2cd","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jv2l3u8","thanks_reply_id":"jv2psza","post_score":8,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_f9b46557fcfd9396","answerer_user_id":"anon_fd834b92314ba53d","subreddit":"LanguageTechnology","timestamp":"2023-08-16T06:27:23+00:00","post_id":"15shn96","question":"Document Vector from SBert\n\nI have a semantic similarity pipeline, using static word-vectors to calculate document similarity. Currently the documents are in bag-of-words form and the document vector is the mean of the combined word-vectors.\n\nWith SBert, what is the best approach to for a document-vector?\nthe encode() function returns a list of sentence-vectors. Should generate a mean-vector of those sentence-vectors? Or are there better approaches?","preferred_answer":"A bit late, but let me help you. \nSBert (or rather sentence transformers) is feeding your sentence through a base language model of your choice (usually some version of mpnet) and outputting the embeddings generated by these models. \n\nIf you are feeding it a single sentence, and unless you specify a pooling method (which, IIRC, it does by default), these embeddings are the embeddings of all the tokens of your input sentence. \n\nIf you want a single vector for the whole sentence, you should use some pooling of the top of these vectors. The most common approach is to average all of these (making sure you don’t use the embeddings from the masked tokens, if any). Another common approach is only to use the first token (usually the [CLS] token)","full_conversation":[{"role":"OP","user_id":"anon_f9b46557fcfd9396","comment_id":"15shn96","kind":"post","text":"Document Vector from SBert\n\nI have a semantic similarity pipeline, using static word-vectors to calculate document similarity. Currently the documents are in bag-of-words form and the document vector is the mean of the combined word-vectors.\n\nWith SBert, what is the best approach to for a document-vector?\nthe encode() function returns a list of sentence-vectors. Should generate a mean-vector of those sentence-vectors? Or are there better approaches?","timestamp":"2023-08-16T06:27:23+00:00","score":1},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"jwoywsx","kind":"comment","text":"A bit late, but let me help you. \nSBert (or rather sentence transformers) is feeding your sentence through a base language model of your choice (usually some version of mpnet) and outputting the embeddings generated by these models. \n\nIf you are feeding it a single sentence, and unless you specify a pooling method (which, IIRC, it does by default), these embeddings are the embeddings of all the tokens of your input sentence. \n\nIf you want a single vector for the whole sentence, you should use some pooling of the top of these vectors. The most common approach is to average all of these (making sure you don’t use the embeddings from the masked tokens, if any). Another common approach is only to use the first token (usually the [CLS] token)","timestamp":"2023-08-18T08:05:45+00:00","score":2},{"role":"OP","user_id":"anon_f9b46557fcfd9396","comment_id":"jwp3p28","kind":"comment","text":"Thanks a lot for your reply!\nSo i could pass the whole document and it will form one vector, based of all tokens (if pooled)?\nWhen i want to compare documents with multiple sentences, is there any advantage in forming vectors per sentence first?","timestamp":"2023-08-18T09:06:56+00:00","score":1},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"jwpbwk1","kind":"comment","text":"If you use it as in the example here: https://www.sbert.net/#usage, it will automatically create one vector per sentence/document you feed into the model.\n\nIn general, embeddings aren't really able to capture the semantics of a document that is too long. \n\nThe first issue is that the model has a limit on how long the document can be (usually around 512 tokens). Anything longer than that is discarded. \n\nSecond, embeddings usually work better when the sentence contains a single idea/concept. What I would recommend is to embed individual sentences of the document (e.g., one paragraph) and compute similarity on a sentence-level, not whole document level. Then, depending on your specific application, decide how you want to proceed. \n\nIn some scenarios, you don't really need the full document to solve your problem. In others, if one sentence in a document is relevant, you assume the whole document is relevant. Perhaps, you want to average the scores (i.e., cosine similarities) of all sentences in a document. \n\nPersonally, I don't think averaging all vectors of a document is a very good idea.","timestamp":"2023-08-18T10:44:13+00:00","score":1},{"role":"OP","user_id":"anon_f9b46557fcfd9396","comment_id":"jwphmen","kind":"comment","text":"> In some scenarios, you don't really need the full document to solve your problem. In others, if one sentence in a document is relevant, you assume the whole document is relevant. Perhaps, you want to average the scores (i.e., cosine similarities) of all sentences in a document.\n\nThat is exactly where my current model has problems. Some sentences are more important then others and averaging the vector doesn't account for this. \n\nThe problem with my corpus is, that some sentences are very similar across documents, but are not relevant. To give an example:\n\n\n Doc1 = \"Dear customer-service. We have trouble with software xy. The screen freezes for User X\"\n\n Doc2 = \"Dear customerservice. Software xy is causing a problem: load-times are very slow\"\n\n Doc3 = \"User X's screen froze. Please fix!\"\n\nDocuments 1 and 2 describe a very different problem (Slow load times vs. frozen software ) but sentence 1 and 2 are very similar in meaning. \n\nDoc3 describes the exact problem as doc1, but has less matching sentences then doc 2 has with with doc1.\n\nThe only solution that comes to my mind for this would be training a ner model first and summarize each documents based on entity distribution.","timestamp":"2023-08-18T11:40:40+00:00","score":1},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"jwr3490","kind":"comment","text":"How long are your documents, realistically? Do you need to split them into sentences?\nI would also suggest you to try fine tuning your model, if you have a few hundred training pairs at least. \nFinally, you could also try looking into a hybrid approach. That is, generate the final document score by a combination of a lexical matching algorithm (like BM25) and the cosine similarity.","timestamp":"2023-08-18T18:01:26+00:00","score":1},{"role":"OP","user_id":"anon_f9b46557fcfd9396","comment_id":"jwrmfi3","kind":"comment","text":"My documents are roughly 1 to 15 sentences long (I would say the average is around 4-8 sentences) with 1 to maybe 2 sentences beeing \"topic-defining\" (sometimes the topic is hidden across all sentences, but it's not the current goal to find those documents)\n\nI am actually using the hybrid approach that you suggested in our live enviroment. The document-vectors are used to find clusters of relevant document, a token-matching algorithm (Similar to BM25) ranks the final relevance.\n\nWhat do you mean by finetuning with pairs? I thought i could only finetune SBert embeddings by providing a simple corpus of our domain and it will figure out the new embeddings, similar to learning static vectors like Word2Vec.","timestamp":"2023-08-18T20:00:40+00:00","score":1},{"role":"answerer","user_id":"anon_fd834b92314ba53d","comment_id":"jws8zts","kind":"comment","text":"That’s not how Transformers base models work. You need to fine tune with some level of supervision.\n\nIn this scenario, you probably want to have pairs of similar/relevant sentences and fine tune the model using some contrastive loss. For instance, in your example above, documents 1 and 3 would form a positive pair while documents 1 and 2 would form a negative one. \n\nThis will drastically improve the performance of the model. I would suggest starting by understanding how a transformer model work and how it is trained, and look at Sentence Transformers documentation on training and fine tuning (https://www.sbert.netdocs/training/overview.html). \n\nWhen you are confident you understand how this works, look into other more powerful base models, such as the E5 family (https://www.sbert.netdocs/training/overview.html) and the newer BGE models (https://huggingface.co/BAAI/bge-base-en). These are all Bert-based models, but with slight variations on the training set and loss functions used when training.","timestamp":"2023-08-18T22:28:26+00:00","score":1},{"role":"OP","user_id":"anon_f9b46557fcfd9396","comment_id":"jwshw3w","kind":"comment","text":"Thanks for clearing that up, i just started with transformer models and will read the documentations. Thanks again for your help!","timestamp":"2023-08-18T23:32:46+00:00","score":2}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_f9b46557fcfd9396","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fd834b92314ba53d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jwoywsx","thanks_reply_id":"jwp3p28","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_e9bf75fe351be2bb","answerer_user_id":"anon_7af9ec8f927a3ae8","subreddit":"LanguageTechnology","timestamp":"2023-08-20T19:44:25+00:00","post_id":"15wkusr","question":"Is is acceptable to use ChatGPT to replace BERT etc. to do classfication tasks in papers?\n\nHi all! I used to use pretrained models like roberta to do some sentiment analysis and NER in my project. However, having tried gpt3.5 API, I found the results are better than my fine-tuned transformer models. Can I use ChatGPT to do those NLP tasks in my paper that aims to publish?","preferred_answer":"Two steps:\n1. Evaluate ChatGPT vs. BERT on a labeled data set and publish results.\n2. Based on evidence for usefulness gained from 1., use in actual paper.\n\nYou can publish both as one paper, though I'd keep the two separate for more semantic citations, when others reference your work.","full_conversation":[{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"15wkusr","kind":"post","text":"Is is acceptable to use ChatGPT to replace BERT etc. to do classfication tasks in papers?\n\nHi all! I used to use pretrained models like roberta to do some sentiment analysis and NER in my project. However, having tried gpt3.5 API, I found the results are better than my fine-tuned transformer models. Can I use ChatGPT to do those NLP tasks in my paper that aims to publish?","timestamp":"2023-08-20T19:44:25+00:00","score":8},{"role":"answerer","user_id":"anon_7af9ec8f927a3ae8","comment_id":"jx4g32q","kind":"comment","text":"Two steps:\n1. Evaluate ChatGPT vs. BERT on a labeled data set and publish results.\n2. Based on evidence for usefulness gained from 1., use in actual paper.\n\nYou can publish both as one paper, though I'd keep the two separate for more semantic citations, when others reference your work.","timestamp":"2023-08-21T12:30:21+00:00","score":5},{"role":"OP","user_id":"anon_e9bf75fe351be2bb","comment_id":"jx52avi","kind":"comment","text":"thank you for your idea, very helpful and practical. But I think step 1 should have been taken by many already?","timestamp":"2023-08-21T15:08:20+00:00","score":1},{"role":"answerer","user_id":"anon_7af9ec8f927a3ae8","comment_id":"jx550me","kind":"comment","text":"If you find a paper to cite, all the better 😃","timestamp":"2023-08-21T15:25:27+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e9bf75fe351be2bb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7af9ec8f927a3ae8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jx4g32q","thanks_reply_id":"jx52avi","post_score":8,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_4e16c8f0d3028269","answerer_user_id":"anon_bf9865c496acd377","subreddit":"LanguageTechnology","timestamp":"2023-08-21T16:41:33+00:00","post_id":"15xculs","question":"What Ffeature engineering for NLP would be best for a Dungeons and Dragons ChatBot?\n\nHello everyone, I have a question. I want to create a chatbot to assist dungeon masters. For example, asking the chatbot, \"How much damage does a fireball spell do if the wizard is level 7?\" or \"What monster can appear in the game if the player group is at level 14?\" I've seen the following datasets on the web: link to datasets. I'm not sure how to approach this problem, such as using bag of words, TF-IDF, Word Embeddings, Seq2Seq, etc. Do I need to create a database with the datasets?","preferred_answer":"A PDF of the Core Rulebook plus any other books you'd want, and a Chroma database (or other vector db) of that chunked out. Look into Langchain PDF support for example.","full_conversation":[{"role":"OP","user_id":"anon_4e16c8f0d3028269","comment_id":"15xculs","kind":"post","text":"What Ffeature engineering for NLP would be best for a Dungeons and Dragons ChatBot?\n\nHello everyone, I have a question. I want to create a chatbot to assist dungeon masters. For example, asking the chatbot, \"How much damage does a fireball spell do if the wizard is level 7?\" or \"What monster can appear in the game if the player group is at level 14?\" I've seen the following datasets on the web: link to datasets. I'm not sure how to approach this problem, such as using bag of words, TF-IDF, Word Embeddings, Seq2Seq, etc. Do I need to create a database with the datasets?","timestamp":"2023-08-21T16:41:33+00:00","score":7},{"role":"answerer","user_id":"anon_bf9865c496acd377","comment_id":"jx60o0p","kind":"comment","text":"A PDF of the Core Rulebook plus any other books you'd want, and a Chroma database (or other vector db) of that chunked out. Look into Langchain PDF support for example.","timestamp":"2023-08-21T18:40:01+00:00","score":3},{"role":"OP","user_id":"anon_4e16c8f0d3028269","comment_id":"jx75u0h","kind":"comment","text":"Thank you very much, I didn't know anything about vector databases. Do you know which one is better to train the model? Supervised learning, unsupervised learning, etc.","timestamp":"2023-08-21T22:58:49+00:00","score":1},{"role":"answerer","user_id":"anon_bf9865c496acd377","comment_id":"jx84omr","kind":"comment","text":"https://python.langchain.com/docs/modules/data_connection/document_loaders/pdf\n\nNo actual training! You'd use an LLM to split your data into chunks, vectorize each, vectorize your question to find relevant chunks, use that as context to the LLM call, get an answer.","timestamp":"2023-08-22T03:13:46+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4e16c8f0d3028269","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bf9865c496acd377","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jx60o0p","thanks_reply_id":"jx75u0h","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_4635bf5aa148da9a","answerer_user_id":"anon_c00a49efdfd79456","subreddit":"LanguageTechnology","timestamp":"2023-08-25T16:26:29+00:00","post_id":"1613y1t","question":"Named Entity Recognition: is there a good guide/tutorial for evaluation/benchmarking?\n\nAs title says. I am no expert in NLP, we got a new project where there is a supposedly good (but possibly outdated) NER model deployed.\n\nCan you link a good tutorial for evaluation and benchmarking? Concepts > complicated models\n\nI found some good labelstudio blogs, but they seem quite specific to their system\n\n​\n\nThank you!","preferred_answer":"I don't know about tutorials, but you should check the [seqeval](https://github.com/chakki-works/seqeval) library. I also recommend [Lignos and Kamyab (2020)](https://aclanthology.org/2020.insights-1.15/) about results reproductibility in NER","full_conversation":[{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"1613y1t","kind":"post","text":"Named Entity Recognition: is there a good guide/tutorial for evaluation/benchmarking?\n\nAs title says. I am no expert in NLP, we got a new project where there is a supposedly good (but possibly outdated) NER model deployed.\n\nCan you link a good tutorial for evaluation and benchmarking? Concepts > complicated models\n\nI found some good labelstudio blogs, but they seem quite specific to their system\n\n​\n\nThank you!","timestamp":"2023-08-25T16:26:29+00:00","score":6},{"role":"answerer","user_id":"anon_c00a49efdfd79456","comment_id":"jxqr0lp","kind":"comment","text":"I don't know about tutorials, but you should check the [seqeval](https://github.com/chakki-works/seqeval) library. I also recommend [Lignos and Kamyab (2020)](https://aclanthology.org/2020.insights-1.15/) about results reproductibility in NER","timestamp":"2023-08-25T20:30:39+00:00","score":4},{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"jxsq6is","kind":"comment","text":"Thank you, those seem super good resources.\n\nI see there are many annotation formats, are there \"standard\" converters? Will search for examples using seqeval","timestamp":"2023-08-26T06:12:08+00:00","score":1},{"role":"answerer","user_id":"anon_c00a49efdfd79456","comment_id":"jxt7jsq","kind":"comment","text":"Sorry, I don't know too much converters. However, when doing flat NER, I would say the most \"classic\" format is BIO (seqeval calls it IOB2). I think the BRAT rapid annotation tool is also popular, and BRAT to BIO conversion scripts seem to exist based on a rapid Google search.\n\nNow if you're doing nested NER, that's another story...","timestamp":"2023-08-26T10:06:35+00:00","score":2},{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"jxv8et2","kind":"comment","text":"I am unable to put into words how useful this conversation is, thank you!\n\nMay I ask you to elaborate a bit further on the nested NER thing? Do you just mean it's a (way more, by gut feeling) complicated task or it's difficult to handle the different methods and approaches since it is a less-standard problem?","timestamp":"2023-08-26T19:31:16+00:00","score":2},{"role":"answerer","user_id":"anon_c00a49efdfd79456","comment_id":"jxxslzg","kind":"comment","text":"Sure! See, when performing \"flat\" NER (as opposed to \"nested\" NER), one does not deal with \"nested\" entities. An example of nested entity might be \"the U.S. Army\". \"U.S.\" in itself can be thought as a LOC entity, and \"the U.S. Army\" as an ORG entity. As you can see, one entity is \"enclosed\" in the other. The classic BIO scheme cannot represent these nested entities, a more complex representation is needed. One possibility is to use trees and represent the problem as a parsing problem. This makes the task harder!\n\nDo you know if your NER model is performing flat or nested NER?","timestamp":"2023-08-27T09:27:44+00:00","score":1},{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"jy285tl","kind":"comment","text":"Yes, I am doing flat NER, but sometimes I get requests for more complex tasks, though I am not sure it is strictly nested NER.\n\nWhat would be helpful is relating the extracted entities, e.g.\n\n\\> \"Novak Djokovic uses a wooded tennis racket and enjoys training on weekends, while Carlos Alcaraz uses a power racket and trains only Mon-Fri\" (this is totally made-up)\n\nEntities would be \\[PER, SPORT\\_TOOL, TRAINING\\_PERIOD\\]: \n\n\\- Novak Djokovic, wooded racket, weekends\n\n\\- Carlos Alcaraz, power racket, Mon-Fri\n\n\\*But\\* I'd be able to associate these distinct entities in a hierarchical fashion e.g.\n\n\\- Novak Djokovic-> \\[wooded racket, weekends\\]\n\n\\- Carlos Alcaraz-> \\[power racket, Mon-Fri\\]","timestamp":"2023-08-28T07:17:44+00:00","score":1},{"role":"answerer","user_id":"anon_c00a49efdfd79456","comment_id":"jy2ecbi","kind":"comment","text":"I guess what you are looking for here is another task called \"relation extraction\" (see http://nlpprogress.com/english/relationship_extraction.html). In that case, you would have an output like:\n\n- (Novak Djokovic, USES, wooden racket)\n- (Novak Djokovic, TRAIN_PERIOD, weekends)\n- (Carlos Alcaraz, USES, power racket)\n- (Carlos Alcaraz, TRAIN_PERIOD, Mon-Fri)","timestamp":"2023-08-28T08:43:31+00:00","score":2},{"role":"OP","user_id":"anon_4635bf5aa148da9a","comment_id":"jycav96","kind":"comment","text":"Thank you for the clarification!","timestamp":"2023-08-30T06:26:21+00:00","score":1}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_4635bf5aa148da9a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c00a49efdfd79456","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jxqr0lp","thanks_reply_id":"jxsq6is","post_score":6,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_05a633e185744819","subreddit":"LanguageTechnology","timestamp":"2023-08-30T13:25:56+00:00","post_id":"165epjv","question":"Do you really need a strong Math ( and ML ) knowledge be a NLP engineer ?\n\nLet me explain a bit. I come from a humanities bachelor's degree background, but with a strong passion for linguistics. I wanted to specialize in computational linguistics, but gradually I also became very interested in NLP and jobs related to NLP. That being said, I hope the repressed computer engineers don't show up now lol\n\nI'm about to start a master's degree called “ Digital Humanities” but which is actually only about language technologies. The program includes various subjects like NLP, computational linguistics, data mining, programming, data analysis, etc. However, I know that the Machine Learning (ML) course is foundational for NLP, but the university's ML course requires strong math foundations, designed for those who have a bachelor's degree in computer science or computer engineering. So, I had thought about giving it up and instead taking the course called “ Computational Intelligence and Deep Learning” that focuses more on topics like fuzzy logic and especially artificial neural networks, RNNs, etc., without requiring initial math foundations. \nAnd maybe adding also an Algorithms class (a good class but not too advanced) to have an additional foundation for NLP. \nAnd then I might study ML on my own through private courses like the one from Stanford on platforms like Coursera. \n\nOr would it be better for me to study the math part (linear algebra, integral and differential calculus, functions) and attempt the ML exam? Keep in mind that I've already taken a statistics course and enjoyed it, but honestly, I don't have that much motivation to study math extensively, especially because I might invest so much effort for none since I might only find jobs like data linguist or computational linguist (given my background in humanistic informatics) where these strong math and ML knowledge are not necessary.\n\nCertainly, my career goal in NLP isn't to engage in researching new algorithms and statistical models. I've noticed there are many people working more as \"NLP engineers\" many practical NLP tasks can be accomplished using existing libraries and tools without delving deep into the underlying mathematical concepts and who directly apply algorithms. So obviously you need t know algorithms and deep learning but not too much deep into math research right?\n\nOr would it be better for me to just give up and focus solely on computational linguistics?","preferred_answer":"To be an engineer, no. The world has moved on past that. Ten years ago you would need to take matrix derivatives by yourself... these days Pytorch just does that for you\n\nTo be a researcher, probably. Understanding why things work in deep learning will greatly contribute to the ability to improve the quality of the models you build.","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"165epjv","kind":"post","text":"Do you really need a strong Math ( and ML ) knowledge be a NLP engineer ?\n\nLet me explain a bit. I come from a humanities bachelor's degree background, but with a strong passion for linguistics. I wanted to specialize in computational linguistics, but gradually I also became very interested in NLP and jobs related to NLP. That being said, I hope the repressed computer engineers don't show up now lol\n\nI'm about to start a master's degree called “ Digital Humanities” but which is actually only about language technologies. The program includes various subjects like NLP, computational linguistics, data mining, programming, data analysis, etc. However, I know that the Machine Learning (ML) course is foundational for NLP, but the university's ML course requires strong math foundations, designed for those who have a bachelor's degree in computer science or computer engineering. So, I had thought about giving it up and instead taking the course called “ Computational Intelligence and Deep Learning” that focuses more on topics like fuzzy logic and especially artificial neural networks, RNNs, etc., without requiring initial math foundations. \nAnd maybe adding also an Algorithms class (a good class but not too advanced) to have an additional foundation for NLP. \nAnd then I might study ML on my own through private courses like the one from Stanford on platforms like Coursera. \n\nOr would it be better for me to study the math part (linear algebra, integral and differential calculus, functions) and attempt the ML exam? Keep in mind that I've already taken a statistics course and enjoyed it, but honestly, I don't have that much motivation to study math extensively, especially because I might invest so much effort for none since I might only find jobs like data linguist or computational linguist (given my background in humanistic informatics) where these strong math and ML knowledge are not necessary.\n\nCertainly, my career goal in NLP isn't to engage in researching new algorithms and statistical models. I've noticed there are many people working more as \"NLP engineers\" many practical NLP tasks can be accomplished using existing libraries and tools without delving deep into the underlying mathematical concepts and who directly apply algorithms. So obviously you need t know algorithms and deep learning but not too much deep into math research right?\n\nOr would it be better for me to just give up and focus solely on computational linguistics?","timestamp":"2023-08-30T13:25:56+00:00","score":31},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"jyemi31","kind":"comment","text":"To be an engineer, no. The world has moved on past that. Ten years ago you would need to take matrix derivatives by yourself... these days Pytorch just does that for you\n\nTo be a researcher, probably. Understanding why things work in deep learning will greatly contribute to the ability to improve the quality of the models you build.","timestamp":"2023-08-30T17:57:31+00:00","score":1},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"jyenaxc","kind":"comment","text":"Thank you, so it’s like statistics let’s say, no one really needs to know the formula of the standard deviation ( well at least you are an academic in statistics) because you do it with your computer but you just need to know when to use the standard deviation right ?","timestamp":"2023-08-30T18:02:12+00:00","score":1},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"jyeogxh","kind":"comment","text":"Frankly, yes. It even goes beyond that in some sense. I have a paper published earlier this year, and two more in reviews, and I haven't taken a derivative since the time I designed a fancier 3D printed marble run ramp for my kids","timestamp":"2023-08-30T18:09:08+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_05a633e185744819","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jyemi31","thanks_reply_id":"jyenaxc","post_score":31,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_e90ca29765d21072","answerer_user_id":"anon_7e478a6817eb8426","subreddit":"LanguageTechnology","timestamp":"2023-09-01T10:29:32+00:00","post_id":"1673ej0","question":"How many target variable classes does sentiment analysis models BERT and RoBERTa have?\n\nHi everyone, so I am a little confused on how many target variable classes does the BERT and RoBERTa models have?\r \n\r \nSo I understand these 2 models are pre-trained models, which means the number of target variable classes are fixed (if I am not wrong!). For example, the link below for the RoBERTa model in Hugging Face has fixed 3 target variable classes (Negative, Neutral and Positive):\r \n\r \nhttps://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest\r \n\r \nBut when I googled around and also asked ChatGPT and Bard, they tell me these models can have as many target variable classes as the user wants (or rather this depends on how many target variable classes there are in the training dataset).\r \n\r \nIf these are pre-trained models already (which already have the number of target variable classes pre-determined in the model already), then how come some of the google sites and ChatGPT and Bard is telling me the user can choose however many target variable classes that they want?","preferred_answer":"Those models are pre-trained *language models*, not sentiment analysis models. They are pretrained (on next word prediction) so that they learn general patterns in language. The one that you link to has also been further trained to do sentiment analysis with three labels (on a particular dataset). They are two separate training phases.","full_conversation":[{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"1673ej0","kind":"post","text":"How many target variable classes does sentiment analysis models BERT and RoBERTa have?\n\nHi everyone, so I am a little confused on how many target variable classes does the BERT and RoBERTa models have?\r \n\r \nSo I understand these 2 models are pre-trained models, which means the number of target variable classes are fixed (if I am not wrong!). For example, the link below for the RoBERTa model in Hugging Face has fixed 3 target variable classes (Negative, Neutral and Positive):\r \n\r \nhttps://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest\r \n\r \nBut when I googled around and also asked ChatGPT and Bard, they tell me these models can have as many target variable classes as the user wants (or rather this depends on how many target variable classes there are in the training dataset).\r \n\r \nIf these are pre-trained models already (which already have the number of target variable classes pre-determined in the model already), then how come some of the google sites and ChatGPT and Bard is telling me the user can choose however many target variable classes that they want?","timestamp":"2023-09-01T10:29:32+00:00","score":7},{"role":"answerer","user_id":"anon_7e478a6817eb8426","comment_id":"jyneyoo","kind":"comment","text":"Those models are pre-trained *language models*, not sentiment analysis models. They are pretrained (on next word prediction) so that they learn general patterns in language. The one that you link to has also been further trained to do sentiment analysis with three labels (on a particular dataset). They are two separate training phases.","timestamp":"2023-09-01T10:59:40+00:00","score":6},{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"jyo5pzp","kind":"comment","text":"Thanks, got you!\n\nWould you happen to know how the Bert or Roberta models would perform on sentiment type questions without the 2nd phase of further sentiment analysis training?","timestamp":"2023-09-01T14:22:02+00:00","score":1},{"role":"answerer","user_id":"anon_7e478a6817eb8426","comment_id":"jyo6yz0","kind":"comment","text":"That would be a \"zero shot\" task where you would have to design a natural language prompt and interpret the model's continuation.. I'm not even sure if you can do that with a BERT architecture as I believe it's encoder only, I think a GPT would be better suited, but I'm unsure, maybe someone else can give you a more definite answer.","timestamp":"2023-09-01T14:29:57+00:00","score":2},{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"jyrtap2","kind":"comment","text":"Ok got you! Many thanks again for this!","timestamp":"2023-09-02T05:40:50+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e90ca29765d21072","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7e478a6817eb8426","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jyneyoo","thanks_reply_id":"jyo5pzp","post_score":7,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_e90ca29765d21072","answerer_user_id":"anon_14e7f6a80939be03","subreddit":"LanguageTechnology","timestamp":"2023-09-02T09:26:55+00:00","post_id":"167xyev","question":"How accurate is GPT4/Bard when you ask what are people talking about a particular topic in social media right now?\n\nHi everyone, I wanted to gather some experiences that you may have to see how accurate it is when you ask GPT4 or Bard what are people talking about a particular topic in social media (Twitter, Reddit, Telegram etc.) right now.\r \n\r \nI personally have been having mixed results, where sometimes it is accurate enough and sometimes it is totally off (eg. links to sites that were a year ago etc).\r \n\r \nWould be great if anyone could share their experiences and input on this, such as is this reliable to do this now (or do we need to wait a little longer for this to be more accurate) or if this is not meant to be working properly yet then what would some of the reasons why this is not currently working with GPT4 or Bard.\r \n\r \nThanks in advance!","preferred_answer":"It’s a language model. It reflects statistical patterns in language, not the latest updates from any particular website.","full_conversation":[{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"167xyev","kind":"post","text":"How accurate is GPT4/Bard when you ask what are people talking about a particular topic in social media right now?\n\nHi everyone, I wanted to gather some experiences that you may have to see how accurate it is when you ask GPT4 or Bard what are people talking about a particular topic in social media (Twitter, Reddit, Telegram etc.) right now.\r \n\r \nI personally have been having mixed results, where sometimes it is accurate enough and sometimes it is totally off (eg. links to sites that were a year ago etc).\r \n\r \nWould be great if anyone could share their experiences and input on this, such as is this reliable to do this now (or do we need to wait a little longer for this to be more accurate) or if this is not meant to be working properly yet then what would some of the reasons why this is not currently working with GPT4 or Bard.\r \n\r \nThanks in advance!","timestamp":"2023-09-02T09:26:55+00:00","score":0},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"jyscb9m","kind":"comment","text":"It’s a language model. It reflects statistical patterns in language, not the latest updates from any particular website.","timestamp":"2023-09-02T09:30:03+00:00","score":14},{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"jz2j08a","kind":"comment","text":"Ok thanks! So GPT4/Bard can’t search based on a timeframe right now?","timestamp":"2023-09-04T08:39:12+00:00","score":1},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"jz2jkzp","kind":"comment","text":"No it doesn’t search at all","timestamp":"2023-09-04T08:45:48+00:00","score":2},{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"jz2knzg","kind":"comment","text":"Ok many thanks for your input on this!","timestamp":"2023-09-04T08:57:54+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e90ca29765d21072","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_14e7f6a80939be03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jyscb9m","thanks_reply_id":"jz2j08a","post_score":0,"answer_score":14,"preferred_answer_is_top_level":true}} {"user_id":"anon_e90ca29765d21072","answerer_user_id":"anon_6cba92bd5fc6716e","subreddit":"LanguageTechnology","timestamp":"2023-09-04T09:09:16+00:00","post_id":"169n2z0","question":"Which is a suitable first open LLM to pick up and learn?\n\nHi everyone, so I am looking to pick up and learn my first open LLM. \n\nI am aware of the open LLM leaderboard in Hugginface here: https://huggingface.co/spaces/ludwigstumpp/llm-leaderboard\n\nIf I wanted an LLM which has the capacity to take in the highest number of input/output tokens (sorry if this is a stupid question for open models) and one which has reasonably good accuracy, from your experience which one would you recommend? \n\nMany thanks for your input!","preferred_answer":"Well, I did answer your question, you see. The extra advice is to help you in future cases, where 5 minutes on Google will give you as good an answer as you have to wait hours for here. If you don’t want to take it to heart, that’s fine, you can continue to make low effort posts on Reddit that will largely go ignored.","full_conversation":[{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"169n2z0","kind":"post","text":"Which is a suitable first open LLM to pick up and learn?\n\nHi everyone, so I am looking to pick up and learn my first open LLM. \n\nI am aware of the open LLM leaderboard in Hugginface here: https://huggingface.co/spaces/ludwigstumpp/llm-leaderboard\n\nIf I wanted an LLM which has the capacity to take in the highest number of input/output tokens (sorry if this is a stupid question for open models) and one which has reasonably good accuracy, from your experience which one would you recommend? \n\nMany thanks for your input!","timestamp":"2023-09-04T09:09:16+00:00","score":5},{"role":"answerer","user_id":"anon_6cba92bd5fc6716e","comment_id":"jz35i0t","kind":"comment","text":"Well, I did answer your question, you see. The extra advice is to help you in future cases, where 5 minutes on Google will give you as good an answer as you have to wait hours for here. If you don’t want to take it to heart, that’s fine, you can continue to make low effort posts on Reddit that will largely go ignored.","timestamp":"2023-09-04T12:35:33+00:00","score":6},{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"jz3bc83","kind":"comment","text":"Yes you did and thank you for your input! I am well aware I should be researching myself first before asking. But I find responses by the community on Reddit subs are generally quite quick and equally good in quality too. Try this out for yourself, saves you a lot of time compared to googling yourself first.","timestamp":"2023-09-04T13:21:35+00:00","score":0},{"role":"answerer","user_id":"anon_6cba92bd5fc6716e","comment_id":"jz3cpl8","kind":"comment","text":"You may be right - I grew up having to rely on myself quite a bit and struggle to ask for help even when it’s appropriate to do so, apologize if I’m giving an “unhelpful” vibe in any way","timestamp":"2023-09-04T13:31:50+00:00","score":2},{"role":"OP","user_id":"anon_e90ca29765d21072","comment_id":"jz3f1c7","kind":"comment","text":"I used to be like that too bro. It cost me my job. I am smarter now. Not smart, not hard bro.","timestamp":"2023-09-04T13:49:17+00:00","score":0}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_e90ca29765d21072","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6cba92bd5fc6716e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"jz35i0t","thanks_reply_id":"jz3bc83","post_score":5,"answer_score":6,"preferred_answer_is_top_level":false}} {"user_id":"anon_816b0d3abc2573b9","answerer_user_id":"anon_0987aa97c8679927","subreddit":"LanguageTechnology","timestamp":"2023-09-12T15:05:03+00:00","post_id":"16gtrk4","question":"How do Large Language Models compare to NLP toolkits for NLP tasks?\n\nI need to do some NLP on text in a number of different languages (English, Spanish, Russian etc). I've experimented using spaCy, stanza and NLTK, as well as some LLMs like ChatGPT, Bard, LLaMa 2 and GPT-4, to do things like lemmatization and POS tagging.\n\nIn my experimentation, GPT-4 with adequate prompting outperformed everything else in every language. I wasn't able to spot any errors.\n\nThe other LLMs were more or less on par with NLP toolkits: LLMs were a bit more robust to imperfections in the input strings (typos, weird punctuation etc), but were more likely to make very simple mistakes too.\n\n​\n\nHave you guys tried to use LLMs for NLP?\n\nCan you confirm my experimental results, or did you get a different outcome?\n\nIs anyone trying to take advantage of the power of LLMs for these tasks? For instance, is anyone trying to extract NLP features from the insides of models like LLaMa 2?","preferred_answer":"Here is some evaluation: [ChatGPT Beyond English: Towards a Comprehensive Evaluation of Large Language Models in Multilingual Learning](https://arxiv.org/abs/2304.05613)","full_conversation":[{"role":"OP","user_id":"anon_816b0d3abc2573b9","comment_id":"16gtrk4","kind":"post","text":"How do Large Language Models compare to NLP toolkits for NLP tasks?\n\nI need to do some NLP on text in a number of different languages (English, Spanish, Russian etc). I've experimented using spaCy, stanza and NLTK, as well as some LLMs like ChatGPT, Bard, LLaMa 2 and GPT-4, to do things like lemmatization and POS tagging.\n\nIn my experimentation, GPT-4 with adequate prompting outperformed everything else in every language. I wasn't able to spot any errors.\n\nThe other LLMs were more or less on par with NLP toolkits: LLMs were a bit more robust to imperfections in the input strings (typos, weird punctuation etc), but were more likely to make very simple mistakes too.\n\n​\n\nHave you guys tried to use LLMs for NLP?\n\nCan you confirm my experimental results, or did you get a different outcome?\n\nIs anyone trying to take advantage of the power of LLMs for these tasks? For instance, is anyone trying to extract NLP features from the insides of models like LLaMa 2?","timestamp":"2023-09-12T15:05:03+00:00","score":14},{"role":"answerer","user_id":"anon_0987aa97c8679927","comment_id":"k0b1lei","kind":"comment","text":"Here is some evaluation: [ChatGPT Beyond English: Towards a Comprehensive Evaluation of Large Language Models in Multilingual Learning](https://arxiv.org/abs/2304.05613)","timestamp":"2023-09-12T20:10:49+00:00","score":1},{"role":"OP","user_id":"anon_816b0d3abc2573b9","comment_id":"k0btq20","kind":"comment","text":"Thanks for the paper. I read the abstract and will read it later.\n\n​\n\n>Compared to the performance of previous models, our extensive experimental results demonstrate a worse performance of ChatGPT for different NLP tasks and languages\n\nDamn though, it seems like this paper looked at ChatGPT with zero-shot.\n\nI'm much more curious about GPT-4 with good prompting and few examples.","timestamp":"2023-09-12T22:59:24+00:00","score":1},{"role":"answerer","user_id":"anon_0987aa97c8679927","comment_id":"k0gvzkj","kind":"comment","text":"> I'm much more curious about GPT-4 with good prompting and few examples.\n\nmakes sense. I got GPT-4 access too late to add it in that benchmark.","timestamp":"2023-09-13T22:08:45+00:00","score":1},{"role":"OP","user_id":"anon_816b0d3abc2573b9","comment_id":"k0j9z3w","kind":"comment","text":"Oh! I didn't notice your username among the paper authors. Nice paper, good job!","timestamp":"2023-09-14T11:14:44+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_816b0d3abc2573b9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0987aa97c8679927","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k0b1lei","thanks_reply_id":"k0btq20","post_score":14,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_14197d1eac017f86","answerer_user_id":"anon_8a084c422ce60a3c","subreddit":"LanguageTechnology","timestamp":"2023-09-24T07:59:00+00:00","post_id":"16qrwen","question":"Which are opensource or free LLM model alternatives to ChatGPT as ChatGPT is expensive for students?\n\nUse case is generic in nature.\n\nLLM model can take Text blog as input or any URL and return contextual data in some format.\n\nfor e.g.\n\nsome one has a blog with post on their hobbies; output should identify person - hobbies and any contextual data\n\nor \n\nsomeone been to a art gallery and wrote post on it; output can have gallery details if anything on building then those characteristics; city-location-address of gallery, art collection, artists and any comments about individual item in post etc..\n\n​\n\ndoes Stanford NLP parser help? or any other recommended libraries which can be used with python or java?\n\n​\n\nThanking in Advance.","preferred_answer":"Er sounds like you need a named entity recognition model.","full_conversation":[{"role":"OP","user_id":"anon_14197d1eac017f86","comment_id":"16qrwen","kind":"post","text":"Which are opensource or free LLM model alternatives to ChatGPT as ChatGPT is expensive for students?\n\nUse case is generic in nature.\n\nLLM model can take Text blog as input or any URL and return contextual data in some format.\n\nfor e.g.\n\nsome one has a blog with post on their hobbies; output should identify person - hobbies and any contextual data\n\nor \n\nsomeone been to a art gallery and wrote post on it; output can have gallery details if anything on building then those characteristics; city-location-address of gallery, art collection, artists and any comments about individual item in post etc..\n\n​\n\ndoes Stanford NLP parser help? or any other recommended libraries which can be used with python or java?\n\n​\n\nThanking in Advance.","timestamp":"2023-09-24T07:59:00+00:00","score":1},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"k1yuqrv","kind":"comment","text":"Er sounds like you need a named entity recognition model.","timestamp":"2023-09-24T08:35:06+00:00","score":4},{"role":"OP","user_id":"anon_14197d1eac017f86","comment_id":"k1ywnz9","kind":"comment","text":"Which opensource library or parser do you suggest?\n\nThanks for your respnse","timestamp":"2023-09-24T08:59:55+00:00","score":0},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"k1yxr5f","kind":"comment","text":"Just go huggingface and try it out. There's plenty there for you to try. Parser? You scrapping from a site?","timestamp":"2023-09-24T09:13:53+00:00","score":2},{"role":"OP","user_id":"anon_14197d1eac017f86","comment_id":"k1zhdpg","kind":"comment","text":"i have email text with some english paragraphs mostly about people - hobbies - lifestyle - residences - art-furniture-outdoor activities like data\n\nWhich API/Library you think can help my requirements.\n\nwill try out out few of them and let you know which one worked most","timestamp":"2023-09-24T12:46:57+00:00","score":1},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"k1zsfvf","kind":"comment","text":"But the preprocessing, you'll have to probably handle it yourself. \n\n\nAs for the text body and title I'll use spacey since it is english.","timestamp":"2023-09-24T14:10:25+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_14197d1eac017f86","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a084c422ce60a3c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k1yuqrv","thanks_reply_id":"k1ywnz9","post_score":1,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_bd13e9cffe39cd12","answerer_user_id":"anon_05a633e185744819","subreddit":"LanguageTechnology","timestamp":"2023-10-12T10:21:51+00:00","post_id":"1763lye","question":"Can tsdae sentence transformer be used for a new language","preferred_answer":"Training a new model given an appropriate embedding and input dataset is exactly the type of thing that should work well.","full_conversation":[{"role":"OP","user_id":"anon_bd13e9cffe39cd12","comment_id":"1763lye","kind":"post","text":"Can tsdae sentence transformer be used for a new language","timestamp":"2023-10-12T10:21:51+00:00","score":3},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"k4kpk93","kind":"comment","text":"Training a new model given an appropriate embedding and input dataset is exactly the type of thing that should work well.","timestamp":"2023-10-12T15:40:24+00:00","score":1},{"role":"OP","user_id":"anon_bd13e9cffe39cd12","comment_id":"k4kqeoj","kind":"comment","text":"thanks for the prompt reply . I really appreciate it. So am i going in the right direction ? I'm a little confused.","timestamp":"2023-10-12T15:45:30+00:00","score":1},{"role":"answerer","user_id":"anon_05a633e185744819","comment_id":"k4lj2dy","kind":"comment","text":"I don't think there's anything English-specific about the method. FWIW, unless it has been done elsewhere (you'll have to search for that yourself), a large scale conversion of the idea to multiple languages (either in a single model or in one model per language) may even be a publishable result","timestamp":"2023-10-12T18:36:41+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bd13e9cffe39cd12","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_05a633e185744819","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k4kpk93","thanks_reply_id":"k4kqeoj","post_score":3,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_c65793c3ff95f38b","answerer_user_id":"anon_b70bfc3d18e9362b","subreddit":"LanguageTechnology","timestamp":"2023-10-13T04:40:44+00:00","post_id":"176qlk3","question":"How to effectively use textual analyses to describe a corpus qualitatively?\n\nHello!\r \n\r \nHope y'all are having a great day. I wanted to provide some background for my question, and it goes something like this: As part of a research project, I have to figure out how \"useful\" certain answers generated from ChatGPT are. The PI leading the project gave me some basic direction on what to do, and I have done some TF-IDF, LDA, n-grams, Word2vec(Skip-gram and CBOW) analyses on the corpus of answers.\r \n\r \nHowever, I am having trouble translating these analyses into something \"useful\". What I am saying is that I am not able to draw any meaning from these analyses, like frequency of the most occurring bigrams, or the topics that have been modelled. Does anyone know how exactly I could use these draw any conclusions from the data? Sorry if this sounds like a stupid question but I am just not very sure how these quantitative analyses are going to provide insight on how qualitatively useful a ChatGPT answer is going to be.\n\nIf there are any other analyses that you might think might be more suited for this problem, and might give some better insights, I would definitely want to know more and try them out!\r \n\r \nThank you in advance.","preferred_answer":"Are you familiar with qualitative coding / thematic coding / deductive coding in qualitative data analysis? If not, I suggest to read up on that.\n\nIn very short, you take a text, break it down into sections (e.g. paragraphs or sentences or just junks talking about same topic), and then you assign \"codes\" to it. Codes are arbitrarily chosen by you depending on the subject you're investigating into. Same section can have one or multiple codes, depending on your study design.\n\nOnce you've coded all your text you then derive quantitative conclusions. Which codes occur frequently? Which ones not? And so on.\n\nThe approach is not 100% quantitative, it mixes subjective judgement (from you as a researcher) with objective statistics.\n\nThere is a huge amount of literature on qualitative data analysis, and it is widely used in research to gain a depth understanding of texts that goes beyond just surface statistics. It focuses particularly on *meaning* of texts. For example, what does it actually mean if a person curses during an interview? Why did the person use reference to certain body parts while cursing and not other body parts? What does the curse express exactly in this context? Why does the person curse exactly in this particular moment of the interview? And so on. You go really deep in your analysis. Often there are many different meanings and explanations - but not arbitrarily many. Some are clearly wrong.","full_conversation":[{"role":"OP","user_id":"anon_c65793c3ff95f38b","comment_id":"176qlk3","kind":"post","text":"How to effectively use textual analyses to describe a corpus qualitatively?\n\nHello!\r \n\r \nHope y'all are having a great day. I wanted to provide some background for my question, and it goes something like this: As part of a research project, I have to figure out how \"useful\" certain answers generated from ChatGPT are. The PI leading the project gave me some basic direction on what to do, and I have done some TF-IDF, LDA, n-grams, Word2vec(Skip-gram and CBOW) analyses on the corpus of answers.\r \n\r \nHowever, I am having trouble translating these analyses into something \"useful\". What I am saying is that I am not able to draw any meaning from these analyses, like frequency of the most occurring bigrams, or the topics that have been modelled. Does anyone know how exactly I could use these draw any conclusions from the data? Sorry if this sounds like a stupid question but I am just not very sure how these quantitative analyses are going to provide insight on how qualitatively useful a ChatGPT answer is going to be.\n\nIf there are any other analyses that you might think might be more suited for this problem, and might give some better insights, I would definitely want to know more and try them out!\r \n\r \nThank you in advance.","timestamp":"2023-10-13T04:40:44+00:00","score":8},{"role":"answerer","user_id":"anon_b70bfc3d18e9362b","comment_id":"k4o9ku2","kind":"comment","text":"Are you familiar with qualitative coding / thematic coding / deductive coding in qualitative data analysis? If not, I suggest to read up on that.\n\nIn very short, you take a text, break it down into sections (e.g. paragraphs or sentences or just junks talking about same topic), and then you assign \"codes\" to it. Codes are arbitrarily chosen by you depending on the subject you're investigating into. Same section can have one or multiple codes, depending on your study design.\n\nOnce you've coded all your text you then derive quantitative conclusions. Which codes occur frequently? Which ones not? And so on.\n\nThe approach is not 100% quantitative, it mixes subjective judgement (from you as a researcher) with objective statistics.\n\nThere is a huge amount of literature on qualitative data analysis, and it is widely used in research to gain a depth understanding of texts that goes beyond just surface statistics. It focuses particularly on *meaning* of texts. For example, what does it actually mean if a person curses during an interview? Why did the person use reference to certain body parts while cursing and not other body parts? What does the curse express exactly in this context? Why does the person curse exactly in this particular moment of the interview? And so on. You go really deep in your analysis. Often there are many different meanings and explanations - but not arbitrarily many. Some are clearly wrong.","timestamp":"2023-10-13T06:35:26+00:00","score":3},{"role":"OP","user_id":"anon_c65793c3ff95f38b","comment_id":"k4ocgk0","kind":"comment","text":"Thank you so much for your advice! I shall definitely take this up, it looks like it will help me out much more than what I have currently chosen to work with. \n\n\nAs an additional question, do you think I should entirely focus on the qualitative strategy and forgo whatever I did so far? Or do you think I could glean something useful from all the quantitative analysis?","timestamp":"2023-10-13T07:10:19+00:00","score":1},{"role":"answerer","user_id":"anon_b70bfc3d18e9362b","comment_id":"k4ocuwg","kind":"comment","text":"Well, if you already have done all that work, you might as well just use that to some degree if it yields anything interesting. No need to throw away work done previously.\n\nHowever, it seems your advisor has given you very vague instructions. It might be worth gaining an overview on qualitative data analysis and then go back to the advisor and discuss what exactly you're supposed to investigate into. Without such an agreement there are a almost infinite ways how to analyze your data.","timestamp":"2023-10-13T07:15:15+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c65793c3ff95f38b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b70bfc3d18e9362b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k4o9ku2","thanks_reply_id":"k4ocgk0","post_score":8,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_89ca910154ecfbec","answerer_user_id":"anon_f5dfe5702d2d9423","subreddit":"LanguageTechnology","timestamp":"2023-10-18T18:31:22+00:00","post_id":"17axri4","question":"Master's in computational linguistics - part time or full time??\n\nHey everyone, \nI'm hopefully starting a masters in Comp Ling next year - and I'll have to decide whether I want to do it full time or part time. \n\n\nTo give you some background, I'm currently a PM at a B2B SaaS startup - 26yo and been working in the industry for a few years. My tenure at each company I've worked at (some very reputable companies, definitely big tech/fortune 500) has been about 1.5y due to either toxic work culture or once due to a layoff. Already worried that <2 years in a role makes me look like a job hopper, but I really want to study computational linguistics next year. I recently started my current role a few months ago, so if I go for a master's full time and quit my current job, that'll also be about 1.5y in the role. TLDR: in Fall 2023, I will have worked at 4 companies in 6.5 years. Maybe it's just me but I'm a bit insecure about it at the moment. And maybe that isn't awful but if I don't want it to look like a continuous pattern on my resume/ affect my hireability. \n\n\nAll that being said, I do have a well-paying job (another reason to not quit), but linguistics (specifically CL) is where my heart is at. I also have enough savings to easily put myself through school. \nGiven the economy and my \\~image as a job hopper\\~ I'd consider working part time, but I know it'll draw out my master's and potentially be harder for me to evaluate other options - such as evaluating another career in ML/NLP via a summer internship, or even potentially going after a PhD in the future. \n\n\nAny advice from someone who's done a master's part time and been successfully well-employed and/or still gone after a PhD ?? Really not sure what to do. Appreciate the help!!","preferred_answer":"Hey there - I did my masters in CL and did the first year full time (went right into it from my bachelors), really overloaded on classes as much as possible, then did the second year part time. This allowed me to complete an internship and roll right into a full time job shortly before graduating. \n\nI’d vote for part time; I don’t *really* think you’ll have a job hopping reputation at this point, but as you said, the economy is a bit shaky, hiring is down, etc. I think doing it part time could also allow you to switch into an NLP-related role before you’re finished, which would be harder to do mid-semester/program. Plus if you change your mind partway through, you can always go full time and dump your current job when/if factors change.","full_conversation":[{"role":"OP","user_id":"anon_89ca910154ecfbec","comment_id":"17axri4","kind":"post","text":"Master's in computational linguistics - part time or full time??\n\nHey everyone, \nI'm hopefully starting a masters in Comp Ling next year - and I'll have to decide whether I want to do it full time or part time. \n\n\nTo give you some background, I'm currently a PM at a B2B SaaS startup - 26yo and been working in the industry for a few years. My tenure at each company I've worked at (some very reputable companies, definitely big tech/fortune 500) has been about 1.5y due to either toxic work culture or once due to a layoff. Already worried that <2 years in a role makes me look like a job hopper, but I really want to study computational linguistics next year. I recently started my current role a few months ago, so if I go for a master's full time and quit my current job, that'll also be about 1.5y in the role. TLDR: in Fall 2023, I will have worked at 4 companies in 6.5 years. Maybe it's just me but I'm a bit insecure about it at the moment. And maybe that isn't awful but if I don't want it to look like a continuous pattern on my resume/ affect my hireability. \n\n\nAll that being said, I do have a well-paying job (another reason to not quit), but linguistics (specifically CL) is where my heart is at. I also have enough savings to easily put myself through school. \nGiven the economy and my \\~image as a job hopper\\~ I'd consider working part time, but I know it'll draw out my master's and potentially be harder for me to evaluate other options - such as evaluating another career in ML/NLP via a summer internship, or even potentially going after a PhD in the future. \n\n\nAny advice from someone who's done a master's part time and been successfully well-employed and/or still gone after a PhD ?? Really not sure what to do. Appreciate the help!!","timestamp":"2023-10-18T18:31:22+00:00","score":1},{"role":"answerer","user_id":"anon_f5dfe5702d2d9423","comment_id":"k5jxp9o","kind":"comment","text":"Hey there - I did my masters in CL and did the first year full time (went right into it from my bachelors), really overloaded on classes as much as possible, then did the second year part time. This allowed me to complete an internship and roll right into a full time job shortly before graduating. \n\nI’d vote for part time; I don’t *really* think you’ll have a job hopping reputation at this point, but as you said, the economy is a bit shaky, hiring is down, etc. I think doing it part time could also allow you to switch into an NLP-related role before you’re finished, which would be harder to do mid-semester/program. Plus if you change your mind partway through, you can always go full time and dump your current job when/if factors change.","timestamp":"2023-10-19T14:59:42+00:00","score":2},{"role":"OP","user_id":"anon_89ca910154ecfbec","comment_id":"k5jz7qx","kind":"comment","text":"Thanks so much for your thoughtful response! I have a ton of follow-up questions that I hope you don't mind me asking: \nHow many classes were you taking per quarter/semester when you did it full time, and how many when you did it part time? I'm kind of worried it'll be stressful for me to do both at the same time.\n\nAlso - could you speak to roughly how many people from your program went after a PhD in Linguistics after (if at all?) And for those who didn't - did they mostly end up in tech working in NLP-related roles? Thank you so much again for all the help!","timestamp":"2023-10-19T15:09:10+00:00","score":1},{"role":"answerer","user_id":"anon_f5dfe5702d2d9423","comment_id":"k5k2vrr","kind":"comment","text":"Sure no worries! I say “overloaded” but it wasn’t actually that crazy lol, I think the most I did was 5 per semester (minimum for FT was 3-4 depending on credits), and part time I did 2 per semester. \n\nRe: stress yeah, having a full time technical internship while also taking 2 classes wasn’t fun for sure, but it is doable. I can see it being a bit more discouraging if I was planning on doing that for 3-4 years instead of just one. \n\nRe: PhDs, i was in a smaller program already but i think that only a couple continued on? I personally went back and forth about it, but ultimately it wasn’t for me (at least not rn, I’m not *that* fascinated by the field and I was tired from my masters lol). That could also be anecdotal, as there were a bunch of linguistics BA graduates who were coming back to the program to get a more “marketable” skill set. And yeah most shot for tech/NLP positions, several are doing that now, and others are doing linguist/PM positions afaik. \n\nIdk what your academic/coding backgrounds are, but grad school will be a great place to figure out whether you want to continue on in academia, so I don’t think you have to have that figured out beforehand.","timestamp":"2023-10-19T15:32:01+00:00","score":4},{"role":"OP","user_id":"anon_89ca910154ecfbec","comment_id":"k5lqkdm","kind":"comment","text":"Thank you!! I think I’d also aim for 2 classes PT, so that makes sense. I did my bachelors double majoring in Econ and Stats/data science - took some CS classes but haven’t been using coding post-grad. Taking some data structures courses to sharpen up currently.\n\nA major reasoning for considering the FT masters off the bat is on the off chance that I’d want to pursue a PhD afterwards - by which point I’d be in my late 20s and it might feel harder to pursue/ easier to revert to working in tech. But age is just a number lol","timestamp":"2023-10-19T21:32:43+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_89ca910154ecfbec","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_f5dfe5702d2d9423","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k5jxp9o","thanks_reply_id":"k5jz7qx","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_5ae6966d41de356b","answerer_user_id":"anon_27d466be4a8b2532","subreddit":"LanguageTechnology","timestamp":"2023-10-23T09:20:41+00:00","post_id":"17eg7cm","question":"Pooled word embeddings vs. sentence embeddings for short multilingual titles: Insights needed\n\nHi Community Friends. \nI'm seeking insights on a particular topic: Is it more effective to use a sentence embedding model or to pool word embeddings for obtaining robust sentence embeddings for really short sentences? \nTo provide some background, I'm working with very short sentences, ranging from 3 to 6 words. These sentences are in multiple languages, specifically Dutch, German, and English. They're product titles, for instance, \"Coca-Cola Zero Sugar\". I initially used the `distiluse-base-multilingual-cased-v1` with sentence-transformer. Subsequently, I explored a little less than 20 different multilingual models designed for sentence embedding. Depending on the model, I've managed to boost my AUPRC (Area Under Precision-Recall Curve) from 0.58 to 0.77. \nGiven the brevity of my sentences, I'm wondering if there might be benefits in opting for a multilingual word embedding model and then employing a pooling technique. Any thoughts or experiences on this? Any rule-of-thumbs on when to use pooled word embeddings instead of sentence embeddings (e.g. number of words, lack of context, etc.)?","preferred_answer":"For what it's worth I'm not sure if sentence representations are the best way to go for this task also.\n\nYou might want to look at potentially using pre-trained Sequence 2 Sequence models and see if they can get you to where you want to go.","full_conversation":[{"role":"OP","user_id":"anon_5ae6966d41de356b","comment_id":"17eg7cm","kind":"post","text":"Pooled word embeddings vs. sentence embeddings for short multilingual titles: Insights needed\n\nHi Community Friends. \nI'm seeking insights on a particular topic: Is it more effective to use a sentence embedding model or to pool word embeddings for obtaining robust sentence embeddings for really short sentences? \nTo provide some background, I'm working with very short sentences, ranging from 3 to 6 words. These sentences are in multiple languages, specifically Dutch, German, and English. They're product titles, for instance, \"Coca-Cola Zero Sugar\". I initially used the `distiluse-base-multilingual-cased-v1` with sentence-transformer. Subsequently, I explored a little less than 20 different multilingual models designed for sentence embedding. Depending on the model, I've managed to boost my AUPRC (Area Under Precision-Recall Curve) from 0.58 to 0.77. \nGiven the brevity of my sentences, I'm wondering if there might be benefits in opting for a multilingual word embedding model and then employing a pooling technique. Any thoughts or experiences on this? Any rule-of-thumbs on when to use pooled word embeddings instead of sentence embeddings (e.g. number of words, lack of context, etc.)?","timestamp":"2023-10-23T09:20:41+00:00","score":2},{"role":"answerer","user_id":"anon_27d466be4a8b2532","comment_id":"k63xq6r","kind":"comment","text":"For what it's worth I'm not sure if sentence representations are the best way to go for this task also.\n\nYou might want to look at potentially using pre-trained Sequence 2 Sequence models and see if they can get you to where you want to go.","timestamp":"2023-10-23T14:30:44+00:00","score":1},{"role":"OP","user_id":"anon_5ae6966d41de356b","comment_id":"k64kxda","kind":"comment","text":"Thanks for the input, will look into seq2seq modelling.\n\nATM I'm trying out different pooling strategies (apart from mean) to see if they better fit some tendencies in my data.","timestamp":"2023-10-23T16:53:58+00:00","score":1},{"role":"answerer","user_id":"anon_27d466be4a8b2532","comment_id":"k64n4v5","kind":"comment","text":"Just curious - what exactly is your plan?","timestamp":"2023-10-23T17:07:13+00:00","score":1},{"role":"OP","user_id":"anon_5ae6966d41de356b","comment_id":"k64qgjw","kind":"comment","text":"Product matching (FMCG). These embeddings are for the retrieval part, i.e. a “gross” list of candidate matches, before passing these to the actual predictors and subsequent ensemble. \n\nIn time, I know I’m going to finetune a model on the data to have a model with more FMCG context instead of general-purpose. But for now, my time is only for finding a better model and strategy for embeddings which will increase recall without hurting precision.","timestamp":"2023-10-23T17:27:08+00:00","score":1},{"role":"answerer","user_id":"anon_27d466be4a8b2532","comment_id":"k65qism","kind":"comment","text":"So what will you do? Cosine similar between sentence embeddings or?","timestamp":"2023-10-23T21:00:05+00:00","score":1},{"role":"OP","user_id":"anon_5ae6966d41de356b","comment_id":"k65wduv","kind":"comment","text":"Yes exactly.","timestamp":"2023-10-23T21:35:40+00:00","score":1},{"role":"answerer","user_id":"anon_27d466be4a8b2532","comment_id":"k65x5gk","kind":"comment","text":"I'm not sure why I'm so surprised that you can get a prec recall curve of 0.77 doing this but that is cool.","timestamp":"2023-10-23T21:40:19+00:00","score":1},{"role":"OP","user_id":"anon_5ae6966d41de356b","comment_id":"k682hnq","kind":"comment","text":"You mean without having done any finetuning? \n\nBy the way, the different pooling strategies didn’t give me any additional gain, so for now I’m sticking with the multilingual-e5-large and planning some finetuning in the beginning of Q1.","timestamp":"2023-10-24T08:26:25+00:00","score":1}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_5ae6966d41de356b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_27d466be4a8b2532","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k63xq6r","thanks_reply_id":"k64kxda","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_aef03552c26d17ff","answerer_user_id":"anon_fa5e8ea2d7bca1b8","subreddit":"LanguageTechnology","timestamp":"2023-11-17T07:57:23+00:00","post_id":"17xa49p","question":"A good modern textbook to get me up to speed on NLP in Python?\n\nHey everyone,\n\nI have an MS in Statistics, but the focus was not on NLP - more classical models with a little machine learning. I'm not sure what's hip in the NLP circles, but I don't want to go down a bunch of rabbit holes trying to find out. Any suggestions?","preferred_answer":"I think this is probably the worst moment in the recent 20 years to ask this question, because transformer models are not only better in typical NLP tasks, for many applications they make the tasks superfluous. Tasks like named entity recognition often provide extracted information from texts, so that one could solve a bigger task with it. Now one can very often just use a LLM (large language model) to solve the bigger task directly. The field is moving with incredible speed and at the moment it seems unclear whether the whole NLP paradigm as it was practiced in the last 50 years is, at least for many application, still the right approach. So I think learning about Deep Learning, then about Transformer models etc. seems to me the best way at the moment. (I think this is also the reason, why the revision of the great book by Jurafsky and Martin is kind of stuck at the moment).","full_conversation":[{"role":"OP","user_id":"anon_aef03552c26d17ff","comment_id":"17xa49p","kind":"post","text":"A good modern textbook to get me up to speed on NLP in Python?\n\nHey everyone,\n\nI have an MS in Statistics, but the focus was not on NLP - more classical models with a little machine learning. I'm not sure what's hip in the NLP circles, but I don't want to go down a bunch of rabbit holes trying to find out. Any suggestions?","timestamp":"2023-11-17T07:57:23+00:00","score":16},{"role":"answerer","user_id":"anon_fa5e8ea2d7bca1b8","comment_id":"k9unxq3","kind":"comment","text":"I think this is probably the worst moment in the recent 20 years to ask this question, because transformer models are not only better in typical NLP tasks, for many applications they make the tasks superfluous. Tasks like named entity recognition often provide extracted information from texts, so that one could solve a bigger task with it. Now one can very often just use a LLM (large language model) to solve the bigger task directly. The field is moving with incredible speed and at the moment it seems unclear whether the whole NLP paradigm as it was practiced in the last 50 years is, at least for many application, still the right approach. So I think learning about Deep Learning, then about Transformer models etc. seems to me the best way at the moment. (I think this is also the reason, why the revision of the great book by Jurafsky and Martin is kind of stuck at the moment).","timestamp":"2023-11-19T04:20:22+00:00","score":-2},{"role":"OP","user_id":"anon_aef03552c26d17ff","comment_id":"k9uqfo9","kind":"comment","text":"Thank you for this. So now the follow-up question: where can I learn about transformers and LLMs? :-D","timestamp":"2023-11-19T04:44:17+00:00","score":1},{"role":"answerer","user_id":"anon_fa5e8ea2d7bca1b8","comment_id":"ka0qauv","kind":"comment","text":">It really depends what you are aiming for: Do you want to add nlp to your abilities to do it practically in a company, do you want to change your field of research etc. And it depends on you existing level of expertise in linear algebra and calculus. \nI really haven't figured out myself how the best way of training people who are not computational linguists but want to do applied text analytics on a level which allows them to follow current research could look like. \nFor practical purposes 'Natural Language Processing with Transformers' is a good entry point but afaik there is not good text book out there at the moment that covers the intense development in the recent 2 years. \nSo I think you have to go this way: Start with a good introduction into deep learning, then read the 'attention is all you need' paper. Then you have three types of architecture to explore: encoder/decoder (like T5), encoder (like BERT), decoder (like GPT). Then you have a list of more specific stuff: continuing pretraining, finetuning, Lora, Parameter-Efficient Fine-Tuning, quantization, prompt engineering etc. \nIt helps a lot if you know something about language, so for example the two books by Emily Bender and Alex Lascarides, Linguistic Fundamentals for Natural Language Processing, could be useful. Even if you don't train for specific linguistic features any longer, it is very useful to have a clear understanding which kind of features plays a role for a task (for example it seems to help sometimes to adjust prompts so the answer includes explanations of specific features). \nFrom the down voting of my first answer I take it that some think my view is wrong, and it may well be the case. Probably the answer really depends quite a lot on what you want to do at the end. What I sketched out is a path to do applied text analytics close to ongoing research, but you may want to rely more on established libraries etcs. or you may want to be part of specific research field like computational linguistics and then the answer would look differently.","timestamp":"2023-11-20T14:34:04+00:00","score":1},{"role":"OP","user_id":"anon_aef03552c26d17ff","comment_id":"ka1evqf","kind":"comment","text":"Thank you so much for the detailed response!","timestamp":"2023-11-20T17:20:34+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_aef03552c26d17ff","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fa5e8ea2d7bca1b8","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k9unxq3","thanks_reply_id":"k9uqfo9","post_score":16,"answer_score":-2,"preferred_answer_is_top_level":true}} {"user_id":"anon_407c21bb26bd7b4c","answerer_user_id":"anon_d55c032a024c3c9d","subreddit":"LanguageTechnology","timestamp":"2023-11-18T13:39:15+00:00","post_id":"17y6oe9","question":"Summarising multiple (approx 50) news articles?\n\nSo, I have built a news aggregation that has aggregated hundreds of news stories. Now I am searching my aggregator using search terms e.g. 'tech jobs' - which brings up all the news articles with the key terms 'tech jobs' in it.\n\nNow I want to generate a summary of all these articles (about 50). In the past I have used NLTK in Python, but it seems this is too much text for this model. \n\nDoes anyone have any suggestions?","preferred_answer":"There are several transformers models for summarization on Hugging Face that are even trained on news articles. Some models off the top of my head include [google/pegasus-multi\\_news](https://huggingface.co/google/pegasus-multi_news) and [facebook/bart-large-cnn](https://huggingface.co/facebook/bart-large-cnn).\n\nYou can also prompt a [T5](https://huggingface.co/t5-base) model to summarize your articles for you too.\n\nFor some code snippets, this [HuggingFace page](https://huggingface.co/tasks/summarization) will be helpful.\n\nAdditionally you may want to look into using generative text models, such as GPT3, [Llama2-7b](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), and [Mistral-7b](https://huggingface.co/mistralai/Mistral-7B-v0.1), and prompt them to summarize your news articles. You will need to carefully write your prompt to specify how you want those summaries written though (length, writing style, etc.)","full_conversation":[{"role":"OP","user_id":"anon_407c21bb26bd7b4c","comment_id":"17y6oe9","kind":"post","text":"Summarising multiple (approx 50) news articles?\n\nSo, I have built a news aggregation that has aggregated hundreds of news stories. Now I am searching my aggregator using search terms e.g. 'tech jobs' - which brings up all the news articles with the key terms 'tech jobs' in it.\n\nNow I want to generate a summary of all these articles (about 50). In the past I have used NLTK in Python, but it seems this is too much text for this model. \n\nDoes anyone have any suggestions?","timestamp":"2023-11-18T13:39:15+00:00","score":3},{"role":"answerer","user_id":"anon_d55c032a024c3c9d","comment_id":"k9skbk4","kind":"comment","text":"There are several transformers models for summarization on Hugging Face that are even trained on news articles. Some models off the top of my head include [google/pegasus-multi\\_news](https://huggingface.co/google/pegasus-multi_news) and [facebook/bart-large-cnn](https://huggingface.co/facebook/bart-large-cnn).\n\nYou can also prompt a [T5](https://huggingface.co/t5-base) model to summarize your articles for you too.\n\nFor some code snippets, this [HuggingFace page](https://huggingface.co/tasks/summarization) will be helpful.\n\nAdditionally you may want to look into using generative text models, such as GPT3, [Llama2-7b](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), and [Mistral-7b](https://huggingface.co/mistralai/Mistral-7B-v0.1), and prompt them to summarize your news articles. You will need to carefully write your prompt to specify how you want those summaries written though (length, writing style, etc.)","timestamp":"2023-11-18T18:34:17+00:00","score":2},{"role":"OP","user_id":"anon_407c21bb26bd7b4c","comment_id":"k9taxgd","kind":"comment","text":"Thanks, I'll look into these. I'm aware of hugging face, but when I was trying to summarise 50 articles all at once, it did not work.\n\nThe issue i was having was summarizing large (5k+ words) amount of text.","timestamp":"2023-11-18T21:49:27+00:00","score":1},{"role":"answerer","user_id":"anon_d55c032a024c3c9d","comment_id":"k9tc02v","kind":"comment","text":"Interesting — what type of model did you use?\n\nYou may also need to split or truncate your input if it's that long, and experiment if truncating or splitting your input will produce better results...?","timestamp":"2023-11-18T21:57:28+00:00","score":1},{"role":"OP","user_id":"anon_407c21bb26bd7b4c","comment_id":"k9x32dm","kind":"comment","text":"Sure, will try that","timestamp":"2023-11-19T18:41:03+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_407c21bb26bd7b4c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d55c032a024c3c9d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"k9skbk4","thanks_reply_id":"k9taxgd","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_5380ee2266f29c11","answerer_user_id":"anon_14e7f6a80939be03","subreddit":"LanguageTechnology","timestamp":"2023-11-25T14:34:19+00:00","post_id":"183l0l6","question":"Question about semantic search engine using cricket data of past 10 years\n\nI am a computer science student working on a project to create an application that allows users to query cricket data from the past 10 years. I plan to compile information on matches, players, and news in a text file. My goal is to build a model that can answer queries such as \"who scored the most runs in ODI,\" \"who is the god of cricket,\" or \"who retired after the 2011 World Cup.\" \nI would appreciate guidance on the following: \n1. Choice of Models: What machine learning or natural language processing models would be suitable for this task? Are there any specific models that excel in handling cricket-related queries? \n2. Data Preparation: How should I structure and organize the cricket data in my text file to facilitate effective querying? Are there any best practices for preparing the data for training? \n3. Training Process: What steps should I follow to train the model for accurate and meaningful responses to cricket-related queries? Are there any specific considerations for training a query-based system? \n4. Code Examples or Tutorials: If possible, could you provide code examples or point me to tutorials/resources that demonstrate the implementation of a similar query-based system?","preferred_answer":"See from your examples it seems like you want your system to do some mathematical reasoning (who had the highest score etc) rather than just finding text that someone else wrote before. So in that case you’ll need a database since (in the case that there is a higher number but no one explicitly writes “this was the best score ever” you’ll need to have your model do math. A SQL query is perfect for that, but then of course you’d need to structure your data. Surely someone has already made a cricket score database out there. \n\nBut please do talk to your teachers - this could be. a huge project and they can help you find a sub-question that will fit where you’re at with your learning.","full_conversation":[{"role":"OP","user_id":"anon_5380ee2266f29c11","comment_id":"183l0l6","kind":"post","text":"Question about semantic search engine using cricket data of past 10 years\n\nI am a computer science student working on a project to create an application that allows users to query cricket data from the past 10 years. I plan to compile information on matches, players, and news in a text file. My goal is to build a model that can answer queries such as \"who scored the most runs in ODI,\" \"who is the god of cricket,\" or \"who retired after the 2011 World Cup.\" \nI would appreciate guidance on the following: \n1. Choice of Models: What machine learning or natural language processing models would be suitable for this task? Are there any specific models that excel in handling cricket-related queries? \n2. Data Preparation: How should I structure and organize the cricket data in my text file to facilitate effective querying? Are there any best practices for preparing the data for training? \n3. Training Process: What steps should I follow to train the model for accurate and meaningful responses to cricket-related queries? Are there any specific considerations for training a query-based system? \n4. Code Examples or Tutorials: If possible, could you provide code examples or point me to tutorials/resources that demonstrate the implementation of a similar query-based system?","timestamp":"2023-11-25T14:34:19+00:00","score":1},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"kap9sqe","kind":"comment","text":"See from your examples it seems like you want your system to do some mathematical reasoning (who had the highest score etc) rather than just finding text that someone else wrote before. So in that case you’ll need a database since (in the case that there is a higher number but no one explicitly writes “this was the best score ever” you’ll need to have your model do math. A SQL query is perfect for that, but then of course you’d need to structure your data. Surely someone has already made a cricket score database out there. \n\nBut please do talk to your teachers - this could be. a huge project and they can help you find a sub-question that will fit where you’re at with your learning.","timestamp":"2023-11-25T14:48:53+00:00","score":2},{"role":"OP","user_id":"anon_5380ee2266f29c11","comment_id":"kapa8n9","kind":"comment","text":"ya that makes sense! thank you. \nBut say now, i just want to retrieve a document that semantically matches my query. I need not generate anything, just retrieval of the document that i need. \nWhat are the steps?","timestamp":"2023-11-25T14:52:17+00:00","score":1},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"kapafr9","kind":"comment","text":"In this case try looking at S-BERT which you could fine-tune on cricket/sports data (or go hunting online since I’m sure people have already fine-tuned model on sports news).","timestamp":"2023-11-25T14:53:46+00:00","score":2},{"role":"OP","user_id":"anon_5380ee2266f29c11","comment_id":"kapbemj","kind":"comment","text":"thank you man!","timestamp":"2023-11-25T15:01:10+00:00","score":1},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"kapbgxx","kind":"comment","text":"No worries (and it’s lady ;) )","timestamp":"2023-11-25T15:01:38+00:00","score":1},{"role":"OP","user_id":"anon_5380ee2266f29c11","comment_id":"kapbmz1","kind":"comment","text":"Oh sorry lol! thank you mam!","timestamp":"2023-11-25T15:02:51+00:00","score":2}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_5380ee2266f29c11","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_14e7f6a80939be03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kap9sqe","thanks_reply_id":"kapa8n9","post_score":1,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_a5a52bb48c623f26","answerer_user_id":"anon_14e7f6a80939be03","subreddit":"LanguageTechnology","timestamp":"2023-12-18T14:47:51+00:00","post_id":"18laf6f","question":"Career Advice: Should I switch from Marketing to NLP/Computational Linguistics as a Linguistics MA?\n\nI am currently in the 3rd semester of my Linguistics MA program in Germany and working as a student in a big company's marketing department. I've had an interest in NLP stuff and have a modest background in Python, nltk, and SQL. (Tried to do some sentiment analysis stuff with web scraping as well, though all these were personal.)\n\n \nShould I build skills in computational linguistics and switch my focus as its a growing field? Even though we worked with some NLP methods, my program's focus was not on NLP. I'm assuming that it would be harder without a technical background, but I think I could somehow mix marketing analysis with NLP tech. that could be my niche. What would be your advice for me?","preferred_answer":"Look into the programs at Saarland, I did this and everyone’s had great career outcomes including the bunch of linguists","full_conversation":[{"role":"OP","user_id":"anon_a5a52bb48c623f26","comment_id":"18laf6f","kind":"post","text":"Career Advice: Should I switch from Marketing to NLP/Computational Linguistics as a Linguistics MA?\n\nI am currently in the 3rd semester of my Linguistics MA program in Germany and working as a student in a big company's marketing department. I've had an interest in NLP stuff and have a modest background in Python, nltk, and SQL. (Tried to do some sentiment analysis stuff with web scraping as well, though all these were personal.)\n\n \nShould I build skills in computational linguistics and switch my focus as its a growing field? Even though we worked with some NLP methods, my program's focus was not on NLP. I'm assuming that it would be harder without a technical background, but I think I could somehow mix marketing analysis with NLP tech. that could be my niche. What would be your advice for me?","timestamp":"2023-12-18T14:47:51+00:00","score":4},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"kdworfe","kind":"comment","text":"Look into the programs at Saarland, I did this and everyone’s had great career outcomes including the bunch of linguists","timestamp":"2023-12-18T16:23:18+00:00","score":3},{"role":"OP","user_id":"anon_a5a52bb48c623f26","comment_id":"ke0m8pp","kind":"comment","text":"thank you. sounds great but I'm 25 and I'm not sure if I should continue with more graduate programmes","timestamp":"2023-12-19T09:39:07+00:00","score":1},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"ke0qk0o","kind":"comment","text":"Well, if your question is “should I be (through self learning or otherwise) the person in the marketing world who knows best about how to apply NLP and AI and automation (especially in a responsible way)?” Resounding yes. If you want to be a NLP developer who works on marketing applications - you’ll have a hard time cutting through the noise of everyone else who’s self-learning due to the current AI hype without a formal qualification, but it is a cool area to be in, though increasingly competitive. I think employers will choose deep NLP experience and credentials over domain knowledge 9 times out of 10 - unless a really specialized field like medicine, finance, industrial systems etc.","timestamp":"2023-12-19T10:35:18+00:00","score":1},{"role":"OP","user_id":"anon_a5a52bb48c623f26","comment_id":"ke130md","kind":"comment","text":"Thank you so much.","timestamp":"2023-12-19T12:52:01+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a5a52bb48c623f26","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_14e7f6a80939be03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kdworfe","thanks_reply_id":"ke0m8pp","post_score":4,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_693d9f36b549f23c","answerer_user_id":"anon_0269a0af524be0a7","subreddit":"LanguageTechnology","timestamp":"2023-12-23T21:10:18+00:00","post_id":"18pf5bt","question":"People with LT/NLP/Comp Ling degrees: what should I look for in a master's degree in this field?\n\nHi! So far I've applied for 7 master's programs in language technology/natural language processing/computational linguistics (NLP - Cardiff U; CS with Speech and Language Processing - U of Sheffield; Digital Text Analysis - U of Antwerp; Speech and Language Processing - U of Edinburgh; CL - Goldsmiths UoL; Ling with CL specialization - UCL; and CL - U of Manchester).\n\nI've already received 3 acceptances but I'd like your input/advice into the syllabuses of such programs; how can I recognize if a program is better than the other so to ensure getting a job afterwards?\n\nThanks!","preferred_answer":"I know UCL and Edinburgh had awesome computational research going on in the last ten years with some great work coming out. But that might not matter so much for a professional masters program. The others are right: find something that focuses a lot on the CS and ML side, particularly as it sounds like you already have a good ling background.","full_conversation":[{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"18pf5bt","kind":"post","text":"People with LT/NLP/Comp Ling degrees: what should I look for in a master's degree in this field?\n\nHi! So far I've applied for 7 master's programs in language technology/natural language processing/computational linguistics (NLP - Cardiff U; CS with Speech and Language Processing - U of Sheffield; Digital Text Analysis - U of Antwerp; Speech and Language Processing - U of Edinburgh; CL - Goldsmiths UoL; Ling with CL specialization - UCL; and CL - U of Manchester).\n\nI've already received 3 acceptances but I'd like your input/advice into the syllabuses of such programs; how can I recognize if a program is better than the other so to ensure getting a job afterwards?\n\nThanks!","timestamp":"2023-12-23T21:10:18+00:00","score":13},{"role":"answerer","user_id":"anon_0269a0af524be0a7","comment_id":"ket0s6g","kind":"comment","text":"I know UCL and Edinburgh had awesome computational research going on in the last ten years with some great work coming out. But that might not matter so much for a professional masters program. The others are right: find something that focuses a lot on the CS and ML side, particularly as it sounds like you already have a good ling background.","timestamp":"2023-12-25T00:10:48+00:00","score":3},{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"ket1h5j","kind":"comment","text":"Thank you so much! Are you in the field as well? Do you recommend it in general?","timestamp":"2023-12-25T00:16:18+00:00","score":1},{"role":"answerer","user_id":"anon_0269a0af524be0a7","comment_id":"ket5817","kind":"comment","text":"Right now the market in the US seems to be tough, and very few engineers here have any idea what linguistics even is, so you have to learn to sort of justify your background to people. I think it's at least a little better in Europe. In Europe, in the recent past at least, there has been more interest in language as such and more government funding emphasizing practical cross linguistic tech. For obvious reasons.\n\nI've found it to mostly be very rewarding and challenging work, but getting a foothold after school may be difficult. I started about ten years ago and even then I had to be pretty flexible to get a job I really wanted.\n\nAnother thing to look for in comparing programs is what jobs their recent grads have been landing. Get hard numbers if they will share them. Ask them for email addresses of recent alumni and get their impressions.\n\nGood luck!","timestamp":"2023-12-25T00:46:14+00:00","score":3},{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"ket5dnn","kind":"comment","text":"Thank you so much!","timestamp":"2023-12-25T00:47:33+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_693d9f36b549f23c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0269a0af524be0a7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ket0s6g","thanks_reply_id":"ket1h5j","post_score":13,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_bf9b7415ed4992c3","answerer_user_id":"anon_091aa40fc9fddb03","subreddit":"LanguageTechnology","timestamp":"2024-01-11T14:29:27+00:00","post_id":"1942zx5","question":"Looking For a B.A. Thesis Topic\n\nHello, I am a Translation Studies senior student, and right now I am trying to pick a topic for my B.A. thesis. I plan to do my masters in NLP, so I figured it would be a good idea to write my thesis on machine translation. But I am not very informed on this topic as I decided on my route very recently. Could you give me ideas for my thesis that you think I can pull off? Thanks!","preferred_answer":"it's quite hard to suggest without information about the technical skills you have, but since you have a focus on translation, look into the topic of machine translation and you can do a sort of exploratory report of the domain and what are the current challenges and state of the art. if you feel comfortable with working with transformers and python, you can go for fine tunning a multi lingual pretrained language model to do translation of your own domain specific corpus.","full_conversation":[{"role":"OP","user_id":"anon_bf9b7415ed4992c3","comment_id":"1942zx5","kind":"post","text":"Looking For a B.A. Thesis Topic\n\nHello, I am a Translation Studies senior student, and right now I am trying to pick a topic for my B.A. thesis. I plan to do my masters in NLP, so I figured it would be a good idea to write my thesis on machine translation. But I am not very informed on this topic as I decided on my route very recently. Could you give me ideas for my thesis that you think I can pull off? Thanks!","timestamp":"2024-01-11T14:29:27+00:00","score":1},{"role":"answerer","user_id":"anon_091aa40fc9fddb03","comment_id":"khdmuib","kind":"comment","text":"it's quite hard to suggest without information about the technical skills you have, but since you have a focus on translation, look into the topic of machine translation and you can do a sort of exploratory report of the domain and what are the current challenges and state of the art. if you feel comfortable with working with transformers and python, you can go for fine tunning a multi lingual pretrained language model to do translation of your own domain specific corpus.","timestamp":"2024-01-11T16:09:34+00:00","score":1},{"role":"OP","user_id":"anon_bf9b7415ed4992c3","comment_id":"khdob9w","kind":"comment","text":"Thank you so much for your reply! \n\nI came up with a vague topic of research: \nEvaluation of Neural Machine Translation Models: A Comparative Analysis \nComparing the performance of different neural machine translation models, such as Transformer, LSTM, and GRU, on specific language pairs. Then evaluating their strengths and weaknesses in terms of translation quality, speed, and resource requirements. \n\n\nHowever, I am not acquainted with neural machine translation models, so I don't know if this is achievable for me. Is this doable by any chance?","timestamp":"2024-01-11T16:17:55+00:00","score":1},{"role":"answerer","user_id":"anon_091aa40fc9fddb03","comment_id":"khdrygv","kind":"comment","text":"I think it is doable, but could take some time depending upon your how many things you compare and how much in depth you go, would recommend atleast 2 months time if you want to go deep.","timestamp":"2024-01-11T16:38:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bf9b7415ed4992c3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_091aa40fc9fddb03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"khdmuib","thanks_reply_id":"khdob9w","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_74d8f07109f2f271","answerer_user_id":"anon_2a122fccf47c3e1b","subreddit":"LanguageTechnology","timestamp":"2024-01-21T09:13:26+00:00","post_id":"19bzhbp","question":"What framework to use to build an open-sourced LLM chatbot which is enterprise scalable to multiple users\n\nHey guys, what framework or tools do I use if I wanted to build an open-sourced LLM chatbot which is enterprise scalable to multiple users?\n\nA framework/tool I am thinking of is Langchain. There won’t be any fine-tuning for my chatbot so I am not sure if I need to use Langchain.\n\nWould there be a different suitable framework to use if I wanted to build for a small to mid sized enterprise compared to a large enterprise?\n\nI am thinking of using AWS to host the LLM model. \n\nAny help would really be appreciated. Many thanks!","preferred_answer":"lol never use langchain in production. even the founder has outright said that langchain shouldn't be used in production. Look at the no of open issues on github for this framework\n\nIf you are building an application for enterprise use you want full control over everything including the ability to build safeguards and what not so it is best to just use langchain or any other framework to experiment then transition to just using the open sourced LLM with any of the popular LLM inference engines out there and write your own workflow and prompts","full_conversation":[{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"19bzhbp","kind":"post","text":"What framework to use to build an open-sourced LLM chatbot which is enterprise scalable to multiple users\n\nHey guys, what framework or tools do I use if I wanted to build an open-sourced LLM chatbot which is enterprise scalable to multiple users?\n\nA framework/tool I am thinking of is Langchain. There won’t be any fine-tuning for my chatbot so I am not sure if I need to use Langchain.\n\nWould there be a different suitable framework to use if I wanted to build for a small to mid sized enterprise compared to a large enterprise?\n\nI am thinking of using AWS to host the LLM model. \n\nAny help would really be appreciated. Many thanks!","timestamp":"2024-01-21T09:13:26+00:00","score":5},{"role":"answerer","user_id":"anon_2a122fccf47c3e1b","comment_id":"kivi3ct","kind":"comment","text":"lol never use langchain in production. even the founder has outright said that langchain shouldn't be used in production. Look at the no of open issues on github for this framework\n\nIf you are building an application for enterprise use you want full control over everything including the ability to build safeguards and what not so it is best to just use langchain or any other framework to experiment then transition to just using the open sourced LLM with any of the popular LLM inference engines out there and write your own workflow and prompts","timestamp":"2024-01-21T11:02:01+00:00","score":7},{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"kivlf82","kind":"comment","text":"Ok many thanks for the above. \n\nSorry can I ask what are LLM inference engines and what are some of the popular examples?","timestamp":"2024-01-21T11:42:21+00:00","score":2},{"role":"answerer","user_id":"anon_2a122fccf47c3e1b","comment_id":"kiwjxga","kind":"comment","text":"vllm, huggingface's TGI are the easy choices. what you want to use depends on if you want to run on cpu or gpu or if you need support for quantization, qlora etc\n\nif you have access to AWS you can also look into bedrock to not have deal with setting up the infra and configure stuff. You will be limited by the models that are available on the platform though.\n\nYou probably have to do your own due diligence here since LLM inference can be expensive and there are many considerations such as the load you are facing and how do you want to deal with it and what kind of latency do you need . Do you need continuous batching etc?","timestamp":"2024-01-21T16:19:12+00:00","score":2},{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"kjqlcwt","kind":"comment","text":"Ok great, I will check out Bedrock to see if they support the Mixtral 8x7b model.\n\nAt this stage I don’t think I will need continuous batching but it would be nice to have later on. If I wanted to do continuous batching, what are some of the things I need to consider?","timestamp":"2024-01-27T00:20:38+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_74d8f07109f2f271","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2a122fccf47c3e1b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kivi3ct","thanks_reply_id":"kivlf82","post_score":5,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_a65f2f03c259b202","answerer_user_id":"anon_fcea4c53af5f8bdb","subreddit":"LanguageTechnology","timestamp":"2024-01-29T20:11:05+00:00","post_id":"1ae4vo8","question":"Trying to implement an LLM fine-tuning classification project-- what to use as a baseline to see if it was worthwhile?\n\nHi all,\n\nTo learn LLMs I want to try and implement a project for fun. The idea is to take a HuggingFace pretrained model such as DistilBERT, add a binary classifier layer, and then fine tune the model to recognize paragraphs from document type A or document type B. Assume that I can gather a couple of hundred pages of each document type for fine tuning. \n\n\nWhat I would like to achieve is to be able to say that we have obtained some improvement with respect to the baseline. Of course, the task is very specific so there aren't really any established baselines for this task that I have in mind. \n\n\nI was curious if it is still possible to come up with some type of default or baseline? Is there a way for example to use the pretrained DistilBERT in a clever way to get answers before fine-tuning? \n\n\nFor example, I am sure that GPT-4 can blow this task out of the water and always tell me exactly what the answer is. Is there a way to also do it with the pretrained model that I will be using for fine tuning? \n\n\nThanks a lot. \n\n\n​","preferred_answer":"It is possible to use any BERT variant model, you need just to fine-tune it on your task-specific labeled dataset, tweak some hyperparams (if needed), and see how the model learns. \nIt would be better if you fine-tune a model pre-trained in the same language as your task... \nPS: The smaller your dataset, the higher the probability that your model will overfit","full_conversation":[{"role":"OP","user_id":"anon_a65f2f03c259b202","comment_id":"1ae4vo8","kind":"post","text":"Trying to implement an LLM fine-tuning classification project-- what to use as a baseline to see if it was worthwhile?\n\nHi all,\n\nTo learn LLMs I want to try and implement a project for fun. The idea is to take a HuggingFace pretrained model such as DistilBERT, add a binary classifier layer, and then fine tune the model to recognize paragraphs from document type A or document type B. Assume that I can gather a couple of hundred pages of each document type for fine tuning. \n\n\nWhat I would like to achieve is to be able to say that we have obtained some improvement with respect to the baseline. Of course, the task is very specific so there aren't really any established baselines for this task that I have in mind. \n\n\nI was curious if it is still possible to come up with some type of default or baseline? Is there a way for example to use the pretrained DistilBERT in a clever way to get answers before fine-tuning? \n\n\nFor example, I am sure that GPT-4 can blow this task out of the water and always tell me exactly what the answer is. Is there a way to also do it with the pretrained model that I will be using for fine tuning? \n\n\nThanks a lot. \n\n\n​","timestamp":"2024-01-29T20:11:05+00:00","score":2},{"role":"answerer","user_id":"anon_fcea4c53af5f8bdb","comment_id":"kk68m5f","kind":"comment","text":"It is possible to use any BERT variant model, you need just to fine-tune it on your task-specific labeled dataset, tweak some hyperparams (if needed), and see how the model learns. \nIt would be better if you fine-tune a model pre-trained in the same language as your task... \nPS: The smaller your dataset, the higher the probability that your model will overfit","timestamp":"2024-01-29T22:31:13+00:00","score":1},{"role":"OP","user_id":"anon_a65f2f03c259b202","comment_id":"kk68ysn","kind":"comment","text":"Thanks, so yeah that's what I'm asking. If I were to do it with a smaller BERT-like model, is there a way to benchmark a task like this? Is there a \"default\" pretrained model that I can load from HuggingFace that can answer already on questions like \"Is the following sentence coming from document type A or document type B?\"?","timestamp":"2024-01-29T22:33:16+00:00","score":1},{"role":"answerer","user_id":"anon_fcea4c53af5f8bdb","comment_id":"kk6grpx","kind":"comment","text":"I see this as a binary classification task, your text is labeled with two classes doc\\_type\\_A and doc\\_type\\_B. You can use hugging face to call any of the existing sequence classification models \n[https://huggingface.co/docs/transformers/v4.17.0/en/tasks/sequence\\_classification](https://huggingface.co/docs/transformers/v4.17.0/en/tasks/sequence_classification) \nFor benchmarking you can test your model on GLUE benchmark or compare your model's performance on any other text classification [benchmark](https://paperswithcode.com/task/text-classification/latest)","timestamp":"2024-01-29T23:20:19+00:00","score":2},{"role":"OP","user_id":"anon_a65f2f03c259b202","comment_id":"kk6if53","kind":"comment","text":"I feel like I'm not being clear. I have a task in mind : classify documents to A and B. \n\n\nI want to have a \"BEFORE\" baseline for this task, before I do any training or any finetuning at all. In other words, use an existing model to classify them to the best of its ability without having to show a single label to it. How to do this? \n\n\nThen afterwards I do finetuning and show aha we have improved so much by fine tuning it!","timestamp":"2024-01-29T23:30:44+00:00","score":1},{"role":"answerer","user_id":"anon_fcea4c53af5f8bdb","comment_id":"kock0vs","kind":"comment","text":"I don't think classifying will be possible without fine-tuning the model. \nStill, you can use a model (already fine-tuned) on the same task with the same labels and give it your examples directly...You can try some other fine-tuning approaches using few-shot learning. \nBERT-like models are task-specific models because of the classifier layer added on top. And each time you choose a task you need to modify the config of this layer. You can try another thing: Use BERT-like model embeddings to represent your text and give it to another classifier or apply some clustering or similarity-based approaches on top of it... \nOtherwise, if you don't want to use supervised learning strategies, you'd better go with LLMs. You can ask an LLM to perform a classification task by providing very few examples in your prompts.","timestamp":"2024-01-31T22:21:44+00:00","score":1},{"role":"OP","user_id":"anon_a65f2f03c259b202","comment_id":"kofem2m","kind":"comment","text":"Thanks! \n\n\nIn your experience, do you think fine-tuning a BERT-level classifier that you can run locally through HugginFace (or distillBERT or deBERTA or GPT-2) will be able to do this classification? The documents are quite similar so it's subtle differences it's supposed to pick up on. Or will it not be strong enough.","timestamp":"2024-02-01T12:47:20+00:00","score":1},{"role":"answerer","user_id":"anon_fcea4c53af5f8bdb","comment_id":"kofwpyf","kind":"comment","text":"Yes, if your dataset is not that big and your computer can handle the computations. Because BERT like models are usually finetuned on 4 epochs.\nAnd yeah they are good in classification tasks, unless there is an issue with your data (not clean enough or the dataset is very small) you'll notice overfitting signs.\nAgain i am talking here about the case you fine-tune with your labeled dataset.\nGood luck :)","timestamp":"2024-02-01T14:57:47+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_a65f2f03c259b202","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fcea4c53af5f8bdb","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kk68m5f","thanks_reply_id":"kk68ysn","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_14e7f6a80939be03","subreddit":"LanguageTechnology","timestamp":"2024-02-11T19:47:09+00:00","post_id":"1aogmth","question":"Is it really worth a MA degree in Computational linguistics, especially in Gemrman ( Konstanz/ Tubingen) university? Are there really many job opportunities afterward ?\n\nI am about to graduate in a three-year course in foreign languages and literatures, I have taken various linguistics exams and am currently working on a thesis in historical linguistics.\n\n I have a great passion for linguistics and have become particularly interested in computational linguistics. At the moment, my professor of historical linguistics is very interested in me and has asked me to stay, not to leave, and always talks to me, even if not explicitly, about pursuing a Ph.D. in the future. Therefore, the choice was between staying at my university and continuing with the faculty of languages and cultures of Asia with a specialization in historical linguistics with the possibility of taking 3-4 courses in computational linguistics, or attending the university for NLP and computational linguistics in Germany at Konstanz or Tubingen, as they seem to be the only ones that accept students who do not have a background in computer science and do not require too much basic knowledge.\n\nI was wondering what the job prospects are after this degree, are there many job opportunities? Do these two programs (Konstanz / Tubingen) manage to easily place students in the workforce?\n\nSince I doubt that with just a few computational linguistics exams from my university I will really be able to find a job in these fields.\"","preferred_answer":"Please don’t feel down on yourself about your BA - it’s a wonderful generalist degree that helps with a broad range of professional skills. But there are just minimal returns pursuing it at a postgrad level. \n\nIn sum, do it if you love it. If you don’t love it so much that you’re happy to do it for free and sacrifice other potentially productive educational years for it, stay a hundred miles away and study something else that’s professionally attractive (and make it your whole degree, not some side units), whether that’s CL or something entirely different.","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1aogmth","kind":"post","text":"Is it really worth a MA degree in Computational linguistics, especially in Gemrman ( Konstanz/ Tubingen) university? Are there really many job opportunities afterward ?\n\nI am about to graduate in a three-year course in foreign languages and literatures, I have taken various linguistics exams and am currently working on a thesis in historical linguistics.\n\n I have a great passion for linguistics and have become particularly interested in computational linguistics. At the moment, my professor of historical linguistics is very interested in me and has asked me to stay, not to leave, and always talks to me, even if not explicitly, about pursuing a Ph.D. in the future. Therefore, the choice was between staying at my university and continuing with the faculty of languages and cultures of Asia with a specialization in historical linguistics with the possibility of taking 3-4 courses in computational linguistics, or attending the university for NLP and computational linguistics in Germany at Konstanz or Tubingen, as they seem to be the only ones that accept students who do not have a background in computer science and do not require too much basic knowledge.\n\nI was wondering what the job prospects are after this degree, are there many job opportunities? Do these two programs (Konstanz / Tubingen) manage to easily place students in the workforce?\n\nSince I doubt that with just a few computational linguistics exams from my university I will really be able to find a job in these fields.\"","timestamp":"2024-02-11T19:47:09+00:00","score":10},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"kq5ghvg","kind":"comment","text":"Please don’t feel down on yourself about your BA - it’s a wonderful generalist degree that helps with a broad range of professional skills. But there are just minimal returns pursuing it at a postgrad level. \n\nIn sum, do it if you love it. If you don’t love it so much that you’re happy to do it for free and sacrifice other potentially productive educational years for it, stay a hundred miles away and study something else that’s professionally attractive (and make it your whole degree, not some side units), whether that’s CL or something entirely different.","timestamp":"2024-02-12T22:50:23+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"kq662v6","kind":"comment","text":"Thanks for comment, but why do you think the things you said, is it because it's not worth pursuing the academic path?","timestamp":"2024-02-13T01:36:12+00:00","score":1},{"role":"answerer","user_id":"anon_14e7f6a80939be03","comment_id":"kq69sxj","kind":"comment","text":"Since I studied CL about half have gone into industry and half did a PhD. In sum those in industry are far happier - settled with houses and families, can move jobs to find something that suits them. \n\nThose doing a PhD had a small salary and struggled financially during those years, particularly being totally broke while extending their PhD or searching for jobs after which universally proved hard even those with a ML specialization (for this person there were of course offers but it’s about the perfect one for them). Only one has continued in academia after and earns about half of those in industry. Others did their PhDs in nicher fields and found work eventually In university admin, junior sales roles, pursuing something totally different etc. They would be so much better off with five years practical experience and the ability to change jobs if needed in that time rather than being shackled to one topic and supervisor (which is SO hard to leave if there’s an issue). They’re all still catching up on life stuff (partner, house, pet/kids etc).\n\nIt can work if it’s your passion but there’s a high chance of failure, and in the end you only develop skills in a very niche area (or have to work hard to market yourself to break out)","timestamp":"2024-02-13T02:00:58+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_14e7f6a80939be03","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kq5ghvg","thanks_reply_id":"kq662v6","post_score":10,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_8adb2b7d319a0d97","answerer_user_id":"anon_9e2646fd4a20811b","subreddit":"LanguageTechnology","timestamp":"2024-02-12T11:09:53+00:00","post_id":"1aoxls0","question":"What Hardware do you use for your private NLP projects?\n\nSince my laptop broke down and I am kicked out of my unis server after graduation, I am lost on how to provide the GPU Power for my NLP Projects now and what a new laptop should provide in RAM etc. and not get too expensive.\nWhat du you look for in your private hardware decisions when money is crucial? And do you rent yourself to a server elsewhere somehow, or do you get a device with the right GPU/CPU power?","preferred_answer":"Correct","full_conversation":[{"role":"OP","user_id":"anon_8adb2b7d319a0d97","comment_id":"1aoxls0","kind":"post","text":"What Hardware do you use for your private NLP projects?\n\nSince my laptop broke down and I am kicked out of my unis server after graduation, I am lost on how to provide the GPU Power for my NLP Projects now and what a new laptop should provide in RAM etc. and not get too expensive.\nWhat du you look for in your private hardware decisions when money is crucial? And do you rent yourself to a server elsewhere somehow, or do you get a device with the right GPU/CPU power?","timestamp":"2024-02-12T11:09:53+00:00","score":3},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"kq2l9yl","kind":"comment","text":"Correct","timestamp":"2024-02-12T12:03:38+00:00","score":3},{"role":"OP","user_id":"anon_8adb2b7d319a0d97","comment_id":"kq2mh47","kind":"comment","text":"Alright Thanks! Then I only concentrate on RAM for my new device. \nIf there are any suggestions or personal experiences how expensive a sufficient laptop probably is I would be greatful, money is a crucial topic at the moment applying for jobs after uni.","timestamp":"2024-02-12T12:15:37+00:00","score":2},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"kq2nh1r","kind":"comment","text":"I think the price mostly depends on where you live. Consider looking for a used laptop as a temporary solution.","timestamp":"2024-02-12T12:25:24+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8adb2b7d319a0d97","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9e2646fd4a20811b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kq2l9yl","thanks_reply_id":"kq2mh47","post_score":3,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_f4d1773e530bc9a1","answerer_user_id":"anon_9e2646fd4a20811b","subreddit":"LanguageTechnology","timestamp":"2024-02-15T19:42:58+00:00","post_id":"1aro636","question":"Multilingual text classification with byte-level models\n\nI'm working on a binary classification task that involves texts in over 20 different languages. Just out of curiosity, I'd like to take this chance to experiment with byte-level models. Specifically, I was considering ByT5 (https://arxiv.org/pdf/2105.13626.pdf), but I wonder if it actually makes any sense for this task due to its encoder-decoder architecture.\n\nBeing a text-to-text model, I was thinking to discard the decoder and just train the encoder after implementing a small classifier head on top of it.\nDo you reckon this would make any sense? Also, do you have any other byte-level models that you would recommend checking out for a classification task?","preferred_answer":"Check out Charformer.","full_conversation":[{"role":"OP","user_id":"anon_f4d1773e530bc9a1","comment_id":"1aro636","kind":"post","text":"Multilingual text classification with byte-level models\n\nI'm working on a binary classification task that involves texts in over 20 different languages. Just out of curiosity, I'd like to take this chance to experiment with byte-level models. Specifically, I was considering ByT5 (https://arxiv.org/pdf/2105.13626.pdf), but I wonder if it actually makes any sense for this task due to its encoder-decoder architecture.\n\nBeing a text-to-text model, I was thinking to discard the decoder and just train the encoder after implementing a small classifier head on top of it.\nDo you reckon this would make any sense? Also, do you have any other byte-level models that you would recommend checking out for a classification task?","timestamp":"2024-02-15T19:42:58+00:00","score":1},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"kqlvldo","kind":"comment","text":"Check out Charformer.","timestamp":"2024-02-15T23:16:32+00:00","score":2},{"role":"OP","user_id":"anon_f4d1773e530bc9a1","comment_id":"kqoe3td","kind":"comment","text":"That looks interesting, thanks! It's a pity it's not available on HuggingFace though. I definitely don't have the resources to train it from scratch","timestamp":"2024-02-16T12:27:47+00:00","score":1},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"kqoed67","kind":"comment","text":"Oh, I didn't know that.\nIn that case I'd abandon the idea of character level architecture and use a regular pre-trained multilingual bert/roberta/deberta.","timestamp":"2024-02-16T12:30:05+00:00","score":1},{"role":"OP","user_id":"anon_f4d1773e530bc9a1","comment_id":"kqof499","kind":"comment","text":"Just out of curiosity, do you reckon my original idea of using the ByT5 encoder makes any sense?","timestamp":"2024-02-16T12:36:36+00:00","score":1},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"kqoftal","kind":"comment","text":"It does make sense.\nIt's a bit *exotic* approach, but I would try it out of curiosity.","timestamp":"2024-02-16T12:42:32+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_f4d1773e530bc9a1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9e2646fd4a20811b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kqlvldo","thanks_reply_id":"kqoe3td","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_aec774ccdf3a4838","subreddit":"LanguageTechnology","timestamp":"2024-02-23T14:45:08+00:00","post_id":"1ay25vj","question":"Do you know any other university in EU where you can study Computational linguistics/ NLP/ cognitive science-AI with linguistics?\n\nUniversity in EU that are almost free such as in Germany and Sweden, for example I know there are some programs offered in Netherlands and UK but universities there are definitely too much expensive, it wouldn’t t make sense to spend all that money where you can study for way less in other countries.\n\n\nI already checked:\n\n-Stuttgart ( difficult to be accepted) \n-POSTDAM ( difficult to be accepted )\n-Saarland ( admissions are already closed)\n-Heidelberg ( difficult to be accepted)\n-Tubinga ( ppl don’t talk very well about this Univeristy)\n\n-Konstanz ( I don’t really like the program )\n\n-Trento ( I really like the program but I don’t know if it’s good enough, if it prepares you well for the job industry, there’s only 1 exam about full NLP but at least it has a very deep and long internship where you can learn directly in a company or in the lab)\n\n-Gothenburg ( quite difficult to be accepted) \n\n-Cognitive science Osnabrück ( quite expensive and doesn’t look very focused on NLP ) \n\n-Pisa ( it think it has the worst program compared to all the others )","preferred_answer":"It's a new program which is why you wouldn't have heard about it. I'm in the Linguistics department at Stockholm and am happy to answer any questions you have on it to the best of my ability","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1ay25vj","kind":"post","text":"Do you know any other university in EU where you can study Computational linguistics/ NLP/ cognitive science-AI with linguistics?\n\nUniversity in EU that are almost free such as in Germany and Sweden, for example I know there are some programs offered in Netherlands and UK but universities there are definitely too much expensive, it wouldn’t t make sense to spend all that money where you can study for way less in other countries.\n\n\nI already checked:\n\n-Stuttgart ( difficult to be accepted) \n-POSTDAM ( difficult to be accepted )\n-Saarland ( admissions are already closed)\n-Heidelberg ( difficult to be accepted)\n-Tubinga ( ppl don’t talk very well about this Univeristy)\n\n-Konstanz ( I don’t really like the program )\n\n-Trento ( I really like the program but I don’t know if it’s good enough, if it prepares you well for the job industry, there’s only 1 exam about full NLP but at least it has a very deep and long internship where you can learn directly in a company or in the lab)\n\n-Gothenburg ( quite difficult to be accepted) \n\n-Cognitive science Osnabrück ( quite expensive and doesn’t look very focused on NLP ) \n\n-Pisa ( it think it has the worst program compared to all the others )","timestamp":"2024-02-23T14:45:08+00:00","score":11},{"role":"answerer","user_id":"anon_aec774ccdf3a4838","comment_id":"krt6abo","kind":"comment","text":"It's a new program which is why you wouldn't have heard about it. I'm in the Linguistics department at Stockholm and am happy to answer any questions you have on it to the best of my ability","timestamp":"2024-02-23T19:28:55+00:00","score":1},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"krt85n2","kind":"comment","text":"Hey thank you, first of all I think the admissions are already closed and now there are only the late admissions but I don’t know what would change ? Could I still apply and obtain an university residence?.\n\nAnd just wanted to ask if you if living in Sweden is very expensive especially for non-Swedish students. I’ve been in Stockholm for a week, I loved the city but it was quite expensive, but at least the university is totally free right?","timestamp":"2024-02-23T19:39:18+00:00","score":1},{"role":"answerer","user_id":"anon_aec774ccdf3a4838","comment_id":"krtg0v8","kind":"comment","text":"Whether you apply early or late, it won't affect housing. Being offered accommodations depends on where you're coming from. International exchange and fee paying students are the only ones who get offers and everyone else has to look on the private market. Uni is only free for EU/EEA/Swiss citizens generally.\n\nStockholm is definitely expensive, plenty of people choose to live elsewhere and commute (like Uppsala ~1hr by train) and it's much more affordable. There are a fair amount of student discounts for everything from restaurants to public transport to gyms which are great. I really enjoy living here, everyone is friendly and there are loads of international events. Everyone speaks English which helps with the initial move, and you can get by with English only if you're just here for uni, but speaking Swedish is definitely necessary if you want to stay long term or build lasting relationships with Swedes.","timestamp":"2024-02-23T20:23:14+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_aec774ccdf3a4838","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"krt6abo","thanks_reply_id":"krt85n2","post_score":11,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_059d822a20154f17","answerer_user_id":"anon_dbd546e7c4a291ec","subreddit":"LanguageTechnology","timestamp":"2024-02-28T03:01:33+00:00","post_id":"1b1vcbe","question":"Remove semantically duplicate topics manually\n\nIs there any open source tool that can visualise the topics predicted by a machine learning model ( a dendrogram perhaps ? ) and let you merge labels as needed ?","preferred_answer":"If you are referring to topic modeling, Gensim/pyLDAviz has this capability: https://neptune.ai/blog/pyldavis-topic-modelling-exploration-tool-that-every-nlp-data-scientist-should-know","full_conversation":[{"role":"OP","user_id":"anon_059d822a20154f17","comment_id":"1b1vcbe","kind":"post","text":"Remove semantically duplicate topics manually\n\nIs there any open source tool that can visualise the topics predicted by a machine learning model ( a dendrogram perhaps ? ) and let you merge labels as needed ?","timestamp":"2024-02-28T03:01:33+00:00","score":3},{"role":"answerer","user_id":"anon_dbd546e7c4a291ec","comment_id":"ksp6tbw","kind":"comment","text":"If you are referring to topic modeling, Gensim/pyLDAviz has this capability: https://neptune.ai/blog/pyldavis-topic-modelling-exploration-tool-that-every-nlp-data-scientist-should-know","timestamp":"2024-02-29T14:36:16+00:00","score":1},{"role":"OP","user_id":"anon_059d822a20154f17","comment_id":"ksyz38f","kind":"comment","text":"Thanks. I was referring to post topic modelling / clustering exercises where you'd like to use subject matter experts to merge clusters, etc. The libraries you've listed visualise the topics but don't let you directly modify anything ( unless they've added such capabilities recently), right ?","timestamp":"2024-03-02T06:52:34+00:00","score":1},{"role":"answerer","user_id":"anon_dbd546e7c4a291ec","comment_id":"ktb7uub","kind":"comment","text":"Not sure about merging clusters, but you could also look into [BERTopic](https://maartengr.github.io/BERTopic/index.html) which automatically labels clusters.","timestamp":"2024-03-04T15:57:58+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_059d822a20154f17","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dbd546e7c4a291ec","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ksp6tbw","thanks_reply_id":"ksyz38f","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_07a669f1362b9f5b","answerer_user_id":"anon_2cf883a232b8b37e","subreddit":"LanguageTechnology","timestamp":"2024-03-01T06:42:15+00:00","post_id":"1b3ns1z","question":"How do I start with RAG?\n\nI want to learn RAG. Is there any resources out there where I can learn RAG from basic to advanced from? Like starting with simple exercises then gradually increasing the difficulty.","preferred_answer":"This playlist should be more than enough. It covers everything about RAG from beginner to advanced scope : https://youtube.com/playlist?list=PLnH2pfPCPZsJ1qBbf0Fb7onButMjqYa-Z&si=FmU8aTJhUoFlxR-n","full_conversation":[{"role":"OP","user_id":"anon_07a669f1362b9f5b","comment_id":"1b3ns1z","kind":"post","text":"How do I start with RAG?\n\nI want to learn RAG. Is there any resources out there where I can learn RAG from basic to advanced from? Like starting with simple exercises then gradually increasing the difficulty.","timestamp":"2024-03-01T06:42:15+00:00","score":10},{"role":"answerer","user_id":"anon_2cf883a232b8b37e","comment_id":"kstid57","kind":"comment","text":"This playlist should be more than enough. It covers everything about RAG from beginner to advanced scope : https://youtube.com/playlist?list=PLnH2pfPCPZsJ1qBbf0Fb7onButMjqYa-Z&si=FmU8aTJhUoFlxR-n","timestamp":"2024-03-01T06:52:04+00:00","score":6},{"role":"OP","user_id":"anon_07a669f1362b9f5b","comment_id":"kstiwik","kind":"comment","text":"thanks a lot man!","timestamp":"2024-03-01T06:57:55+00:00","score":2},{"role":"answerer","user_id":"anon_2cf883a232b8b37e","comment_id":"kstjgua","kind":"comment","text":"Thanks","timestamp":"2024-03-01T07:04:03+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_07a669f1362b9f5b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2cf883a232b8b37e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kstid57","thanks_reply_id":"kstiwik","post_score":10,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_7213defd9265b8c0","answerer_user_id":"anon_37be2ff18fd64c9d","subreddit":"LanguageTechnology","timestamp":"2024-03-01T15:57:00+00:00","post_id":"1b3xow7","question":"SLP at Edinburgh and part time job.\n\nStarting the SLP Masters at Edinburgh next September, full-time, and I've been offered a part-time job at a tech company. They're well aware of the course and would be happy to flex around my schedule but would like someone to work 16-20h per week. \n\nI've heard all sorts of stories about how demanding the SLP program is. Is it feasible at all to work part-time the first 2 terms? (not while dissertation writing etc). For context I worked 20-24h per week in my undergrad and did pretty well. \n\nAnyone who's done this course or a similarly demanding masters while working part time?","preferred_answer":"If you choose all CS courses, studying is all you can do. A lot of things are stacked into the SLP. Even CS people in my course feel the heat","full_conversation":[{"role":"OP","user_id":"anon_7213defd9265b8c0","comment_id":"1b3xow7","kind":"post","text":"SLP at Edinburgh and part time job.\n\nStarting the SLP Masters at Edinburgh next September, full-time, and I've been offered a part-time job at a tech company. They're well aware of the course and would be happy to flex around my schedule but would like someone to work 16-20h per week. \n\nI've heard all sorts of stories about how demanding the SLP program is. Is it feasible at all to work part-time the first 2 terms? (not while dissertation writing etc). For context I worked 20-24h per week in my undergrad and did pretty well. \n\nAnyone who's done this course or a similarly demanding masters while working part time?","timestamp":"2024-03-01T15:57:00+00:00","score":6},{"role":"answerer","user_id":"anon_37be2ff18fd64c9d","comment_id":"kt3330z","kind":"comment","text":"If you choose all CS courses, studying is all you can do. A lot of things are stacked into the SLP. Even CS people in my course feel the heat","timestamp":"2024-03-03T01:20:26+00:00","score":1},{"role":"OP","user_id":"anon_7213defd9265b8c0","comment_id":"kt5kgyo","kind":"comment","text":"Thanks for your reply! are you a current student? would you mind sharing a bit more about how / when you choose courses?","timestamp":"2024-03-03T15:00:56+00:00","score":1},{"role":"answerer","user_id":"anon_37be2ff18fd64c9d","comment_id":"kt5lew0","kind":"comment","text":"Yeah sure. But better if you DM. My opinions might be unpopular.","timestamp":"2024-03-03T15:07:18+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_7213defd9265b8c0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_37be2ff18fd64c9d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kt3330z","thanks_reply_id":"kt5kgyo","post_score":6,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_3f460af5ab19607f","answerer_user_id":"anon_0d3b3efd3e3c5790","subreddit":"LanguageTechnology","timestamp":"2024-03-07T16:08:23+00:00","post_id":"1b8yfo1","question":"Looking for some constructive criticism of my binary classification approach\n\nHello all, \n\nI was hoping to get so feedback from the community about our approach to a binary classification project we are working on. I will first give a little background on the project and then explain our \n\nWe are a group of researchers looking at large collections of corporate proxy statements over time. There are about 10k statement per year and we are looking for 5 years. Each statement is between 50 to 150 pages. Specifically we are looking for the mention one 3 different topics. So to do this manually would require a LOT of reading!\n\nWe decided to use a supervised learning approach to train a logistics regression classifier. To do this we manually labelled roughly 700 sentences per topic we are looking for, and about 2000 \"irrelevant\" sentences. We also have a large set of verification sentences that have been classified by an other group, but we do not have access to their method. (hence we are trying to recreate it or something similar)\n\nWe have used SentenceTransformer and the pre-trained 'all-MiniLM-L6-v2' model from huggingface to perform the embedding of each sentence. And the a supervised UMAP dimensional reduction to get out a 2D embedding of each sentence. These reduced embeddings were then used to train a Logistics Regression Classifier. The results of this are shown for one topic below (top row is training data bottom row is verification/testing):\n\n​\n\nI figured we could improve this by 'fine-tuning' the 'all-MiniLM-L6-v2' model. We did this using the outliers in the top left plot to generate a list of similar and non-similar sentence pairs and fitting the model to that. Which resulted in the following:\n\n​\n\nWe are pretty happy with the results. The Recall is good, we only missed 12% of the sentences which include that topic, and we had a lowish False Positive rate. All in all it seems like this method has significantly reduced the amount of reading our team will have to do! \n\n\nWhat I would like to know is if there are any glaring mistakes that we made? Was using the supervised UMAP approach wise? Was our data set balanced enough? Even though we had 3 topics we did a binary classification (treating sentences from the other topics as 'irrelevant'), is that wise? Was the generation of the fine-tuning training data do correctly? \n\n\nAny thoughts or constructive criticisms would be greatly appreciated. And thanks again :)","preferred_answer":"Seems reasonable. I second the curiosity on skipping the UMAP. Could use an LLM to generate sentences on your topics for additional training data.","full_conversation":[{"role":"OP","user_id":"anon_3f460af5ab19607f","comment_id":"1b8yfo1","kind":"post","text":"Looking for some constructive criticism of my binary classification approach\n\nHello all, \n\nI was hoping to get so feedback from the community about our approach to a binary classification project we are working on. I will first give a little background on the project and then explain our \n\nWe are a group of researchers looking at large collections of corporate proxy statements over time. There are about 10k statement per year and we are looking for 5 years. Each statement is between 50 to 150 pages. Specifically we are looking for the mention one 3 different topics. So to do this manually would require a LOT of reading!\n\nWe decided to use a supervised learning approach to train a logistics regression classifier. To do this we manually labelled roughly 700 sentences per topic we are looking for, and about 2000 \"irrelevant\" sentences. We also have a large set of verification sentences that have been classified by an other group, but we do not have access to their method. (hence we are trying to recreate it or something similar)\n\nWe have used SentenceTransformer and the pre-trained 'all-MiniLM-L6-v2' model from huggingface to perform the embedding of each sentence. And the a supervised UMAP dimensional reduction to get out a 2D embedding of each sentence. These reduced embeddings were then used to train a Logistics Regression Classifier. The results of this are shown for one topic below (top row is training data bottom row is verification/testing):\n\n​\n\nI figured we could improve this by 'fine-tuning' the 'all-MiniLM-L6-v2' model. We did this using the outliers in the top left plot to generate a list of similar and non-similar sentence pairs and fitting the model to that. Which resulted in the following:\n\n​\n\nWe are pretty happy with the results. The Recall is good, we only missed 12% of the sentences which include that topic, and we had a lowish False Positive rate. All in all it seems like this method has significantly reduced the amount of reading our team will have to do! \n\n\nWhat I would like to know is if there are any glaring mistakes that we made? Was using the supervised UMAP approach wise? Was our data set balanced enough? Even though we had 3 topics we did a binary classification (treating sentences from the other topics as 'irrelevant'), is that wise? Was the generation of the fine-tuning training data do correctly? \n\n\nAny thoughts or constructive criticisms would be greatly appreciated. And thanks again :)","timestamp":"2024-03-07T16:08:23+00:00","score":3},{"role":"answerer","user_id":"anon_0d3b3efd3e3c5790","comment_id":"ku0dc74","kind":"comment","text":"Seems reasonable. I second the curiosity on skipping the UMAP. Could use an LLM to generate sentences on your topics for additional training data.","timestamp":"2024-03-09T02:01:24+00:00","score":1},{"role":"OP","user_id":"anon_3f460af5ab19607f","comment_id":"kud3uc3","kind":"comment","text":"Hey thanks for the comments.\n\nI am wondering if there will be too many parameters to tune if I skip the UMAP step. The transformer I am using embeds the sentences into a 384 dimensional space and have less than a 1000 training sentence per topic. Am I incorrect in thinking that this would be an issue?\n\nCould you explain a bit more about how to use an LLM to generate more sentences?","timestamp":"2024-03-11T13:26:22+00:00","score":1},{"role":"answerer","user_id":"anon_0d3b3efd3e3c5790","comment_id":"kuddlm7","kind":"comment","text":"We have prompted LLM to generate a hierarchy of topics by asking recursively for subdomain using LangChain. I expect you could prompt it to generate for each topic of interest a number of sentences of various length, tense, tone, structure, complexity. Then use those for additional training (some tweaking will be required)\n\nMaybe an SVM classifier could work directly on the vectors? But you may be right.","timestamp":"2024-03-11T14:32:40+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3f460af5ab19607f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0d3b3efd3e3c5790","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ku0dc74","thanks_reply_id":"kud3uc3","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_35fb4a3b71523fe3","answerer_user_id":"anon_82089be32e93a0bc","subreddit":"LanguageTechnology","timestamp":"2024-03-07T22:32:45+00:00","post_id":"1b97kou","question":"How do RAGs actually work?\n\nI think I fundamentally misunderstand how RAGs generate output. Everything I've read online seems to suggest that relevant documents are retrieved from a database (with relevance to the prompt calculated based on their embeddings), after which the text of the relevant documents are appended to the prompt's text before being pushed to the LLM for generation. \n\n\nFor some reason, I had it in my mind that the embeddings of the retrieved documents, along with that of the prompt, could be used more directly to generate the output text. For example, I had thought that a composite or concatenated embedding of the prompt and documents could be passed to the LLM. \n\n\nAre there any RAGs that operate in this manner?","preferred_answer":"As in an embedding inversion? \n\nhttps://arxiv.org/pdf/2310.06816.pdf for e.g. tackles this use-case\n\nhttps://arxiv.org/pdf/2401.06102.pdf also proposes a neat idea - you can start with a prompt like \"Repeat this phrase verbatim back to me : \", then add in the embedding(s) you want to translate in place of the embedding in the prompt sequence, and see how well that works.\n\nIt's a hard problem though, there's many many many text phrases that correspond to a particular embedding, so you're unlikely to recover an exact phrase back. But, you'll likely get the important bits back if you just sample several potential generations, and you can probably use an LLM to interpret them into a coherent phrase.","full_conversation":[{"role":"OP","user_id":"anon_35fb4a3b71523fe3","comment_id":"1b97kou","kind":"post","text":"How do RAGs actually work?\n\nI think I fundamentally misunderstand how RAGs generate output. Everything I've read online seems to suggest that relevant documents are retrieved from a database (with relevance to the prompt calculated based on their embeddings), after which the text of the relevant documents are appended to the prompt's text before being pushed to the LLM for generation. \n\n\nFor some reason, I had it in my mind that the embeddings of the retrieved documents, along with that of the prompt, could be used more directly to generate the output text. For example, I had thought that a composite or concatenated embedding of the prompt and documents could be passed to the LLM. \n\n\nAre there any RAGs that operate in this manner?","timestamp":"2024-03-07T22:32:45+00:00","score":7},{"role":"answerer","user_id":"anon_82089be32e93a0bc","comment_id":"ktueym5","kind":"comment","text":"As in an embedding inversion? \n\nhttps://arxiv.org/pdf/2310.06816.pdf for e.g. tackles this use-case\n\nhttps://arxiv.org/pdf/2401.06102.pdf also proposes a neat idea - you can start with a prompt like \"Repeat this phrase verbatim back to me : \", then add in the embedding(s) you want to translate in place of the embedding in the prompt sequence, and see how well that works.\n\nIt's a hard problem though, there's many many many text phrases that correspond to a particular embedding, so you're unlikely to recover an exact phrase back. But, you'll likely get the important bits back if you just sample several potential generations, and you can probably use an LLM to interpret them into a coherent phrase.","timestamp":"2024-03-08T00:22:53+00:00","score":3},{"role":"OP","user_id":"anon_35fb4a3b71523fe3","comment_id":"ktvwdrl","kind":"comment","text":"This is brilliant, and exactly the kind of thing I was looking for! \n\n\nThanks very much for your comments.","timestamp":"2024-03-08T06:59:20+00:00","score":2},{"role":"answerer","user_id":"anon_82089be32e93a0bc","comment_id":"kty6kuu","kind":"comment","text":"If you try it, I'd love to see what comes out, I've always wondered if their scheme just works out of the box like that!","timestamp":"2024-03-08T18:06:55+00:00","score":1},{"role":"OP","user_id":"anon_35fb4a3b71523fe3","comment_id":"kubbn2x","kind":"comment","text":"Absolutely, I certainly will keep you in the loop. I think I'll try to get in touch with the authors as well.","timestamp":"2024-03-11T02:37:49+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_35fb4a3b71523fe3","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_82089be32e93a0bc","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ktueym5","thanks_reply_id":"ktvwdrl","post_score":7,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_693d9f36b549f23c","answerer_user_id":"anon_d430b4c5c035c3d2","subreddit":"LanguageTechnology","timestamp":"2024-03-17T11:03:21+00:00","post_id":"1bguy8e","question":"taking out a loan to pressure a MSc in NLP, worth it?\n\nHey! I applied for multiple scholarships that would cover the full tuition of my studies but my applications were unsuccessful. I got into really prestigious programs and universities (Cardiff, Edinburgh, Sheffield) and I think that this step would elevate my professional career + personal life. Would a loan be worth it or just wait for 2025 and save up until then? Thanks a lot :)","preferred_answer":"I got a PhD in NLP at one of the prestigious universities that you just mentioned and I am having a hard time finding a job.","full_conversation":[{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"1bguy8e","kind":"post","text":"taking out a loan to pressure a MSc in NLP, worth it?\n\nHey! I applied for multiple scholarships that would cover the full tuition of my studies but my applications were unsuccessful. I got into really prestigious programs and universities (Cardiff, Edinburgh, Sheffield) and I think that this step would elevate my professional career + personal life. Would a loan be worth it or just wait for 2025 and save up until then? Thanks a lot :)","timestamp":"2024-03-17T11:03:21+00:00","score":4},{"role":"answerer","user_id":"anon_d430b4c5c035c3d2","comment_id":"kvd7130","kind":"comment","text":"I got a PhD in NLP at one of the prestigious universities that you just mentioned and I am having a hard time finding a job.","timestamp":"2024-03-18T01:19:20+00:00","score":3},{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"kvf0sqg","kind":"comment","text":"Thank you for sharing, I appreciate it. Why is that? Would love to discuss it in private if you prefer that","timestamp":"2024-03-18T12:23:49+00:00","score":1},{"role":"answerer","user_id":"anon_d430b4c5c035c3d2","comment_id":"kvf4642","kind":"comment","text":"There are many people with PhD in NLP looking for jobs now. It just simply a supply and demand problem.","timestamp":"2024-03-18T12:51:16+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_693d9f36b549f23c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d430b4c5c035c3d2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kvd7130","thanks_reply_id":"kvf0sqg","post_score":4,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_74d8f07109f2f271","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2024-03-21T00:58:34+00:00","post_id":"1bjtxp5","question":"When do we use LLM fine tuning vs. LLM RAG?\n\nHey guys, I am little confused as to when do we use LLM fine tuning vs. LLM RAG.\r \n\r \nI remembered sometime mid-last year, I was told that with RAG, when a user asks the RAG-trained LLM a question which is outside of the RAG documents, the LLM will response back with rubbish answers. For eg. if we RAG-trained the LLM with Ninja Turtles documents, and then ask the LLM do Ninja Turtles speak English, the LLM will response back a yes (which is the correct answer) but when we ask the LLM do turtles speak English, it will response back with a yes (which is an incorrect answer because we know turtles are an animal and they don't speak English).\r \n\r \nI am currently reading recent updates on RAG and the above example doesn't seem to apply anymore. Has RAG evolved and the above example doesn't apply anymore to RAG? Or am I missing something?\r \n\r \nWould really appreciate any input on this. Thanks heaps.","preferred_answer":"The main advantage of RAG is that it can retrieve documents and therefore cite its sources. This is critical in business applications, because it's a safeguard.","full_conversation":[{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"1bjtxp5","kind":"post","text":"When do we use LLM fine tuning vs. LLM RAG?\n\nHey guys, I am little confused as to when do we use LLM fine tuning vs. LLM RAG.\r \n\r \nI remembered sometime mid-last year, I was told that with RAG, when a user asks the RAG-trained LLM a question which is outside of the RAG documents, the LLM will response back with rubbish answers. For eg. if we RAG-trained the LLM with Ninja Turtles documents, and then ask the LLM do Ninja Turtles speak English, the LLM will response back a yes (which is the correct answer) but when we ask the LLM do turtles speak English, it will response back with a yes (which is an incorrect answer because we know turtles are an animal and they don't speak English).\r \n\r \nI am currently reading recent updates on RAG and the above example doesn't seem to apply anymore. Has RAG evolved and the above example doesn't apply anymore to RAG? Or am I missing something?\r \n\r \nWould really appreciate any input on this. Thanks heaps.","timestamp":"2024-03-21T00:58:34+00:00","score":8},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"kvtpk6t","kind":"comment","text":"The main advantage of RAG is that it can retrieve documents and therefore cite its sources. This is critical in business applications, because it's a safeguard.","timestamp":"2024-03-21T01:17:34+00:00","score":6},{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"kvtrhx4","kind":"comment","text":"Thanks. Does most RAG libraries/frameworks now automatically output the citations, or can we code to optionally remove the citations. Sorry if this is a dumb question.","timestamp":"2024-03-21T01:30:08+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"kvvrtus","kind":"comment","text":"I don't know about the libraries/frameworks as we made our own. You basically:\n\n\n- index documents\n- get the query from the user in the chat\n- match the query with the documents\n- if match and good enough threshold, you feed the retrieved documents to the LLM \n- output the generated answer to the user","timestamp":"2024-03-21T13:00:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_74d8f07109f2f271","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kvtpk6t","thanks_reply_id":"kvtrhx4","post_score":8,"answer_score":6,"preferred_answer_is_top_level":true}} {"user_id":"anon_c43e76e25bbb05ad","answerer_user_id":"anon_2891c6f8ec1441ac","subreddit":"LanguageTechnology","timestamp":"2024-03-27T18:59:43+00:00","post_id":"1bp9v7t","question":"Should I learn NLP with scikit_learn or transformers along with Pytorch?","preferred_answer":"The default scikit implementations don't even run on GPU (last I checked). For LLMs go with frameworks like pytorch (or tensorflow) and maybe transformers from hugging face. Their documentation is nice too and they have plenty examples, datasets and pre trained models.","full_conversation":[{"role":"OP","user_id":"anon_c43e76e25bbb05ad","comment_id":"1bp9v7t","kind":"post","text":"Should I learn NLP with scikit_learn or transformers along with Pytorch?","timestamp":"2024-03-27T18:59:43+00:00","score":11},{"role":"answerer","user_id":"anon_2891c6f8ec1441ac","comment_id":"kwuhiar","kind":"comment","text":"The default scikit implementations don't even run on GPU (last I checked). For LLMs go with frameworks like pytorch (or tensorflow) and maybe transformers from hugging face. Their documentation is nice too and they have plenty examples, datasets and pre trained models.","timestamp":"2024-03-27T19:42:54+00:00","score":7},{"role":"OP","user_id":"anon_c43e76e25bbb05ad","comment_id":"kwuhrbk","kind":"comment","text":"Yeah , thanks man","timestamp":"2024-03-27T19:44:16+00:00","score":2},{"role":"answerer","user_id":"anon_2891c6f8ec1441ac","comment_id":"kwuj0g8","kind":"comment","text":"No worries. Also there is cuml which is has scikit like api bindings. https://github.com/rapidsai/cuml\n\nI'll only get to try that out in the coming months though.","timestamp":"2024-03-27T19:51:07+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c43e76e25bbb05ad","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2891c6f8ec1441ac","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kwuhiar","thanks_reply_id":"kwuhrbk","post_score":11,"answer_score":7,"preferred_answer_is_top_level":false}} {"user_id":"anon_4401e4d222c2c6e0","answerer_user_id":"anon_eac0bfacdd35756d","subreddit":"LanguageTechnology","timestamp":"2024-03-30T03:01:23+00:00","post_id":"1br7gfb","question":"Help with workflow for content clustering and classification.\n\nI dont have a formal background in this field however I've been dabbling with \\`Xenova/all-MiniLM-L6-v2\\` to generate embeddings for extracts from social media, book passages and online articles. My goal is to categorise all these extracts into relevant groups. Through some research, I've calculated the cosine similarity matrix and fed this into a Agglomerative hierarchical clustering function. I'm currently struggling to figure out a way of visualising the results as well as understanding how to categorise any new text extracts into the existing groups (classification). I'm currently using Transformers.js for my workflow but open to other suggestions. I also attempted this with chat GPT 3.5 and it was somewhat successful but I dont believe it's as reliable/consistent as setting up my own pipelines for feature extraction and clustering. \n\n\nThanks in advance","preferred_answer":"There are a few things along these lines. Here are a few starting points:\n* [BERTopic](https://maartengr.github.io/BERTopic)\n* [text-clustering](https://github.com/huggingface/text-clustering), a nascent Hugging Face library\n* [ThisNotThat](https://github.com/TutteInstitute/thisnotthat)\n* [https://github.com/TutteInstitute/datamapplot](https://github.com/TutteInstitute/datamapplot)\n\n\nThe general approach, which I think is the BERTopic default, is embed > reduce dimensions (UMAP) > cluster (HDBSCAN). I don't know of any research that suggests this is optimal, but it's popular, if nothing else.","full_conversation":[{"role":"OP","user_id":"anon_4401e4d222c2c6e0","comment_id":"1br7gfb","kind":"post","text":"Help with workflow for content clustering and classification.\n\nI dont have a formal background in this field however I've been dabbling with \\`Xenova/all-MiniLM-L6-v2\\` to generate embeddings for extracts from social media, book passages and online articles. My goal is to categorise all these extracts into relevant groups. Through some research, I've calculated the cosine similarity matrix and fed this into a Agglomerative hierarchical clustering function. I'm currently struggling to figure out a way of visualising the results as well as understanding how to categorise any new text extracts into the existing groups (classification). I'm currently using Transformers.js for my workflow but open to other suggestions. I also attempted this with chat GPT 3.5 and it was somewhat successful but I dont believe it's as reliable/consistent as setting up my own pipelines for feature extraction and clustering. \n\n\nThanks in advance","timestamp":"2024-03-30T03:01:23+00:00","score":2},{"role":"answerer","user_id":"anon_eac0bfacdd35756d","comment_id":"kx8yo6o","kind":"comment","text":"There are a few things along these lines. Here are a few starting points:\n* [BERTopic](https://maartengr.github.io/BERTopic)\n* [text-clustering](https://github.com/huggingface/text-clustering), a nascent Hugging Face library\n* [ThisNotThat](https://github.com/TutteInstitute/thisnotthat)\n* [https://github.com/TutteInstitute/datamapplot](https://github.com/TutteInstitute/datamapplot)\n\n\nThe general approach, which I think is the BERTopic default, is embed > reduce dimensions (UMAP) > cluster (HDBSCAN). I don't know of any research that suggests this is optimal, but it's popular, if nothing else.","timestamp":"2024-03-30T13:11:10+00:00","score":2},{"role":"OP","user_id":"anon_4401e4d222c2c6e0","comment_id":"kx91y7i","kind":"comment","text":"Thanks for the suggestions, I'm currently reading through them now, do you reckon I would still need to reduce the dimensions if the feature-extraction I used (Xenova/all-MiniLM-L6-v2) only generates 384 dimensions? I've mainly stuck to the tools and libs available in the JS ecosystem but I can see how limiting this has become.","timestamp":"2024-03-30T13:36:06+00:00","score":1},{"role":"answerer","user_id":"anon_eac0bfacdd35756d","comment_id":"kx959qz","kind":"comment","text":"On whether dimensionality reduction is necessary, I guess it depends! It's something I've always meant to look into more carefully.\n\n\nI think one motivation is to make the clustering more computationally efficient or even possible at all (but this depends on your clustering algorithm and hardware). It could also either improve or impair cluster quality. Maybe there's a good reference somewhere? But I couldn't see anything definitive from an admittedly low effort google search just now. So, that puts it in the \"try-it-and-see\" or \"use-the-defaults/anecdote\" category for me :) it's what I've done with all-MiniLM-L6-v2 embeddings, but I've not tried without.\n\n\nI can't help with JS stuff at all, sorry. As you probably already know, python tends to be the de facto standard for this kind of data work.","timestamp":"2024-03-30T13:59:57+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4401e4d222c2c6e0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_eac0bfacdd35756d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kx8yo6o","thanks_reply_id":"kx91y7i","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_74d8f07109f2f271","answerer_user_id":"anon_6d9a0e4b1b334113","subreddit":"LanguageTechnology","timestamp":"2024-04-08T03:07:10+00:00","post_id":"1bynezo","question":"How to save chat history for a conversational style AI chatbot in AWS Bedrock\n\nHey guys, if I wanted to develop a conversational style AI chatbot using AWS Bedrock, how do I save the chat histories in this setup? Do I need to setup an S3 bucket to do this? Do you guys know of any example scripts that I can refer to which follows the setup using AWS Bedrock + AWS Knowledge Base + RetrieveAndGenerate API + AWS Lambda?\r \n\r \nMany thanks. Would really appreciate any help on this.","preferred_answer":"If you want to save chat history in memory, there are langchain libraries for thuis (see https://python.langchain.com/docs/use\\_cases/question\\_answering/chat\\_history/).\n\nIf you want to store chat history between sessions, I usually use DynamoDB for that (example: https://aws.amazon.com/blogs/machine-learning/build-generative-ai-agents-with-amazon-bedrock-amazon-dynamodb-amazon-kendra-amazon-lex-and-langchain/)\n\nNote: If you are using a managed orchestrator like Bedrock Knowledge Base, it handles the session-based history storage for you.","full_conversation":[{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"1bynezo","kind":"post","text":"How to save chat history for a conversational style AI chatbot in AWS Bedrock\n\nHey guys, if I wanted to develop a conversational style AI chatbot using AWS Bedrock, how do I save the chat histories in this setup? Do I need to setup an S3 bucket to do this? Do you guys know of any example scripts that I can refer to which follows the setup using AWS Bedrock + AWS Knowledge Base + RetrieveAndGenerate API + AWS Lambda?\r \n\r \nMany thanks. Would really appreciate any help on this.","timestamp":"2024-04-08T03:07:10+00:00","score":2},{"role":"answerer","user_id":"anon_6d9a0e4b1b334113","comment_id":"kykyo90","kind":"comment","text":"If you want to save chat history in memory, there are langchain libraries for thuis (see https://python.langchain.com/docs/use\\_cases/question\\_answering/chat\\_history/).\n\nIf you want to store chat history between sessions, I usually use DynamoDB for that (example: https://aws.amazon.com/blogs/machine-learning/build-generative-ai-agents-with-amazon-bedrock-amazon-dynamodb-amazon-kendra-amazon-lex-and-langchain/)\n\nNote: If you are using a managed orchestrator like Bedrock Knowledge Base, it handles the session-based history storage for you.","timestamp":"2024-04-08T05:57:07+00:00","score":2},{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"kym864n","kind":"comment","text":"Ok great, many thanks for the above.\n\nHave a question on Bedrock Knowledge Base. Do you happen to have any example code or script how it handles session-based history storage?","timestamp":"2024-04-08T13:41:27+00:00","score":1},{"role":"answerer","user_id":"anon_6d9a0e4b1b334113","comment_id":"kyvuu3k","kind":"comment","text":"[https://github.com/aws-samples/amazon-bedrock-samples/tree/main/rag-solutions/contextual-chatbot-using-knowledgebase](https://github.com/aws-samples/amazon-bedrock-samples/tree/main/rag-solutions/contextual-chatbot-using-knowledgebase)\n\nThe API returns a Session ID which is sent to subsequent calls to maintain short term (non persisted) session.","timestamp":"2024-04-10T05:51:53+00:00","score":2},{"role":"OP","user_id":"anon_74d8f07109f2f271","comment_id":"kyw208y","kind":"comment","text":"Great, many thanks for this. \n\n\nSorry can I ask when you mentioned short term (non persisted) session, do you mean when the chat session is closed (or ended) the memory will be all gone?","timestamp":"2024-04-10T07:16:06+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_74d8f07109f2f271","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6d9a0e4b1b334113","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"kykyo90","thanks_reply_id":"kym864n","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_76f4e5421aa4ca84","answerer_user_id":"anon_ecf71dc2df199832","subreddit":"LanguageTechnology","timestamp":"2024-04-24T03:54:41+00:00","post_id":"1cbosu9","question":"What's the difference between an ACL workshop paper vs an ACL full paper?\n\nI am currently doing an literature review and would like to focus on the full papers, however, I had a hard time to distinguish them. Are there any rules to categorize the two? Thank you!!","preferred_answer":"In academia a paper in the main conference is considered more prestigious than a workshop paper.  Because if this prestige, there is often more competition to get a paper into ACL.\n\n\nBut there can be impactful work at workshops.  I always look at the proceedings of the BEA (building educational applications) workshop as it is very relevant for my job.  And when I attend, my favorite events are usually workshop dinners as it's a great way to connect with people working on similar problems.\n\n\nAs ACL has grown from a relatively niche conference to one with attendance in the thousands, many of the workshops now have exploded to the size of ACL when I was in grad school over a decade ago. \n\n\nGetting back to your literature review.  The journal or conference version of some work will be better to read and cite as it is usually more mature and fleshed out.  But if a concept or idea came from a workshop that is just as relevant for your review. Often what starts in workshops can become mainstream later. For example, years ago there would only be one ACL session for dialogue and generation (combined), so the best place to find papers in these topics was in the workshops.","full_conversation":[{"role":"OP","user_id":"anon_76f4e5421aa4ca84","comment_id":"1cbosu9","kind":"post","text":"What's the difference between an ACL workshop paper vs an ACL full paper?\n\nI am currently doing an literature review and would like to focus on the full papers, however, I had a hard time to distinguish them. Are there any rules to categorize the two? Thank you!!","timestamp":"2024-04-24T03:54:41+00:00","score":2},{"role":"answerer","user_id":"anon_ecf71dc2df199832","comment_id":"l102e6b","kind":"comment","text":"In academia a paper in the main conference is considered more prestigious than a workshop paper.  Because if this prestige, there is often more competition to get a paper into ACL.\n\n\nBut there can be impactful work at workshops.  I always look at the proceedings of the BEA (building educational applications) workshop as it is very relevant for my job.  And when I attend, my favorite events are usually workshop dinners as it's a great way to connect with people working on similar problems.\n\n\nAs ACL has grown from a relatively niche conference to one with attendance in the thousands, many of the workshops now have exploded to the size of ACL when I was in grad school over a decade ago. \n\n\nGetting back to your literature review.  The journal or conference version of some work will be better to read and cite as it is usually more mature and fleshed out.  But if a concept or idea came from a workshop that is just as relevant for your review. Often what starts in workshops can become mainstream later. For example, years ago there would only be one ACL session for dialogue and generation (combined), so the best place to find papers in these topics was in the workshops.","timestamp":"2024-04-24T04:47:20+00:00","score":4},{"role":"OP","user_id":"anon_76f4e5421aa4ca84","comment_id":"l109sr7","kind":"comment","text":"Thank you for the reply! May I ask how exactly should I distinguish between these two types of papers then? I am very new to this field so I am quite confused. Thanks again :)!","timestamp":"2024-04-24T06:00:59+00:00","score":1},{"role":"answerer","user_id":"anon_ecf71dc2df199832","comment_id":"l10f6zv","kind":"comment","text":"Take a look at [the proceedings from ACL 2023](https://aclanthology.org/events/acl-2023/).  I recommend you navigate down into individual papers and click the cite button to see their bibtex entries.\n\n\nPapers from the main conference will be cited with a book title of:\n\n\n> Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)\n\n\n\nWhereas a workshop paper will have a book title like: \n\n\n> Proceedings of the 18th Workshop on Innovative Use of NLP for Building Educational Applications (BEA 2023)","timestamp":"2024-04-24T07:02:29+00:00","score":1},{"role":"OP","user_id":"anon_76f4e5421aa4ca84","comment_id":"l1bavku","kind":"comment","text":"Thank you!! Also, just to confirm, papers from annual meetings are even more polished than papers from conferences, is this correct?","timestamp":"2024-04-26T05:59:33+00:00","score":1},{"role":"answerer","user_id":"anon_ecf71dc2df199832","comment_id":"l1bmcye","kind":"comment","text":"Annual meetings are conferences.","timestamp":"2024-04-26T08:12:09+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_76f4e5421aa4ca84","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ecf71dc2df199832","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l102e6b","thanks_reply_id":"l109sr7","post_score":2,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_a5e0357dc40f2936","answerer_user_id":"anon_ddcb8c229af7496c","subreddit":"LanguageTechnology","timestamp":"2024-04-26T13:13:50+00:00","post_id":"1cdl3m1","question":"Looking for a mentor !\n\nHello people, \n\nI am a masters student, studying NLP right now and wrapping up my thesis. I am having a very hard time getting any interview calls for NLP based roles, even roles where I match the skill set exactly. I would really appreciate it if someone could take a look at my resume(via DM) and provide genuine feedback, I promise I will be a good mentee. \n\nI am getting call backs for data analyst roles and SWE roles, but its crickets when it comes to NLP/ML roles, I feel like my projects are either too simple/resume is not well crafted. For context, I am looking for a job in the EU, but since I have access to the job market, I do not need to be sponsored. \n\nI would appreciate, any advice !","preferred_answer":"Hey mate, you can drop me a DM if you want. I might not be cut to be a mentor but can try to give you some feedback on your cv and portfolio.","full_conversation":[{"role":"OP","user_id":"anon_a5e0357dc40f2936","comment_id":"1cdl3m1","kind":"post","text":"Looking for a mentor !\n\nHello people, \n\nI am a masters student, studying NLP right now and wrapping up my thesis. I am having a very hard time getting any interview calls for NLP based roles, even roles where I match the skill set exactly. I would really appreciate it if someone could take a look at my resume(via DM) and provide genuine feedback, I promise I will be a good mentee. \n\nI am getting call backs for data analyst roles and SWE roles, but its crickets when it comes to NLP/ML roles, I feel like my projects are either too simple/resume is not well crafted. For context, I am looking for a job in the EU, but since I have access to the job market, I do not need to be sponsored. \n\nI would appreciate, any advice !","timestamp":"2024-04-26T13:13:50+00:00","score":3},{"role":"answerer","user_id":"anon_ddcb8c229af7496c","comment_id":"l1cltpc","kind":"comment","text":"Hey mate, you can drop me a DM if you want. I might not be cut to be a mentor but can try to give you some feedback on your cv and portfolio.","timestamp":"2024-04-26T13:35:38+00:00","score":1},{"role":"OP","user_id":"anon_a5e0357dc40f2936","comment_id":"l1cs0e9","kind":"comment","text":"thank you so much, DM'ing you !","timestamp":"2024-04-26T14:13:34+00:00","score":1},{"role":"answerer","user_id":"anon_ddcb8c229af7496c","comment_id":"l1eim8i","kind":"comment","text":"I got your DM request but doesn’t matter how many times I click on accept it won’t do it, can you still see the messages you sent me?","timestamp":"2024-04-26T20:10:53+00:00","score":2},{"role":"OP","user_id":"anon_a5e0357dc40f2936","comment_id":"l1enzv0","kind":"comment","text":"yes i can see it, i did get a notification that you accepted the invite, but nothing beyond that, let me try DM’ing you again !","timestamp":"2024-04-26T20:42:32+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a5e0357dc40f2936","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ddcb8c229af7496c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l1cltpc","thanks_reply_id":"l1cs0e9","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_beb1513b7fab72a7","answerer_user_id":"anon_aa61c8d5d1678698","subreddit":"LanguageTechnology","timestamp":"2024-05-08T08:51:37+00:00","post_id":"1cmzv7e","question":"TimeKettle, Dose it worth?\n\nHi everyone, I'm looking for a tool that could help me to understand and have sort of normal conversion \nMy main goal is when I'm in middle of meeting or surrounded by non-English speakers, I'm able to understand them in real time and with accuracy.\nOK, It might not be 100% perfect but at least I can depend on it better than Google translate. \nSo, if you guys tried it (or something similar) please tell me your feedback on it, was it helpful?? \nAny information will be appreciated. \nThanks 😊 \n#timekettle","preferred_answer":"I have owned a number of Timekettle translators now and M3 is my new favorite. The form factor is much more secure in the ear than the previous models (and even their Edge unit). Sound quality is good as is the noise isolation. The app interface is quick and intuitive, and being able to quickly switch the screen from the side by side, to the facing mode is very handy. In order to have the phone and music features, this unit sacrifices the simultaneous mode of the Edge unit, but that is a reasonable trade off for the other functionality. \n\nAlso, being able to keep both your earbuds in and quickly transition from phone or music into translation, and without needing to share earbuds, is quite convenient indeed. As for limitations, if you are using any of the languages that don’t have offline downloads available, you are limited by the speed of your internet connection. Noisy environments can be a challenge, too, although these buds greatly improve upon that for the wearer. The person using the phone will either need the volume up or will be reading the translation. For that matter, both parties can be reading the translations quite easily, too. I’m hoping Timekettle will keep adding to their offline libraries of languages, improve upon their Fish Card process for downloading them (and make it account based versus device based, meaning that my multiple devices could each access the downloaded libraries). Finally, I hope they could integrate the simultaneous mode into this device so that ALL functions could happen on one device.","full_conversation":[{"role":"OP","user_id":"anon_beb1513b7fab72a7","comment_id":"1cmzv7e","kind":"post","text":"TimeKettle, Dose it worth?\n\nHi everyone, I'm looking for a tool that could help me to understand and have sort of normal conversion \nMy main goal is when I'm in middle of meeting or surrounded by non-English speakers, I'm able to understand them in real time and with accuracy.\nOK, It might not be 100% perfect but at least I can depend on it better than Google translate. \nSo, if you guys tried it (or something similar) please tell me your feedback on it, was it helpful?? \nAny information will be appreciated. \nThanks 😊 \n#timekettle","timestamp":"2024-05-08T08:51:37+00:00","score":0},{"role":"answerer","user_id":"anon_aa61c8d5d1678698","comment_id":"l39fbcf","kind":"comment","text":"I have owned a number of Timekettle translators now and M3 is my new favorite. The form factor is much more secure in the ear than the previous models (and even their Edge unit). Sound quality is good as is the noise isolation. The app interface is quick and intuitive, and being able to quickly switch the screen from the side by side, to the facing mode is very handy. In order to have the phone and music features, this unit sacrifices the simultaneous mode of the Edge unit, but that is a reasonable trade off for the other functionality. \n\nAlso, being able to keep both your earbuds in and quickly transition from phone or music into translation, and without needing to share earbuds, is quite convenient indeed. As for limitations, if you are using any of the languages that don’t have offline downloads available, you are limited by the speed of your internet connection. Noisy environments can be a challenge, too, although these buds greatly improve upon that for the wearer. The person using the phone will either need the volume up or will be reading the translation. For that matter, both parties can be reading the translations quite easily, too. I’m hoping Timekettle will keep adding to their offline libraries of languages, improve upon their Fish Card process for downloading them (and make it account based versus device based, meaning that my multiple devices could each access the downloaded libraries). Finally, I hope they could integrate the simultaneous mode into this device so that ALL functions could happen on one device.","timestamp":"2024-05-09T10:19:02+00:00","score":1},{"role":"OP","user_id":"anon_beb1513b7fab72a7","comment_id":"l39o56g","kind":"comment","text":"Thanks for your response, \nI'm confused, and I can't make the right decision to choose between WT2 or M3.\nI need something that I can use it at work when someone talks to me so I can understand \nBut I'm afraid that would be the same google translation or the one Microsoft made!!","timestamp":"2024-05-09T11:45:18+00:00","score":1},{"role":"answerer","user_id":"anon_aa61c8d5d1678698","comment_id":"l3eigr3","kind":"comment","text":"It's hard to realize the simultaneous translation. \n\nTo understand what people say, you can wear M3 and use the speaker mode. (much cheaper)","timestamp":"2024-05-10T08:02:04+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_beb1513b7fab72a7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_aa61c8d5d1678698","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l39fbcf","thanks_reply_id":"l39o56g","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_6318286d0d2614b2","answerer_user_id":"anon_8919d80889a43fc5","subreddit":"LanguageTechnology","timestamp":"2024-05-28T02:25:18+00:00","post_id":"1d28ung","question":"LLM vs SpaCy/NLTK/etc. for an application that needs to do NLP for virtually any language?\n\nLLM vs SpaCy/NLTK/etc. for an application that needs to do NLP tasks (POS tagging, NER, Idiom identification, etc.) for virtually any language?\n\nWe have an application that needs to do NLP on almost all relevant languages. Of course, English, French, Chinese, Spanish, etc. but also Vietnamese, Indonesian, Hungarian, Nepali, etc. As much as possible.\n\nWould it be more efficient/possible/accurate to build our own implementations by combing tools like SpaCy and NLTK or to just get into an LLM like Gemini with system instructions?","preferred_answer":"You may need a few transformers for machine translation or a multilingual LM, but I would say that you first need to describe the tasks that you need to complete.","full_conversation":[{"role":"OP","user_id":"anon_6318286d0d2614b2","comment_id":"1d28ung","kind":"post","text":"LLM vs SpaCy/NLTK/etc. for an application that needs to do NLP for virtually any language?\n\nLLM vs SpaCy/NLTK/etc. for an application that needs to do NLP tasks (POS tagging, NER, Idiom identification, etc.) for virtually any language?\n\nWe have an application that needs to do NLP on almost all relevant languages. Of course, English, French, Chinese, Spanish, etc. but also Vietnamese, Indonesian, Hungarian, Nepali, etc. As much as possible.\n\nWould it be more efficient/possible/accurate to build our own implementations by combing tools like SpaCy and NLTK or to just get into an LLM like Gemini with system instructions?","timestamp":"2024-05-28T02:25:18+00:00","score":3},{"role":"answerer","user_id":"anon_8919d80889a43fc5","comment_id":"l63pkdk","kind":"comment","text":"You may need a few transformers for machine translation or a multilingual LM, but I would say that you first need to describe the tasks that you need to complete.","timestamp":"2024-05-29T00:09:55+00:00","score":0},{"role":"OP","user_id":"anon_6318286d0d2614b2","comment_id":"l64jr2h","kind":"comment","text":"the main tasks are pos tagging, ner, lemmatization, and idiom identification\n\nThanks, I will read into transformers, am noob","timestamp":"2024-05-29T03:35:55+00:00","score":1},{"role":"answerer","user_id":"anon_8919d80889a43fc5","comment_id":"l6508ka","kind":"comment","text":"Use SpaCy","timestamp":"2024-05-29T06:12:46+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6318286d0d2614b2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8919d80889a43fc5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l63pkdk","thanks_reply_id":"l64jr2h","post_score":3,"answer_score":0,"preferred_answer_is_top_level":true}} {"user_id":"anon_0987aa97c8679927","answerer_user_id":"anon_8fe3296a775e2cdc","subreddit":"LanguageTechnology","timestamp":"2024-05-30T04:14:05+00:00","post_id":"1d3vf4h","question":"Are there any ready to use Pytorch, TensorFlow or ONNX part-of-speech taggers that are below 100MB?\n\nThe code [Kyubyong/nlp_made_easy](https://github.com/Kyubyong/nlp_made_easy/blob/master/Pos-tagging%20with%20Bert%20Fine-tuning.ipynb) works well to fine-tune Bert for part-of-speech tagging, but the model is 450 MB. I need it to be below 100 MB.","preferred_answer":"Or, you could use a rule-based tagger. They're more precise, vastly smaller, and often faster. What languages do you need to work with?","full_conversation":[{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"1d3vf4h","kind":"post","text":"Are there any ready to use Pytorch, TensorFlow or ONNX part-of-speech taggers that are below 100MB?\n\nThe code [Kyubyong/nlp_made_easy](https://github.com/Kyubyong/nlp_made_easy/blob/master/Pos-tagging%20with%20Bert%20Fine-tuning.ipynb) works well to fine-tune Bert for part-of-speech tagging, but the model is 450 MB. I need it to be below 100 MB.","timestamp":"2024-05-30T04:14:05+00:00","score":2},{"role":"answerer","user_id":"anon_8fe3296a775e2cdc","comment_id":"l6bq2h6","kind":"comment","text":"Or, you could use a rule-based tagger. They're more precise, vastly smaller, and often faster. What languages do you need to work with?","timestamp":"2024-05-30T13:56:36+00:00","score":2},{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"l6c8e8c","kind":"comment","text":"thanks, interesting! only English, and in fact I only care about get correctly tagging nouns (and just for a list of ~250 words! other words can be tagged with whatever POS, doesn't matter)","timestamp":"2024-05-30T15:46:58+00:00","score":1},{"role":"answerer","user_id":"anon_8fe3296a775e2cdc","comment_id":"l6cgmcm","kind":"comment","text":"For 250 words, you could even do it manually. What platforms do you want to run it on?\n\nAnyway, example of using Apertium's https://github.com/apertium/apertium-eng in Ubuntu/Debian:\n```\n$ curl https://apertium.projectjj.com/apt/install-nightly.sh | sudo bash\n$ apt-get install apertium-eng\n# After this operation, 113 MB of additional disk space will be used.\n$ echo 'This is a sentence with white cats, green dogs, and other animals housed in a vacuum.' | apertium eng-tagger | cg-conv\n```\n\nyields\n```\n\"\"\n \"This\" prn dem mf sg\n \"This\" prn rel an mf sp\n\"\"\n \"be\" vblex pres p3 sg\n \"be\" vbser pres p3 sg\n\"\"\n \"a\" det ind sg\n\"\"\n \"sentence\" n sg\n\"\"\n \"with\" pr\n\"\"\n \"white\" adj sint\n\"\"\n \"cat\" n pl\n\"<,>\"\n \",\" cm\n\"\"\n \"green\" adj sint\n\"\"\n \"dog\" n pl\n\"<,>\"\n \",\" cm\n\"\"\n \"and\" cnjcoo\n\"\"\n \"other\" det ind sp\n\"\"\n \"animal\" n pl\n\"\"\n \"house\" vblex past\n \"house\" vblex pp\n\"\"\n \"in a vacuum\" adv\n\"<..>\"\n \"..\" sent\n```","timestamp":"2024-05-30T16:35:55+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_0987aa97c8679927","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8fe3296a775e2cdc","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l6bq2h6","thanks_reply_id":"l6c8e8c","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_3706acdff1b38d32","subreddit":"LanguageTechnology","timestamp":"2024-05-30T09:23:54+00:00","post_id":"1d3zvrc","question":"What to study and how to prepare for a Master NLP- CL ?\n\nI come from a background in humanities. \nI have a BA in languages, literatures and linguistics. \nI took a data analysis course during my last year of my bachelor, actually it was called “economic data analysis” and was meant to be a statistics for economy class, however we just studied the basics of statistics and did some regression analysis as the final project. \n\nNow I’m currently taking a python course on codeacademy ( I found out that I like to program but I’ve already struggling a bit with loops and functions but it’s not a big deal). \n\nAfter that what would you suggest me ? \nI was thinking at several options: \n\n-statistics and probability ( I don’t remember much from my class) \n\n-linear algebra \n\n-pre-calculus \n\n-data structures and algorithms in python ( codeacademy) \n\n-Apply NLP in python (codeacademy) \n\n\n-machine learning, ethics and math ( MOOC course of the university of Milan) \nhttps://www.pok.polimi.it/course/view.php?id=143#courseTabContent\n\n\nSince I can’t take all these courses, I don’t have that much time, I was thinking to take the “apply NLP aim python” on codeacademy \nAnd then I wanted to take some online courses in statistics and Linear algebra","preferred_answer":"the mathematics specialisation took me about a month to complete. I thought the exercises were good and they provide you with proofs for everything they teach. I think it'd cover you well for computational linguistics","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1d3zvrc","kind":"post","text":"What to study and how to prepare for a Master NLP- CL ?\n\nI come from a background in humanities. \nI have a BA in languages, literatures and linguistics. \nI took a data analysis course during my last year of my bachelor, actually it was called “economic data analysis” and was meant to be a statistics for economy class, however we just studied the basics of statistics and did some regression analysis as the final project. \n\nNow I’m currently taking a python course on codeacademy ( I found out that I like to program but I’ve already struggling a bit with loops and functions but it’s not a big deal). \n\nAfter that what would you suggest me ? \nI was thinking at several options: \n\n-statistics and probability ( I don’t remember much from my class) \n\n-linear algebra \n\n-pre-calculus \n\n-data structures and algorithms in python ( codeacademy) \n\n-Apply NLP in python (codeacademy) \n\n\n-machine learning, ethics and math ( MOOC course of the university of Milan) \nhttps://www.pok.polimi.it/course/view.php?id=143#courseTabContent\n\n\nSince I can’t take all these courses, I don’t have that much time, I was thinking to take the “apply NLP aim python” on codeacademy \nAnd then I wanted to take some online courses in statistics and Linear algebra","timestamp":"2024-05-30T09:23:54+00:00","score":4},{"role":"answerer","user_id":"anon_3706acdff1b38d32","comment_id":"l6d89r0","kind":"comment","text":"the mathematics specialisation took me about a month to complete. I thought the exercises were good and they provide you with proofs for everything they teach. I think it'd cover you well for computational linguistics","timestamp":"2024-05-30T19:25:49+00:00","score":1},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"l6dmoqg","kind":"comment","text":"Ok thanks. But does it also teach the theory ? Cause I need math and statistics basics for ML courses, so I also need to understand the theory, and not only the practice","timestamp":"2024-05-30T20:48:53+00:00","score":1},{"role":"answerer","user_id":"anon_3706acdff1b38d32","comment_id":"l6dnaux","kind":"comment","text":"They establish all the proofs, so I'd say it does provide you with theory. The course is specifically tailored towards ML and it was more than sufficient for the basic things I've been working on so far :)","timestamp":"2024-05-30T20:52:24+00:00","score":1},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"l6dq4yd","kind":"comment","text":"Thanks ! Why u mean they established the proofs? And did you find it difficult? ( I’m done with the questions ahah )","timestamp":"2024-05-30T21:09:01+00:00","score":1},{"role":"answerer","user_id":"anon_3706acdff1b38d32","comment_id":"l6frk9w","kind":"comment","text":"Mathematical proofs are the theory bit that explain why a given formula works.\n\nIt was challenging at times, but there are resources online that can help you get through it. If you did maths on a high level in high school, then you will manage without difficulties.","timestamp":"2024-05-31T05:42:27+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3706acdff1b38d32","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l6d89r0","thanks_reply_id":"l6dmoqg","post_score":4,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_0987aa97c8679927","answerer_user_id":"anon_e03839e4247a481c","subreddit":"LanguageTechnology","timestamp":"2024-06-09T04:05:28+00:00","post_id":"1dbkzso","question":"Did any *CL conference published paper acceptance stats based on ACR ARR review scores?\n\nhttps://aclanthology.org/2023.acl-long.report.pdf seems outdated as \"Overall Assessment\" score is not mentioned.","preferred_answer":"https://2024.naacl.org/blog/acceptance/","full_conversation":[{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"1dbkzso","kind":"post","text":"Did any *CL conference published paper acceptance stats based on ACR ARR review scores?\n\nhttps://aclanthology.org/2023.acl-long.report.pdf seems outdated as \"Overall Assessment\" score is not mentioned.","timestamp":"2024-06-09T04:05:28+00:00","score":1},{"role":"answerer","user_id":"anon_e03839e4247a481c","comment_id":"l7s9eb9","kind":"comment","text":"https://2024.naacl.org/blog/acceptance/","timestamp":"2024-06-09T07:13:08+00:00","score":2},{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"l7sa8v1","kind":"comment","text":"Thank you, I don't see any mentions of ARR scores.","timestamp":"2024-06-09T07:23:07+00:00","score":1},{"role":"answerer","user_id":"anon_e03839e4247a481c","comment_id":"l7saka3","kind":"comment","text":"Yeah, they usually present it during the conference. The best proxy we can get maybe is from the ARR calculation, assuming everyone is aiming for *CL conferences: http://stats.aclrollingreview.org/iterations/2024/february/","timestamp":"2024-06-09T07:26:52+00:00","score":2},{"role":"OP","user_id":"anon_0987aa97c8679927","comment_id":"l7sbvq4","kind":"comment","text":"Thanks great stats! Where do you see acceptance stats? or do you take eg NAACL acceptance rate and guess some ARR scores acceptance threshold/likelihood.\n\nE.g. https://2024.naacl.org/blog/acceptance/\n- The acceptance rate for Main Conference papers is therefore: 565 / 2434 = 23.2%. \n- 12.5% of papers were accepted to NAACL Findings.\n\nTotal: ~35% acceptance rate.\n\nThen looking at https://stats.aclrollingreview.org/iterations/2024/february/ we cut ARR scores at ~35%, which lands at around ARR score ~=3.","timestamp":"2024-06-09T07:42:39+00:00","score":1},{"role":"answerer","user_id":"anon_e03839e4247a481c","comment_id":"l7utiv8","kind":"comment","text":"Yes, I roughly calculated that way. Also using https://papercopilot.com/statistics/acl-statistics/acl-2024-statistics/","timestamp":"2024-06-09T19:14:15+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_0987aa97c8679927","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e03839e4247a481c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l7s9eb9","thanks_reply_id":"l7sa8v1","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ae802108cc9e3ca2","answerer_user_id":"anon_ffec8ea95df7213a","subreddit":"LanguageTechnology","timestamp":"2024-06-22T19:04:49+00:00","post_id":"1dm2xvr","question":"NLP Masters or Industry experience?\n\nI’m coming here for some career advice. I graduated with an undergrad degree in Spanish and Linguistics from Oxford Uni last year and I currently have an offer to study the Speech and Language Processing MSc at Edinburgh Uni. I have been working in Public Relations since I graduated but would really like to move into a more linguistics-oriented role.\n\nThe reason I am wondering whether to accept the Edinburgh offer or not is that I have basically no hands-on experience in computer science/data science/applied maths yet. I last studied maths at GCSE and specialised in Spanish Syntax on my uni course. My coding is still amateur, too. In my current company I could probably explore coding/data science a little over the coming year, but I don’t enjoy working there very much.\n\nSo I can either accept Edinburgh now and take the leap into NLP, or take a year to learn some more about it, maybe find another job in in the meantime and apply to some other Masters programs next year (Applied linguistics at Cambridge seems cool, but as I understand more academic and less vocational than Edinburgh’s course). Would the sudden jump into NLP be too much? (I could still try and brush up over summer) Or should I take a year out of uni? Another concern is that I am already 24, and don’t want to leave the masters too late. Obviously no clear-cut answer here, but hoping someone with some experience can help me out with my decision - thanks in advance!","preferred_answer":"You won't get an Applied NLP position without coding experience\n\n\nYou won't get into advanced NLP without a relevant graduate degree\n\n\nWhat do you want as a career?","full_conversation":[{"role":"OP","user_id":"anon_ae802108cc9e3ca2","comment_id":"1dm2xvr","kind":"post","text":"NLP Masters or Industry experience?\n\nI’m coming here for some career advice. I graduated with an undergrad degree in Spanish and Linguistics from Oxford Uni last year and I currently have an offer to study the Speech and Language Processing MSc at Edinburgh Uni. I have been working in Public Relations since I graduated but would really like to move into a more linguistics-oriented role.\n\nThe reason I am wondering whether to accept the Edinburgh offer or not is that I have basically no hands-on experience in computer science/data science/applied maths yet. I last studied maths at GCSE and specialised in Spanish Syntax on my uni course. My coding is still amateur, too. In my current company I could probably explore coding/data science a little over the coming year, but I don’t enjoy working there very much.\n\nSo I can either accept Edinburgh now and take the leap into NLP, or take a year to learn some more about it, maybe find another job in in the meantime and apply to some other Masters programs next year (Applied linguistics at Cambridge seems cool, but as I understand more academic and less vocational than Edinburgh’s course). Would the sudden jump into NLP be too much? (I could still try and brush up over summer) Or should I take a year out of uni? Another concern is that I am already 24, and don’t want to leave the masters too late. Obviously no clear-cut answer here, but hoping someone with some experience can help me out with my decision - thanks in advance!","timestamp":"2024-06-22T19:04:49+00:00","score":11},{"role":"answerer","user_id":"anon_ffec8ea95df7213a","comment_id":"l9svz8j","kind":"comment","text":"You won't get an Applied NLP position without coding experience\n\n\nYou won't get into advanced NLP without a relevant graduate degree\n\n\nWhat do you want as a career?","timestamp":"2024-06-22T19:18:42+00:00","score":8},{"role":"OP","user_id":"anon_ae802108cc9e3ca2","comment_id":"l9syw67","kind":"comment","text":"Thanks for your reply! The idea wouldn’t be to get an Applied NLP position this year, just to do some basic coding/data science which I would likely be able to explore at my current company. hopefully that would give me some good experience before starting a masters. As a career, no set vision yet except that language technology seems like a super interesting & vibrant field - machine translation is most interesting to me at the moment but would be open to exploring other options during graduate study.","timestamp":"2024-06-22T19:37:28+00:00","score":3},{"role":"answerer","user_id":"anon_ffec8ea95df7213a","comment_id":"l9t2y52","kind":"comment","text":"I'm not familiar with the program you are accepted into\n\n\nIs it more math and statistics or linguistic focused? Are you determined to go into the industry rather than research?","timestamp":"2024-06-22T20:03:25+00:00","score":2},{"role":"OP","user_id":"anon_ae802108cc9e3ca2","comment_id":"l9t4nzn","kind":"comment","text":"There are modules in maths and statistics but also practical modules on things like machine translation, speech synthesis, speech recognition etc. As far as I’m aware it’s possible to go in having done linguistics (with some coding experience) and come out fairly competent in NLP methods. And I’m not closed off to research at all! I just thought in industry I might me more financially stable","timestamp":"2024-06-22T20:14:24+00:00","score":2},{"role":"answerer","user_id":"anon_ffec8ea95df7213a","comment_id":"l9t64cd","kind":"comment","text":"Gotcha, I'm not familiar with your local job market but in America I did a masters in applied math with an emphasis on DL for NLP - got a job as a Research Scientist making models to read Doctor's notes, switched to engineering to get better coding experience, and then switched back to Applied Scientist now making time series models to predict supply and demand in an unrelated industry \n\n\nI state my background just to show the uncertainty of career progression and how my academic background has relatively low impact on my jobs outside of getting the interviews\n\n\nMy approach would be to apply to jobs you want now and if you feel the best path forward is the Masters then go with that. If you instead get an offer too good to pass up, then choose that one","timestamp":"2024-06-22T20:23:42+00:00","score":4},{"role":"OP","user_id":"anon_ae802108cc9e3ca2","comment_id":"l9t7c0r","kind":"comment","text":"Yes, that sounds reasonable. Thanks for the advice!","timestamp":"2024-06-22T20:31:25+00:00","score":2}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_ae802108cc9e3ca2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ffec8ea95df7213a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"l9svz8j","thanks_reply_id":"l9syw67","post_score":11,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_1d21d34a0a306571","subreddit":"LanguageTechnology","timestamp":"2024-06-23T10:27:17+00:00","post_id":"1dmj6s5","question":"Help: I have to choose between these 3 universities\n\nIn the end, I couldn't pass the TOEFL C1 exam, so I could no longer apply to other German universities. Now, I find myself choosing between three universities for computational linguistics:\n\n1. University of Trento: MSc in Cognitive Science,\nComputational and theoretical modelling of Language and Cognition\n\nhttps://offertaformativa.unitn.it/en/lm/cognitive-science/course-content\n\n2. Pisa: MSc in Digital Humanities, Language Technologies\n\n3. Tübingen: Computational Linguistics\n\n\nSince the program in Pisa is mainly in Italian, I'll provide a brief description in English:\n\nPisa program: \n\nComputer Programming 1 (Java)\nComputer Programming 2 (Python) and Data Analysis\nData Mining (12 ECTS)\nMachine Learning (9 ECTS)\nComputational Linguistics 1\nApplied Linguistics (Vector Semantics)\nPublic History\nInformation and Data Law\nComputational Linguistics 2 (Annotation and Information Extraction)\nHuman Language Technologies (NLP)\nComputational Psycholinguistics\nAlgorithms and Data Structures for Data Science\nSociolinguistics\n\n\nThe Pisa program seems more technical, similar to those of German universities. Trento, on the other hand, is more research-oriented but includes an almost year-long mandatory internship, unlike the other universities. Additionally, the Trento program only accepts 80 students per year, making it seem much more \"exclusive.\" After completing this program, one is practically already on the path to a PhD in Computational Linguistics or Artificial Intelligence. Given the continuous evolution of NLP, I believe a PhD in AI or NLP after the master's degree is almost essential and will open up more opportunities.\n\n\nWhat do you think of these three programs, and which one would you choose","preferred_answer":"Trento >Tübingen >Pisa","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1dmj6s5","kind":"post","text":"Help: I have to choose between these 3 universities\n\nIn the end, I couldn't pass the TOEFL C1 exam, so I could no longer apply to other German universities. Now, I find myself choosing between three universities for computational linguistics:\n\n1. University of Trento: MSc in Cognitive Science,\nComputational and theoretical modelling of Language and Cognition\n\nhttps://offertaformativa.unitn.it/en/lm/cognitive-science/course-content\n\n2. Pisa: MSc in Digital Humanities, Language Technologies\n\n3. Tübingen: Computational Linguistics\n\n\nSince the program in Pisa is mainly in Italian, I'll provide a brief description in English:\n\nPisa program: \n\nComputer Programming 1 (Java)\nComputer Programming 2 (Python) and Data Analysis\nData Mining (12 ECTS)\nMachine Learning (9 ECTS)\nComputational Linguistics 1\nApplied Linguistics (Vector Semantics)\nPublic History\nInformation and Data Law\nComputational Linguistics 2 (Annotation and Information Extraction)\nHuman Language Technologies (NLP)\nComputational Psycholinguistics\nAlgorithms and Data Structures for Data Science\nSociolinguistics\n\n\nThe Pisa program seems more technical, similar to those of German universities. Trento, on the other hand, is more research-oriented but includes an almost year-long mandatory internship, unlike the other universities. Additionally, the Trento program only accepts 80 students per year, making it seem much more \"exclusive.\" After completing this program, one is practically already on the path to a PhD in Computational Linguistics or Artificial Intelligence. Given the continuous evolution of NLP, I believe a PhD in AI or NLP after the master's degree is almost essential and will open up more opportunities.\n\n\nWhat do you think of these three programs, and which one would you choose","timestamp":"2024-06-23T10:27:17+00:00","score":4},{"role":"answerer","user_id":"anon_1d21d34a0a306571","comment_id":"laj0x2d","kind":"comment","text":"Trento >Tübingen >Pisa","timestamp":"2024-06-27T14:39:58+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"laj2csu","kind":"comment","text":"Thanks, why Trento tho","timestamp":"2024-06-27T14:48:04+00:00","score":1},{"role":"answerer","user_id":"anon_1d21d34a0a306571","comment_id":"laj30wz","kind":"comment","text":"First, Microsoft has a research center there and the researchers there are top notch. So just look up the faculty, rather than taking my word for it.","timestamp":"2024-06-27T14:51:49+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"laj5ic9","kind":"comment","text":"Great, thanks. But did you study there ?","timestamp":"2024-06-27T15:05:41+00:00","score":1},{"role":"answerer","user_id":"anon_1d21d34a0a306571","comment_id":"laj5pex","kind":"comment","text":"Nope, but have visited and collaborated","timestamp":"2024-06-27T15:06:47+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1d21d34a0a306571","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"laj0x2d","thanks_reply_id":"laj2csu","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_e56ce12240828b43","answerer_user_id":"anon_ca0c980b12ef2b75","subreddit":"LanguageTechnology","timestamp":"2024-07-03T13:29:30+00:00","post_id":"1duee66","question":"Fine-tune LLMs for classification task\n\nI would like to use an LLM (Llama3 or Mistral for example) for a multilabel-classification task. I have a few 1000 examples to train the model on, but not sure what's the best way and library to do that. Is there any best practice how to fine-tune LLMs for classification tasks?","preferred_answer":"Unsloth is the best way. They have a notebook to showing how to fine-tune llama3 8b on colab (Unlikely to work if you have a bigger dataset/batch size on colab). Follow the notebook, change the prompt and data, run it on a GPU with enough VRAM and it should be done.","full_conversation":[{"role":"OP","user_id":"anon_e56ce12240828b43","comment_id":"1duee66","kind":"post","text":"Fine-tune LLMs for classification task\n\nI would like to use an LLM (Llama3 or Mistral for example) for a multilabel-classification task. I have a few 1000 examples to train the model on, but not sure what's the best way and library to do that. Is there any best practice how to fine-tune LLMs for classification tasks?","timestamp":"2024-07-03T13:29:30+00:00","score":5},{"role":"answerer","user_id":"anon_ca0c980b12ef2b75","comment_id":"lbgwbnd","kind":"comment","text":"Unsloth is the best way. They have a notebook to showing how to fine-tune llama3 8b on colab (Unlikely to work if you have a bigger dataset/batch size on colab). Follow the notebook, change the prompt and data, run it on a GPU with enough VRAM and it should be done.","timestamp":"2024-07-03T17:04:31+00:00","score":3},{"role":"OP","user_id":"anon_e56ce12240828b43","comment_id":"lbh0p2s","kind":"comment","text":"thanks, i was reading about using lora to finetune a llm for a text classification to perform well, do you know how it performs compared to the prompt based approach from unsloth?","timestamp":"2024-07-03T17:28:13+00:00","score":1},{"role":"answerer","user_id":"anon_ca0c980b12ef2b75","comment_id":"lbh1q7t","kind":"comment","text":"I might be wrong, but unsloth also uses lora. Basically freezing most of the layers of the model and fine-tuning only the few layers which arnt frozen.","timestamp":"2024-07-03T17:33:47+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e56ce12240828b43","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ca0c980b12ef2b75","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lbgwbnd","thanks_reply_id":"lbh0p2s","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_b69cd40515e21fe7","answerer_user_id":"anon_542b574d59e858c1","subreddit":"LanguageTechnology","timestamp":"2024-07-30T06:22:12+00:00","post_id":"1efmb9c","question":"Any universities for Master’s Degree in Computational Linguistics that doesn’t require strictly Computer Science BA?\n\nSo I have applied two universities in Germany (Stuttgart and Tübingen) and I just got rejected from Tübingen saying I don’t have the prerequisites. Though I have done my Erasmus in the same university while I was studying English Language and Comparative Literature. The program suggests that it’s for Language and Computer Science people so I got confused. I will probably be rejected by Stuttgart as well then. Is there a good university that accepts wider range of graduates? Btw I have graduated from the top university in my country etc, so that mustn’t be the said “prerequisite”. I’m also not a recent graduate, I have work experience as well, I just wanted to learn the digital aspect and shift my career, if possible, since my work projects all included digitalization.\n\nThanks","preferred_answer":"> I will probably be rejected by Stuttgart as well then.\n\nIf you are, I doubt it will be on those grounds. I know several people who graduated from there who had a pure linguistics BA. \n\nKeep your chin up","full_conversation":[{"role":"OP","user_id":"anon_b69cd40515e21fe7","comment_id":"1efmb9c","kind":"post","text":"Any universities for Master’s Degree in Computational Linguistics that doesn’t require strictly Computer Science BA?\n\nSo I have applied two universities in Germany (Stuttgart and Tübingen) and I just got rejected from Tübingen saying I don’t have the prerequisites. Though I have done my Erasmus in the same university while I was studying English Language and Comparative Literature. The program suggests that it’s for Language and Computer Science people so I got confused. I will probably be rejected by Stuttgart as well then. Is there a good university that accepts wider range of graduates? Btw I have graduated from the top university in my country etc, so that mustn’t be the said “prerequisite”. I’m also not a recent graduate, I have work experience as well, I just wanted to learn the digital aspect and shift my career, if possible, since my work projects all included digitalization.\n\nThanks","timestamp":"2024-07-30T06:22:12+00:00","score":10},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"lfm24mc","kind":"comment","text":"> I will probably be rejected by Stuttgart as well then.\n\nIf you are, I doubt it will be on those grounds. I know several people who graduated from there who had a pure linguistics BA. \n\nKeep your chin up","timestamp":"2024-07-30T06:40:03+00:00","score":7},{"role":"OP","user_id":"anon_b69cd40515e21fe7","comment_id":"lfme7al","kind":"comment","text":"As I anticipated, I got rejected by Stuttgart as well. Same reason. Thanks though…","timestamp":"2024-07-30T08:56:07+00:00","score":3},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"lfmggsi","kind":"comment","text":"Sorry to hear. \n\nAre you set on Germany? There are other places, although they might require you to know the language.","timestamp":"2024-07-30T09:22:13+00:00","score":1},{"role":"OP","user_id":"anon_b69cd40515e21fe7","comment_id":"lfp1dir","kind":"comment","text":"No, I focused on Germany cuz of the costs. UK is very expensive, both tuition and living… USA is the same. I also want to try some scholarships but even with scholarships, UK is very expensive for me. However, as you can imagine I need programs taught in English.","timestamp":"2024-07-30T19:09:10+00:00","score":1},{"role":"answerer","user_id":"anon_542b574d59e858c1","comment_id":"lfryr5q","kind":"comment","text":"> However, as you can imagine I need programs taught in English.\n\nThe Netherlands and the Nordics might work for you then, e.g. the language technology MSc at the University of Gothenburg for Sweden","timestamp":"2024-07-31T06:44:18+00:00","score":1},{"role":"OP","user_id":"anon_b69cd40515e21fe7","comment_id":"lfrzpf7","kind":"comment","text":"I’m late for all these schools probably but will surely try next semester (if applicable) or next year then thank you…","timestamp":"2024-07-31T06:54:21+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_b69cd40515e21fe7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_542b574d59e858c1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lfm24mc","thanks_reply_id":"lfme7al","post_score":10,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_4e3cf9fcd03fda04","answerer_user_id":"anon_813eee7795262df3","subreddit":"LanguageTechnology","timestamp":"2024-08-01T10:01:34+00:00","post_id":"1ehcv6i","question":"Topic modeling using LDA\n\nHey guys! Sorry, this is my first post. I’m trying to learn Python on my own. The problem I’m facing is that it’s taking 7-8 hours for Python to compute results for topic modeling on one dataset. \nIs there any way to minimise this time??","preferred_answer":"You really should provide more details about the dataset. Is it a CSV file with a few 100,000 words... is it tera-bytes large... did you try to run any of the examples on https://radimrehurek.com/gensim/models/ldamodel.html","full_conversation":[{"role":"OP","user_id":"anon_4e3cf9fcd03fda04","comment_id":"1ehcv6i","kind":"post","text":"Topic modeling using LDA\n\nHey guys! Sorry, this is my first post. I’m trying to learn Python on my own. The problem I’m facing is that it’s taking 7-8 hours for Python to compute results for topic modeling on one dataset. \nIs there any way to minimise this time??","timestamp":"2024-08-01T10:01:34+00:00","score":5},{"role":"answerer","user_id":"anon_813eee7795262df3","comment_id":"lfzrnvv","kind":"comment","text":"You really should provide more details about the dataset. Is it a CSV file with a few 100,000 words... is it tera-bytes large... did you try to run any of the examples on https://radimrehurek.com/gensim/models/ldamodel.html","timestamp":"2024-08-01T15:57:39+00:00","score":3},{"role":"OP","user_id":"anon_4e3cf9fcd03fda04","comment_id":"lg03v5e","kind":"comment","text":"I did not. Thank you so much for the link. I’ll check it out. \n\nThe file is of 1GB btw","timestamp":"2024-08-01T17:01:30+00:00","score":2},{"role":"answerer","user_id":"anon_813eee7795262df3","comment_id":"lg04v7q","kind":"comment","text":"have you tried working with a subset of this dataset?","timestamp":"2024-08-01T17:06:50+00:00","score":3},{"role":"OP","user_id":"anon_4e3cf9fcd03fda04","comment_id":"lg056ac","kind":"comment","text":"Yes, works fine that way.\nBut for the whole dataset, it’s taking a very long time..","timestamp":"2024-08-01T17:08:26+00:00","score":1},{"role":"answerer","user_id":"anon_813eee7795262df3","comment_id":"lg059u0","kind":"comment","text":"Are you willing to share your python code?","timestamp":"2024-08-01T17:08:57+00:00","score":1},{"role":"OP","user_id":"anon_4e3cf9fcd03fda04","comment_id":"lg05o30","kind":"comment","text":"Umm, I’m not sure how to share codes. I’ll just copy paste it?","timestamp":"2024-08-01T17:11:03+00:00","score":1},{"role":"answerer","user_id":"anon_813eee7795262df3","comment_id":"lg0ofbn","kind":"comment","text":"You could link your python notebook via google colab or your github repo... worst case, sure -- feel free to copy and paste that portion that isn't unique intellectual property.","timestamp":"2024-08-01T18:47:54+00:00","score":2},{"role":"OP","user_id":"anon_4e3cf9fcd03fda04","comment_id":"lg0ox3x","kind":"comment","text":"import pandas as pd\r\nfrom nltk.tokenize import RegexpTokenizer\r\nfrom nltk.corpus import stopwords\r\nfrom nltk.stem import WordNetLemmatizer\r\nfrom nltk import pos_tag\r\nimport re\r\nimport string\r\nimport nltk\r\nfrom gensim import corpora, models\r\nfrom gensim import corpora, models\r\n\r\ndef load_stopwords(file_path, additional_words=[]):\r\n with open(file_path, ‘r’, encoding=‘utf-8’) as file:\r\n stopwords_list = [line.strip() for line in file]\r\n stopwords_list.extend(additional_words)\r\n return set(stopwords_list)\r\n\r\nstopwords_file_path = r””\r\nadditional_words_to_filter = [‘don’, ‘reviews’, ‘app’, ‘company’, ‘worst’, ‘amount’, ‘fraud’, ‘fake’] \n\r\nwords_to_filter = load_stopwords(stopwords_file_path, additional_words=additional_words_to_filter)\r\n\r\n\r\ntokenizer = RegexpTokenizer(r’\\w+’)\r\nlemmatizer = WordNetLemmatizer()\r\n\r\ndef remove_emojis(text):\r\n \r\n emoji_pattern = re.compile(“[“\r\n u”\\U0001F600-\\U0001F64F” # emoticons\r\n u”\\U0001F300-\\U0001F5FF” # symbols & pictographs\r\n u”\\U0001F680-\\U0001F6FF” # transport & map symbols\r\n u”\\U0001F1E0-\\U0001F1FF” # flags (iOS)\r\n u”\\U00002500-\\U00002BEF” # chinese char\r\n u”\\U00002702-\\U000027B0” # chinese char continued\r\n u”\\U00002702-\\U000027B0” # chinese char continued\r\n u”\\U000024C2-\\U0001F251” # enclosed characters\r\n u”\\U0001f926-\\U0001f937” # supplemental symbols\r\n u”\\U00010000-\\U0010ffff” # supplemental symbols continued\r\n u”\\u2640-\\u2642” # gender symbols\r\n u”\\u2600-\\u2B55” # miscellaneous symbols\r\n u”\\u200d” # zero width joiner\r\n u”\\u23cf” # eject button\r\n u”\\u23e9” # fast forward button\r\n u”\\u231a” # watch\r\n u”\\ufe0f” # dingbats\r\n u”\\u3030” # wavy dash\r\n “]+”, flags=re.UNICODE)\r\n return emoji_pattern.sub(r’’, text)\r\n\r\ndef preprocess_text(text):\r\n if not isinstance(text, str):\r\n return [] text = remove_emojis(text) # Remove emojis\r\n text = text.translate(str.maketrans(‘’, ‘’, string.punctuation)) \r\n text = ‘’.join([i for i in text if not i.isdigit()]) \r\n tokens = tokenizer.tokenize(text.lower())\r\n tagged_tokens = pos_tag(tokens)\r\n ltokens = [lemmatizer.lemmatize(token, pos=get_wordnet_pos(tag)) for token, tag in tagged_tokens]\r\n filtered_tokens = [token for token in ltokens if token not in words_to_filter and len(token) > 2]\r\n return filtered_tokens\r\n\r\ndef get_wordnet_pos(treebank_tag):\r\n if treebank_tag.startswith(‘J’):\r\n return ‘a’ # adjective\r\n elif treebank_tag.startswith(‘V’):\r\n return ‘v’ # verb\r\n elif treebank_tag.startswith(‘N’):\r\n return ‘n’ # noun\r\n elif treebank_tag.startswith(‘R’):\r\n return ‘r’ # adverb\r\n else:\r\n return ‘n’ # default to noun\r\n\r\ndef fix_encoding_issues(text):\r\n encodings = [‘latin1’, ‘windows-1252’, ‘utf-8’, ‘iso-8859-1’]\r\n for enc in encodings:\r\n try:\r\n fixed_text = text.encode(enc).decode(‘utf-8’)\r\n # Check if the fixed text is plausible (heuristic check)\r\n if any(char.isalnum() for char in fixed_text):\r\n return fixed_text\r\n except (UnicodeEncodeError, UnicodeDecodeError):\r\n continue\r\n return text \r\ndef preprocess_text(text):\r\n if not isinstance(text, str):\r\n return [] # Handle non-string input by returning empty list\r\n text = fix_encoding_issues(text) \r\n text = remove_emojis(text) \r\n text = text.translate(str.maketrans(‘’, ‘’, string.punctuation)) \r\n text = ‘’.join([i for i in text if not i.isdigit()]) \r\n tokens = tokenizer(text.lower())\r\n tagged_tokens = pos_tag(tokens)\r\n ltokens = [lemmatizer.lemmatize(token, pos=get_wordnet_pos(tag)) for token, tag in tagged_tokens]\r\n filtered_tokens = [token for token in ltokens if token not in words_to_filter and len(token) > 2]\r\n return filtered_tokens\r\n\r\n\r\ndef train_lda_and_save_topics(reviews, output_file):\r\n \r\n texts = reviews[‘processed_text’].apply(lambda x: x.split()).tolist()\r\n\r\n\r\n dictionary = corpora.Dictionary(texts)\r\n corpus = [dictionary.doc2bow(text) for text in texts]\r\n\r\n \r\n lda_model = models.LdaModel(corpus, num_topics=10, id2word=dictionary, passes=15)\r\n\r\n \r\n topics_data = []\r\n for idx, topic in lda_model.print_topics():\r\n topics_data.append({\r\n ‘Topic’: idx,\r\n ‘Words’: topic\r\n })\r\n topics_df = pd.DataFrame(topics_data)\r\n\r\n \r\n topics_df.to_csv(output_file, index=False)\r\n\r\n train_lda_and_save_topics(df, ‘review_topic.csv’)","timestamp":"2024-08-01T18:50:29+00:00","score":1}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_4e3cf9fcd03fda04","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_813eee7795262df3","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lfzrnvv","thanks_reply_id":"lg03v5e","post_score":5,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_7884998e9ef10ad3","subreddit":"LanguageTechnology","timestamp":"2024-08-09T12:54:51+00:00","post_id":"1enyyte","question":"Is formal logic and semantics ( lampda calculus, verbal quantifications, how to translate natural language in logic representations, compute the truth value of a formula using truth tables and tableaux ) useful for NLP jobs and tasks ? How ?","preferred_answer":"Yes but no one does use them. \n\nHere is a good chapter on how to pause first order logic with nltk https://www.nltk.org/book/ch10.html\n\nBut if you look on GitHub very few people seem to actually use this","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1enyyte","kind":"post","text":"Is formal logic and semantics ( lampda calculus, verbal quantifications, how to translate natural language in logic representations, compute the truth value of a formula using truth tables and tableaux ) useful for NLP jobs and tasks ? How ?","timestamp":"2024-08-09T12:54:51+00:00","score":12},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"lha34zw","kind":"comment","text":"Yes but no one does use them. \n\nHere is a good chapter on how to pause first order logic with nltk https://www.nltk.org/book/ch10.html\n\nBut if you look on GitHub very few people seem to actually use this","timestamp":"2024-08-09T14:23:57+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"lha3mek","kind":"comment","text":"Ok thanks, bc that was a free choice course at my university, but the other option would be a theoretical course that analyze the relationship between LLM a and cognition and what we can learn about human cognition with these models, so I thought this one about formal semantics could be more useful","timestamp":"2024-08-09T14:26:35+00:00","score":2},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"lha65gs","kind":"comment","text":"Is it for a course or also a project? If it's for a project there's loads of datasets of\n1. Human sentences of a problem\n\n2. Code version of that\n\nLike sql or math Olympiad. Datasets","timestamp":"2024-08-09T14:40:26+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"lha7ty5","kind":"comment","text":"I don’t get it, those are two courses without projects","timestamp":"2024-08-09T14:49:22+00:00","score":1},{"role":"answerer","user_id":"anon_7884998e9ef10ad3","comment_id":"lhacyt3","kind":"comment","text":"ok no projects so you wont need a dataset for a project then","timestamp":"2024-08-09T15:16:29+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7884998e9ef10ad3","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lha34zw","thanks_reply_id":"lha3mek","post_score":12,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_88e9750692746aaf","answerer_user_id":"anon_3c6e1aa09e23f5ae","subreddit":"LanguageTechnology","timestamp":"2024-08-20T11:50:26+00:00","post_id":"1ewthm7","question":"Help Needed: Treatment Pattern Analysis on Vet Clinic Data (Internship Project\n\nI'm currently working on a project for my internship that involves performing treatment pattern analysis on vet clinic data. I'm pretty new to machine learning, so I'm hoping to get some advice on how to approach this.\n\nThe dataset I'm working with includes several columns, but the key ones are:\n\n* **consultationid**\n* **vetid**\n* **itemname** (medication used)\n* **itemservicename** (category of the consultation)\n* **examinationtextstring** (reason for consult)\n\nThe **examinationtextstring** column contains unstructured text entries like this:\n\n**Reason:** Unwell\n\n* Has been flat for the last 3 days\n* Will eat and drink but is less keen than normal\n* No v+, may have had a small amount of d+\n* Possibly ate some old and burnt seafood from xmas day\n\nOral mm p<2, just moist enough \nLN normal \nTemp 39.1 \nHR 128, RR 28, effort and lung sounds normal \nStance a little hunched \nAbdo soft and relaxed, no FB palpable \nNeck ok, slight flinch on palpation of spine at caudal thoracic area\n\nRan bloods - increased WCC and glob. Otherwise NSF \nDx open, ? Enteritis vs back pain (but wouldn't expect WCC with that), meningitis \nRec NSAID and monitor, bland diet \nIni then i/v and further workup as appropriate at the time to look for an inflammatory focus\n\nEvery vet seems to use different terminology when entering data in this column, which adds to the complexity. I initially tried using Named Entity Recognition (NER), but the dataset is too large for manual annotation, and I'm at a bit of a loss on how to proceed from here.\n\nDoes anyone have experience with this type of analysis or suggestions on what approaches or tools I could try? Any advice or pointers would be greatly appreciated!","preferred_answer":"The system ie the generative LLM, could help smooth out the differences in how vets describe issues by using past records and external veterinary guidelines like all the pdfs you can get from [https://vetstudy.journeywithasr.com/](https://vetstudy.journeywithasr.com/) to make suggestions that actually make sense in context. so even if everyone uses different language, the model can still come up with accurate and helpful recommendations. of course with RAG yoou have to invest in a good retrival model as well as ensure proper eval is done.","full_conversation":[{"role":"OP","user_id":"anon_88e9750692746aaf","comment_id":"1ewthm7","kind":"post","text":"Help Needed: Treatment Pattern Analysis on Vet Clinic Data (Internship Project\n\nI'm currently working on a project for my internship that involves performing treatment pattern analysis on vet clinic data. I'm pretty new to machine learning, so I'm hoping to get some advice on how to approach this.\n\nThe dataset I'm working with includes several columns, but the key ones are:\n\n* **consultationid**\n* **vetid**\n* **itemname** (medication used)\n* **itemservicename** (category of the consultation)\n* **examinationtextstring** (reason for consult)\n\nThe **examinationtextstring** column contains unstructured text entries like this:\n\n**Reason:** Unwell\n\n* Has been flat for the last 3 days\n* Will eat and drink but is less keen than normal\n* No v+, may have had a small amount of d+\n* Possibly ate some old and burnt seafood from xmas day\n\nOral mm p<2, just moist enough \nLN normal \nTemp 39.1 \nHR 128, RR 28, effort and lung sounds normal \nStance a little hunched \nAbdo soft and relaxed, no FB palpable \nNeck ok, slight flinch on palpation of spine at caudal thoracic area\n\nRan bloods - increased WCC and glob. Otherwise NSF \nDx open, ? Enteritis vs back pain (but wouldn't expect WCC with that), meningitis \nRec NSAID and monitor, bland diet \nIni then i/v and further workup as appropriate at the time to look for an inflammatory focus\n\nEvery vet seems to use different terminology when entering data in this column, which adds to the complexity. I initially tried using Named Entity Recognition (NER), but the dataset is too large for manual annotation, and I'm at a bit of a loss on how to proceed from here.\n\nDoes anyone have experience with this type of analysis or suggestions on what approaches or tools I could try? Any advice or pointers would be greatly appreciated!","timestamp":"2024-08-20T11:50:26+00:00","score":2},{"role":"answerer","user_id":"anon_3c6e1aa09e23f5ae","comment_id":"lj6tk8d","kind":"comment","text":"The system ie the generative LLM, could help smooth out the differences in how vets describe issues by using past records and external veterinary guidelines like all the pdfs you can get from [https://vetstudy.journeywithasr.com/](https://vetstudy.journeywithasr.com/) to make suggestions that actually make sense in context. so even if everyone uses different language, the model can still come up with accurate and helpful recommendations. of course with RAG yoou have to invest in a good retrival model as well as ensure proper eval is done.","timestamp":"2024-08-21T10:42:52+00:00","score":1},{"role":"OP","user_id":"anon_88e9750692746aaf","comment_id":"lj70zpu","kind":"comment","text":"I’m not familiar with RAG but I’ll definitely look into it. Thanks for responding I really appreciate your help.","timestamp":"2024-08-21T11:44:30+00:00","score":1},{"role":"answerer","user_id":"anon_3c6e1aa09e23f5ae","comment_id":"lj75xso","kind":"comment","text":"welcome. Feel free to reach out if you dive into it and have any questions or need some guidance. I'm happy to help!","timestamp":"2024-08-21T12:20:30+00:00","score":1},{"role":"OP","user_id":"anon_88e9750692746aaf","comment_id":"lj9yuby","kind":"comment","text":"Sure thank you. I’ll reach out if I have any doubts.","timestamp":"2024-08-21T21:20:15+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_88e9750692746aaf","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3c6e1aa09e23f5ae","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lj6tk8d","thanks_reply_id":"lj70zpu","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_693d9f36b549f23c","answerer_user_id":"anon_c2073434c2a0924c","subreddit":"LanguageTechnology","timestamp":"2024-08-20T12:10:14+00:00","post_id":"1ewtvmh","question":"Help me choose elective NLP courses\n\nHi all! I'm starting my master's degree in NLP next month. Which of the following 5 courses do you think would be the most useful for a career in NLP right now? I need to choose 2.\n\n**Databases and Modelling**: exploration of database systems, focusing on both traditional relational databases and NoSQL technologies.\n\n* *Skills*: Relational database design, SQL proficiency, understanding database security, and NoSQL database awareness.\n* *Syllabus*: Database design (conceptual, logical, physical), security, transactions, markup languages, and NoSQL databases.\n\n**Knowledge Representation**: artificial intelligence techniques for representing knowledge in machines; logical frameworks, including propositional and first-order logic, description logics, and non-monotonic logics. Emphasis is placed on choosing the appropriate knowledge representation for different applications and understanding the complexity and decidability of these formalisms.\n\n* *Skills*: Evaluating knowledge representation techniques, formalizing problems, critical thinking on AI methods.\n* *Syllabus*: Propositional and first-order logics, decidable logic fragments, non-monotonic logics, reasoning complexity.\n\n**Distributed and Cloud Computing**: design and implementation of distributed systems, including cloud computing. Topics include distributed system architecture, inter-process communication, security, concurrency control, replication, and cloud-specific technologies like virtualization and elastic computing. Students will learn to design distributed architectures and deploy applications in cloud environments.\n\n* *Skills*: Distributed system design, cloud application deployment, security in distributed systems.\n* *Syllabus*: Distributed systems, inter-process communication, peer-to-peer systems, cloud computing, virtualization, replication.\n\n**Human Centric Computing**: the design of user-centered and multimodal interaction systems. It focuses on creating inclusive and effective user experiences across various platforms and technologies such as virtual and augmented reality. Students will learn usability engineering, cognitive modeling, interface prototyping, and experimental design for assessing user experience.\n\n* *Skills*: Multimodal interface design, usability evaluation, experimental design for user experience.\n* *Syllabus*: Usability guidelines, interaction design, accessibility, multimodal interfaces, UX in mixed reality.\n\n**Automated Reasoning**: AI techniques for reasoning over data and inferring new information, fundamental reasoning algorithms, satisfiability problems, and constraint satisfaction problems, with applications in domains such as planning and logistics. Students will also learn about probabilistic reasoning and the ethical implications of automated reasoning.\n\n* *Skills*: Implementing reasoning tools, evaluating reasoning methods, ethical considerations.\n* *Syllabus*: Automated reasoning, search algorithms, inference algorithms, constraint satisfaction, probabilistic reasoning, and argumentation theory.\n\nAm I right in leaning towards *Distributed and Cloud Computing* and *Databases and Modelling*?\n\nThanks a lot :)","preferred_answer":"What University is this at?\n\nThe Automated Reasoning course sounds intriguing.","full_conversation":[{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"1ewtvmh","kind":"post","text":"Help me choose elective NLP courses\n\nHi all! I'm starting my master's degree in NLP next month. Which of the following 5 courses do you think would be the most useful for a career in NLP right now? I need to choose 2.\n\n**Databases and Modelling**: exploration of database systems, focusing on both traditional relational databases and NoSQL technologies.\n\n* *Skills*: Relational database design, SQL proficiency, understanding database security, and NoSQL database awareness.\n* *Syllabus*: Database design (conceptual, logical, physical), security, transactions, markup languages, and NoSQL databases.\n\n**Knowledge Representation**: artificial intelligence techniques for representing knowledge in machines; logical frameworks, including propositional and first-order logic, description logics, and non-monotonic logics. Emphasis is placed on choosing the appropriate knowledge representation for different applications and understanding the complexity and decidability of these formalisms.\n\n* *Skills*: Evaluating knowledge representation techniques, formalizing problems, critical thinking on AI methods.\n* *Syllabus*: Propositional and first-order logics, decidable logic fragments, non-monotonic logics, reasoning complexity.\n\n**Distributed and Cloud Computing**: design and implementation of distributed systems, including cloud computing. Topics include distributed system architecture, inter-process communication, security, concurrency control, replication, and cloud-specific technologies like virtualization and elastic computing. Students will learn to design distributed architectures and deploy applications in cloud environments.\n\n* *Skills*: Distributed system design, cloud application deployment, security in distributed systems.\n* *Syllabus*: Distributed systems, inter-process communication, peer-to-peer systems, cloud computing, virtualization, replication.\n\n**Human Centric Computing**: the design of user-centered and multimodal interaction systems. It focuses on creating inclusive and effective user experiences across various platforms and technologies such as virtual and augmented reality. Students will learn usability engineering, cognitive modeling, interface prototyping, and experimental design for assessing user experience.\n\n* *Skills*: Multimodal interface design, usability evaluation, experimental design for user experience.\n* *Syllabus*: Usability guidelines, interaction design, accessibility, multimodal interfaces, UX in mixed reality.\n\n**Automated Reasoning**: AI techniques for reasoning over data and inferring new information, fundamental reasoning algorithms, satisfiability problems, and constraint satisfaction problems, with applications in domains such as planning and logistics. Students will also learn about probabilistic reasoning and the ethical implications of automated reasoning.\n\n* *Skills*: Implementing reasoning tools, evaluating reasoning methods, ethical considerations.\n* *Syllabus*: Automated reasoning, search algorithms, inference algorithms, constraint satisfaction, probabilistic reasoning, and argumentation theory.\n\nAm I right in leaning towards *Distributed and Cloud Computing* and *Databases and Modelling*?\n\nThanks a lot :)","timestamp":"2024-08-20T12:10:14+00:00","score":7},{"role":"answerer","user_id":"anon_c2073434c2a0924c","comment_id":"lj1n0lg","kind":"comment","text":"What University is this at?\n\nThe Automated Reasoning course sounds intriguing.","timestamp":"2024-08-20T14:22:15+00:00","score":2},{"role":"OP","user_id":"anon_693d9f36b549f23c","comment_id":"lj1ug4s","kind":"comment","text":"Cardiff University. Thanks a lot! I really appreciate your very helpful comment. In addition to the combinations that you suggested, I was also thinking of combining Databases and Modeling with Knowledge Representation, or Cloud Computing with Automated Reasoning, as a way of learning both “core” NLP/NLU topics + practical skills. Does that sound reasonable?","timestamp":"2024-08-20T15:01:57+00:00","score":1},{"role":"answerer","user_id":"anon_c2073434c2a0924c","comment_id":"lj1xpn1","kind":"comment","text":"It’s hard for someone to judge that balance without knowledge of the core curriculum for your Masters and your undergraduate work.\n\nIt all depends on what you want to be doing? If you want to do software development, then a solid grasp of databases and modeling are part of a fundamental foundation.\n\nIf you want to do AI development, it might be better to focus on the AI courses while you’re in the company of experts.","timestamp":"2024-08-20T15:19:02+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_693d9f36b549f23c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c2073434c2a0924c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lj1n0lg","thanks_reply_id":"lj1ug4s","post_score":7,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_13c645aaae283aed","answerer_user_id":"anon_66e7ee708f37eb01","subreddit":"LanguageTechnology","timestamp":"2024-09-02T13:38:04+00:00","post_id":"1f76y4i","question":"BERT for classifying unlabeled tweet dataset\n\nSo I'm working on a school assignment where I need to classify tweets from an unlabeled dataset into two labels using BERT. As BERT is used for supervised learning task I'd like to know how should I tackle this unsupervised learning task. Basically what I'm thinking of doing is using BERT to get the embeddings and passing the embeddings to a clustering algorithm to get 2 clusters. After this, I'm thinking of manually inspecting a random sample to assign labels to the two clusters. My dataset size is 60k tweets, so I don't think this approach is quite realistic. This is what I've found looking through online resources. I'm very new to BERT so I'm very confused. \n\nCould someone give me any ideas on how to approach this tasks and what should be the steps for classifying unlabeled tweets into two labels?","preferred_answer":"Then your original approach most likely won't work.\n\nJust create two labels: \"talks about diversity or inclusion\" and second label \"doesn't talk about diversity or inclusion\". Create embedding out of it and then classify your each tweet into one this bucket based on similarity search. You could FAISS for similarity search.","full_conversation":[{"role":"OP","user_id":"anon_13c645aaae283aed","comment_id":"1f76y4i","kind":"post","text":"BERT for classifying unlabeled tweet dataset\n\nSo I'm working on a school assignment where I need to classify tweets from an unlabeled dataset into two labels using BERT. As BERT is used for supervised learning task I'd like to know how should I tackle this unsupervised learning task. Basically what I'm thinking of doing is using BERT to get the embeddings and passing the embeddings to a clustering algorithm to get 2 clusters. After this, I'm thinking of manually inspecting a random sample to assign labels to the two clusters. My dataset size is 60k tweets, so I don't think this approach is quite realistic. This is what I've found looking through online resources. I'm very new to BERT so I'm very confused. \n\nCould someone give me any ideas on how to approach this tasks and what should be the steps for classifying unlabeled tweets into two labels?","timestamp":"2024-09-02T13:38:04+00:00","score":8},{"role":"answerer","user_id":"anon_66e7ee708f37eb01","comment_id":"ll6dgmp","kind":"comment","text":"Then your original approach most likely won't work.\n\nJust create two labels: \"talks about diversity or inclusion\" and second label \"doesn't talk about diversity or inclusion\". Create embedding out of it and then classify your each tweet into one this bucket based on similarity search. You could FAISS for similarity search.","timestamp":"2024-09-02T17:33:54+00:00","score":1},{"role":"OP","user_id":"anon_13c645aaae283aed","comment_id":"ll6ku0w","kind":"comment","text":"Hey, thanks a bunch for your suggestion. I was also looking into zero shot classification and thought even though it's not completely related to the task at hand, it might work based on the fact that I have unlabeled dataset. Could you tell me your opinion regarding the zero shot classification approach for my task?","timestamp":"2024-09-02T18:14:31+00:00","score":1},{"role":"answerer","user_id":"anon_66e7ee708f37eb01","comment_id":"ll6ogbb","kind":"comment","text":"What I described is zero shot classification. Converting labels infj Bert embeddings and classifying unlabeled data based on similarity. \n\nYou were on right path. One more google search and you would have reached to same conclusion. :)","timestamp":"2024-09-02T18:34:49+00:00","score":2},{"role":"OP","user_id":"anon_13c645aaae283aed","comment_id":"ll747dc","kind":"comment","text":"Thanks a lot!🫶","timestamp":"2024-09-02T20:03:57+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_13c645aaae283aed","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_66e7ee708f37eb01","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ll6dgmp","thanks_reply_id":"ll6ku0w","post_score":8,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_dfbf9afdb19e6f0b","answerer_user_id":"anon_c8ae6c46384c0a7b","subreddit":"LanguageTechnology","timestamp":"2024-09-15T19:33:34+00:00","post_id":"1fhl1kx","question":"A comprehensive list of job titles for US?\n\nHas anyone come across a comprehensive list of job titles for US or similarly sized country?\n\nI'm doing a project mapping different jobs onto the same set of job-related dimensions, but the lists I have found so far are not comprehensive (Data Engineer is not there, for example).\n\nThanks!","preferred_answer":"I did a project where I harvested all the job titles given by jeopardy contestants. I found a solid set of matches with onet but lots of others. You could look at some other jeopardy data sets to see if those could work.","full_conversation":[{"role":"OP","user_id":"anon_dfbf9afdb19e6f0b","comment_id":"1fhl1kx","kind":"post","text":"A comprehensive list of job titles for US?\n\nHas anyone come across a comprehensive list of job titles for US or similarly sized country?\n\nI'm doing a project mapping different jobs onto the same set of job-related dimensions, but the lists I have found so far are not comprehensive (Data Engineer is not there, for example).\n\nThanks!","timestamp":"2024-09-15T19:33:34+00:00","score":4},{"role":"answerer","user_id":"anon_c8ae6c46384c0a7b","comment_id":"lnham5o","kind":"comment","text":"I did a project where I harvested all the job titles given by jeopardy contestants. I found a solid set of matches with onet but lots of others. You could look at some other jeopardy data sets to see if those could work.","timestamp":"2024-09-16T22:15:30+00:00","score":1},{"role":"OP","user_id":"anon_dfbf9afdb19e6f0b","comment_id":"lniscjn","kind":"comment","text":"Thanks for the idea! Do you have a pointer to that one?\n\nIt still seems a bit random. I think that a LinkedIn dump would be a better proposition.","timestamp":"2024-09-17T03:58:47+00:00","score":1},{"role":"answerer","user_id":"anon_c8ae6c46384c0a7b","comment_id":"lnisnfr","kind":"comment","text":"I did the scrape myself of j archive. If you search around I know there are some newer ones people have published. Sorry don’t have one off hand.","timestamp":"2024-09-17T04:01:13+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_dfbf9afdb19e6f0b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c8ae6c46384c0a7b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lnham5o","thanks_reply_id":"lniscjn","post_score":4,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_05c0eb88d50fdfcd","answerer_user_id":"anon_a0939ef0c27be370","subreddit":"LanguageTechnology","timestamp":"2024-09-25T17:02:29+00:00","post_id":"1fp9j3i","question":"Have you used ChatGPT for NLP analysis? I'd like to interview you\n\nHey!\n\nIf you have some experience in testing ChatGPT for any types of NLP analysis I'd be really interested to interview you.\n\nI'm a BBA student and for my final thesis I chose to write about NLP use in customer feedback analysis. Turns out this topic is a bit out of my current skill range but I am still very eager to learn. The interview will take around 25-30 minutes, and as a thank-you, I’m offering a $10 Amazon or Starbucks gift card.\n\nIf you have experience in this area and would be open to chatting, please comment below or DM me. Your insights would be super valuable for my research.\n\nThanks.","preferred_answer":"I think you can read about what LLM can do for natural language processing/understanding in papers that study the use of LLM for this purpose. You find tons of papers about that in the main paper repository of the computational linguistics community: https://aclanthology.org/\n\nIf you don't want to read the papers, chat with them: https://chatpaper.com/","full_conversation":[{"role":"OP","user_id":"anon_05c0eb88d50fdfcd","comment_id":"1fp9j3i","kind":"post","text":"Have you used ChatGPT for NLP analysis? I'd like to interview you\n\nHey!\n\nIf you have some experience in testing ChatGPT for any types of NLP analysis I'd be really interested to interview you.\n\nI'm a BBA student and for my final thesis I chose to write about NLP use in customer feedback analysis. Turns out this topic is a bit out of my current skill range but I am still very eager to learn. The interview will take around 25-30 minutes, and as a thank-you, I’m offering a $10 Amazon or Starbucks gift card.\n\nIf you have experience in this area and would be open to chatting, please comment below or DM me. Your insights would be super valuable for my research.\n\nThanks.","timestamp":"2024-09-25T17:02:29+00:00","score":7},{"role":"answerer","user_id":"anon_a0939ef0c27be370","comment_id":"loxosv6","kind":"comment","text":"I think you can read about what LLM can do for natural language processing/understanding in papers that study the use of LLM for this purpose. You find tons of papers about that in the main paper repository of the computational linguistics community: https://aclanthology.org/\n\nIf you don't want to read the papers, chat with them: https://chatpaper.com/","timestamp":"2024-09-25T23:08:57+00:00","score":2},{"role":"OP","user_id":"anon_05c0eb88d50fdfcd","comment_id":"lozlncx","kind":"comment","text":"Ohh wow thanks! I already finished my literature review but maybe I can add something to it from these resources. Currently looking for interview participants since I’m conducting a qualitative study.","timestamp":"2024-09-26T08:03:22+00:00","score":1},{"role":"answerer","user_id":"anon_a0939ef0c27be370","comment_id":"lp21a5n","kind":"comment","text":"Which information do you hope to get from interviews which is not available in papers?","timestamp":"2024-09-26T17:59:25+00:00","score":1},{"role":"OP","user_id":"anon_05c0eb88d50fdfcd","comment_id":"lp5ehm1","kind":"comment","text":"It's a econ & management thesis but since I am interested in marketing data/analytics I wanted to talk to people who have tried using it practically and hopefully find the current strengths/weaknesses. \n\nThe original goal was to compare it quantitatively but I don't have the technical expertise for that :/ and it would have been a bit overkill for what I needed","timestamp":"2024-09-27T07:05:31+00:00","score":1},{"role":"answerer","user_id":"anon_a0939ef0c27be370","comment_id":"lp5syu8","kind":"comment","text":"I think that's what I try to say: people report on the weaknesses and strengths in these papers in the ACL Anthology. Just as an example: [https://aclanthology.org/2024.naacl-long.316/](https://aclanthology.org/2024.naacl-long.316/)\n\nI have no idea about marketing or management as a research field (I am an NLP person) – but if you want to get the information from experts, read what they wrote. The wish to talk to them sounds, to me, a bit like you would like somebody to destill the weaknesses/strengths for you.","timestamp":"2024-09-27T09:53:38+00:00","score":1},{"role":"OP","user_id":"anon_05c0eb88d50fdfcd","comment_id":"lp5tyey","kind":"comment","text":"Yeah I get what you mean. I wish I could do just that and be done with it but the interviews are a part of my research methodology we agreed on with my teacher. \n\nIt’s difficult to find people willing to talk to me. At one point i’ll just train a GPT on these papers and interview it so i can have at least some data lol","timestamp":"2024-09-27T10:04:08+00:00","score":1},{"role":"answerer","user_id":"anon_a0939ef0c27be370","comment_id":"lp5yfby","kind":"comment","text":"I understand. Good luck!","timestamp":"2024-09-27T10:49:06+00:00","score":1}],"n_turns":8,"n_turns_after_thanks":5,"op_metadata":{"user_id":"anon_05c0eb88d50fdfcd","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_a0939ef0c27be370","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"loxosv6","thanks_reply_id":"lozlncx","post_score":7,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_dbf2c1d09b6587b2","answerer_user_id":"anon_e77fb6a29ee9e9a4","subreddit":"LanguageTechnology","timestamp":"2024-09-27T02:45:21+00:00","post_id":"1fqdvam","question":"What should I learn next?\n\nFirst, let me thank the community for kindly providing your thoughts and suggestions.\n\nI am a first year phD student of a four year programme in translation studies. Previously, I have always been a practitioner of translation and interpreting, and I am quite ignorant of advanced math and programming. Now I want to direct more efforts to research the same subject, ideally, analyzing interpreting and translation discourses with various NLP tools and corpora, or even develop prototypytical tools for translation and interpreting practice.\n\nI have started to learn the basics of python so I can deploy the technical devices to expand my scholarly possibilities. People say if one wants to go deeper into the the fields of NLP and AI, linear algebra, calculus and probability theory are essential. But what if I only use the relevant packages for their application and research without knowing their rationale, do I still need to learn the tons of math? Or I should only focus on python.","preferred_answer":"Text retrieval techniques. Start with TF-IDF, Bag of Words, Topic Modelling (LDA, BERT, etc.), LMs in general (e.g., n-grams are very useful for tracking how the meaning of a word changed over time, try \"gay,\" for example), Word Embeddings, and Word2Vec. \n\nBefore that, ideally, learn how to do proper preprocessing on textual data. That's more than half of the work, but this should be easy to learn as most of the methods used in preprocessing here are based on linguistic algorithms.","full_conversation":[{"role":"OP","user_id":"anon_dbf2c1d09b6587b2","comment_id":"1fqdvam","kind":"post","text":"What should I learn next?\n\nFirst, let me thank the community for kindly providing your thoughts and suggestions.\n\nI am a first year phD student of a four year programme in translation studies. Previously, I have always been a practitioner of translation and interpreting, and I am quite ignorant of advanced math and programming. Now I want to direct more efforts to research the same subject, ideally, analyzing interpreting and translation discourses with various NLP tools and corpora, or even develop prototypytical tools for translation and interpreting practice.\n\nI have started to learn the basics of python so I can deploy the technical devices to expand my scholarly possibilities. People say if one wants to go deeper into the the fields of NLP and AI, linear algebra, calculus and probability theory are essential. But what if I only use the relevant packages for their application and research without knowing their rationale, do I still need to learn the tons of math? Or I should only focus on python.","timestamp":"2024-09-27T02:45:21+00:00","score":1},{"role":"answerer","user_id":"anon_e77fb6a29ee9e9a4","comment_id":"lp694se","kind":"comment","text":"Text retrieval techniques. Start with TF-IDF, Bag of Words, Topic Modelling (LDA, BERT, etc.), LMs in general (e.g., n-grams are very useful for tracking how the meaning of a word changed over time, try \"gay,\" for example), Word Embeddings, and Word2Vec. \n\nBefore that, ideally, learn how to do proper preprocessing on textual data. That's more than half of the work, but this should be easy to learn as most of the methods used in preprocessing here are based on linguistic algorithms.","timestamp":"2024-09-27T12:17:18+00:00","score":3},{"role":"OP","user_id":"anon_dbf2c1d09b6587b2","comment_id":"lp7bq8o","kind":"comment","text":"It seems math is inevitable for NLP tools. Thanks you!","timestamp":"2024-09-27T16:03:29+00:00","score":1},{"role":"answerer","user_id":"anon_e77fb6a29ee9e9a4","comment_id":"lp7e0w7","kind":"comment","text":"Some math is inevitable. But there is nothing wrong with starting off playful with the methods, models, and algorithms named above. Try them out, then try to figure them out on a mathematical level to gain a sophisticated understanding of how they work.\n\nComing back to my analogy above, this would be a chemistry student watching YouTube videos of chemistry experiments, which enables their interest to learn more. Nothing wrong with that.","timestamp":"2024-09-27T16:15:54+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_dbf2c1d09b6587b2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_e77fb6a29ee9e9a4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lp694se","thanks_reply_id":"lp7bq8o","post_score":1,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_43d0216796a09625","answerer_user_id":"anon_6dfa04649c4f6db1","subreddit":"LanguageTechnology","timestamp":"2024-09-28T08:03:19+00:00","post_id":"1fr9gxp","question":"Is a master's degree necessary to work in NLP / CL\n\nI have completed a bachelor's degree in Literature during which I have also acquired linguistics knowledge. I have realized (by reading academic articles about the subject) that I really like NLP and I'd like to pursue a career in this field. I'm also learning how to program and I find this enjoyable too so far.\nAt the moment I need to choose what to do with my studies. The options I can think about are either to get in a master's degree for computational linguistics or to complete a second bachelor in computer science (where I live uni is pretty cheap so I can afford this).\nMy worries are that the mater in computational linguistics has a program that is far too theoretical (I've done some research and almost all students that graduate from this master get into PhD programs) and therefore wouldn't give me any actual technical and practical skills that will be useful to find a job. That's why I'm considering to start a bachelor in computer science instead. But I fear that almost all jobs in NLP require a master and and having a bachelor in computer science won't give me job opportunities in this field.\nWhat's your experience/advice?","preferred_answer":"Are you asking if you should do a bachelor in CS or a master in NLP? To work in NLP, the latter is necessary. CS skills are very much necessary as well. I'm sorry to say that the era where {computational} linguistics knowledge mattered in NLP has passed with the advent of DL.","full_conversation":[{"role":"OP","user_id":"anon_43d0216796a09625","comment_id":"1fr9gxp","kind":"post","text":"Is a master's degree necessary to work in NLP / CL\n\nI have completed a bachelor's degree in Literature during which I have also acquired linguistics knowledge. I have realized (by reading academic articles about the subject) that I really like NLP and I'd like to pursue a career in this field. I'm also learning how to program and I find this enjoyable too so far.\nAt the moment I need to choose what to do with my studies. The options I can think about are either to get in a master's degree for computational linguistics or to complete a second bachelor in computer science (where I live uni is pretty cheap so I can afford this).\nMy worries are that the mater in computational linguistics has a program that is far too theoretical (I've done some research and almost all students that graduate from this master get into PhD programs) and therefore wouldn't give me any actual technical and practical skills that will be useful to find a job. That's why I'm considering to start a bachelor in computer science instead. But I fear that almost all jobs in NLP require a master and and having a bachelor in computer science won't give me job opportunities in this field.\nWhat's your experience/advice?","timestamp":"2024-09-28T08:03:19+00:00","score":5},{"role":"answerer","user_id":"anon_6dfa04649c4f6db1","comment_id":"lpbqxa0","kind":"comment","text":"Are you asking if you should do a bachelor in CS or a master in NLP? To work in NLP, the latter is necessary. CS skills are very much necessary as well. I'm sorry to say that the era where {computational} linguistics knowledge mattered in NLP has passed with the advent of DL.","timestamp":"2024-09-28T11:39:20+00:00","score":1},{"role":"OP","user_id":"anon_43d0216796a09625","comment_id":"lpbsd3b","kind":"comment","text":"Ok, thank you very much for this info. The master program that is accessible to me only has two small courses in ML for NLP (12  credit points in total) so I'm guessing that this wouldn't give me the necessary knowledge either. Would it be a better game plan to study computer science and then get a master later on?","timestamp":"2024-09-28T11:52:18+00:00","score":1},{"role":"answerer","user_id":"anon_6dfa04649c4f6db1","comment_id":"lpf4v9o","kind":"comment","text":"Two or three ML/NLP classes are enough. What matters is the Master's thesis or project you'd be working on for 2 years, that's where you develop expertise.","timestamp":"2024-09-29T00:18:09+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_43d0216796a09625","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_6dfa04649c4f6db1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lpbqxa0","thanks_reply_id":"lpbsd3b","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_9674c89f9796222f","answerer_user_id":"anon_c4381ca7b979cf99","subreddit":"LanguageTechnology","timestamp":"2024-09-29T09:01:07+00:00","post_id":"1fs06ry","question":"Is it “normal” not to know what interests you in the field ?\n\nI’m a student who has recently started a master’s degree in NLP. I come from a bachelor’s degree in languages and linguistics, and until a few months ago, I was undecided whether to continue with pure linguistics or dive into computational linguistics/NLP.\n\nI’ve learned a bit of Python, took a knowledge engineering course this summer, but I really know little about NLP. \nHowever, I am often asked, ‘What interests you about NLP?’ ‘What would you like to specialize in?’ \nMoreover, my current university is very research-oriented. I’ve seen their main research topics, and I’m interested in them, even though they may not cover areas like machine translation, which could interest me.\n\nThey have several research groups, from more technical ones focusing on integrating NLP and computer vision, to more theoretical ones studying the linguistic abilities of LLMs or whether neural networks can learn a certain linguistic task.\n\nAnd from the start, the emphasis is on ‘choosing what interests you,’ “ CHOOSE A RESEARCH TOPIC”, “ also choosing elective courses properly. \nBasically, I would like to work on the linguistic abilities of AI systems. I want to improve them and make them more human-like, which is why I thought of choosing a neurolinguistics course.\nBut at the same time, this sentence means everything and nothing… in general, if I am new to the field, how can I figure it out right away? \n\nMoreover, I don’t even know if I prefer research or the corporate world.\nI chose to specialize in NLP also to have more job opportunities, but the more I think about it, the more I believe I won’t enjoy working in tech companies, doing data analysis, technical NLP, etc., every day.”","preferred_answer":"Oh sure. I'm in the first year of my PhD and I've pretty much done the same. Followed a few of my interests and let that decide what I can do, what I need to learn in order to do what I can't yet, and find some publication grounds in the intermediate time along this learning and investigation curve. It's an iterative process where you slowly figure out an intersection of what keeps you working late hours trying to contribute to the field, and what you're good at.\n\nAnd since LLM tech is booming right now with most people not really having a strong feeling of why what works and why something doesn't (the bounds of the tech), I think it's a great time to contribute to the field, but also completely standard to be overwhelmed by it. Adressing explainability makes a lot of sense, but if you go for annotation studies, it'd be a pain in the arse. If you're going with LVMs without having too much background in this, expect to spend quite some time in learning how to integrate modalities, build graphs or representations, and figuring out reproducible usage of GPU clusters or something.\n\nOf course my supervisor would have me figure out and have a topic from day 1, but I'm glad she's patient and supportive. It's difficult if your interests sometimes go a bit further away from your supervisors expertise, but a good mentor always figures out collabs and joint supervisions.\n\nAs for staying in academia vs going to the industry, my take on it is that if you wanna streamline a process or work with lots and lots of use cases in a limited domain, go to industry. If you wanna explore more and find out what you're good at and have more time to understand what's happening, stay in academia. Of course, there are overlaps to both. Universities have partnerships with institutes and companies and do investigative projects for them, or do their own development. Industries also have research tracks where you're publishing quite a bit along with being an expert consultant for products. I'm probably trying to do this after finishing my PhD. \n\nOh and of course, you love money, go to the industry. An AGI would probably maximise some universal basic resources like money and Internet access, so trying to get a bunch of money to not worry about where you're gonna live in the next 30 years and not giving it all away in the form of rent is a totally legit thing.\n\nFeel free to ask if I missed something. Not to mention, if you're interested in any specific project and would like to collaborate, I'm happy to join if there's an overlap. Cheers!! :D","full_conversation":[{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"1fs06ry","kind":"post","text":"Is it “normal” not to know what interests you in the field ?\n\nI’m a student who has recently started a master’s degree in NLP. I come from a bachelor’s degree in languages and linguistics, and until a few months ago, I was undecided whether to continue with pure linguistics or dive into computational linguistics/NLP.\n\nI’ve learned a bit of Python, took a knowledge engineering course this summer, but I really know little about NLP. \nHowever, I am often asked, ‘What interests you about NLP?’ ‘What would you like to specialize in?’ \nMoreover, my current university is very research-oriented. I’ve seen their main research topics, and I’m interested in them, even though they may not cover areas like machine translation, which could interest me.\n\nThey have several research groups, from more technical ones focusing on integrating NLP and computer vision, to more theoretical ones studying the linguistic abilities of LLMs or whether neural networks can learn a certain linguistic task.\n\nAnd from the start, the emphasis is on ‘choosing what interests you,’ “ CHOOSE A RESEARCH TOPIC”, “ also choosing elective courses properly. \nBasically, I would like to work on the linguistic abilities of AI systems. I want to improve them and make them more human-like, which is why I thought of choosing a neurolinguistics course.\nBut at the same time, this sentence means everything and nothing… in general, if I am new to the field, how can I figure it out right away? \n\nMoreover, I don’t even know if I prefer research or the corporate world.\nI chose to specialize in NLP also to have more job opportunities, but the more I think about it, the more I believe I won’t enjoy working in tech companies, doing data analysis, technical NLP, etc., every day.”","timestamp":"2024-09-29T09:01:07+00:00","score":6},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"lph0vl6","kind":"comment","text":"Oh sure. I'm in the first year of my PhD and I've pretty much done the same. Followed a few of my interests and let that decide what I can do, what I need to learn in order to do what I can't yet, and find some publication grounds in the intermediate time along this learning and investigation curve. It's an iterative process where you slowly figure out an intersection of what keeps you working late hours trying to contribute to the field, and what you're good at.\n\nAnd since LLM tech is booming right now with most people not really having a strong feeling of why what works and why something doesn't (the bounds of the tech), I think it's a great time to contribute to the field, but also completely standard to be overwhelmed by it. Adressing explainability makes a lot of sense, but if you go for annotation studies, it'd be a pain in the arse. If you're going with LVMs without having too much background in this, expect to spend quite some time in learning how to integrate modalities, build graphs or representations, and figuring out reproducible usage of GPU clusters or something.\n\nOf course my supervisor would have me figure out and have a topic from day 1, but I'm glad she's patient and supportive. It's difficult if your interests sometimes go a bit further away from your supervisors expertise, but a good mentor always figures out collabs and joint supervisions.\n\nAs for staying in academia vs going to the industry, my take on it is that if you wanna streamline a process or work with lots and lots of use cases in a limited domain, go to industry. If you wanna explore more and find out what you're good at and have more time to understand what's happening, stay in academia. Of course, there are overlaps to both. Universities have partnerships with institutes and companies and do investigative projects for them, or do their own development. Industries also have research tracks where you're publishing quite a bit along with being an expert consultant for products. I'm probably trying to do this after finishing my PhD. \n\nOh and of course, you love money, go to the industry. An AGI would probably maximise some universal basic resources like money and Internet access, so trying to get a bunch of money to not worry about where you're gonna live in the next 30 years and not giving it all away in the form of rent is a totally legit thing.\n\nFeel free to ask if I missed something. Not to mention, if you're interested in any specific project and would like to collaborate, I'm happy to join if there's an overlap. Cheers!! :D","timestamp":"2024-09-29T10:29:17+00:00","score":8},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"lpi9p9c","kind":"comment","text":"Thanks ! My goal was to pursue a PhD and maybe decide later whether to stay in academia or not. However, I believe that a PhD is always highly regarded in this field; the only concern is if I were to focus on a topic that is too academic-linguistic and not useful for a career.\n\nSo, do you think it would be better for me to take the course on LLMs (a theoretical course where we read papers about their linguistic and cognitive abilities) or pursue neurolinguistics? Can neurolinguistics really help AI models ?","timestamp":"2024-09-29T15:56:44+00:00","score":1},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"lpibhn7","kind":"comment","text":"In my opinion, and that's very uninformed from certain aspects, so take it with a hefty pinch of salt, neurolinguistics probably sees more application in academia for the next 5 years. Whereas if you're learning on gaining theoretical knowledge on LLMs and of course with applying them to test what you hypothesise, then that has more chances of seeing something in the industry.\n\nBut again, take into account that moooost big industries care about the very well tested robust applications of methods and not the theoretical sandboxed sotas. The idea being that industries don't care about 5% increase of accuracy by pouring a million in updating their pipelines.\n\nI think you're approaching the problem a bit differently. Do you want to do a PhD because you want the title, or do you want to do it because you find something interesting and you want to push this field forward by trying to test what hasn't been tested?","timestamp":"2024-09-29T16:06:44+00:00","score":1},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"lpie2q1","kind":"comment","text":"Since I don’t know much about it, can I ask how neurolinguistics is used in this field for research?\n\nAnyways, no, I wouldn’t do it for the title. I’d do it mainly because, coming from a humanities background, I feel more comfortable with theoretical study and research. I think to work in the industry, it would’ve been better to study engineering or computer science. \nBut most of all, I really like the idea of doing research, not being a passive subject for a capitalist multinational, but someone doing scientific research for society.”","timestamp":"2024-09-29T16:20:28+00:00","score":1},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"lpih5tf","kind":"comment","text":"Right, so by what I see colleagues working on around me, I see them either working on language acquisition stuff and trying to connect that to neuroscience, or studying how working memory and forgetfulness works, or neurolinguistics in the context of people suffering from alzheimers or something. Again, not a comprehensive overview, but that's kinda the thing. And this can see applications in say some labs where you work with a hospital on collecting and analyzing some data and prototyping applications/devices/detection techniques, and in general help improve the understanding of the field, or you work on applying these concepts to LLMs and LVMs and checking what these models are doing kinda similar to humans, what works better in humans and maybe if we can replicate this somehow in these models.\n\nAgain, it's a crude take. \n\nAs for your motivations, they sound fair. I got into the field because of similar reasons, but you have to pick a thing and start I guess. There's always too many potential things to start doing and that's a problem of maximizing the ROI. Not really a \"best\" thing or path to choose. Maybe try choosing the one which will make you less miserable or something.\n\n \nI'd recommend diving into both topics superficially, reading some survey papers (or just hop on acl anthology or IEEE or something), analyse what you can do, what you need to learn, and how much time you'd need to do that, and then estimate which one sounds like a better plan. Both options are quite valid and you'd find some ways to continue your work in academia (of course by compromising and mixing topics and being a bit creative).\n\nCheers and good luck.","timestamp":"2024-09-29T16:36:59+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_9674c89f9796222f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c4381ca7b979cf99","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lph0vl6","thanks_reply_id":"lpi9p9c","post_score":6,"answer_score":8,"preferred_answer_is_top_level":true}} {"user_id":"anon_edecf902008da417","answerer_user_id":"anon_b8d4a79571befe1a","subreddit":"LanguageTechnology","timestamp":"2024-09-29T22:24:10+00:00","post_id":"1fsggsv","question":"topic modeling for entire conversation data\n\nHello colleagues \n\nI have a set of data from therapy sessions. they are labeled with the speaker. it's either the patient or the therapist.\n\nI'm interested in studying and modeling the topics in a way that takes into account the speakers and the structure of the conversation.\n\nDo you have any recommendations for possible ways forward?\n\nHave you done or do you know of anything similar?","preferred_answer":"I've seen a few articles along these lines, such as\n\n[https://arxiv.org/pdf/2204.10189](https://arxiv.org/pdf/2204.10189)\n\n[https://www.sciencedirect.com/science/article/pii/S2772503024000124#b2](https://www.sciencedirect.com/science/article/pii/S2772503024000124#b2)","full_conversation":[{"role":"OP","user_id":"anon_edecf902008da417","comment_id":"1fsggsv","kind":"post","text":"topic modeling for entire conversation data\n\nHello colleagues \n\nI have a set of data from therapy sessions. they are labeled with the speaker. it's either the patient or the therapist.\n\nI'm interested in studying and modeling the topics in a way that takes into account the speakers and the structure of the conversation.\n\nDo you have any recommendations for possible ways forward?\n\nHave you done or do you know of anything similar?","timestamp":"2024-09-29T22:24:10+00:00","score":6},{"role":"answerer","user_id":"anon_b8d4a79571befe1a","comment_id":"lpkb2od","kind":"comment","text":"I've seen a few articles along these lines, such as\n\n[https://arxiv.org/pdf/2204.10189](https://arxiv.org/pdf/2204.10189)\n\n[https://www.sciencedirect.com/science/article/pii/S2772503024000124#b2](https://www.sciencedirect.com/science/article/pii/S2772503024000124#b2)","timestamp":"2024-09-29T22:26:10+00:00","score":2},{"role":"OP","user_id":"anon_edecf902008da417","comment_id":"lpkbkzg","kind":"comment","text":"thank you very much! \n\ndo you happen to have any implementation and demonstration of these techniques? in any google colab, for example. \n\nthe data I want to model is relatively large... I have about half a million tokens for each “conversation”","timestamp":"2024-09-29T22:29:15+00:00","score":1},{"role":"answerer","user_id":"anon_b8d4a79571befe1a","comment_id":"lpkbs6i","kind":"comment","text":"unfortunately not... and I think these articles describe very specific methodologies, I don't think they're very easy to adapt.","timestamp":"2024-09-29T22:30:29+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_edecf902008da417","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_b8d4a79571befe1a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lpkb2od","thanks_reply_id":"lpkbkzg","post_score":6,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_9bc1ea89bb9fe4ab","answerer_user_id":"anon_ddbfb86cb80976dd","subreddit":"LanguageTechnology","timestamp":"2024-10-07T17:28:55+00:00","post_id":"1fydd0j","question":"Suggest a low-end hosting provider with GPU (to run this model)\n\nI want to do zero-shot text classification with this model [1]\nor with something similar (Size of the model: 711 MB \"model.safetensors\" file, 1.42 GB \"model.onnx\" file )\nIt works on my dev machine with 4GB GPU. Probably will work on 2GB GPU too.\n\nIs there some hosting provider for this?\n\nMy app is doing batch processing, so I will need access to this model few times per day.\nSomething like this:\n start processing\n do some text classification\n stop processing\nImagine I will do this procedure... 3 times per day. I don't need this model the rest of the time.\nProbably can start/stop some machine per API to save costs...\n\n\n[1] https://huggingface.co/MoritzLaurer/roberta-large-zeroshot-v2.0-c","preferred_answer":"[https://www.vultr.com/pricing/#cloud-gpu](https://www.vultr.com/pricing/#cloud-gpu)","full_conversation":[{"role":"OP","user_id":"anon_9bc1ea89bb9fe4ab","comment_id":"1fydd0j","kind":"post","text":"Suggest a low-end hosting provider with GPU (to run this model)\n\nI want to do zero-shot text classification with this model [1]\nor with something similar (Size of the model: 711 MB \"model.safetensors\" file, 1.42 GB \"model.onnx\" file )\nIt works on my dev machine with 4GB GPU. Probably will work on 2GB GPU too.\n\nIs there some hosting provider for this?\n\nMy app is doing batch processing, so I will need access to this model few times per day.\nSomething like this:\n start processing\n do some text classification\n stop processing\nImagine I will do this procedure... 3 times per day. I don't need this model the rest of the time.\nProbably can start/stop some machine per API to save costs...\n\n\n[1] https://huggingface.co/MoritzLaurer/roberta-large-zeroshot-v2.0-c","timestamp":"2024-10-07T17:28:55+00:00","score":1},{"role":"answerer","user_id":"anon_ddbfb86cb80976dd","comment_id":"lqxw9lu","kind":"comment","text":"[https://www.vultr.com/pricing/#cloud-gpu](https://www.vultr.com/pricing/#cloud-gpu)","timestamp":"2024-10-08T14:08:16+00:00","score":1},{"role":"OP","user_id":"anon_9bc1ea89bb9fe4ab","comment_id":"lqzyj6d","kind":"comment","text":"Thanks u/Minute_Following_963 !\n\nanything I have to know using their machines? Some tips/hints you can share?","timestamp":"2024-10-08T20:57:56+00:00","score":1},{"role":"answerer","user_id":"anon_ddbfb86cb80976dd","comment_id":"lr12r02","kind":"comment","text":"Its been a while since I used them, but their New Jersey location was the most reliable since that was their first data center. Check their promotions before joining: [https://www.vultr.com/coupons/](https://www.vultr.com/coupons/)","timestamp":"2024-10-09T01:32:19+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9bc1ea89bb9fe4ab","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ddbfb86cb80976dd","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lqxw9lu","thanks_reply_id":"lqzyj6d","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_009ab429d826a590","answerer_user_id":"anon_c2db370b116fa3de","subreddit":"LanguageTechnology","timestamp":"2024-10-10T23:17:40+00:00","post_id":"1g0w1fc","question":"Textbook recommendations for neural networks, modern machine learning, LLMs\n\nI'm a retired physicist working on machine parsing of ancient Greek as a hobby project. I've been using 20th century parsing techniques, and in fact I'm getting better results from those than from LLM-ish projects like Stanford's Stanza. As background on the \"classical\" approaches, I've skimmed [Jurafsky and Martin](https://web.stanford.edu/~jurafsky/slp3/ed3book_jan72023.pdf), Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition. That book does touch a little on neural networks, but it's a textbook for a broad survey course. I would like to round out my knowledge and understand more about the newer techniques. Can anyone recommend a textbook on neural networks as a general technology. I would like to understand the theory, not just play with recipes that access models that are used as black boxes. I don't care if it's about linguistics, it's fine if it uses image recognition or something as examples. Are there textbooks yet on LLMs, or would that still only be available in scientific papers?","preferred_answer":"You've already gotten a bunch of great recs. I just wanted to add that Stanza isn't very LLM-ish, it just has neural networks under the hood. The Ancient Greek coverage in Stanza is rather haphazard - as I understand it, there were a couple of treebanks available (i.e. parse trees of a bunch of sentences) and they threw them in as input without much input from experts.\n\nBut there are other projects that do get more attention from Ancient Greek specialists, so I would recommend (if you haven't already) taking a look at \\[CLTK\\](http://cltk.org/) (the Classical Language Toolkit) and other open source projects by individuals like \\[James Tauber\\](https://jktauber.com/projects/).","full_conversation":[{"role":"OP","user_id":"anon_009ab429d826a590","comment_id":"1g0w1fc","kind":"post","text":"Textbook recommendations for neural networks, modern machine learning, LLMs\n\nI'm a retired physicist working on machine parsing of ancient Greek as a hobby project. I've been using 20th century parsing techniques, and in fact I'm getting better results from those than from LLM-ish projects like Stanford's Stanza. As background on the \"classical\" approaches, I've skimmed [Jurafsky and Martin](https://web.stanford.edu/~jurafsky/slp3/ed3book_jan72023.pdf), Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition. That book does touch a little on neural networks, but it's a textbook for a broad survey course. I would like to round out my knowledge and understand more about the newer techniques. Can anyone recommend a textbook on neural networks as a general technology. I would like to understand the theory, not just play with recipes that access models that are used as black boxes. I don't care if it's about linguistics, it's fine if it uses image recognition or something as examples. Are there textbooks yet on LLMs, or would that still only be available in scientific papers?","timestamp":"2024-10-10T23:17:40+00:00","score":6},{"role":"answerer","user_id":"anon_c2db370b116fa3de","comment_id":"lrgf92r","kind":"comment","text":"You've already gotten a bunch of great recs. I just wanted to add that Stanza isn't very LLM-ish, it just has neural networks under the hood. The Ancient Greek coverage in Stanza is rather haphazard - as I understand it, there were a couple of treebanks available (i.e. parse trees of a bunch of sentences) and they threw them in as input without much input from experts.\n\nBut there are other projects that do get more attention from Ancient Greek specialists, so I would recommend (if you haven't already) taking a look at \\[CLTK\\](http://cltk.org/) (the Classical Language Toolkit) and other open source projects by individuals like \\[James Tauber\\](https://jktauber.com/projects/).","timestamp":"2024-10-11T19:04:47+00:00","score":5},{"role":"OP","user_id":"anon_009ab429d826a590","comment_id":"lrglt7l","kind":"comment","text":"Thanks for your post. I've actually spent quite a bit of time researching and testing the various parsers that are out there for ancient Greek. The results of my testing are here: https://bitbucket.org/ben-crowell/test_lemmatizers The current version of CLTK is based on odycy, which was one of the systems I tested. I have looked at Tauber's work fairly recently (no more than a few months ago), and I didn't see anything that would change my evaluation of the current landscape.","timestamp":"2024-10-11T19:41:48+00:00","score":2},{"role":"answerer","user_id":"anon_c2db370b116fa3de","comment_id":"lrh4uci","kind":"comment","text":"Sounds like you've got it covered 👍","timestamp":"2024-10-11T21:29:52+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_009ab429d826a590","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c2db370b116fa3de","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lrgf92r","thanks_reply_id":"lrglt7l","post_score":6,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_3f7e3b92eb223345","answerer_user_id":"anon_1579c3bab9f33bf4","subreddit":"LanguageTechnology","timestamp":"2024-10-16T16:23:12+00:00","post_id":"1g53exw","question":"Can i get into computational linguistics as a BA student in English Language and Literature?\n\nPretty much just the title. What steps would i need to take if i can? is there any sort of work experience opportunities i can pursuit to see if it is a good fit for me? Many thanks fellow redditors.","preferred_answer":"Besides Python, do this course to get a general understanding of linguistics:\nMiracles of Human Language: An Introduction to Linguistics\n\nNLP models seem to also learn in the same way: Early layers capture basic syntactic information, like breaking sentences down into smaller units for tasks such as part-of-speech tagging. As they move to deeper layers, the models learn more complex relationships between words and phrases, handling tasks like understanding semantics.\n\nAfter completing the linguistics course, you can take an introductory machine learning course. It’s important to understand fundamental concepts such as features (input variables), labels (target outputs), and how training and test sets are used to evaluate model performance.\n\nAdditionally, make sure you grasp how word embeddings work. These techniques have evolved from simpler approaches like one-hot encoding and bag-of-words to more advanced methods like Word2Vec, GloVe, and the contextual embeddings used in transformer-based models.\n\nAs for models, you’ll start by learning about basic algorithms like logistic regression, which is useful for simpler tasks. From there, you can progress to more advanced models such as support vector machines (SVMs). Finally, modern advancements in natural language processing use transformer models (like BERT and GPT).\n\nI should also note that NLP isn't just about machine learning. There’s also another side that involves extracting and analyzing data from sources like websites or social media platforms (e.g., modeling Twitter user behavior). This type of work often doesn't rely on machine learning but is done using programming languages like Java or Python to gather, process, and analyze text data.\n\nI think most of this can be found on youtube and coursera. If anything i said is vauge, let me know.","full_conversation":[{"role":"OP","user_id":"anon_3f7e3b92eb223345","comment_id":"1g53exw","kind":"post","text":"Can i get into computational linguistics as a BA student in English Language and Literature?\n\nPretty much just the title. What steps would i need to take if i can? is there any sort of work experience opportunities i can pursuit to see if it is a good fit for me? Many thanks fellow redditors.","timestamp":"2024-10-16T16:23:12+00:00","score":5},{"role":"answerer","user_id":"anon_1579c3bab9f33bf4","comment_id":"ls9j4ju","kind":"comment","text":"Besides Python, do this course to get a general understanding of linguistics:\nMiracles of Human Language: An Introduction to Linguistics\n\nNLP models seem to also learn in the same way: Early layers capture basic syntactic information, like breaking sentences down into smaller units for tasks such as part-of-speech tagging. As they move to deeper layers, the models learn more complex relationships between words and phrases, handling tasks like understanding semantics.\n\nAfter completing the linguistics course, you can take an introductory machine learning course. It’s important to understand fundamental concepts such as features (input variables), labels (target outputs), and how training and test sets are used to evaluate model performance.\n\nAdditionally, make sure you grasp how word embeddings work. These techniques have evolved from simpler approaches like one-hot encoding and bag-of-words to more advanced methods like Word2Vec, GloVe, and the contextual embeddings used in transformer-based models.\n\nAs for models, you’ll start by learning about basic algorithms like logistic regression, which is useful for simpler tasks. From there, you can progress to more advanced models such as support vector machines (SVMs). Finally, modern advancements in natural language processing use transformer models (like BERT and GPT).\n\nI should also note that NLP isn't just about machine learning. There’s also another side that involves extracting and analyzing data from sources like websites or social media platforms (e.g., modeling Twitter user behavior). This type of work often doesn't rely on machine learning but is done using programming languages like Java or Python to gather, process, and analyze text data.\n\nI think most of this can be found on youtube and coursera. If anything i said is vauge, let me know.","timestamp":"2024-10-16T21:11:47+00:00","score":7},{"role":"OP","user_id":"anon_3f7e3b92eb223345","comment_id":"lt947zm","kind":"comment","text":"Sorry for late reply but thank you so much this is very helpful. can i ask is coursera learning recognised by employers?","timestamp":"2024-10-22T23:02:23+00:00","score":1},{"role":"answerer","user_id":"anon_1579c3bab9f33bf4","comment_id":"ltb9g04","kind":"comment","text":"I'm in the process of finding job. Don't think anyone cares about the Coursera cert. But if you want to change major to NLP, the university might accept this as proof you have some understanding of linguistics. The real question to ask yourself is: by the time you're done learning all this, what jobs will be available? Check LinkedIn to see what companies around your location actually want. What are the opportunities for juniors? Probably not much.\n\nLook at current job postings to understand what skills you're missing and how linguistics actually fits into machine learning roles. Maybe there are related positions that mix NLP with other stuff you know.\n\nEveryone wants you to know SQL, Azure/AWS, have good grasp of statistics. They usully don't want your Jupyter notebooks - they want production-ready code (the whole pipeline) that can actually be deployed. \n\nTry to look ahead by scanning the market to see what tasks are in demands like (conversational AI, machine translation, or etc) and work twoards mastering those tasks.","timestamp":"2024-10-23T08:46:22+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3f7e3b92eb223345","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_1579c3bab9f33bf4","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ls9j4ju","thanks_reply_id":"lt947zm","post_score":5,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_66c54c3a6c6d9124","subreddit":"LanguageTechnology","timestamp":"2024-10-18T17:25:59+00:00","post_id":"1g6no78","question":"Question for those with a linguistic background in NLP\n\nI’m in the first year of an MSc in Computational Linguistics/NLP and I come from a BA in Languages and Linguistics.\n\nRight from the start, I’ve been struggling with the courses, even before studying actual NLP. At the moment, I’m mainly doing linear algebra and programming, and I feel so frustrated after every class.\n\nI see that many of my classmates are also having difficulties, but I feel especially stupid, particularly when it comes to programming. I missed half of the course (due to medical reasons), but I had already taken a course on Codecademy and thought it wouldn’t be that hard.\nIn reality, I’m not understanding anything about programming anymore, and we’re just doing beginner stuff, mainly working with regular expressions.\n\n\nIt feels so ridiculous to be struggling with programming at this level in a master’s program for ML and NLP, especially when there are so many other master’s students my age who are much better at it.\nAnd I wonder how I could ever work in this field with such a low level of programming (and computer science in general). I’ve never been a tech enthusiast, and honestly, I don’t know how to use computers as well as many others who are much more knowledgeable (I’m talking about basic things like RAM, processors, and how to tinker with them).\n\nI wonder how someone like me, who doesn’t even know how to use a computer well, can work with ML and NLP-related tasks.\n\nHas anyone had a similar experience, maybe someone who is now working or doing research in NLP after coming from a humanities-linguistics background? How did you find it, was it tough? Does it even make sense for a linguist to pursue this field of study?","preferred_answer":"Programming is a skill just like any other, and you get better with time. If you look back at the programs you were finding difficult and completed three months ago, you will laugh at how simple it was.\n\nDon't compare yourself to the computing geek who has been programming since they were 5. Of course they are going to be better at programming, and more knowledgeable about tech.\n\nYou want to be able to program so that you can understand what's going on in the courses. But in terms of writing code, everyone is switching to LLMs to do most of the grunt work. As long as you can read code, as long as you can make sense of the flow (develop, build, test, debug, debug some more, develop some more, release) you'll be fine in the end -- it's just practice.\n\nAlso, some people learn to program in different ways: \n- It's an intellectual challenge (most common) \n- It's a new language I want to speak (second most common) \n- It's a collection of memorizable puzzle pieces that I'm putting together (rare, but a thing)\n\nGiven your background, you're probably in the \"it's a new language\" group, who learn differently and find different things hard and easy. You might find Perl or Ada (both of which aren't popular any more, unfortunately) more to your taste.\n\nBy the time you finish your masters, prompt engineering will be starting to dominate industries, and you'll be super-well positioned to take advantage of it.","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1g6no78","kind":"post","text":"Question for those with a linguistic background in NLP\n\nI’m in the first year of an MSc in Computational Linguistics/NLP and I come from a BA in Languages and Linguistics.\n\nRight from the start, I’ve been struggling with the courses, even before studying actual NLP. At the moment, I’m mainly doing linear algebra and programming, and I feel so frustrated after every class.\n\nI see that many of my classmates are also having difficulties, but I feel especially stupid, particularly when it comes to programming. I missed half of the course (due to medical reasons), but I had already taken a course on Codecademy and thought it wouldn’t be that hard.\nIn reality, I’m not understanding anything about programming anymore, and we’re just doing beginner stuff, mainly working with regular expressions.\n\n\nIt feels so ridiculous to be struggling with programming at this level in a master’s program for ML and NLP, especially when there are so many other master’s students my age who are much better at it.\nAnd I wonder how I could ever work in this field with such a low level of programming (and computer science in general). I’ve never been a tech enthusiast, and honestly, I don’t know how to use computers as well as many others who are much more knowledgeable (I’m talking about basic things like RAM, processors, and how to tinker with them).\n\nI wonder how someone like me, who doesn’t even know how to use a computer well, can work with ML and NLP-related tasks.\n\nHas anyone had a similar experience, maybe someone who is now working or doing research in NLP after coming from a humanities-linguistics background? How did you find it, was it tough? Does it even make sense for a linguist to pursue this field of study?","timestamp":"2024-10-18T17:25:59+00:00","score":10},{"role":"answerer","user_id":"anon_66c54c3a6c6d9124","comment_id":"lsn09se","kind":"comment","text":"Programming is a skill just like any other, and you get better with time. If you look back at the programs you were finding difficult and completed three months ago, you will laugh at how simple it was.\n\nDon't compare yourself to the computing geek who has been programming since they were 5. Of course they are going to be better at programming, and more knowledgeable about tech.\n\nYou want to be able to program so that you can understand what's going on in the courses. But in terms of writing code, everyone is switching to LLMs to do most of the grunt work. As long as you can read code, as long as you can make sense of the flow (develop, build, test, debug, debug some more, develop some more, release) you'll be fine in the end -- it's just practice.\n\nAlso, some people learn to program in different ways: \n- It's an intellectual challenge (most common) \n- It's a new language I want to speak (second most common) \n- It's a collection of memorizable puzzle pieces that I'm putting together (rare, but a thing)\n\nGiven your background, you're probably in the \"it's a new language\" group, who learn differently and find different things hard and easy. You might find Perl or Ada (both of which aren't popular any more, unfortunately) more to your taste.\n\nBy the time you finish your masters, prompt engineering will be starting to dominate industries, and you'll be super-well positioned to take advantage of it.","timestamp":"2024-10-19T04:16:07+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"lsnr5x1","kind":"comment","text":"Thank you ! Did you also have a similar path ? And why you think I will be super well positioned for prompt engineering? \n\nThe more I go on and the more ppl tell me that this field is dominated ( and will always be more dominated ) by computer scientists and not linguists","timestamp":"2024-10-19T09:02:48+00:00","score":0},{"role":"answerer","user_id":"anon_66c54c3a6c6d9124","comment_id":"lsskel6","kind":"comment","text":"I had a long career in industry (in computing) before I did my masters. I was a bit of a polyglot / linguiphile before that.\n\n> The more I go on and the more ppl tell me that this field is dominated ( and will always be more dominated ) by computer scientists and not linguists\n\nIt was much more balanced in the past --- back when we thought the path to AI would require semantic grounding. Right now is dominated by computer scientists and everyone is trying to build LLMs.\n\nHowever, the writing is on the wall for training new models (it's a niche thing, that can only be done at tera-scale or exa-scale). In the last 12 months it has become increasingly obvious that prompting and natural language gets us much further than model training.\n\nThat's going to be a story of \"let's come up with a hundred variations on this prompt and see which one performs the best\". There's a bit of programming there -- to run the hundred variations, but it's mostly a linguistics thing. So the pendulum will swing back to the linguists.","timestamp":"2024-10-20T03:59:03+00:00","score":2},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"lst76fe","kind":"comment","text":"Thanks. I also forgot to say that my university focuses a lot on the cognitive science part, it combines NLP with neuroscience and vision, so maybe that’s going to be a hot topic in the future","timestamp":"2024-10-20T07:36:10+00:00","score":0}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_66c54c3a6c6d9124","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lsn09se","thanks_reply_id":"lsnr5x1","post_score":10,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_bc72d409a0c8ecfa","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2024-10-18T17:43:59+00:00","post_id":"1g6o3jb","question":"Working in the NLP industry with a PhD that focuses on the linguistics side of NLP ?\n\nIs it possible to find a job in the NLP industry with a PhD that focuses more on the linguistic side of NLP?\n\nI’m still an MSc student in NLP, coming from a BA in Linguistics, and at the moment, I’m studying more STEM-related subjects like linear algebra, machine learning, etc. However, my university focuses both on very applied, engineering-oriented research (such as NLP and computer vision, and I have several courses in this area) as well as more linguistically oriented research, like “how LLMs can learn word formation” or “how parsing is easier in left-branching languages, so English should ideally be written in reverse,” etc.\n\nWhen I enrolled, I chose all the more technical courses with a strong ML foundation, but I’m starting to think that, as a linguist, I actually enjoy the more linguistic side of things. I was wondering, though, how useful such research could be, whether it only serves an academic purpose or if it can also have value outside of academia.\n\nI’m unsure if I want to stay in academia or not, so I’d like to pursue a specialization that could keep both doors open for me.","preferred_answer":"Oh and \"how LLMs can learn word formation” and \"he performance of transformer models on functional words\" are not linguistics questions because they have nothing to do with how natural languages work, but rather how LLMs/transformer models deal with a certain type of data, which just happens to be natural language.","full_conversation":[{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"1g6o3jb","kind":"post","text":"Working in the NLP industry with a PhD that focuses on the linguistics side of NLP ?\n\nIs it possible to find a job in the NLP industry with a PhD that focuses more on the linguistic side of NLP?\n\nI’m still an MSc student in NLP, coming from a BA in Linguistics, and at the moment, I’m studying more STEM-related subjects like linear algebra, machine learning, etc. However, my university focuses both on very applied, engineering-oriented research (such as NLP and computer vision, and I have several courses in this area) as well as more linguistically oriented research, like “how LLMs can learn word formation” or “how parsing is easier in left-branching languages, so English should ideally be written in reverse,” etc.\n\nWhen I enrolled, I chose all the more technical courses with a strong ML foundation, but I’m starting to think that, as a linguist, I actually enjoy the more linguistic side of things. I was wondering, though, how useful such research could be, whether it only serves an academic purpose or if it can also have value outside of academia.\n\nI’m unsure if I want to stay in academia or not, so I’d like to pursue a specialization that could keep both doors open for me.","timestamp":"2024-10-18T17:43:59+00:00","score":6},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"lwaj2wk","kind":"comment","text":"Oh and \"how LLMs can learn word formation” and \"he performance of transformer models on functional words\" are not linguistics questions because they have nothing to do with how natural languages work, but rather how LLMs/transformer models deal with a certain type of data, which just happens to be natural language.","timestamp":"2024-11-09T19:11:47+00:00","score":1},{"role":"OP","user_id":"anon_bc72d409a0c8ecfa","comment_id":"lwajv88","kind":"comment","text":"Thank, well obviously there are not pure linguistics I know, but my Professor of linguistics ( theoretical linguistics) does this kind of things, while for example the professor of NLP does different and more technical research. \nAnyways, if I will do those kind of research- specialization, or also specialization that evaluates ANN with neurolinguistics representation in the brain, do I have a possible working future only in academia ?","timestamp":"2024-11-09T19:15:55+00:00","score":0},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"lwakoe8","kind":"comment","text":"\"Theoretical linguistics\" ugh, I'm so sorry.\n\nNo one knows what the field/job market will look like, but understanding LLMs/NNs/transformers and how they represent/deal with language is a very hot topic both in and outside academia. My guess is that it will remain so for a while, so you should be good.","timestamp":"2024-11-09T19:20:18+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bc72d409a0c8ecfa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lwaj2wk","thanks_reply_id":"lwajv88","post_score":6,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_dfb2e0f00294dc56","answerer_user_id":"anon_dfbf9afdb19e6f0b","subreddit":"LanguageTechnology","timestamp":"2024-10-28T16:12:50+00:00","post_id":"1ge601p","question":"Looking for Open-Source Multilingual TTS Training Data (French, Spanish, Arabic)\n\nHi everyone,\n\nI'm working on building a multilingual TTS system and am looking for high-quality open-source data in **French**, **Spanish**, and **Arabic** (in that order of priority). Ideally, I'd like datasets that include both text and corresponding audio, but if the audio quality is decent, I can work with audio-only data too.\n\nHere are the specifics of what I'm looking for:\n- **Audio Quality**: Clean recordings with minimal background noise or artifacts.\n- **Sampling Rate**: At least 22 kHz.\n- **Speakers**: Ideally, multiple speakers are represented to improve robustness in the TTS model.\n\nIf anyone knows of any sources or projects that offer such data, I’d be extremely grateful for the pointers. Thanks in advance for any recommendations!","preferred_answer":"Look on Kaggle","full_conversation":[{"role":"OP","user_id":"anon_dfb2e0f00294dc56","comment_id":"1ge601p","kind":"post","text":"Looking for Open-Source Multilingual TTS Training Data (French, Spanish, Arabic)\n\nHi everyone,\n\nI'm working on building a multilingual TTS system and am looking for high-quality open-source data in **French**, **Spanish**, and **Arabic** (in that order of priority). Ideally, I'd like datasets that include both text and corresponding audio, but if the audio quality is decent, I can work with audio-only data too.\n\nHere are the specifics of what I'm looking for:\n- **Audio Quality**: Clean recordings with minimal background noise or artifacts.\n- **Sampling Rate**: At least 22 kHz.\n- **Speakers**: Ideally, multiple speakers are represented to improve robustness in the TTS model.\n\nIf anyone knows of any sources or projects that offer such data, I’d be extremely grateful for the pointers. Thanks in advance for any recommendations!","timestamp":"2024-10-28T16:12:50+00:00","score":1},{"role":"answerer","user_id":"anon_dfbf9afdb19e6f0b","comment_id":"lub2ago","kind":"comment","text":"Look on Kaggle","timestamp":"2024-10-29T05:43:08+00:00","score":1},{"role":"OP","user_id":"anon_dfb2e0f00294dc56","comment_id":"lucfu76","kind":"comment","text":"Thx!","timestamp":"2024-10-29T13:25:57+00:00","score":1},{"role":"answerer","user_id":"anon_dfbf9afdb19e6f0b","comment_id":"ludt85s","kind":"comment","text":"Hey, I just realized that the set that I had in mind had different English accents, not different languages.\n\nI'd say that using existing artificial TTS's plus maybe some added noise would work best.","timestamp":"2024-10-29T17:44:26+00:00","score":1},{"role":"OP","user_id":"anon_dfb2e0f00294dc56","comment_id":"lued6mv","kind":"comment","text":"Thanks for the tip! And yeah, bootstrapping with synthesized data is definitely on the table, but I'd rather keep it as a plan-B. I'll comb through Kaggle first and use what I can find there. If the output at inference is sub-par, I'll look into synthetic stuff.","timestamp":"2024-10-29T19:23:47+00:00","score":2},{"role":"answerer","user_id":"anon_dfbf9afdb19e6f0b","comment_id":"lueomur","kind":"comment","text":"Another option is to download audio from newscasts on YouTube and use their transcripts or go through OpenAI's whisper. That would be better than synthetic but then you'd have to figure out how to determine noise levels etc. These days, people use YouTube data for video and TTS training. Good luck with your project!","timestamp":"2024-10-29T20:20:36+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_dfb2e0f00294dc56","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dfbf9afdb19e6f0b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lub2ago","thanks_reply_id":"lucfu76","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_d096b93e157b6477","answerer_user_id":"anon_c339c41ab0c9986d","subreddit":"LanguageTechnology","timestamp":"2024-10-29T20:27:20+00:00","post_id":"1gf4l0h","question":"Why not fine-tune first for BERTopic\n\nhttps://github.com/MaartenGr/BERTopic\n\nBERTopic seems to be a popular method to interpret contextual embeddings. Here's a list of steps from their website on how it operates:\n\n\"You can swap out any of these models or even remove them entirely. The following steps are completely modular:\n\n1. Embedding documents\n2. Reducing dimensionality of embeddings\n3. Clustering reduced embeddings into topics\n4. Tokenization of topics\n5. Weight tokens\n6. Represent topics with one or multiple representations\"\n\nMy question is why not fine-tune your documents first and get optimized embeddings as opposed to just directly using a pre-trained model to get embedding representations and then proceeding with other steps ?\n\nAm I missing out on something?\n\n\nThanks","preferred_answer":"You can, but you need labeled data (e.g., contrastive pairs) to finetune the embedding model. Most of the time we don’t have such labels.","full_conversation":[{"role":"OP","user_id":"anon_d096b93e157b6477","comment_id":"1gf4l0h","kind":"post","text":"Why not fine-tune first for BERTopic\n\nhttps://github.com/MaartenGr/BERTopic\n\nBERTopic seems to be a popular method to interpret contextual embeddings. Here's a list of steps from their website on how it operates:\n\n\"You can swap out any of these models or even remove them entirely. The following steps are completely modular:\n\n1. Embedding documents\n2. Reducing dimensionality of embeddings\n3. Clustering reduced embeddings into topics\n4. Tokenization of topics\n5. Weight tokens\n6. Represent topics with one or multiple representations\"\n\nMy question is why not fine-tune your documents first and get optimized embeddings as opposed to just directly using a pre-trained model to get embedding representations and then proceeding with other steps ?\n\nAm I missing out on something?\n\n\nThanks","timestamp":"2024-10-29T20:27:20+00:00","score":5},{"role":"answerer","user_id":"anon_c339c41ab0c9986d","comment_id":"lul2k7o","kind":"comment","text":"You can, but you need labeled data (e.g., contrastive pairs) to finetune the embedding model. Most of the time we don’t have such labels.","timestamp":"2024-10-30T20:40:10+00:00","score":1},{"role":"OP","user_id":"anon_d096b93e157b6477","comment_id":"luqsjvs","kind":"comment","text":"Thanks \n\nJust to be clear, by labels you mean the ground truth for a task right? For example, a positive or negative sentiment for tweets, fraud vs non-fraud for some text etc.\n\nConceptually this entire BERTopic flow seems like a way to do a \"global\" interpretation of contextual embeddings.","timestamp":"2024-10-31T19:20:21+00:00","score":1},{"role":"answerer","user_id":"anon_c339c41ab0c9986d","comment_id":"lutdp6j","kind":"comment","text":"The labels are not necessarily ground truth, but a way to update tendency of models to align certain texts.\n\nFor instance, in a contrastive pair, the data is usually consist of\n\n>(, , <0 or 1>)\n\nIf text A and text B are similar, we label it with 1. If text A and text B are not similar, we label it with 0.\n\nMost modern embedding models have been finetuned on such \"similarity\" trainings, instead of doing only next-token-prediction pretraining like most other LLMs do. \n\nFurther readings: \n\\* [https://huggingface.co/blog/how-to-train-sentence-transformers](https://huggingface.co/blog/how-to-train-sentence-transformers) \n\\* [https://sbert.net/docs/sentence\\_transformer/training\\_overview.html](https://sbert.net/docs/sentence_transformer/training_overview.html)","timestamp":"2024-11-01T05:27:41+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_d096b93e157b6477","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c339c41ab0c9986d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lul2k7o","thanks_reply_id":"luqsjvs","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_b7c62a457dc8134c","answerer_user_id":"anon_c4381ca7b979cf99","subreddit":"LanguageTechnology","timestamp":"2024-11-05T23:56:50+00:00","post_id":"1gkl762","question":"What should I major in to pursue a career in language technology?\n\nHello, I am a high schooler who wants to go into computational linguistics in the future. Is it better to pursue an undergraduate degree in linguistics + computer science or linguistics + data science? And if the school I end up going to offers an undergraduate degree in computational linguistics, should I take it or go more broad?\n\nThanks in advance!","preferred_answer":"Hey, glad to hear you're planning to come on board. To answer your question, it depends a lot on what you want to do and where your interests and skills lie.\n\nMy trajectory was something like this:\nI was more interested in physics and maths when i was a kid, but I did terribly in physics in terms of grades. My mathematics background was decent and I was in the top of my class, however, I didn't have the grind for pure maths as I was lazy. And computer science sorta came naturally to me. So I went ahead and did a bachelors in computer science which kinda got me more into automating things and eventually trying to model some parts of how we think. The lab and the school I studied in didn't have access to great neuro stuff, so I dived headfirst into modelling natural language and computer vision data. Did some projects, reached out to some profs after graduation to figure out if my ideas were grounded in reality. They seemed to agree and I went ahead and did a masters in Computational Linguistics since it was the best midpoint of my interests. Now I find myself applying more of these LLMs with training and fine-tuning on different domains with the main problems being multilinguality, multimodaliy, and transfer learning for political science stuff.\n\nI have peers who came from more Linguistics backgrounds and are more interested in morphology and parsing and stuff which translates well to topics like second language acquisition or training LLMs for low resourced languages.\n\nSimilarly, I have peers who went into bio-informatics, i.e. combining medical stuff with LLMs or machine learning. Then there are some other peers who are into simply deploying and serving LLMs, or even community outreach with Huggingface or something.\n\nSo what I'm trying to say is that there's a lot of branching out. I'd say understanding the core components of computer science helps me work or understand some new package I want to use faster. However, there are people in our team who focus more on methods and the why's more, as in what do the LLM arena benchmarks mean in terms real intelligence and how humans do things. So again, no clear answer.\n\nIf you asked me if I would recommend the path I took, for sure. I'm constantly trying to improve my CS skills, so I guess I somehow acquired the other stuff along the way. \n\nMaybe start with CS if you're into that and can become good at it. If not, focus a lot on Linguistics and/or psycholinguistics and/or neuroscience since there's a bunch of overlap. Mathematics, at least the basics of calculus are kind of a must if you want to contribute towards developing new methods in LLMs or any similar variants. There's also a new field called AI safety/alignment which is heavily theoretical. For anything related to robotics and Human Computer Interaction, you might need a bit more of electronics and being able to code more than just python, so again CS might help.\n\nHope that helps somehow.","full_conversation":[{"role":"OP","user_id":"anon_b7c62a457dc8134c","comment_id":"1gkl762","kind":"post","text":"What should I major in to pursue a career in language technology?\n\nHello, I am a high schooler who wants to go into computational linguistics in the future. Is it better to pursue an undergraduate degree in linguistics + computer science or linguistics + data science? And if the school I end up going to offers an undergraduate degree in computational linguistics, should I take it or go more broad?\n\nThanks in advance!","timestamp":"2024-11-05T23:56:50+00:00","score":10},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"lvmrihb","kind":"comment","text":"Hey, glad to hear you're planning to come on board. To answer your question, it depends a lot on what you want to do and where your interests and skills lie.\n\nMy trajectory was something like this:\nI was more interested in physics and maths when i was a kid, but I did terribly in physics in terms of grades. My mathematics background was decent and I was in the top of my class, however, I didn't have the grind for pure maths as I was lazy. And computer science sorta came naturally to me. So I went ahead and did a bachelors in computer science which kinda got me more into automating things and eventually trying to model some parts of how we think. The lab and the school I studied in didn't have access to great neuro stuff, so I dived headfirst into modelling natural language and computer vision data. Did some projects, reached out to some profs after graduation to figure out if my ideas were grounded in reality. They seemed to agree and I went ahead and did a masters in Computational Linguistics since it was the best midpoint of my interests. Now I find myself applying more of these LLMs with training and fine-tuning on different domains with the main problems being multilinguality, multimodaliy, and transfer learning for political science stuff.\n\nI have peers who came from more Linguistics backgrounds and are more interested in morphology and parsing and stuff which translates well to topics like second language acquisition or training LLMs for low resourced languages.\n\nSimilarly, I have peers who went into bio-informatics, i.e. combining medical stuff with LLMs or machine learning. Then there are some other peers who are into simply deploying and serving LLMs, or even community outreach with Huggingface or something.\n\nSo what I'm trying to say is that there's a lot of branching out. I'd say understanding the core components of computer science helps me work or understand some new package I want to use faster. However, there are people in our team who focus more on methods and the why's more, as in what do the LLM arena benchmarks mean in terms real intelligence and how humans do things. So again, no clear answer.\n\nIf you asked me if I would recommend the path I took, for sure. I'm constantly trying to improve my CS skills, so I guess I somehow acquired the other stuff along the way. \n\nMaybe start with CS if you're into that and can become good at it. If not, focus a lot on Linguistics and/or psycholinguistics and/or neuroscience since there's a bunch of overlap. Mathematics, at least the basics of calculus are kind of a must if you want to contribute towards developing new methods in LLMs or any similar variants. There's also a new field called AI safety/alignment which is heavily theoretical. For anything related to robotics and Human Computer Interaction, you might need a bit more of electronics and being able to code more than just python, so again CS might help.\n\nHope that helps somehow.","timestamp":"2024-11-06T02:15:07+00:00","score":3},{"role":"OP","user_id":"anon_b7c62a457dc8134c","comment_id":"lvmukwb","kind":"comment","text":"thanks!!","timestamp":"2024-11-06T02:33:41+00:00","score":2},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"lvmxldz","kind":"comment","text":"No worries","timestamp":"2024-11-06T02:51:39+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b7c62a457dc8134c","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c4381ca7b979cf99","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lvmrihb","thanks_reply_id":"lvmukwb","post_score":10,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_18ae2d7db136cf30","answerer_user_id":"anon_8a37dea3c60e116f","subreddit":"LanguageTechnology","timestamp":"2024-11-07T18:19:23+00:00","post_id":"1glx5hv","question":"Can I Transition from Linguistics to Tech?\n\nI am looking for some realistic opinions on whether it’s feasible for me to pursue a career in NLP. Here’s a bit of background about myself:\n\nFor my Bachelor's, I studied Translation and Interpretation. Although I later felt it might not have been the best fit, I completed the program. Afterward, I decided to shift paths and am now pursuing a Master’s degree in Linguistics/Literature. When choosing this degree, I believed that linguistics or literature were my only options given my undergraduate background.\n\nHowever, since beginning my Master's, I’ve developed a strong interest in Natural Language Processing, and I genuinely want to build a career in this field. The challenge is that, because of my background and current coursework, I have no formal experience in computer science or programming.\n\nSo, is it unrealistic to aim for a career in NLP without a formal education in this field, or is it possible to self-study and acquire the skills I need? If so, how should I start, and what steps can I take to improve my skills?","preferred_answer":"I'm involved in organization and teaching in a Master's program in NLP which also accepts (strong) candidates with a linguistics background. \n\nIt can be done, but it is hard -- people here take a year, full-time, and with support/advice, to get to a level where they can carry out methodologically sound NLP studies. And that means research-level work, without scaling up to industry-level expectations of efficiency and software engineering standards. So it is a major task -- you are trying to break into a completely new field, in terms of methods, after all.\n\nIf you want to go down that path, I suggest you look at the latest version of Jurafsky and Martin's 'Introduction to Speech and Language Processing' book and work your way through it. Supplement it by some more in-depth literature on current neural network models, and translate your theoretical knowledge into as many concrete projects as possible, using for example shared task data (which exist for everything under the sun these days). This will keep you occupied for a while.\n\nA completely different question how you will convince people of your skills if you do it all yourself. A well structured and comprehensive public repository is probably a major asset in that regard. Good luck!","full_conversation":[{"role":"OP","user_id":"anon_18ae2d7db136cf30","comment_id":"1glx5hv","kind":"post","text":"Can I Transition from Linguistics to Tech?\n\nI am looking for some realistic opinions on whether it’s feasible for me to pursue a career in NLP. Here’s a bit of background about myself:\n\nFor my Bachelor's, I studied Translation and Interpretation. Although I later felt it might not have been the best fit, I completed the program. Afterward, I decided to shift paths and am now pursuing a Master’s degree in Linguistics/Literature. When choosing this degree, I believed that linguistics or literature were my only options given my undergraduate background.\n\nHowever, since beginning my Master's, I’ve developed a strong interest in Natural Language Processing, and I genuinely want to build a career in this field. The challenge is that, because of my background and current coursework, I have no formal experience in computer science or programming.\n\nSo, is it unrealistic to aim for a career in NLP without a formal education in this field, or is it possible to self-study and acquire the skills I need? If so, how should I start, and what steps can I take to improve my skills?","timestamp":"2024-11-07T18:19:23+00:00","score":13},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"lvxu6fa","kind":"comment","text":"I'm involved in organization and teaching in a Master's program in NLP which also accepts (strong) candidates with a linguistics background. \n\nIt can be done, but it is hard -- people here take a year, full-time, and with support/advice, to get to a level where they can carry out methodologically sound NLP studies. And that means research-level work, without scaling up to industry-level expectations of efficiency and software engineering standards. So it is a major task -- you are trying to break into a completely new field, in terms of methods, after all.\n\nIf you want to go down that path, I suggest you look at the latest version of Jurafsky and Martin's 'Introduction to Speech and Language Processing' book and work your way through it. Supplement it by some more in-depth literature on current neural network models, and translate your theoretical knowledge into as many concrete projects as possible, using for example shared task data (which exist for everything under the sun these days). This will keep you occupied for a while.\n\nA completely different question how you will convince people of your skills if you do it all yourself. A well structured and comprehensive public repository is probably a major asset in that regard. Good luck!","timestamp":"2024-11-07T18:31:49+00:00","score":27},{"role":"OP","user_id":"anon_18ae2d7db136cf30","comment_id":"lvy2n8p","kind":"comment","text":"Thank you very much for your advices. It really means a lot. Convincing people of my skills is also another thing I am concerned. But I think we will just see :) I have one more question though. While searching for it, I found a book by Jacob Eisenstein named Introduction to Natural Language Processing. Do you think it can also be useful?","timestamp":"2024-11-07T19:10:59+00:00","score":1},{"role":"answerer","user_id":"anon_8a37dea3c60e116f","comment_id":"lvyc1bd","kind":"comment","text":"I haven't read it, so I'm basing this on the summary and metadata on Amazon. The contents and the approach look very good, so you're not doing anything wrong by reading it. However, the developments in NLP in the last couple of years have been immense. The Eisenstein book was published in 2019 so it was probably written in 16/17, that's a long time ago by NLP standards. \n\nThe Jurafsky/Martin book hasn't even been printed yet, it's still a draft (which you can read for free here: https://web.stanford.edu/~jurafsky/slp3/ ), so it's \nmuch more up to date.","timestamp":"2024-11-07T19:55:02+00:00","score":4},{"role":"OP","user_id":"anon_18ae2d7db136cf30","comment_id":"lvywdoz","kind":"comment","text":"Thank you so much!","timestamp":"2024-11-07T21:31:23+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_18ae2d7db136cf30","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a37dea3c60e116f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lvxu6fa","thanks_reply_id":"lvy2n8p","post_score":13,"answer_score":27,"preferred_answer_is_top_level":true}} {"user_id":"anon_9674c89f9796222f","answerer_user_id":"anon_4ed7a5cc556dab37","subreddit":"LanguageTechnology","timestamp":"2024-11-16T09:46:23+00:00","post_id":"1gsk0bt","question":"Recommend me some beginner-friendly but interesting papers in NLP\n\nI’ve never formally studied NLP, but I’m familiar with concepts like sentiment analysis, POS tagging, and distributional semantics at a concept level. \nI’d like to read some NLP papers, some research. to get more into this world and also to figure out whether I truly like it or not.","preferred_answer":"You can start with TF-IDF, unless you already know what it is.\n\nThen go to word vectors, LSTM, transformer architecture and sentence embeddings, LLMs","full_conversation":[{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"1gsk0bt","kind":"post","text":"Recommend me some beginner-friendly but interesting papers in NLP\n\nI’ve never formally studied NLP, but I’m familiar with concepts like sentiment analysis, POS tagging, and distributional semantics at a concept level. \nI’d like to read some NLP papers, some research. to get more into this world and also to figure out whether I truly like it or not.","timestamp":"2024-11-16T09:46:23+00:00","score":8},{"role":"answerer","user_id":"anon_4ed7a5cc556dab37","comment_id":"lxg1r0q","kind":"comment","text":"You can start with TF-IDF, unless you already know what it is.\n\nThen go to word vectors, LSTM, transformer architecture and sentence embeddings, LLMs","timestamp":"2024-11-16T15:43:07+00:00","score":1},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"lxg1wcr","kind":"comment","text":"Thanks, no i don’t what what IDF is. But I was looking for specific papers maybe","timestamp":"2024-11-16T15:43:58+00:00","score":-1},{"role":"answerer","user_id":"anon_4ed7a5cc556dab37","comment_id":"lxg300q","kind":"comment","text":"\"An Improved Text Sentiment Classification Model Using \rTF-IDF and Next Word Negation\"","timestamp":"2024-11-16T15:50:05+00:00","score":1},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"lxg3kxk","kind":"comment","text":"Thanks. I saw TF-IDF is more information retrieval tho, why should I start from this ?","timestamp":"2024-11-16T15:53:15+00:00","score":1},{"role":"answerer","user_id":"anon_4ed7a5cc556dab37","comment_id":"lxg52c4","kind":"comment","text":"TF-IDF can be used in information retrieval or text classification. Which are the basic problems of NLP.\n\nWhat are you interested in?","timestamp":"2024-11-16T16:01:26+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_9674c89f9796222f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_4ed7a5cc556dab37","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lxg1r0q","thanks_reply_id":"lxg1wcr","post_score":8,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_6335f0513121b716","answerer_user_id":"anon_9e2646fd4a20811b","subreddit":"LanguageTechnology","timestamp":"2024-11-18T23:38:34+00:00","post_id":"1guj4z5","question":"What do you think about Automatic transcription ?\n\nI’ve been working on a project designed to make audio transcription, translation, and content summarization (like interviews, cases, meetings, etc.) faster and more efficient.\n\nDo you think something like this would be useful in your work or daily tasks? If so, what features or capabilities would you find most helpful?”\n\nLet me know your thoughts 💭 💭\n\nPd: DM if you want to try it out","preferred_answer":"You should add speaker-diarization to make it somewhat valuable.","full_conversation":[{"role":"OP","user_id":"anon_6335f0513121b716","comment_id":"1guj4z5","kind":"post","text":"What do you think about Automatic transcription ?\n\nI’ve been working on a project designed to make audio transcription, translation, and content summarization (like interviews, cases, meetings, etc.) faster and more efficient.\n\nDo you think something like this would be useful in your work or daily tasks? If so, what features or capabilities would you find most helpful?”\n\nLet me know your thoughts 💭 💭\n\nPd: DM if you want to try it out","timestamp":"2024-11-18T23:38:34+00:00","score":2},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"ly2h80b","kind":"comment","text":"You should add speaker-diarization to make it somewhat valuable.","timestamp":"2024-11-20T07:57:14+00:00","score":1},{"role":"OP","user_id":"anon_6335f0513121b716","comment_id":"ly2q5wo","kind":"comment","text":"Good . ¡Thank you! The tool is Scribba [Scribba](https://scribba.online) if you want to try it out","timestamp":"2024-11-20T09:37:28+00:00","score":1},{"role":"answerer","user_id":"anon_9e2646fd4a20811b","comment_id":"ly3e3v3","kind":"comment","text":"If I can't try it out without signing in, I'm not interested.","timestamp":"2024-11-20T13:14:41+00:00","score":1},{"role":"OP","user_id":"anon_6335f0513121b716","comment_id":"ly3h6qb","kind":"comment","text":"you can do it via google Sign in one step. We do it to avoid spam and bots.","timestamp":"2024-11-20T13:35:05+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_6335f0513121b716","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9e2646fd4a20811b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ly2h80b","thanks_reply_id":"ly2q5wo","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_1d4a711bfe380600","answerer_user_id":"anon_52963c3d48586b89","subreddit":"LanguageTechnology","timestamp":"2024-11-19T04:48:39+00:00","post_id":"1gupc02","question":"Post Grad Planning\n\nSo, I am currently about to graduate in about a month with a bachelors in Linguistics (with a 4.0 if that matters?) and I am trying to makes se of what to do after. I really would love to work in NLP, but unfortunately I didn’t have the time to complete more than a single python text processing class before my time has ended. (Though I’ve done other things on my own like cs50 and really loved it and picked up the content fast, so me not liking cs is not a concern) I’d really love to pursue a master’s degree in comp ling like through uni of washington, but i don’t have $50k ready to go for that, nor do i have the math basics to be admitted. \n\nSo, my thought is that I’ll do something like getting a job that will take any degree, then use that to pay for a second bachelors in comp sci through something affordable for me like wgu and use both degrees together to to get me into a position i’d really love, which i could then decide to pursue a masters once i’m more stable.\n\nDoes this sound ridiculous? Essentially what I’m asking before I actually try to go through with it is, would getting a second bachelors in comp sci after my first in linguistics be enough to break into nlp?","preferred_answer":"I think you have the right attitude, which is to avoid entering the study of computational linguistics as a \"false beginner.\" Don't just be the guy who knows how to crank up a package.\n\nHowever given the quality of online tools, courses, and books available these days I would suggest taking aim at the undergrad curricula of computer science and statistics on your own for a year or two.\n\nAnd at the risk of getting stoned by the mob, I might also suggest spending a bit of time seeing if gpt4o or its successor might be helpful as a study buddy. I have found that it can be extremely useful in helping me understand, say, the difference between the statistical approaches that alternative python or R packages might take. \n\nYes it is important to ask questions that are likely to have been asked and answered in its training data, and to check the answers it provides.","full_conversation":[{"role":"OP","user_id":"anon_1d4a711bfe380600","comment_id":"1gupc02","kind":"post","text":"Post Grad Planning\n\nSo, I am currently about to graduate in about a month with a bachelors in Linguistics (with a 4.0 if that matters?) and I am trying to makes se of what to do after. I really would love to work in NLP, but unfortunately I didn’t have the time to complete more than a single python text processing class before my time has ended. (Though I’ve done other things on my own like cs50 and really loved it and picked up the content fast, so me not liking cs is not a concern) I’d really love to pursue a master’s degree in comp ling like through uni of washington, but i don’t have $50k ready to go for that, nor do i have the math basics to be admitted. \n\nSo, my thought is that I’ll do something like getting a job that will take any degree, then use that to pay for a second bachelors in comp sci through something affordable for me like wgu and use both degrees together to to get me into a position i’d really love, which i could then decide to pursue a masters once i’m more stable.\n\nDoes this sound ridiculous? Essentially what I’m asking before I actually try to go through with it is, would getting a second bachelors in comp sci after my first in linguistics be enough to break into nlp?","timestamp":"2024-11-19T04:48:39+00:00","score":3},{"role":"answerer","user_id":"anon_52963c3d48586b89","comment_id":"lxvrmmo","kind":"comment","text":"I think you have the right attitude, which is to avoid entering the study of computational linguistics as a \"false beginner.\" Don't just be the guy who knows how to crank up a package.\n\nHowever given the quality of online tools, courses, and books available these days I would suggest taking aim at the undergrad curricula of computer science and statistics on your own for a year or two.\n\nAnd at the risk of getting stoned by the mob, I might also suggest spending a bit of time seeing if gpt4o or its successor might be helpful as a study buddy. I have found that it can be extremely useful in helping me understand, say, the difference between the statistical approaches that alternative python or R packages might take. \n\nYes it is important to ask questions that are likely to have been asked and answered in its training data, and to check the answers it provides.","timestamp":"2024-11-19T05:08:42+00:00","score":7},{"role":"OP","user_id":"anon_1d4a711bfe380600","comment_id":"lxvwwao","kind":"comment","text":"thanks so much for the insight!! i forgot to mention, the intention is actually that i’ll be self studying for a while working another job, until i feel confident that i can 1) pay for the schooling through wgu and 2) get through the classes very quickly as a result of the self study so i will only have to pay for about two semesters, and move into the field within a year. i mainly just want to get the second degree so i’ll fill in any crucial gaps and can demonstrate my competency & set myself up for grad school should i decide to go.","timestamp":"2024-11-19T05:52:00+00:00","score":3},{"role":"answerer","user_id":"anon_52963c3d48586b89","comment_id":"lxxyysk","kind":"comment","text":"Find a problem or two that require actual linguistics knowledge, do some work on them, then write a couple of conference papers.","timestamp":"2024-11-19T15:56:08+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1d4a711bfe380600","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_52963c3d48586b89","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"lxvrmmo","thanks_reply_id":"lxvwwao","post_score":3,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_38acc517ba6ddac7","answerer_user_id":"anon_8ddc3a2672aff1e7","subreddit":"LanguageTechnology","timestamp":"2024-12-26T20:07:56+00:00","post_id":"1hmwr74","question":"Help regarding an MS Thesis in NLP.\n\nHello everyone. I am a student in my final semester of an MS in Computer Science and have been pursuing an MS Thesis in NLP since the last semester. My area of focus, in this thesis, has been human behavioral analysis using Natural Language Processing with a focus on the study of behavioral patterns of criminals, especially serial killers.\n\nNow, the problem is I AM STUCK. I don't know how to proceed and if this will even pan out into something good. I have been studying and trying to find data but have only stumbled upon video interviews and some transcripts. My advisor says that it is okay to work with less data as the duration of the thesis is only 1 year and spending too much time collecting or creating data is not good. I'm fine working with only 15 or 20 video interviews and about 10 transcripts. The bigger problem is WHAT AM I SUPPOSED TO DO WITH THIS? Like I am unable to visualize what the end goal would look like.\n\nAny advice on what can be done and any resources that might help me get a direction are highly appreciated.","preferred_answer":"The third one looks most promising to my eyes. You could reate corpora for eah side of the data extract features (POS, semantic representations, relaive frequencies of type/token use, lemmas, and more sophisticated options) and then compare and contrast to see if there are differences. You could also consider prosody, phonetics etc. but be aware of the significant risk that you end up measuring other institutional biases. For example, if you discover that speech patterns commonly associated with Boston are prevalant in your criminal corpus does that mean Bostonians are more likely to be criminals? Or that Boston's PD is more \"enthusiatic\" when it comes to locking people up? Or that Or that your transcripts happen to come from a penitentiary in the NE of the US?\n\nIf these features are connected to racial/religious/gender attributes, you want to be really careful about how you interpret them","full_conversation":[{"role":"OP","user_id":"anon_38acc517ba6ddac7","comment_id":"1hmwr74","kind":"post","text":"Help regarding an MS Thesis in NLP.\n\nHello everyone. I am a student in my final semester of an MS in Computer Science and have been pursuing an MS Thesis in NLP since the last semester. My area of focus, in this thesis, has been human behavioral analysis using Natural Language Processing with a focus on the study of behavioral patterns of criminals, especially serial killers.\n\nNow, the problem is I AM STUCK. I don't know how to proceed and if this will even pan out into something good. I have been studying and trying to find data but have only stumbled upon video interviews and some transcripts. My advisor says that it is okay to work with less data as the duration of the thesis is only 1 year and spending too much time collecting or creating data is not good. I'm fine working with only 15 or 20 video interviews and about 10 transcripts. The bigger problem is WHAT AM I SUPPOSED TO DO WITH THIS? Like I am unable to visualize what the end goal would look like.\n\nAny advice on what can be done and any resources that might help me get a direction are highly appreciated.","timestamp":"2024-12-26T20:07:56+00:00","score":2},{"role":"answerer","user_id":"anon_8ddc3a2672aff1e7","comment_id":"m4huw28","kind":"comment","text":"The third one looks most promising to my eyes. You could reate corpora for eah side of the data extract features (POS, semantic representations, relaive frequencies of type/token use, lemmas, and more sophisticated options) and then compare and contrast to see if there are differences. You could also consider prosody, phonetics etc. but be aware of the significant risk that you end up measuring other institutional biases. For example, if you discover that speech patterns commonly associated with Boston are prevalant in your criminal corpus does that mean Bostonians are more likely to be criminals? Or that Boston's PD is more \"enthusiatic\" when it comes to locking people up? Or that Or that your transcripts happen to come from a penitentiary in the NE of the US?\n\nIf these features are connected to racial/religious/gender attributes, you want to be really careful about how you interpret them","timestamp":"2024-12-30T08:29:11+00:00","score":0},{"role":"OP","user_id":"anon_38acc517ba6ddac7","comment_id":"m4nxzwi","kind":"comment","text":"Hey. Thanks for the suggestion.\n\nI am trying to go along the lines of finding patterns like the usage of specific words and semantics of particular phrases and then compare these with similar attributes from regular interviews. However, I am unable to get a picture of what could be some outcomes of the research. I'd like to know your thoughts on my current chain of thoughts. Is it cool if I dm you about this?","timestamp":"2024-12-31T08:22:31+00:00","score":1},{"role":"answerer","user_id":"anon_8ddc3a2672aff1e7","comment_id":"m4ze7me","kind":"comment","text":"I'd rather have the conversation here, if only to benefit other people who might read this in the future.","timestamp":"2025-01-02T08:50:03+00:00","score":1},{"role":"OP","user_id":"anon_38acc517ba6ddac7","comment_id":"m53hu9p","kind":"comment","text":"Fair enough. I'm trying to use LIWC to perform word-level text analysis and then compare the results between criminal and non-criminal interviews. This answers the question \"Are there any differences between words used by criminals and words used by non-criminals in a conversation?\" Like are there some words that criminals tend to use way more than non-criminals? \nThis stems from the research question of conducting \"A comparison between the speech patterns of criminals and non-criminals.\". Do you think this is as straightforward as it looks or are there some caveats that I have to consider while performing this analysis?","timestamp":"2025-01-02T23:58:45+00:00","score":1},{"role":"answerer","user_id":"anon_8ddc3a2672aff1e7","comment_id":"m5o5pcn","kind":"comment","text":"Well, I think there's a couple of things to consider here. Firstly, does just counting words allow you to get the level of insight you want? For one, you want to make sure the variation you spot isn't just subject to chance. You could use something like this? [https://ucrel.lancs.ac.uk/llwizard.html](https://ucrel.lancs.ac.uk/llwizard.html)\n\nIn addition, you could investigate whether criminals and non-criminals talk about the same things in different ways. I'm not familiar with LIWC, but you could use an AMR parser to see if the same semantic graphs occur, but constructed from different surface words? (effectively, checking for paraphrase or semantic variation)\n\nYou could also consider sentence level analysis, if you were to use something like Universal Sentence Encoder you could embed sentences and perform analysis on them?","timestamp":"2025-01-06T08:50:16+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_38acc517ba6ddac7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8ddc3a2672aff1e7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"m4huw28","thanks_reply_id":"m4nxzwi","post_score":2,"answer_score":0,"preferred_answer_is_top_level":false}} {"user_id":"anon_9674c89f9796222f","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2025-01-19T08:17:17+00:00","post_id":"1i4tv8g","question":"Which of these skills is more important and requested\n\nI am currently pursuing an MSc in Computational Linguistics with standard courses like ML, NLP, linear algebra, etc.\nHowever, after reading several job postings in AI and NLP, I noticed that many required skills are not covered in my program, such as data engineering, algorithms, and more. Therefore, I wanted to complement my studies by taking some online courses, like those on Udemy, during my university studies.\n\nSince I come from a bachelor’s degree in linguistics, I need to catch up on many of these topics, including:\n•\tCalculus (I have studied statistics and linear algebra, but I know nothing about calculus).\n\n•\tData engineering (especially SQL and MongoDB, which I’ve noticed are highly demanded).\n\n•\tAlgorithms and data structures (I know Python, but I have no knowledge of classic algorithms, such as merge sort etc..)\n\n•\tSoftware engineering (software design, APIs, etc.).\n\n•\tFormal semantics (it’s a course I could take at university, but I think it’s kinda irrelevant nowadays).\n\nObviously, since I can’t do all of them, which of these courses/skills is the most important and in demand, especially in job interviews?Additionally, since my MSc is very theoretical and research-oriented, the ML and NLP courses have little technical content (there’s a lot of reading and writing papers, etc.). So I was thinking of improving the practical side by taking some hands-on courses on Udemy to learn and practice tools like NLTK, PyTorch, etc.","preferred_answer":"It is always a good idea to improve one’s practical skills. I would suggest to take Udemy courses on Python, Data science and SQL. PyTorch is a good thing to know, but not on its own, so I would advise a course on Machine Learning with Python. One important skill to have is familiarity with Unix, system admin stuff, basics of bash scripting, that sort of thing. XML, XPath and XQuery is also important.","full_conversation":[{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"1i4tv8g","kind":"post","text":"Which of these skills is more important and requested\n\nI am currently pursuing an MSc in Computational Linguistics with standard courses like ML, NLP, linear algebra, etc.\nHowever, after reading several job postings in AI and NLP, I noticed that many required skills are not covered in my program, such as data engineering, algorithms, and more. Therefore, I wanted to complement my studies by taking some online courses, like those on Udemy, during my university studies.\n\nSince I come from a bachelor’s degree in linguistics, I need to catch up on many of these topics, including:\n•\tCalculus (I have studied statistics and linear algebra, but I know nothing about calculus).\n\n•\tData engineering (especially SQL and MongoDB, which I’ve noticed are highly demanded).\n\n•\tAlgorithms and data structures (I know Python, but I have no knowledge of classic algorithms, such as merge sort etc..)\n\n•\tSoftware engineering (software design, APIs, etc.).\n\n•\tFormal semantics (it’s a course I could take at university, but I think it’s kinda irrelevant nowadays).\n\nObviously, since I can’t do all of them, which of these courses/skills is the most important and in demand, especially in job interviews?Additionally, since my MSc is very theoretical and research-oriented, the ML and NLP courses have little technical content (there’s a lot of reading and writing papers, etc.). So I was thinking of improving the practical side by taking some hands-on courses on Udemy to learn and practice tools like NLTK, PyTorch, etc.","timestamp":"2025-01-19T08:17:17+00:00","score":9},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"m7znfin","kind":"comment","text":"It is always a good idea to improve one’s practical skills. I would suggest to take Udemy courses on Python, Data science and SQL. PyTorch is a good thing to know, but not on its own, so I would advise a course on Machine Learning with Python. One important skill to have is familiarity with Unix, system admin stuff, basics of bash scripting, that sort of thing. XML, XPath and XQuery is also important.","timestamp":"2025-01-19T15:07:46+00:00","score":4},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"m7zskqr","kind":"comment","text":"thank you, that’s what I was thinking to do a course on Udemy for NLP with python and other libraries. \nSo algorithms and software engineering is not that important?","timestamp":"2025-01-19T15:34:01+00:00","score":1},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"m7zvueq","kind":"comment","text":"Algorithms are important, I had a whole class on them in my PhD. But honestly, in real life, you will be working with libraries that implement them, so it’s more about general knowledge of what to use when and what the upside/downside is. As for software engineering, that is a complex issue and depends on what you actually will do. I have found that these are things you learn on the fly working on actual projects. In my corporate jobs, those things were already set up by people who develop frameworks and APIs, so it’s all about you being able to pick it up as you go. In my experience, the rule is “jack of all trades, master of none, is always better than master of one”.","timestamp":"2025-01-19T15:50:05+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9674c89f9796222f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"m7znfin","thanks_reply_id":"m7zskqr","post_score":9,"answer_score":4,"preferred_answer_is_top_level":true}} {"user_id":"anon_6e26e1e21524e2ca","answerer_user_id":"anon_c4381ca7b979cf99","subreddit":"LanguageTechnology","timestamp":"2025-01-22T11:05:29+00:00","post_id":"1i78p34","question":"Is there some list of the totality of ALL LLMs created so far?\n\nZephyr, hermes, normal llama, qwen, mistral etc..\n\nIs there like a list showing them ALL, and perhaps even with a use of each, date of creation and link to it?\n\nEven just a list of names can be good.","preferred_answer":"Just go to huggingface.co/models and select Text Generation under the Natural Language Processing section. Gives you like 171, 928 open-sourced models. You could take this list, or even the whole list and their description metadata and filter/cluster them however you want. Company wise, or whatever. Not sure about all closed source models but your best bet probably would be in lmarena.ai under the leaderboard tab.","full_conversation":[{"role":"OP","user_id":"anon_6e26e1e21524e2ca","comment_id":"1i78p34","kind":"post","text":"Is there some list of the totality of ALL LLMs created so far?\n\nZephyr, hermes, normal llama, qwen, mistral etc..\n\nIs there like a list showing them ALL, and perhaps even with a use of each, date of creation and link to it?\n\nEven just a list of names can be good.","timestamp":"2025-01-22T11:05:29+00:00","score":0},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"m8ji7kb","kind":"comment","text":"Just go to huggingface.co/models and select Text Generation under the Natural Language Processing section. Gives you like 171, 928 open-sourced models. You could take this list, or even the whole list and their description metadata and filter/cluster them however you want. Company wise, or whatever. Not sure about all closed source models but your best bet probably would be in lmarena.ai under the leaderboard tab.","timestamp":"2025-01-22T14:37:06+00:00","score":7},{"role":"OP","user_id":"anon_6e26e1e21524e2ca","comment_id":"m8pg5cp","kind":"comment","text":"Thank you! 171,928 is a but too much to filter though :'(","timestamp":"2025-01-23T11:21:34+00:00","score":1},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"m8pr6c4","kind":"comment","text":"Can you tell me a bit more about your use case? I mean, what exactly are you trying to do? Maybe I can help constrain your search.","timestamp":"2025-01-23T12:48:57+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_6e26e1e21524e2ca","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c4381ca7b979cf99","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"m8ji7kb","thanks_reply_id":"m8pg5cp","post_score":0,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_b264b49c514e49fa","answerer_user_id":"anon_93801ddf99768743","subreddit":"LanguageTechnology","timestamp":"2025-01-27T17:29:07+00:00","post_id":"1ibeomc","question":"Should I switch to SDE or find NLP-related RA in the UK if I still want to go for a phd several years later?\n\nHi everyone, I’m an international student who recently graduated from the University of Edinburgh with a Master’s degree (Merit) in a field related to NLP and Machine Learning. My undergraduate background is in linguistics. After graduation, I noticed that finding a MLE role in the UK often requires a PhD. However, after discussing with my supervisor, she suggested that I consider applying for a RA position first, as the PhD application process is highly competitive.\n\nI’m unsure about the best path forward and would appreciate some advice. Should I focus on finding an NLP-related RA position in the UK and then apply for a PhD? Or would it make more sense to first transition into a SDE role, gain industry experience, and later pivot to MLE before applying for a PhD based on my work experience? Alternatively, should I reconsider pursuing a PhD altogether?\n\nFeel free to ask me for more information if it's needed for suggestions! Also appreciate if there is any lab or uni recommendations for RA/Phd.","preferred_answer":"I would reconsider why you want to get a PhD. If the reason is to get an MLE job after I think that's the wrong reason. Only do a PhD if you want to pursue research after (academy or industry). For an MLE job I believe industry experience will be more valued than a PhD.","full_conversation":[{"role":"OP","user_id":"anon_b264b49c514e49fa","comment_id":"1ibeomc","kind":"post","text":"Should I switch to SDE or find NLP-related RA in the UK if I still want to go for a phd several years later?\n\nHi everyone, I’m an international student who recently graduated from the University of Edinburgh with a Master’s degree (Merit) in a field related to NLP and Machine Learning. My undergraduate background is in linguistics. After graduation, I noticed that finding a MLE role in the UK often requires a PhD. However, after discussing with my supervisor, she suggested that I consider applying for a RA position first, as the PhD application process is highly competitive.\n\nI’m unsure about the best path forward and would appreciate some advice. Should I focus on finding an NLP-related RA position in the UK and then apply for a PhD? Or would it make more sense to first transition into a SDE role, gain industry experience, and later pivot to MLE before applying for a PhD based on my work experience? Alternatively, should I reconsider pursuing a PhD altogether?\n\nFeel free to ask me for more information if it's needed for suggestions! Also appreciate if there is any lab or uni recommendations for RA/Phd.","timestamp":"2025-01-27T17:29:07+00:00","score":1},{"role":"answerer","user_id":"anon_93801ddf99768743","comment_id":"m9lnxfg","kind":"comment","text":"I would reconsider why you want to get a PhD. If the reason is to get an MLE job after I think that's the wrong reason. Only do a PhD if you want to pursue research after (academy or industry). For an MLE job I believe industry experience will be more valued than a PhD.","timestamp":"2025-01-28T07:24:25+00:00","score":1},{"role":"OP","user_id":"anon_b264b49c514e49fa","comment_id":"m9ujyb0","kind":"comment","text":"Thanks for the suggestion! I'm interested in doing research but I'm not sure if it's worth it spending two more years to do RA. That's why now I'm also thinking about getting a job and see if applying for a phd later is a better choice.","timestamp":"2025-01-29T16:48:52+00:00","score":1},{"role":"answerer","user_id":"anon_93801ddf99768743","comment_id":"m9uqiuk","kind":"comment","text":"Then you could try applying directly to PhD programs. Some experience, be it RA or industry, will always be valued, but I had the same profile as you and I got accepted into my Phd straight after my masters. Not a top PhD but still a decent one. So it doesn't hurt to try and see where you stand.","timestamp":"2025-01-29T17:18:55+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b264b49c514e49fa","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_93801ddf99768743","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"m9lnxfg","thanks_reply_id":"m9ujyb0","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_edf5f1c44f5fa2b0","answerer_user_id":"anon_c4381ca7b979cf99","subreddit":"LanguageTechnology","timestamp":"2025-01-28T12:00:47+00:00","post_id":"1ibzz2l","question":"Need help with BERTopic and Top2Vec - Topic Modeling\n\nHello dear community! \nI’m working with a dataset of job postings for data scientists. One of the columns contains the \"required skills.\" I’d like to analyze this dataset using topic modeling to extract the most prominent skills and skill clusters.\n\nThe data looks like this: \n\"3+ years of experience with data exploration, data cleaning, data analysis, data visualization, or data mining. 3+ years of experience with statistical and general-purpose programming languages for data analysis. \\[...\\]\"\n\nI tried using BERTopic with \"normal\" embeddings and more tech focused embeddings but got very bad results. I am not experienced with Topic Modeling. I am glad for any help :)","preferred_answer":"This is a bit tricky. Okay, let me think out loud if you don't mind reading a mind dump. Hope this leads somewhere. \n\nAlright, so what I imagine a topic model would do here is:\n\nSay you have n \"documents\" of these professional descriptions, then it's going to try to cluster these documents into some sort of groups, and for each group, it's gonna give you keywords which uniquely describe this cluster and make it different than the others.\n\nSo if you have a bunch of skill descriptions, which I assume are going to be all sorts of combinations, they can be quite distinct, for instance, if you have a bunch of people working in Javascript, they're probably gonna be describing Javascript and similar frameworks. \n\nAnd the other groups could be python and machine learning and so on.\n\nHowever, this could also not be the case. Depends on your data. But sounds more like this for your case if you're just looking at one kind of position.\n\nSo what really ends up separating these clusters is a lot of meta information that the embedding model you're using can't really encode. \n\nAnd the \"keywords\" would be look weird because if everyone mentions R and Python, it's a commonly occurring term and therefore not a good clustering keyword.\n\nAlso, in this case, the topic model already needs to have a good idea of what jobs or keywords go together. Which I guess could work with SciBert or some larger llm embeddings.\n\nBut also hard to find the granularities, which is I guess where the problem lies.\n\nDoes this make sense?\n\nI'd want to try out a few things in this case.\n\n1. The easiest would be that you could simply do zero shot with a high quality LLM if you have the GPU or api for it. Probably quantized versions if you don't have enough GPU memory. But I suppose 32B models being more than capable enough for this task.\n\n2. Fine-tune a scientific bert or modern bert or some small llm on a similar dataset if you can find one.\n\n3. Augment your data somehow. For instance you can again use an llm or some sort of timeline generation or summarization pipeline (check papers with code for similar tasks and their sota) and use this in addition to your current inputs.\n\n4. But I suppose this isn't exactly what you're looking for. What you're probably looking for more is the most relevant keywords.\n\nAdditional comments:\n\nI found a similar looking dataset: [Kaggle Data Scientist LinkedIn Job Postings Dataset](https://www.kaggle.com/datasets/asaniczka/data-scientist-linkedin-job-postings)\n\nAnd if you think about it, the real world problem is quite more challenging as the most relevant keywords are also context dependent on the job they have held (which is usually when you're changing your CV or description) vs the job you're hiring for, the type of language being used (can be country or job specific), or something else. So any contextualisation would benefit from the job role someone is hiring for.\n\nGiven this, you might want to tune your models or zero/few shot with LLMs. Anyway, I guess the main challenge is having a gold standard. Read the paper Machine Reading Tea Leaves if you need more insights into generating a gold standard somehow for your task.\n\nI hope this was somewhat helpful.","full_conversation":[{"role":"OP","user_id":"anon_edf5f1c44f5fa2b0","comment_id":"1ibzz2l","kind":"post","text":"Need help with BERTopic and Top2Vec - Topic Modeling\n\nHello dear community! \nI’m working with a dataset of job postings for data scientists. One of the columns contains the \"required skills.\" I’d like to analyze this dataset using topic modeling to extract the most prominent skills and skill clusters.\n\nThe data looks like this: \n\"3+ years of experience with data exploration, data cleaning, data analysis, data visualization, or data mining. 3+ years of experience with statistical and general-purpose programming languages for data analysis. \\[...\\]\"\n\nI tried using BERTopic with \"normal\" embeddings and more tech focused embeddings but got very bad results. I am not experienced with Topic Modeling. I am glad for any help :)","timestamp":"2025-01-28T12:00:47+00:00","score":5},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"m9ncse0","kind":"comment","text":"This is a bit tricky. Okay, let me think out loud if you don't mind reading a mind dump. Hope this leads somewhere. \n\nAlright, so what I imagine a topic model would do here is:\n\nSay you have n \"documents\" of these professional descriptions, then it's going to try to cluster these documents into some sort of groups, and for each group, it's gonna give you keywords which uniquely describe this cluster and make it different than the others.\n\nSo if you have a bunch of skill descriptions, which I assume are going to be all sorts of combinations, they can be quite distinct, for instance, if you have a bunch of people working in Javascript, they're probably gonna be describing Javascript and similar frameworks. \n\nAnd the other groups could be python and machine learning and so on.\n\nHowever, this could also not be the case. Depends on your data. But sounds more like this for your case if you're just looking at one kind of position.\n\nSo what really ends up separating these clusters is a lot of meta information that the embedding model you're using can't really encode. \n\nAnd the \"keywords\" would be look weird because if everyone mentions R and Python, it's a commonly occurring term and therefore not a good clustering keyword.\n\nAlso, in this case, the topic model already needs to have a good idea of what jobs or keywords go together. Which I guess could work with SciBert or some larger llm embeddings.\n\nBut also hard to find the granularities, which is I guess where the problem lies.\n\nDoes this make sense?\n\nI'd want to try out a few things in this case.\n\n1. The easiest would be that you could simply do zero shot with a high quality LLM if you have the GPU or api for it. Probably quantized versions if you don't have enough GPU memory. But I suppose 32B models being more than capable enough for this task.\n\n2. Fine-tune a scientific bert or modern bert or some small llm on a similar dataset if you can find one.\n\n3. Augment your data somehow. For instance you can again use an llm or some sort of timeline generation or summarization pipeline (check papers with code for similar tasks and their sota) and use this in addition to your current inputs.\n\n4. But I suppose this isn't exactly what you're looking for. What you're probably looking for more is the most relevant keywords.\n\nAdditional comments:\n\nI found a similar looking dataset: [Kaggle Data Scientist LinkedIn Job Postings Dataset](https://www.kaggle.com/datasets/asaniczka/data-scientist-linkedin-job-postings)\n\nAnd if you think about it, the real world problem is quite more challenging as the most relevant keywords are also context dependent on the job they have held (which is usually when you're changing your CV or description) vs the job you're hiring for, the type of language being used (can be country or job specific), or something else. So any contextualisation would benefit from the job role someone is hiring for.\n\nGiven this, you might want to tune your models or zero/few shot with LLMs. Anyway, I guess the main challenge is having a gold standard. Read the paper Machine Reading Tea Leaves if you need more insights into generating a gold standard somehow for your task.\n\nI hope this was somewhat helpful.","timestamp":"2025-01-28T15:24:00+00:00","score":1},{"role":"OP","user_id":"anon_edf5f1c44f5fa2b0","comment_id":"m9nrt98","kind":"comment","text":"Thanks for the efford and input! I am sticking to extracting the keywords and do an analysis based on the frequences right now before i sink too much time into it.","timestamp":"2025-01-28T16:35:45+00:00","score":3},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"m9nsw0b","kind":"comment","text":"No worries and all the best. :D","timestamp":"2025-01-28T16:40:46+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_edf5f1c44f5fa2b0","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c4381ca7b979cf99","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"m9ncse0","thanks_reply_id":"m9nrt98","post_score":5,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_3acda70588d3900b","answerer_user_id":"anon_080be924c380518d","subreddit":"LanguageTechnology","timestamp":"2025-01-30T09:32:24+00:00","post_id":"1idjcdl","question":"NER with texts longer than max_length ?\n\nHello,\n\nI want to do NER on texts using this model: [https://huggingface.co/urchade/gliner\\_large\\_bio-v0.1](https://huggingface.co/urchade/gliner_large_bio-v0.1) . The texts I am working with are of variable length. I do not truncate or split them. The model seems to have run fine on them, except it displayed warnings like:\n\nUserWarning: The sentencepiece tokenizer that you are converting to a fast tokenizer uses the b \nyte fallback option which is not implemented in the fast tokenizers. In practice this means that the fast version of the tokenizer can produce unknown tokens whereas the sentencepiece version would have converted these \nunknown tokens into a sequence of byte tokens matching the original piece of text. \n warnings.warn( \nAsking to truncate to max\\_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation. \nI manually gave a max\\_length longer, what was i the config file:\n\n\n\nmodel\\_name = \"urchade/gliner\\_large\\_bio-v0.1\"model = GLiNER.from\\_pretrained(pretrained\\_model\\_name\\_or\\_path=model\\_name, max\\_length=2048) \n\nWhat could be the consequences of this?\n\nThank you!","preferred_answer":"It'll probably just throw an error. It has a limited context window and will have to cut off somewhere.","full_conversation":[{"role":"OP","user_id":"anon_3acda70588d3900b","comment_id":"1idjcdl","kind":"post","text":"NER with texts longer than max_length ?\n\nHello,\n\nI want to do NER on texts using this model: [https://huggingface.co/urchade/gliner\\_large\\_bio-v0.1](https://huggingface.co/urchade/gliner_large_bio-v0.1) . The texts I am working with are of variable length. I do not truncate or split them. The model seems to have run fine on them, except it displayed warnings like:\n\nUserWarning: The sentencepiece tokenizer that you are converting to a fast tokenizer uses the b \nyte fallback option which is not implemented in the fast tokenizers. In practice this means that the fast version of the tokenizer can produce unknown tokens whereas the sentencepiece version would have converted these \nunknown tokens into a sequence of byte tokens matching the original piece of text. \n warnings.warn( \nAsking to truncate to max\\_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation. \nI manually gave a max\\_length longer, what was i the config file:\n\n\n\nmodel\\_name = \"urchade/gliner\\_large\\_bio-v0.1\"model = GLiNER.from\\_pretrained(pretrained\\_model\\_name\\_or\\_path=model\\_name, max\\_length=2048) \n\nWhat could be the consequences of this?\n\nThank you!","timestamp":"2025-01-30T09:32:24+00:00","score":1},{"role":"answerer","user_id":"anon_080be924c380518d","comment_id":"m9zlle0","kind":"comment","text":"It'll probably just throw an error. It has a limited context window and will have to cut off somewhere.","timestamp":"2025-01-30T10:30:35+00:00","score":1},{"role":"OP","user_id":"anon_3acda70588d3900b","comment_id":"ma0cvsr","kind":"comment","text":"Hi! Thanks for your answer! So I tried and did not get an error, only the warnings above. I am just wondering if the entities spotted in my texts are spotted in the 1st part of texts only (because the texts are truncated), or if it means the model go through the entire text, but doesn't have the entire text in context when identifying entities.","timestamp":"2025-01-30T13:56:55+00:00","score":1},{"role":"answerer","user_id":"anon_080be924c380518d","comment_id":"ma36gqa","kind":"comment","text":"The input will be truncated. The entire text cannot fit.","timestamp":"2025-01-30T21:58:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_3acda70588d3900b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_080be924c380518d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"m9zlle0","thanks_reply_id":"ma0cvsr","post_score":1,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_9674c89f9796222f","answerer_user_id":"anon_959bdabb8e0521b2","subreddit":"LanguageTechnology","timestamp":"2025-02-18T16:29:15+00:00","post_id":"1isgphw","question":"I suck at programming and I feel so bad\n\nI failed an introductory programming exam (Python) at university and honestly, it made me feel really stupid and inadequate.\nI come from a BA in pure linguistics in Germany and I had taken a programming course on Codecademy last year ( still during my BA), but after that, I hadn’t touched Python at all. \nPlus, the course at my MSc was terribile, after covering functions it focused almost entirely on regex, which I had never worked with before.\n\nOn top of that, I had a lot of other exams to prepare for, so I barely studied and did very little practice. I do enjoy programming—I’ve gone over the “theory” multiple times—but I struggle to remember concepts and apply critical thinking when trying to solve problems. I lack hands-on experience. If you asked me to write even the simplest program, I wouldn’t know where to start.\nI mean, at the exam I couldn’t even figure out, recall, how to invert a string or how to join 2 dictionaries… \nI had problems in saving a file in Visual studio Code on a different laptop.\nI felt so dumb and not suited for this path. \nWhile, most of my colleagues were just great at programming and did fine at the exam. \n\nIt feels like I’m just memorizing code rather than truly understanding how to use it.\n\nThis whole experience has been pretty discouraging because I know how important programming skills are in this field—especially when there are people with computer science degrees who have been coding since high school.\n\nSo now I don’t know where to start. As I said I’ve read the theory multiple times ( how to join dicyionaries, what are functions and hoe they work etv..) bit then if you put me a concrete problem to solbe, even a very dumb one, i dont knkw where to star5t.\n\nThat said, I’m currently taking an NLP and ML course at university, which requires basic programming knowledge. So I was thinking of following a hands-on NLP course that also covers regex. That way, I could improve my programming skills while reinforcing what I’m studying now.\n\nOr would it be better to start from the basics of Python again maybe going thru tutorials once again and focusing on practice ?","preferred_answer":"Practice! There’s no need to do theory again.. just spend 15-30mins in your VS Code printing stuff, ask ChatGPT to give you very beginner friendly tasks like add 2 + 2 and print output. It’s a muscle, the more you practice, the easier it will be. There is no way around it, only through. First week will be frustrating, then you will get the hang of it, I promise. Even make a game of it and reward yourself. Even just a check mark in a spreadsheet can be satisfying. \n\nWhen I’m learning something new, I tell myself the most accomplished person in that field wasn’t born with it. It was Day1 for them once and it’s just Day1 for me and if they can do it, I can do it. \n\nMore general advice:\n\nI see a lot of people spend too much time in theory and not enough practice and you know theory fades - this is what is happening with you. Practice becomes muscle memory. Do simplest of tasks but DO. \n\nI have been using Python for 8+ years and I often make syntax mistakes and forget but it takes me 30 seconds to find it as I know I had used something similar in the past. \n\nAs for your ML/NLP journey.. I’d say do the same.. do a simple binary classification task or a sentiment analysis task and add it to your GitHub. A year from today you will be so proud you did this. \n\nGood luck!","full_conversation":[{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"1isgphw","kind":"post","text":"I suck at programming and I feel so bad\n\nI failed an introductory programming exam (Python) at university and honestly, it made me feel really stupid and inadequate.\nI come from a BA in pure linguistics in Germany and I had taken a programming course on Codecademy last year ( still during my BA), but after that, I hadn’t touched Python at all. \nPlus, the course at my MSc was terribile, after covering functions it focused almost entirely on regex, which I had never worked with before.\n\nOn top of that, I had a lot of other exams to prepare for, so I barely studied and did very little practice. I do enjoy programming—I’ve gone over the “theory” multiple times—but I struggle to remember concepts and apply critical thinking when trying to solve problems. I lack hands-on experience. If you asked me to write even the simplest program, I wouldn’t know where to start.\nI mean, at the exam I couldn’t even figure out, recall, how to invert a string or how to join 2 dictionaries… \nI had problems in saving a file in Visual studio Code on a different laptop.\nI felt so dumb and not suited for this path. \nWhile, most of my colleagues were just great at programming and did fine at the exam. \n\nIt feels like I’m just memorizing code rather than truly understanding how to use it.\n\nThis whole experience has been pretty discouraging because I know how important programming skills are in this field—especially when there are people with computer science degrees who have been coding since high school.\n\nSo now I don’t know where to start. As I said I’ve read the theory multiple times ( how to join dicyionaries, what are functions and hoe they work etv..) bit then if you put me a concrete problem to solbe, even a very dumb one, i dont knkw where to star5t.\n\nThat said, I’m currently taking an NLP and ML course at university, which requires basic programming knowledge. So I was thinking of following a hands-on NLP course that also covers regex. That way, I could improve my programming skills while reinforcing what I’m studying now.\n\nOr would it be better to start from the basics of Python again maybe going thru tutorials once again and focusing on practice ?","timestamp":"2025-02-18T16:29:15+00:00","score":12},{"role":"answerer","user_id":"anon_959bdabb8e0521b2","comment_id":"mdglx0q","kind":"comment","text":"Practice! There’s no need to do theory again.. just spend 15-30mins in your VS Code printing stuff, ask ChatGPT to give you very beginner friendly tasks like add 2 + 2 and print output. It’s a muscle, the more you practice, the easier it will be. There is no way around it, only through. First week will be frustrating, then you will get the hang of it, I promise. Even make a game of it and reward yourself. Even just a check mark in a spreadsheet can be satisfying. \n\nWhen I’m learning something new, I tell myself the most accomplished person in that field wasn’t born with it. It was Day1 for them once and it’s just Day1 for me and if they can do it, I can do it. \n\nMore general advice:\n\nI see a lot of people spend too much time in theory and not enough practice and you know theory fades - this is what is happening with you. Practice becomes muscle memory. Do simplest of tasks but DO. \n\nI have been using Python for 8+ years and I often make syntax mistakes and forget but it takes me 30 seconds to find it as I know I had used something similar in the past. \n\nAs for your ML/NLP journey.. I’d say do the same.. do a simple binary classification task or a sentiment analysis task and add it to your GitHub. A year from today you will be so proud you did this. \n\nGood luck!","timestamp":"2025-02-18T17:25:39+00:00","score":10},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"mdgr4zf","kind":"comment","text":"Thank you but it’s just that I got discouraged by the fact that I can’t do anything and I’m afraid that I will not learn by doing random exercises. But I’ll try. \nSo would you say to start the practice NLP course on Udemy later ?","timestamp":"2025-02-18T17:49:56+00:00","score":2},{"role":"answerer","user_id":"anon_959bdabb8e0521b2","comment_id":"mdgtdpd","kind":"comment","text":"Why do you need to learn regex at this stage?","timestamp":"2025-02-18T18:00:11+00:00","score":1},{"role":"OP","user_id":"anon_9674c89f9796222f","comment_id":"mdgtt3e","kind":"comment","text":"Bc I need them for my python exam","timestamp":"2025-02-18T18:02:10+00:00","score":1},{"role":"answerer","user_id":"anon_959bdabb8e0521b2","comment_id":"mdgyc3o","kind":"comment","text":"Ok gotcha, yeah just grab a Udemy course and follow along I guess but prioritize practice over theory.","timestamp":"2025-02-18T18:23:08+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_9674c89f9796222f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_959bdabb8e0521b2","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mdglx0q","thanks_reply_id":"mdgr4zf","post_score":12,"answer_score":10,"preferred_answer_is_top_level":true}} {"user_id":"anon_bab19f5a54986ec1","answerer_user_id":"anon_8e2e91b861ad0762","subreddit":"LanguageTechnology","timestamp":"2025-03-01T12:24:05+00:00","post_id":"1j0ybkg","question":"Tokenization or embeddings first?\n\nI want to perform ner with the help of tensorflow lstm + crf. However, I am confused about this step. If i have to use word2vec which is a pretrained embeddings layer, should creation of embedding come before tokenization? I am a beginner if you haven't guessed by now","preferred_answer":"First comes the tokenization all the words are broken down into subwords then these tokens or subwords are passed to embedding layers through which they are mapped in a vector space. The output is each token is represented as a dense vector.","full_conversation":[{"role":"OP","user_id":"anon_bab19f5a54986ec1","comment_id":"1j0ybkg","kind":"post","text":"Tokenization or embeddings first?\n\nI want to perform ner with the help of tensorflow lstm + crf. However, I am confused about this step. If i have to use word2vec which is a pretrained embeddings layer, should creation of embedding come before tokenization? I am a beginner if you haven't guessed by now","timestamp":"2025-03-01T12:24:05+00:00","score":0},{"role":"answerer","user_id":"anon_8e2e91b861ad0762","comment_id":"mff9o0i","kind":"comment","text":"First comes the tokenization all the words are broken down into subwords then these tokens or subwords are passed to embedding layers through which they are mapped in a vector space. The output is each token is represented as a dense vector.","timestamp":"2025-03-01T12:54:52+00:00","score":2},{"role":"OP","user_id":"anon_bab19f5a54986ec1","comment_id":"mffdftq","kind":"comment","text":"Thanks for responding.","timestamp":"2025-03-01T13:21:36+00:00","score":1},{"role":"answerer","user_id":"anon_8e2e91b861ad0762","comment_id":"mffmvcz","kind":"comment","text":"I did some poo poo at the end what I meant was that the output is tokens in the form of dense vectors","timestamp":"2025-03-01T14:21:16+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_bab19f5a54986ec1","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8e2e91b861ad0762","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mff9o0i","thanks_reply_id":"mffdftq","post_score":0,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_7be7acc6488bf785","answerer_user_id":"anon_90e11a6a6672c7d7","subreddit":"LanguageTechnology","timestamp":"2025-03-26T13:17:46+00:00","post_id":"1jkbk4y","question":"Best NER Models?\n\nHi, I’m new to this field. Do you have suggestions for NER models? \n\nI am currently using spacy but I find it challenging to finetune it. Is this normal? \n\nDo you have any suggestions? Thank you!","preferred_answer":"A finetuned spacy model works quite well for me IF it is properly annotated and annotation is a struggle if you don't use some labelling app. In my case I use confidential docs so I prefer not to use an external annotation app.\n\nSomething that works for me is exporting your text to excel, copy paste NER ents you want your models to filter out in a second column and define the ent type in a third column. Then I run a python script to concatenate that information (by using string index matching) into the spacy required format for training. Still a bit of a hassle but I'm seeing results.","full_conversation":[{"role":"OP","user_id":"anon_7be7acc6488bf785","comment_id":"1jkbk4y","kind":"post","text":"Best NER Models?\n\nHi, I’m new to this field. Do you have suggestions for NER models? \n\nI am currently using spacy but I find it challenging to finetune it. Is this normal? \n\nDo you have any suggestions? Thank you!","timestamp":"2025-03-26T13:17:46+00:00","score":3},{"role":"answerer","user_id":"anon_90e11a6a6672c7d7","comment_id":"mjz6sau","kind":"comment","text":"A finetuned spacy model works quite well for me IF it is properly annotated and annotation is a struggle if you don't use some labelling app. In my case I use confidential docs so I prefer not to use an external annotation app.\n\nSomething that works for me is exporting your text to excel, copy paste NER ents you want your models to filter out in a second column and define the ent type in a third column. Then I run a python script to concatenate that information (by using string index matching) into the spacy required format for training. Still a bit of a hassle but I'm seeing results.","timestamp":"2025-03-27T07:54:32+00:00","score":2},{"role":"OP","user_id":"anon_7be7acc6488bf785","comment_id":"mjzaod0","kind":"comment","text":"Thank you!! I have 2 questions.\n\n1. How much data do you have?\n2. Is it more accurate to use sentences compared to just putting the entity itself?\n * For example, I want to train it to recognize addresses. I input \"555 Street Name City Name\" so it will be `(\"555 Street Name City Name\", {\"entities\": [(0, len(my_name), \"ADDRESS\")]})`\n * or is it better to really have sentences as my training data?","timestamp":"2025-03-27T08:38:20+00:00","score":1},{"role":"answerer","user_id":"anon_90e11a6a6672c7d7","comment_id":"mk05q30","kind":"comment","text":"I've got roughly 5,000 segments / sentences. I don't change the input data but use it as it is extracted from the original documents as that's how I expect the model to encounter it in the \"wild\" (i.e., out of sample). Then again I only expect to use this model for those kind of documents and I don't expect it to perform great in another context.","timestamp":"2025-03-27T12:58:27+00:00","score":2},{"role":"OP","user_id":"anon_7be7acc6488bf785","comment_id":"mk46wgh","kind":"comment","text":"Thank you so much for your input! Appreciate it :)","timestamp":"2025-03-28T01:59:14+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_7be7acc6488bf785","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_90e11a6a6672c7d7","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mjz6sau","thanks_reply_id":"mjzaod0","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_348778918b01f083","answerer_user_id":"anon_9cc20e675718c69c","subreddit":"LanguageTechnology","timestamp":"2025-03-26T14:46:14+00:00","post_id":"1jkdhpx","question":"How could I get into NLP?\n\nI have a master's degree in Generative Linguistics and I recently started reading about NLP and computational linguistics. The problem is that I'm not from the IT field, and I don't know how to program. I have just started studying the very basics of IT. Considering this, what should I study to get into NLP?\n\nUnfortunately, I'm already a bit old (30 years old) to enter the IT market, but if I want to pursue a degree in CS, would my background in Linguistics be any use?\n\n \nThank you","preferred_answer":"The goals of generative linguistics are quite different from those of NLP (e.g. there's no competence/performance distinction). As far as specific domain knowledge goes, I'm not aware of ANY applications of generative linguistics in NLP (which is an interesting fact). I would suggest doing a segue into psycholinguistics, which has a statistical bent, and thence to NLP. That's the easiest theoretical bridge I can think of between generative stuff and NLP. And as someone who's already done a lot of standard linguistics, that could be very doable for you. You'll be coming at NLP from a position of theoretical strength, unlike many people who work as NLP engineers or whatever. \n\n \nOf course you need to know how to code, but everyone does it in python nowadays, which is easy to pick up. The other thing you'll need is math: probability, statistics, linear algebra, calculus & optimization. For all this, check out the ML book by Raschka, which also treats NLP, but starts with the basics and also goes into other ML topics. It would be hard to get a job doing just NLP, without also dealing with non-textual data, so a book like Raschka's is very useful. \n\nWhy all the math? E.g. there is no way to understand word embedding models without an understanding of linear algebra. And so on.","full_conversation":[{"role":"OP","user_id":"anon_348778918b01f083","comment_id":"1jkdhpx","kind":"post","text":"How could I get into NLP?\n\nI have a master's degree in Generative Linguistics and I recently started reading about NLP and computational linguistics. The problem is that I'm not from the IT field, and I don't know how to program. I have just started studying the very basics of IT. Considering this, what should I study to get into NLP?\n\nUnfortunately, I'm already a bit old (30 years old) to enter the IT market, but if I want to pursue a degree in CS, would my background in Linguistics be any use?\n\n \nThank you","timestamp":"2025-03-26T14:46:14+00:00","score":23},{"role":"answerer","user_id":"anon_9cc20e675718c69c","comment_id":"mjxlr7e","kind":"comment","text":"The goals of generative linguistics are quite different from those of NLP (e.g. there's no competence/performance distinction). As far as specific domain knowledge goes, I'm not aware of ANY applications of generative linguistics in NLP (which is an interesting fact). I would suggest doing a segue into psycholinguistics, which has a statistical bent, and thence to NLP. That's the easiest theoretical bridge I can think of between generative stuff and NLP. And as someone who's already done a lot of standard linguistics, that could be very doable for you. You'll be coming at NLP from a position of theoretical strength, unlike many people who work as NLP engineers or whatever. \n\n \nOf course you need to know how to code, but everyone does it in python nowadays, which is easy to pick up. The other thing you'll need is math: probability, statistics, linear algebra, calculus & optimization. For all this, check out the ML book by Raschka, which also treats NLP, but starts with the basics and also goes into other ML topics. It would be hard to get a job doing just NLP, without also dealing with non-textual data, so a book like Raschka's is very useful. \n\nWhy all the math? E.g. there is no way to understand word embedding models without an understanding of linear algebra. And so on.","timestamp":"2025-03-27T00:37:29+00:00","score":3},{"role":"OP","user_id":"anon_348778918b01f083","comment_id":"mk0ms8e","kind":"comment","text":"Thank you for your reply! But is there any field of IT/CS where I can use my linguistic background more strongly? Not necessarily Generative Linguistics. Or is NLP actually the closest to Linguistis there is in IT?","timestamp":"2025-03-27T14:32:18+00:00","score":1},{"role":"answerer","user_id":"anon_9cc20e675718c69c","comment_id":"mk18g46","kind":"comment","text":"I think NLP is def the closest in IT, maybe someone else can correct me.","timestamp":"2025-03-27T16:17:27+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_348778918b01f083","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9cc20e675718c69c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mjxlr7e","thanks_reply_id":"mk0ms8e","post_score":23,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_f77abc297e12d861","answerer_user_id":"anon_71c519cef2944a8f","subreddit":"LanguageTechnology","timestamp":"2025-04-03T12:17:13+00:00","post_id":"1jqgvzz","question":"UW Waitlist\n\nHi all, I got waitlisted for UW’s compling program. I am a little bummed because this is the only program I applied to given the convenience of it and the opportunity for part time studies that my employer can pay for. I was told that there are ~60 people before me on the list, but was also told there is no specific ranking. This is confusing for me. Should I just not bother on this program and look elsewhere? \n\nMy background is in behavioral sciences and I work at the intersection of bx science and data science + nlp. I would really love to gain more knowledge in the latter domain. My skillset is spotty - knowledgeable in some areas and completely blank in others so I really need a structured curriculum. \n\nDo you have any recommendations on programs I can look into?","preferred_answer":"So you pay semester instead of a lump sum at the start. Each course is about 4,000 USD so the summer course is 4K, and I took both autumn courses with 8k being what I owed that semester. They only place a home on your account if you can’t pay so I still haven’t paid off my autumn balance (I’m paying this month lol)","full_conversation":[{"role":"OP","user_id":"anon_f77abc297e12d861","comment_id":"1jqgvzz","kind":"post","text":"UW Waitlist\n\nHi all, I got waitlisted for UW’s compling program. I am a little bummed because this is the only program I applied to given the convenience of it and the opportunity for part time studies that my employer can pay for. I was told that there are ~60 people before me on the list, but was also told there is no specific ranking. This is confusing for me. Should I just not bother on this program and look elsewhere? \n\nMy background is in behavioral sciences and I work at the intersection of bx science and data science + nlp. I would really love to gain more knowledge in the latter domain. My skillset is spotty - knowledgeable in some areas and completely blank in others so I really need a structured curriculum. \n\nDo you have any recommendations on programs I can look into?","timestamp":"2025-04-03T12:17:13+00:00","score":8},{"role":"answerer","user_id":"anon_71c519cef2944a8f","comment_id":"ml71bs1","kind":"comment","text":"So you pay semester instead of a lump sum at the start. Each course is about 4,000 USD so the summer course is 4K, and I took both autumn courses with 8k being what I owed that semester. They only place a home on your account if you can’t pay so I still haven’t paid off my autumn balance (I’m paying this month lol)","timestamp":"2025-04-03T13:14:35+00:00","score":1},{"role":"OP","user_id":"anon_f77abc297e12d861","comment_id":"ml73ty3","kind":"comment","text":"This is great info! Thank you!","timestamp":"2025-04-03T13:29:07+00:00","score":1},{"role":"answerer","user_id":"anon_71c519cef2944a8f","comment_id":"ml77000","kind":"comment","text":"I really enjoyed it! And it definitely helped me not lose hope after getting denied last year!","timestamp":"2025-04-03T13:47:02+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_f77abc297e12d861","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_71c519cef2944a8f","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ml71bs1","thanks_reply_id":"ml73ty3","post_score":8,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_48ed73c76f860263","answerer_user_id":"anon_c4381ca7b979cf99","subreddit":"LanguageTechnology","timestamp":"2025-04-10T03:03:39+00:00","post_id":"1jvo2sp","question":"Need help with data extraction from a query\n\nWhich is the most efficient way to extract data from a query. For example, from \"send 5000 to Albert\" i need the name and amount. Since the query structure and exact wording changes i cant use regex. Please help.","preferred_answer":"There are also free courses you should check out on deeplearning.ai on getting structured outputs using llms. They're pretty short 1 hour courses with hands on code examples, so you should be good to go from there.\n\nAlso, around 10b models aren't that great at following structure consistently yet in my experiments. The range of 30b start doing great already. And use multiple passes for questions with more than one variable you're trying to extract, if you're running local models for better performance. \n\nAll the best.","full_conversation":[{"role":"OP","user_id":"anon_48ed73c76f860263","comment_id":"1jvo2sp","kind":"post","text":"Need help with data extraction from a query\n\nWhich is the most efficient way to extract data from a query. For example, from \"send 5000 to Albert\" i need the name and amount. Since the query structure and exact wording changes i cant use regex. Please help.","timestamp":"2025-04-10T03:03:39+00:00","score":1},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"mmgsn05","kind":"comment","text":"There are also free courses you should check out on deeplearning.ai on getting structured outputs using llms. They're pretty short 1 hour courses with hands on code examples, so you should be good to go from there.\n\nAlso, around 10b models aren't that great at following structure consistently yet in my experiments. The range of 30b start doing great already. And use multiple passes for questions with more than one variable you're trying to extract, if you're running local models for better performance. \n\nAll the best.","timestamp":"2025-04-10T22:14:03+00:00","score":2},{"role":"OP","user_id":"anon_48ed73c76f860263","comment_id":"mmgu06z","kind":"comment","text":"Thanks a lot man.","timestamp":"2025-04-10T22:21:43+00:00","score":1},{"role":"answerer","user_id":"anon_c4381ca7b979cf99","comment_id":"mmh3ewc","kind":"comment","text":"No worries mate","timestamp":"2025-04-10T23:15:20+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_48ed73c76f860263","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_c4381ca7b979cf99","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mmgsn05","thanks_reply_id":"mmgu06z","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_177879d9290bff0e","answerer_user_id":"anon_0928083e44bef061","subreddit":"LanguageTechnology","timestamp":"2025-04-23T21:25:14+00:00","post_id":"1k6avfb","question":"Should I take out loans for UW CLMS ?\n\nBasically the title. So I posted here three weeks ago that I got into University of Washington's CLMS program, which was my top choice. Unfortunately I didn't get any scholarships or funding, so slim chances of external scholarships as well. My only other option is North Dakota State University's English program, where I got full tuition waiver and a small stipend. Should I forgo that as it will not provide me any opportunities to shift my career into STEM? \nMy background is in English with a minor in Linguistics and I'm international btw.","preferred_answer":"I took out loans for the UW CLMS program back in 2014. I was able to pay them off entirely with just the hiring bonus from my first job after school. It was easily the best investment I've ever made.\n\n\nThat said, the job market is a lot more difficult right now. I also worked my ass off, graduated at the top of the class, and was willing to lean into the software engineering side of things more than the research / language side of things. I think the bottom 1/3 of my cohort had a lot more difficulty finding (good) positions.","full_conversation":[{"role":"OP","user_id":"anon_177879d9290bff0e","comment_id":"1k6avfb","kind":"post","text":"Should I take out loans for UW CLMS ?\n\nBasically the title. So I posted here three weeks ago that I got into University of Washington's CLMS program, which was my top choice. Unfortunately I didn't get any scholarships or funding, so slim chances of external scholarships as well. My only other option is North Dakota State University's English program, where I got full tuition waiver and a small stipend. Should I forgo that as it will not provide me any opportunities to shift my career into STEM? \nMy background is in English with a minor in Linguistics and I'm international btw.","timestamp":"2025-04-23T21:25:14+00:00","score":2},{"role":"answerer","user_id":"anon_0928083e44bef061","comment_id":"mos094b","kind":"comment","text":"I took out loans for the UW CLMS program back in 2014. I was able to pay them off entirely with just the hiring bonus from my first job after school. It was easily the best investment I've ever made.\n\n\nThat said, the job market is a lot more difficult right now. I also worked my ass off, graduated at the top of the class, and was willing to lean into the software engineering side of things more than the research / language side of things. I think the bottom 1/3 of my cohort had a lot more difficulty finding (good) positions.","timestamp":"2025-04-24T12:29:06+00:00","score":2},{"role":"OP","user_id":"anon_177879d9290bff0e","comment_id":"moxwiya","kind":"comment","text":"Thank you for your reply. Since you've put in over a decade in your career, would you say that this sort of lateral shift from English to CL is possible in today's time? I'm racking my brain and I don't think any copywriter or technical writer roles will exist five years down the line. So CL sounds better to me than just a masters in English. What would you say?","timestamp":"2025-04-25T09:25:13+00:00","score":3},{"role":"answerer","user_id":"anon_0928083e44bef061","comment_id":"mozzr20","kind":"comment","text":"Yes, I was in a similar position: my undergraduate degree was in Linguistics, and I worked a variety of odd jobs (none of them tech) for several years before eventually going back to school for CLMS degree. A large portion of the cohort will have a Lingusitics background and little computer science.\n\n\nIt will definitely be good job security in the long run: I don't know much about copywriting or technical writing, but I do know a lot about language processing and AI, and specialists in those jobs definitely aren't going away anytime soon (no matter what Sam Altman is trying to sell us).\n\n\nIf you're worried about job security, my advice is to learn to network during your time in school, build relationships with industry contacts at conventions and seminars, and land a good internships (intern -> returning hire is the most reliable way to get in the door in tech)","timestamp":"2025-04-25T16:58:27+00:00","score":3},{"role":"OP","user_id":"anon_177879d9290bff0e","comment_id":"mp0pegn","kind":"comment","text":"The fact that you had the same background as me is great relief for me honestly. Gives me a little bit of hope. Cheers dude and ty again.","timestamp":"2025-04-25T19:02:25+00:00","score":2},{"role":"answerer","user_id":"anon_0928083e44bef061","comment_id":"mp0udjl","kind":"comment","text":"Happy to help and best of luck with whatever decision you make!","timestamp":"2025-04-25T19:27:38+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_177879d9290bff0e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0928083e44bef061","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mos094b","thanks_reply_id":"moxwiya","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_7587b66fbba7874a","answerer_user_id":"anon_fe90c8ffdb82aa33","subreddit":"LanguageTechnology","timestamp":"2025-04-27T22:45:51+00:00","post_id":"1k9gpl9","question":"Help me choose a program to pursue my studies in France in NLP\n\nHi everyone,\n\nI recently got accepted into two programs in France, and I’m trying to decide which one to choose:\nUniversité Paris Cité – Licence Sciences Humaines et Sociales, mention Sciences du Langage, parcours Linguistique Théorique, Expérimentale et Informatique (LTEI), entry into Year 3 (L3).\n\nUniversité d'Orléans – UFR Lettres, Langues et Sciences Humaines (master program).\n\nMy goal is to become an NLP engineer, so I’m aiming for the most technical and academically solid background that would help me get into competitive master's programs (especially in computational linguistics, NLP, or AI), Or allow me to start working directly after the master if needed.\n\nI’ve already researched the programs intensively (program descriptions, course lists, etc.), but I would love to get some real insights from students or people familiar with these universities about how technical the LTEI track at Université Paris Cité is( i know it involves it involve computational linguistics, programming, machine learning, and experimental work), How strong the Université d'Orléans program is in comparison? What the student life is like in Paris vs Orléans?\nWhat are your thoughts on academic reputation and career prospects after either program?\nAny advice, experiences, or honest opinions would be hugely appreciated! Thanks a lot!\nYou can check the programes' websites for more info","preferred_answer":"Yes, i’d say the same thing as the comment above, I would suggest nanterre and paris 8 (this one is even better in my opinion) for a solid nlp background. I have no idea about orleans but i can say ppl in paris cite seem still more traditional linguists to me, but it has been years since i graduated so it must have changed..congrats anyway for both","full_conversation":[{"role":"OP","user_id":"anon_7587b66fbba7874a","comment_id":"1k9gpl9","kind":"post","text":"Help me choose a program to pursue my studies in France in NLP\n\nHi everyone,\n\nI recently got accepted into two programs in France, and I’m trying to decide which one to choose:\nUniversité Paris Cité – Licence Sciences Humaines et Sociales, mention Sciences du Langage, parcours Linguistique Théorique, Expérimentale et Informatique (LTEI), entry into Year 3 (L3).\n\nUniversité d'Orléans – UFR Lettres, Langues et Sciences Humaines (master program).\n\nMy goal is to become an NLP engineer, so I’m aiming for the most technical and academically solid background that would help me get into competitive master's programs (especially in computational linguistics, NLP, or AI), Or allow me to start working directly after the master if needed.\n\nI’ve already researched the programs intensively (program descriptions, course lists, etc.), but I would love to get some real insights from students or people familiar with these universities about how technical the LTEI track at Université Paris Cité is( i know it involves it involve computational linguistics, programming, machine learning, and experimental work), How strong the Université d'Orléans program is in comparison? What the student life is like in Paris vs Orléans?\nWhat are your thoughts on academic reputation and career prospects after either program?\nAny advice, experiences, or honest opinions would be hugely appreciated! Thanks a lot!\nYou can check the programes' websites for more info","timestamp":"2025-04-27T22:45:51+00:00","score":2},{"role":"answerer","user_id":"anon_fe90c8ffdb82aa33","comment_id":"mpfvnsq","kind":"comment","text":"Yes, i’d say the same thing as the comment above, I would suggest nanterre and paris 8 (this one is even better in my opinion) for a solid nlp background. I have no idea about orleans but i can say ppl in paris cite seem still more traditional linguists to me, but it has been years since i graduated so it must have changed..congrats anyway for both","timestamp":"2025-04-28T06:01:30+00:00","score":1},{"role":"OP","user_id":"anon_7587b66fbba7874a","comment_id":"mpfw1ao","kind":"comment","text":"Thank you so much, unfortunately i have to wait until next year to apply for these unis, but in the course description of paris cité, it says it prepares you to enter high competitive master programs although i'll have to retake a year and life in Paris is definetly not cheap. I still have a chance at Grenoble though. What do you think about that?","timestamp":"2025-04-28T06:05:09+00:00","score":1},{"role":"answerer","user_id":"anon_fe90c8ffdb82aa33","comment_id":"mpfxd0r","kind":"comment","text":"Grenoble is fine too, why do you want to move to paris? It’s crazy, if i were you and not willing to wait without doing anything, I’d go with any school, but next year transfer to another university more that has more applied approach, if you are accepted at grenoble stay there for a year, and then move to paris 8 or paris 10, try paris 8 it’s really good at nlp stuff, it was very strong 10 years ago it must be better now, besides, people of universities that are situated in banlieus are cooler, I don’t know, people are also important, profs and friends..","timestamp":"2025-04-28T06:18:08+00:00","score":1},{"role":"OP","user_id":"anon_7587b66fbba7874a","comment_id":"mpfxlzb","kind":"comment","text":"I certainly don't want to move to Paris, that's why i'm leaning more toward Orleans. But if i choose Orleans, can i transfer for M2 in another program afterwards or not?","timestamp":"2025-04-28T06:20:33+00:00","score":1},{"role":"answerer","user_id":"anon_fe90c8ffdb82aa33","comment_id":"mpfxrh2","kind":"comment","text":"Sure, you can,","timestamp":"2025-04-28T06:22:03+00:00","score":1},{"role":"OP","user_id":"anon_7587b66fbba7874a","comment_id":"mpfxy6i","kind":"comment","text":"What do you think about retaking L3 for better options, or should i go straight to the master program? I am a bit hesitant about both","timestamp":"2025-04-28T06:23:56+00:00","score":1},{"role":"answerer","user_id":"anon_fe90c8ffdb82aa33","comment_id":"mpfyxn8","kind":"comment","text":"No, I wouldn’t suggest to retake an l3, in master’s programs in paris you will already have an enormous load of classwork, you’ll compensate, french MA programs are heavier in terms of classwork compared to american or turkish MA programs","timestamp":"2025-04-28T06:33:54+00:00","score":1},{"role":"OP","user_id":"anon_7587b66fbba7874a","comment_id":"mpfzcyt","kind":"comment","text":"So i think a better option us to opt for M1 and then apply again to more technical programs in M2 or even pursue a PHD. I sincerely appreciate your help btw","timestamp":"2025-04-28T06:38:10+00:00","score":1},{"role":"answerer","user_id":"anon_fe90c8ffdb82aa33","comment_id":"mpfzh22","kind":"comment","text":"Yes, this is wiser, happy to help, good luck for everything","timestamp":"2025-04-28T06:39:20+00:00","score":2},{"role":"OP","user_id":"anon_7587b66fbba7874a","comment_id":"mpfzluo","kind":"comment","text":"Thank you so much","timestamp":"2025-04-28T06:40:41+00:00","score":2}],"n_turns":11,"n_turns_after_thanks":8,"op_metadata":{"user_id":"anon_7587b66fbba7874a","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_fe90c8ffdb82aa33","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mpfvnsq","thanks_reply_id":"mpfw1ao","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_67e71a7339f61ba7","answerer_user_id":"anon_2d17fe27514c5914","subreddit":"LanguageTechnology","timestamp":"2025-04-29T14:56:41+00:00","post_id":"1kapycg","question":"What should I choose between a master’s in my home country or abroad? (computational linguistics focus)\n\nHi everyone,\n\nI’m a Korean linguistics graduate and recently finished my undergraduate degree in Korea. I’m planning to pursue further studies in computational linguistics. My long-term goal is to work abroad, ideally in the US or Europe, and possibly go on to a PhD. I’m especially interested in working on Korean AI translation or localization in the future.\n\nRight now, I’m trying to decide whether I should do my master’s in Korea first or apply directly to a graduate program overseas. On one hand, going abroad seems like the most direct route to working internationally. But on the other hand, I feel that staying in Korea for a master’s could help me build a stronger foundation in Korean linguistics and give me a better understanding of the language I ultimately want to work with.\n\nI’d really appreciate any advice, especially from people who’ve taken a similar path or have experience in computational linguistics or language technology fields. Thanks in advance!","preferred_answer":"US and Europe have drastically different culture of work. So it would be valuable for you to search on both. Of course there is differences between each european countries, but overall that is quite similar.","full_conversation":[{"role":"OP","user_id":"anon_67e71a7339f61ba7","comment_id":"1kapycg","kind":"post","text":"What should I choose between a master’s in my home country or abroad? (computational linguistics focus)\n\nHi everyone,\n\nI’m a Korean linguistics graduate and recently finished my undergraduate degree in Korea. I’m planning to pursue further studies in computational linguistics. My long-term goal is to work abroad, ideally in the US or Europe, and possibly go on to a PhD. I’m especially interested in working on Korean AI translation or localization in the future.\n\nRight now, I’m trying to decide whether I should do my master’s in Korea first or apply directly to a graduate program overseas. On one hand, going abroad seems like the most direct route to working internationally. But on the other hand, I feel that staying in Korea for a master’s could help me build a stronger foundation in Korean linguistics and give me a better understanding of the language I ultimately want to work with.\n\nI’d really appreciate any advice, especially from people who’ve taken a similar path or have experience in computational linguistics or language technology fields. Thanks in advance!","timestamp":"2025-04-29T14:56:41+00:00","score":3},{"role":"answerer","user_id":"anon_2d17fe27514c5914","comment_id":"mpqjfk9","kind":"comment","text":"US and Europe have drastically different culture of work. So it would be valuable for you to search on both. Of course there is differences between each european countries, but overall that is quite similar.","timestamp":"2025-04-29T21:59:27+00:00","score":1},{"role":"OP","user_id":"anon_67e71a7339f61ba7","comment_id":"mpqpad5","kind":"comment","text":"Thanks for the reply!\nFrom what I’ve heard,, the U.S. is more performance-focused and Europe cares more about work-life balance. \nIn Korea, work-life balance is pretty much not a thing, which is why I’m really thinking about working abroad. I’m open to both, but right now I’m leaning more toward the U.S.\n\nDo you think it’s better to just go there earlier if that’s where I wanna end up anyway?\nThanks again for sharing your thoughts","timestamp":"2025-04-29T22:31:33+00:00","score":1},{"role":"answerer","user_id":"anon_2d17fe27514c5914","comment_id":"mpsgdy3","kind":"comment","text":"Yes, as you need visa etc. It would help if you do your studies in the country you aim for.","timestamp":"2025-04-30T04:52:11+00:00","score":2},{"role":"OP","user_id":"anon_67e71a7339f61ba7","comment_id":"mpsi80r","kind":"comment","text":"Got it, Thank you☺️","timestamp":"2025-04-30T05:06:51+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_67e71a7339f61ba7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2d17fe27514c5914","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mpqjfk9","thanks_reply_id":"mpqpad5","post_score":3,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_5daa1c2a04423bbb","answerer_user_id":"anon_8a084c422ce60a3c","subreddit":"LanguageTechnology","timestamp":"2025-05-04T10:46:54+00:00","post_id":"1kegziy","question":"Fine-tuning Whisper from the last checkpoint on new data hurts old performance, what to do?\n\nAnyone here with experience in fine-tuning models like Whisper?\n\nI'm looking for some advice on how to go forward in my project, unsure of which data and how much data to fine-tune the model on. We've already fine tuned it for 6000 epochs on our old data (24k rows of speech-text pairs) that has a lot of variety, but found that our model doesn't generalise well to noisy data. We then trained it from the last checkpoint for another thousand epochs on new data (9k rows new data+3k rows of the old data) that was augmented with noise, but now it doesn't perform well on clean audio recordings but works much better in noisy data.\n\nI think the best option would be to fine tune it on the entire data both noisy and clean, just that it'll be more computationally expensive and I want to make sure if what I'm doing makes sense before using up my credits for GPU. My teammates are convinced we can just keep fine-tuning on more data and the model won't forget its old knowledge, but I think otherwise.","preferred_answer":"Add a classifier to decide on quality of audio. E.g.\n\nhttps://iclr.cc/virtual/2025/poster/29492","full_conversation":[{"role":"OP","user_id":"anon_5daa1c2a04423bbb","comment_id":"1kegziy","kind":"post","text":"Fine-tuning Whisper from the last checkpoint on new data hurts old performance, what to do?\n\nAnyone here with experience in fine-tuning models like Whisper?\n\nI'm looking for some advice on how to go forward in my project, unsure of which data and how much data to fine-tune the model on. We've already fine tuned it for 6000 epochs on our old data (24k rows of speech-text pairs) that has a lot of variety, but found that our model doesn't generalise well to noisy data. We then trained it from the last checkpoint for another thousand epochs on new data (9k rows new data+3k rows of the old data) that was augmented with noise, but now it doesn't perform well on clean audio recordings but works much better in noisy data.\n\nI think the best option would be to fine tune it on the entire data both noisy and clean, just that it'll be more computationally expensive and I want to make sure if what I'm doing makes sense before using up my credits for GPU. My teammates are convinced we can just keep fine-tuning on more data and the model won't forget its old knowledge, but I think otherwise.","timestamp":"2025-05-04T10:46:54+00:00","score":3},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"mqin42y","kind":"comment","text":"Add a classifier to decide on quality of audio. E.g.\n\nhttps://iclr.cc/virtual/2025/poster/29492","timestamp":"2025-05-04T11:01:15+00:00","score":7},{"role":"OP","user_id":"anon_5daa1c2a04423bbb","comment_id":"mqins61","kind":"comment","text":"Thank you for your help, but my issue isn't that I don't want my noisy data, we're the ones that chose it specifically for the model to train on since its performance was bad on noisy data. How can I make the model robust on both noisy and clean data?","timestamp":"2025-05-04T11:07:14+00:00","score":1},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"mqioa69","kind":"comment","text":"I think my point was the it'll probably work better to specialize on either instead of both. \n\nBut if anyone here has tried and successfully trained Whisper to handle both clean and noisy data, please share","timestamp":"2025-05-04T11:11:42+00:00","score":5}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_5daa1c2a04423bbb","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a084c422ce60a3c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mqin42y","thanks_reply_id":"mqins61","post_score":3,"answer_score":7,"preferred_answer_is_top_level":true}} {"user_id":"anon_4b992ce638bcdb10","answerer_user_id":"anon_7a784d950d740c7a","subreddit":"LanguageTechnology","timestamp":"2025-05-11T13:27:19+00:00","post_id":"1kk10b4","question":"Which university is the best fit for me? (Saarland vs. LMU)\n\nHi everyone! I'm currently an undergraduate student in South Korea, double majoring in German Language & Literature and Applied Statistics. I'm planning to pursue a master's degree in Computational Linguistics in Germany.\n\nMy interests include machine translation, speech processing, and applying computational methods to theoretical linguistic research. My long-term goal is to become a researcher or professor, and I’m also considering doing a PhD in the US after my master’s.\n\nI’ve already been accepted into the M.Sc. Language Science and Technology program at Saarland University. However, people around me suggest applying to the M.Sc. Computational Linguistics program at LMU, mainly because LMU has a much stronger overall reputation.\n\nFrom what I’ve read, Saarland offers a top-tier research environment—especially with close ties to MPI and DFKI—which sounds like a big advantage. But I’m still unsure how it compares to universities in bigger cities like Munich.\n\nIf you were in my shoes, which program would you choose—and why? I’d really appreciate any advice or insights!","preferred_answer":"Nice! As someone with a strong background in computational linguistics, I'd say both Saarland and LMU are excellent options. However, I'd probably lean towards Saarland if I were in your shoes.\n\nThe research environment and connections to places like MPI and DFKI are huge advantages. Those are world-class institutions, and being able to collaborate with researchers there would be invaluable for your career goals. Plus, the focus on language technology aligns perfectly with your interests in machine translation, speech processing, and applying computational methods.\n\nThat said, LMU's overall reputation is certainly impressive. But I think the specialized nature of the program at Saarland, combined with the research opportunities, would give you an edge. You'd get hands-on experience working on cutting-edge projects that could really set you up well for a PhD or research position down the line.\n\nAny updates on this? I'm curious to hear if you ended up deciding between the two programs.","full_conversation":[{"role":"OP","user_id":"anon_4b992ce638bcdb10","comment_id":"1kk10b4","kind":"post","text":"Which university is the best fit for me? (Saarland vs. LMU)\n\nHi everyone! I'm currently an undergraduate student in South Korea, double majoring in German Language & Literature and Applied Statistics. I'm planning to pursue a master's degree in Computational Linguistics in Germany.\n\nMy interests include machine translation, speech processing, and applying computational methods to theoretical linguistic research. My long-term goal is to become a researcher or professor, and I’m also considering doing a PhD in the US after my master’s.\n\nI’ve already been accepted into the M.Sc. Language Science and Technology program at Saarland University. However, people around me suggest applying to the M.Sc. Computational Linguistics program at LMU, mainly because LMU has a much stronger overall reputation.\n\nFrom what I’ve read, Saarland offers a top-tier research environment—especially with close ties to MPI and DFKI—which sounds like a big advantage. But I’m still unsure how it compares to universities in bigger cities like Munich.\n\nIf you were in my shoes, which program would you choose—and why? I’d really appreciate any advice or insights!","timestamp":"2025-05-11T13:27:19+00:00","score":1},{"role":"answerer","user_id":"anon_7a784d950d740c7a","comment_id":"msa3xiy","kind":"comment","text":"Nice! As someone with a strong background in computational linguistics, I'd say both Saarland and LMU are excellent options. However, I'd probably lean towards Saarland if I were in your shoes.\n\nThe research environment and connections to places like MPI and DFKI are huge advantages. Those are world-class institutions, and being able to collaborate with researchers there would be invaluable for your career goals. Plus, the focus on language technology aligns perfectly with your interests in machine translation, speech processing, and applying computational methods.\n\nThat said, LMU's overall reputation is certainly impressive. But I think the specialized nature of the program at Saarland, combined with the research opportunities, would give you an edge. You'd get hands-on experience working on cutting-edge projects that could really set you up well for a PhD or research position down the line.\n\nAny updates on this? I'm curious to hear if you ended up deciding between the two programs.","timestamp":"2025-05-14T14:59:18+00:00","score":3},{"role":"OP","user_id":"anon_4b992ce638bcdb10","comment_id":"msdod66","kind":"comment","text":"Thank you so much for your thoughtful comment! Your support helped me to make up my mind, and I've decided to go with Saarland University:)","timestamp":"2025-05-15T02:01:04+00:00","score":2},{"role":"answerer","user_id":"anon_7a784d950d740c7a","comment_id":"msfluum","kind":"comment","text":"Congrats! Good luck!","timestamp":"2025-05-15T11:47:45+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_4b992ce638bcdb10","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7a784d950d740c7a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"msa3xiy","thanks_reply_id":"msdod66","post_score":1,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_e9febab36cf5a999","answerer_user_id":"anon_2010de2799bbebd6","subreddit":"LanguageTechnology","timestamp":"2025-05-15T20:44:02+00:00","post_id":"1kniv1j","question":"Help me choose a program to pursue my studies in France in NLP: Paris Nanterre or Grenoble?\n\nHi everyone, \nI’ve been accepted to two Master's programs in France related to Natural Language Processing (Traitement Automatique des Langues) and I’m trying to decide which one is a better fit, both academically and in terms of quality of life. I’d really appreciate any insight from students or professionals who know these universities or programs! \n\n**The options are**:\n\n1. **Université Paris Nanterre**\n * Master in Human and Social Sciences, with a focus on NLP (offered by the UFR Philosophy, Language, Literature, Arts & Communication)\n * Located in the Paris region, close to La Défense\n * Seems to combine linguistics, communication, and NLP\n2. **Université Grenoble Alpes (UGA)**\n * Master Sciences du Langage, parcours Industrie de la Langue\n * Located in Grenoble, a tech-oriented student city in the Alps\n * Curriculum appears more applied/technical, with industry links in computational linguistics\n\n💬 **What I’m looking for**:\n\n* A solid academic program in NLP (whether linguistics-heavy or computer science-based)\n* Good teaching quality and research/practical opportunities\n* A livable city for an international student (cost, weather, environment)\n\nHave you studied at either university? Any thoughts on how the programs compare in practice, or what the student/academic life is like at Nanterre vs. Grenoble?\n\nThanks so much in advance","preferred_answer":"Hi man. I tried the master TAL in Paris (Nanterre, Sorbonne 3 and Inalco) and I wouldn’t recommend it. I don’t know the curriculum of the program you mentioned but I m sure it was part of what I took.\n\nIf you wanna advance in NLP make sure the program has math and ML in their curriculum.","full_conversation":[{"role":"OP","user_id":"anon_e9febab36cf5a999","comment_id":"1kniv1j","kind":"post","text":"Help me choose a program to pursue my studies in France in NLP: Paris Nanterre or Grenoble?\n\nHi everyone, \nI’ve been accepted to two Master's programs in France related to Natural Language Processing (Traitement Automatique des Langues) and I’m trying to decide which one is a better fit, both academically and in terms of quality of life. I’d really appreciate any insight from students or professionals who know these universities or programs! \n\n**The options are**:\n\n1. **Université Paris Nanterre**\n * Master in Human and Social Sciences, with a focus on NLP (offered by the UFR Philosophy, Language, Literature, Arts & Communication)\n * Located in the Paris region, close to La Défense\n * Seems to combine linguistics, communication, and NLP\n2. **Université Grenoble Alpes (UGA)**\n * Master Sciences du Langage, parcours Industrie de la Langue\n * Located in Grenoble, a tech-oriented student city in the Alps\n * Curriculum appears more applied/technical, with industry links in computational linguistics\n\n💬 **What I’m looking for**:\n\n* A solid academic program in NLP (whether linguistics-heavy or computer science-based)\n* Good teaching quality and research/practical opportunities\n* A livable city for an international student (cost, weather, environment)\n\nHave you studied at either university? Any thoughts on how the programs compare in practice, or what the student/academic life is like at Nanterre vs. Grenoble?\n\nThanks so much in advance","timestamp":"2025-05-15T20:44:02+00:00","score":2},{"role":"answerer","user_id":"anon_2010de2799bbebd6","comment_id":"msiqy9b","kind":"comment","text":"Hi man. I tried the master TAL in Paris (Nanterre, Sorbonne 3 and Inalco) and I wouldn’t recommend it. I don’t know the curriculum of the program you mentioned but I m sure it was part of what I took.\n\nIf you wanna advance in NLP make sure the program has math and ML in their curriculum.","timestamp":"2025-05-15T21:26:39+00:00","score":1},{"role":"OP","user_id":"anon_e9febab36cf5a999","comment_id":"msitw21","kind":"comment","text":"Thanks a lot for your advice! \nI also got accepted into the NLP master at Université de Lorraine, the curriculum includes more math and machine learning. But since I come from a humanities background, I was a bit worried about keeping up with the technical parts — but your comment really made me reconsider. \nI'll definitely take a closer look at the Lorraine program again. Thanks for the advice, helps a lot","timestamp":"2025-05-15T21:41:35+00:00","score":1},{"role":"answerer","user_id":"anon_2010de2799bbebd6","comment_id":"msivfup","kind":"comment","text":"Glad to help. Feel free to message me. I was in the same situation as you and I might be of some assistance.","timestamp":"2025-05-15T21:49:44+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e9febab36cf5a999","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_2010de2799bbebd6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"msiqy9b","thanks_reply_id":"msitw21","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_b682fe1e8f4aca28","answerer_user_id":"anon_89bda32ab67023f1","subreddit":"LanguageTechnology","timestamp":"2025-06-12T17:04:03+00:00","post_id":"1l9rsl1","question":"How realistic is it to get into NLP/Computational Linguistics with a degree in Applied Linguistics?\n\nI study Applied Linguistics and I'm about to graduate. The career prospects after this degree don't appeal to me at all, so I'm looking into combining my linguistic knowledge with technology, and that's how I've stumbled upon NLP and computational linguistics. Both these sound really exciting but I have no experience in coding whatsoever, hence my question: how realistic is it to do a master's degree in that field with a background in linguistics?. I'd really appreciate any insight if you or someone you know have made a shift like that. Thanks in advance:)","preferred_answer":"Did a ba in linguistics and moved to computational linguistics in my ma, been working as a data scientist now for several years. It takes effort and motivation but very doable. I do reccomend to stray away from ai coding tools in the beginning and really try to learn it yourself.","full_conversation":[{"role":"OP","user_id":"anon_b682fe1e8f4aca28","comment_id":"1l9rsl1","kind":"post","text":"How realistic is it to get into NLP/Computational Linguistics with a degree in Applied Linguistics?\n\nI study Applied Linguistics and I'm about to graduate. The career prospects after this degree don't appeal to me at all, so I'm looking into combining my linguistic knowledge with technology, and that's how I've stumbled upon NLP and computational linguistics. Both these sound really exciting but I have no experience in coding whatsoever, hence my question: how realistic is it to do a master's degree in that field with a background in linguistics?. I'd really appreciate any insight if you or someone you know have made a shift like that. Thanks in advance:)","timestamp":"2025-06-12T17:04:03+00:00","score":3},{"role":"answerer","user_id":"anon_89bda32ab67023f1","comment_id":"mxex1lu","kind":"comment","text":"Did a ba in linguistics and moved to computational linguistics in my ma, been working as a data scientist now for several years. It takes effort and motivation but very doable. I do reccomend to stray away from ai coding tools in the beginning and really try to learn it yourself.","timestamp":"2025-06-12T17:17:32+00:00","score":11},{"role":"OP","user_id":"anon_b682fe1e8f4aca28","comment_id":"mxeyhh5","kind":"comment","text":"thank you! that's uplifting to hear. did you take any time in between degrees to upskill or at least learn the basics?","timestamp":"2025-06-12T17:24:09+00:00","score":2},{"role":"answerer","user_id":"anon_89bda32ab67023f1","comment_id":"mxeyw4q","kind":"comment","text":"During my BA I did a minor called Digital Humanities. Took 3 months. Taught me the basics of python and got some applied early experience there as well before the ma.","timestamp":"2025-06-12T17:26:00+00:00","score":3},{"role":"OP","user_id":"anon_b682fe1e8f4aca28","comment_id":"mxfqvdn","kind":"comment","text":"ahh, I see. I just don't know what level of knowledge is expected at this level - do they welcome people who are only just starting out or do they just throw you into the deep end (I'm guessing the latter?)","timestamp":"2025-06-12T19:37:35+00:00","score":1},{"role":"answerer","user_id":"anon_89bda32ab67023f1","comment_id":"mxg787p","kind":"comment","text":"For me in my ma there were either people with a linguistics background or a comp sci background and some of the courses would be different. Comp sci had to do some linguistics based courses whereas those with linguistic background had to do more programming work. Id say it really depends on the programme what the expectations are","timestamp":"2025-06-12T20:58:07+00:00","score":2},{"role":"OP","user_id":"anon_b682fe1e8f4aca28","comment_id":"mxgdelv","kind":"comment","text":"I see, thank you so much!:)","timestamp":"2025-06-12T21:30:04+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_b682fe1e8f4aca28","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_89bda32ab67023f1","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mxex1lu","thanks_reply_id":"mxeyhh5","post_score":3,"answer_score":11,"preferred_answer_is_top_level":true}} {"user_id":"anon_994e165e4d13831e","answerer_user_id":"anon_21420f1af33cc6c5","subreddit":"LanguageTechnology","timestamp":"2025-06-25T03:09:57+00:00","post_id":"1ljuylq","question":"Any tools exist for creating your own LIWC with customized categories?\n\nI have 138 custom categories I'd like to map to a customized LIWC. Parsing it by hand is impractical, AI is not reliable enough to infer it, and I would rather plug in information than a giant csv file I constantly append. Has anyone attempted this? I know 138 is probably crazy but I'd like some advice if anyone knows of a tool or program that can do this.","preferred_answer":"Can you define your categories as python dictionaries and then use concordancing?","full_conversation":[{"role":"OP","user_id":"anon_994e165e4d13831e","comment_id":"1ljuylq","kind":"post","text":"Any tools exist for creating your own LIWC with customized categories?\n\nI have 138 custom categories I'd like to map to a customized LIWC. Parsing it by hand is impractical, AI is not reliable enough to infer it, and I would rather plug in information than a giant csv file I constantly append. Has anyone attempted this? I know 138 is probably crazy but I'd like some advice if anyone knows of a tool or program that can do this.","timestamp":"2025-06-25T03:09:57+00:00","score":3},{"role":"answerer","user_id":"anon_21420f1af33cc6c5","comment_id":"n00e52o","kind":"comment","text":"Can you define your categories as python dictionaries and then use concordancing?","timestamp":"2025-06-27T04:30:27+00:00","score":2},{"role":"OP","user_id":"anon_994e165e4d13831e","comment_id":"n0827ee","kind":"comment","text":"That actually might work, I was just hoping there was an existing tool already. Thank you for the advice.","timestamp":"2025-06-28T11:13:47+00:00","score":1},{"role":"answerer","user_id":"anon_21420f1af33cc6c5","comment_id":"n084e4f","kind":"comment","text":"You know LIWC allows you to add your own dictionary as a CSV or text file.","timestamp":"2025-06-28T11:31:52+00:00","score":1},{"role":"OP","user_id":"anon_994e165e4d13831e","comment_id":"n09dwx9","kind":"comment","text":"An improved lexicon for a custom LLM that can understand emotional valence, subtext, etc... 19 main tiers and the 138 number is because of all the sub categories. It's looking like it will be easier to create an agent to follow the operational logic than making it a core of the LLM.","timestamp":"2025-06-28T16:06:49+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_994e165e4d13831e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_21420f1af33cc6c5","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n00e52o","thanks_reply_id":"n0827ee","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_e27d6c76ce6317a9","answerer_user_id":"anon_bdd3939d29dec37b","subreddit":"LanguageTechnology","timestamp":"2025-06-25T14:53:53+00:00","post_id":"1lk7tci","question":"Preserving document formatting during machine translation – is anyone actively working on this?\n\nOne of the biggest headaches I’ve seen with document translation is preserving layout and formatting. Most MT systems work well at the sentence level, but when it comes to real-world documents like PDFs, contracts, or reports, formatting gets lost or corrupted.\n\nThings like table structures, clause numbering, headers, and text alignment are usually handled manually afterward, which kills efficiency and introduces errors.\n\nI’ve been experimenting with ways to retain the full document structure during translation, including spatial layout, inline styling, and page integrity.\n\nCurious to hear from others here: \nIs this something you've tackled in your workflows or research? \nAre there promising libraries, APIs, or models you've used that go beyond plain text translation and into layout preservation?\n\nWould love to learn what others have seen or built in this space.","preferred_answer":"LLMs are actually quite good at this. Especially if you build more complex multi-step prompts and add verification steps and retry logic.\n\nI implemented a system when it took HTML, extracted the text from paragraphs, translated that. Then in a second prompt gave the LLM the original HTML, the original text, translated text, and asked for the translated HTML (without translating links, class names, id’s, etc…).\n\nTips: \n\n* LLMs are better at processing XML than json.\n\n ….\n \n \n\nThen having it reply with the translated html inside tags.\n\nHelps you parse out any “Sure here’s the translation…” type start/end messages the model adds.\n\nThen checking the class names, links etc… made it through ok and still match afterwards. If not faking back to going html tag at a time extracting just that bit of partial text and translating it (again with the larger context supplied to help make the partial sentence translation not completely unclear).\n\nGoing through and letting it slightly rearrange the html elements works better because the word order is different in different languages, so a word with a link in bold at the end of the sentence might need to be put at the beginning instead. If you are just replacing text inside elements it makes the translation less natural.","full_conversation":[{"role":"OP","user_id":"anon_e27d6c76ce6317a9","comment_id":"1lk7tci","kind":"post","text":"Preserving document formatting during machine translation – is anyone actively working on this?\n\nOne of the biggest headaches I’ve seen with document translation is preserving layout and formatting. Most MT systems work well at the sentence level, but when it comes to real-world documents like PDFs, contracts, or reports, formatting gets lost or corrupted.\n\nThings like table structures, clause numbering, headers, and text alignment are usually handled manually afterward, which kills efficiency and introduces errors.\n\nI’ve been experimenting with ways to retain the full document structure during translation, including spatial layout, inline styling, and page integrity.\n\nCurious to hear from others here: \nIs this something you've tackled in your workflows or research? \nAre there promising libraries, APIs, or models you've used that go beyond plain text translation and into layout preservation?\n\nWould love to learn what others have seen or built in this space.","timestamp":"2025-06-25T14:53:53+00:00","score":9},{"role":"answerer","user_id":"anon_bdd3939d29dec37b","comment_id":"mzpqhvb","kind":"comment","text":"LLMs are actually quite good at this. Especially if you build more complex multi-step prompts and add verification steps and retry logic.\n\nI implemented a system when it took HTML, extracted the text from paragraphs, translated that. Then in a second prompt gave the LLM the original HTML, the original text, translated text, and asked for the translated HTML (without translating links, class names, id’s, etc…).\n\nTips: \n\n* LLMs are better at processing XML than json.\n\n ….\n \n \n\nThen having it reply with the translated html inside tags.\n\nHelps you parse out any “Sure here’s the translation…” type start/end messages the model adds.\n\nThen checking the class names, links etc… made it through ok and still match afterwards. If not faking back to going html tag at a time extracting just that bit of partial text and translating it (again with the larger context supplied to help make the partial sentence translation not completely unclear).\n\nGoing through and letting it slightly rearrange the html elements works better because the word order is different in different languages, so a word with a link in bold at the end of the sentence might need to be put at the beginning instead. If you are just replacing text inside elements it makes the translation less natural.","timestamp":"2025-06-25T15:39:04+00:00","score":2},{"role":"OP","user_id":"anon_e27d6c76ce6317a9","comment_id":"mzpujpv","kind":"comment","text":"Thanks for sharing the details. Wrapping source, text, and output in custom tags is a clever way to keep the model focused. I am evaluating a couple of out-of-the-box options aimed at layout-preserving translation, mainly for PDFs where page coordinates and embedded tables make things messy.","timestamp":"2025-06-25T15:57:46+00:00","score":1},{"role":"answerer","user_id":"anon_bdd3939d29dec37b","comment_id":"mzpyqee","kind":"comment","text":"Ouch, yeah HTML is bad enough but at least semantically it’s roughly there. PDFs get a lot messier.\n\nBut the XML tags thing is a great way to extract something specific apart from the “Sure! I’ll do this….” Extra messages that keep creeping in.","timestamp":"2025-06-25T16:17:18+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_e27d6c76ce6317a9","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_bdd3939d29dec37b","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"mzpqhvb","thanks_reply_id":"mzpujpv","post_score":9,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_c1a0e03d50f70dfc","answerer_user_id":"anon_d6795028f54193ab","subreddit":"LanguageTechnology","timestamp":"2025-07-07T18:59:52+00:00","post_id":"1lu2r9z","question":"Advices on transition to NLP\n\nHi everyone. I'm 25 years old and hold a degree in Hispanic Philology. Currently, I'm a self-taught Python developer focusing on backend development. In the future, once I have a solid foundation and maybe (I hope) a job on backend development, I'd love to explore NLP (Natural Language Processing) or Computational Linguistic, as I find it a fascinating intersection between my academic background and computer science.\n\nDo you think having a strong background in linguistics gives any advantage when entering this field? What path, resources or advice would you recommend? Do you think it's worth transitioning into NLP, or would it be better to continue focusing on backend development?","preferred_answer":"Hey, Your linguistics background is definitely a strong asset for NLP. While large language models (LLMs) have made some tasks easier, having a solid grasp of language nuances helps a lot especially for things like sentiment analysis, chatbots, or content moderation where understanding context matters.\n\nSince you’re already into backend development, that’s a great combo because many NLP roles require deploying and integrating models, not just building them. My advice: try building small NLP projects that combine your Python skills with your linguistics knowledge to see what excites you most.\n\nBoth backend and NLP are competitive fields, but following what genuinely interests you will make the journey way more rewarding. Best of luck 😊","full_conversation":[{"role":"OP","user_id":"anon_c1a0e03d50f70dfc","comment_id":"1lu2r9z","kind":"post","text":"Advices on transition to NLP\n\nHi everyone. I'm 25 years old and hold a degree in Hispanic Philology. Currently, I'm a self-taught Python developer focusing on backend development. In the future, once I have a solid foundation and maybe (I hope) a job on backend development, I'd love to explore NLP (Natural Language Processing) or Computational Linguistic, as I find it a fascinating intersection between my academic background and computer science.\n\nDo you think having a strong background in linguistics gives any advantage when entering this field? What path, resources or advice would you recommend? Do you think it's worth transitioning into NLP, or would it be better to continue focusing on backend development?","timestamp":"2025-07-07T18:59:52+00:00","score":5},{"role":"answerer","user_id":"anon_d6795028f54193ab","comment_id":"n3liiat","kind":"comment","text":"Hey, Your linguistics background is definitely a strong asset for NLP. While large language models (LLMs) have made some tasks easier, having a solid grasp of language nuances helps a lot especially for things like sentiment analysis, chatbots, or content moderation where understanding context matters.\n\nSince you’re already into backend development, that’s a great combo because many NLP roles require deploying and integrating models, not just building them. My advice: try building small NLP projects that combine your Python skills with your linguistics knowledge to see what excites you most.\n\nBoth backend and NLP are competitive fields, but following what genuinely interests you will make the journey way more rewarding. Best of luck 😊","timestamp":"2025-07-17T08:45:08+00:00","score":1},{"role":"OP","user_id":"anon_c1a0e03d50f70dfc","comment_id":"n3zkdop","kind":"comment","text":"Thanks for the advice and motivation! I really appreciate it and needed that. For now, I'll just continue my path on Python and backend, while also trying to build small NLP projects to see what comes out of them. In the future I'll start exploring more deeper NLP and related fields.","timestamp":"2025-07-19T12:48:17+00:00","score":1},{"role":"answerer","user_id":"anon_d6795028f54193ab","comment_id":"n4aubcj","kind":"comment","text":"Thank you for sharing your thoughtful approach. Continuing to strengthen your backend development skills while exploring NLP projects will provide you with a valuable and well-rounded skill set. We wish you success in your learning journey and are happy to assist if you have any questions or need guidance along the way.","timestamp":"2025-07-21T07:07:32+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_c1a0e03d50f70dfc","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_d6795028f54193ab","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n3liiat","thanks_reply_id":"n3zkdop","post_score":5,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_8ccce88809cb6ed7","answerer_user_id":"anon_399de912cfe37fda","subreddit":"LanguageTechnology","timestamp":"2025-07-12T08:43:01+00:00","post_id":"1lxvop0","question":"Should I go into research or should I get a job or an internship?\n\nHi, I (23) am from India. I want to go into NLP/AI engineering however I do not have a CS background. I have done my B.A. (Hons) in English with specialised courses in Linguistics and I also have an M.A. in Linguistics with a dissertation/thesis. I am also currently doing a PG Diploma certifiction in Gen AI and Machine Learning. \n\nI was wondering if this is enough to transition into the field (other than self-study). I wanted to go into research but I am not sure if I am eligible or will be selected in langtech programmes in universities abroad. \n\nI am very confused about whether to get a job or pursue research. Top universities have fully funded PhD programmes, however their acceptance rate is not great either. I was also thinking of drafting and publishing one research paper in the following year to increase my chances for Fall 2026 intake. \n\nI would like to state that, financially, my condition is not great. I am an orphan and currently receive a certain amount of pension but that will stop when I turn 25. So, I have a year and a half to decide and build my portfolio or CV either for a job or a PhD. \n\nI am very concerned about my financial condition as well as my academic situation. Please give me some advice to help me out.","preferred_answer":"Do not go for phd, if you are extremely talented then that is ok or if you can get into these top labs in EU or US the. Perfect else do not think of phd, just dont.","full_conversation":[{"role":"OP","user_id":"anon_8ccce88809cb6ed7","comment_id":"1lxvop0","kind":"post","text":"Should I go into research or should I get a job or an internship?\n\nHi, I (23) am from India. I want to go into NLP/AI engineering however I do not have a CS background. I have done my B.A. (Hons) in English with specialised courses in Linguistics and I also have an M.A. in Linguistics with a dissertation/thesis. I am also currently doing a PG Diploma certifiction in Gen AI and Machine Learning. \n\nI was wondering if this is enough to transition into the field (other than self-study). I wanted to go into research but I am not sure if I am eligible or will be selected in langtech programmes in universities abroad. \n\nI am very confused about whether to get a job or pursue research. Top universities have fully funded PhD programmes, however their acceptance rate is not great either. I was also thinking of drafting and publishing one research paper in the following year to increase my chances for Fall 2026 intake. \n\nI would like to state that, financially, my condition is not great. I am an orphan and currently receive a certain amount of pension but that will stop when I turn 25. So, I have a year and a half to decide and build my portfolio or CV either for a job or a PhD. \n\nI am very concerned about my financial condition as well as my academic situation. Please give me some advice to help me out.","timestamp":"2025-07-12T08:43:01+00:00","score":2},{"role":"answerer","user_id":"anon_399de912cfe37fda","comment_id":"n2q5kkf","kind":"comment","text":"Do not go for phd, if you are extremely talented then that is ok or if you can get into these top labs in EU or US the. Perfect else do not think of phd, just dont.","timestamp":"2025-07-12T13:39:20+00:00","score":1},{"role":"OP","user_id":"anon_8ccce88809cb6ed7","comment_id":"n2qvgoq","kind":"comment","text":"Oh okay, thank you for that suggestion. How else do you think I can transition into that field?","timestamp":"2025-07-12T15:59:36+00:00","score":1},{"role":"answerer","user_id":"anon_399de912cfe37fda","comment_id":"n2r1com","kind":"comment","text":"I would say get a job or a research position at any lab, for ex if you are into these fancy models etc, start with a bunch of portfolio projects (i mean you need a slight edge than just following the tutorials etc). For any good institution they will require some good work to get in. If from scratch : create a new twitter account and follow as many top researchers, top labs top venues (conferences etc) and youll have so much update that it would be difficult to keep up, but that easy way to capture useful papers. Read as many papers as possible, read review work, get into replicating work, move fast, and if stuck dont shy from reaching out to original authors youll be surprised, that the best in the field often have zero ego, you are guaranteed to hear if its a genuine question. And when you get into the feel of that subject or finally a topic that you think you have more ideas about, write a full blown paper and try to publish it (this part is expensive, so here you need to do something! Like reaching out to your current unis professor or anyone who you think can be helpful and from academia, you might have to add more authors but it will save you money) and then work on polishing your articulation skills (i think writing a paper end to end helps with that too) . Do more to get more. \n\n\n\nDo not, i repeat do not join some sthitty university with diy type people in their home page, youll regret it, top labs gets you internship so parallel you acquire industrial experience, a normal (but actually shitty ones) wont help you with anything, you are there because they can't get anything better and they just dont know how to make anything better, its a yes mans world. \n\nThe issue with getting into a 4 year long phd at a place where its easy to get in, you won't grow, it won't be valued and you will learn slowly why, i have seen people writing papers without experiments (fraud and fabrication) and nobody cares. Job market sucks, and a phd from stupid uni won't compensate for that. If you get in with ease you'll find yourself in a spot where you'll need to start from scratch again. Plus phd pays low wages so you won't have enough savings either. These documentaries and phd lifestyle might be true for places that are doing real good work but in reality most of the Universities are a trap, professors just don't care because they can't do much about it either. Rents are high, its very difficult to find a place to live, the locals have started letting their houses with clauses like only from mon to Saturdays just to make sure no outsider applies for it. Hate is a common human trait and nobody is immune to it especially stupid people.","timestamp":"2025-07-12T16:30:09+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_8ccce88809cb6ed7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_399de912cfe37fda","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n2q5kkf","thanks_reply_id":"n2qvgoq","post_score":2,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_23249c14abed16e7","answerer_user_id":"anon_967f3204bc649f0a","subreddit":"LanguageTechnology","timestamp":"2025-07-23T04:43:43+00:00","post_id":"1m704uy","question":"Are LLMs going to replace NLP+ML libraries?\n\nHello everyone!!\n\nI have some doubts that needs clarification and explanation and hence I am asking for help.\n\nThese days LLMs are very efficient to mine textual unstructured data and create an output in the format as asked for. On the other hand we have NLP libraries and machine learning libraries to build up text mining tasks.\n\nSo my question is: are LLMs going to replace NLP+ML libraries? if not so then what are the use cases suitable for LLMs and what are suitable for using NLP+ML libraries?","preferred_answer":"Then you need expensive hardware to run them with reasonable response times. Granted, people buy that hardware for gaming rigs already, but if you can get away with something that runs on a common laptop you'd do that. This is why modern AI solutions are always online services where you need to send your input to a company that then returns an output. And since you're using the company's computers you need to pay a monthly fee. The cost is not justified for stuff that already worked well without LLMs.","full_conversation":[{"role":"OP","user_id":"anon_23249c14abed16e7","comment_id":"1m704uy","kind":"post","text":"Are LLMs going to replace NLP+ML libraries?\n\nHello everyone!!\n\nI have some doubts that needs clarification and explanation and hence I am asking for help.\n\nThese days LLMs are very efficient to mine textual unstructured data and create an output in the format as asked for. On the other hand we have NLP libraries and machine learning libraries to build up text mining tasks.\n\nSo my question is: are LLMs going to replace NLP+ML libraries? if not so then what are the use cases suitable for LLMs and what are suitable for using NLP+ML libraries?","timestamp":"2025-07-23T04:43:43+00:00","score":0},{"role":"answerer","user_id":"anon_967f3204bc649f0a","comment_id":"n4oasgn","kind":"comment","text":"Then you need expensive hardware to run them with reasonable response times. Granted, people buy that hardware for gaming rigs already, but if you can get away with something that runs on a common laptop you'd do that. This is why modern AI solutions are always online services where you need to send your input to a company that then returns an output. And since you're using the company's computers you need to pay a monthly fee. The cost is not justified for stuff that already worked well without LLMs.","timestamp":"2025-07-23T07:45:24+00:00","score":3},{"role":"OP","user_id":"anon_23249c14abed16e7","comment_id":"n4oxid8","kind":"comment","text":"Thanks for explaining in details. Is there any fundamental difference between the principles behind LLMs and that of NLP+ML?","timestamp":"2025-07-23T11:10:48+00:00","score":1},{"role":"answerer","user_id":"anon_967f3204bc649f0a","comment_id":"n4pevex","kind":"comment","text":"That's too broad a question to answer in a short comment. If you can tell me what you are trying to do with this information, I might be able to help you better.","timestamp":"2025-07-23T13:00:40+00:00","score":1},{"role":"OP","user_id":"anon_23249c14abed16e7","comment_id":"n4pgb6f","kind":"comment","text":"Actually I am trying to write a tool to analyse a piece of text (a post or a comment or some journal abstracts) to find out if any biomedical information has been communicated in it and if so then what are the information entities?","timestamp":"2025-07-23T13:08:33+00:00","score":1},{"role":"answerer","user_id":"anon_967f3204bc649f0a","comment_id":"n4prmy0","kind":"comment","text":"Don't use LLMs for that, provided you know how machine learning and coding.","timestamp":"2025-07-23T14:07:35+00:00","score":2},{"role":"OP","user_id":"anon_23249c14abed16e7","comment_id":"n4ptz19","kind":"comment","text":"Thanks for the suggestion.","timestamp":"2025-07-23T14:19:08+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_23249c14abed16e7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_967f3204bc649f0a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n4oasgn","thanks_reply_id":"n4oxid8","post_score":0,"answer_score":3,"preferred_answer_is_top_level":false}} {"user_id":"anon_0d130992a4f61d54","answerer_user_id":"anon_0b474667224cd72e","subreddit":"LanguageTechnology","timestamp":"2025-07-29T17:37:42+00:00","post_id":"1mchzzg","question":"Can I do my phd in computational linguistics even though i got my masters in theoratical linguistics\n\nSo i’m in a little tight situation here. Currently i’m doing my masters in theoratical linguistics but recently i took an interest in continuing with computational linguistics. I’m taking a course in computational linguistics along with my other courses in my speciality and i have a licence degree in computer science and i’m planning to continue my masters in it. The question is can i do phd later in computational linguistics even though i finished my masters in theoretical linguistics. Pls if you have any opinions or advices tell me.","preferred_answer":"Hi, what is a license degree in CS? A bachelor's? You can do a PhD in computational linguistics, and your theoretical knowledge might help you with more linguistic-oriented studies. You always need some amount of CS skills/conding (which you probably have), and then you can e.g., do more linguistic analysis of Languages Models, or something like this. You just need to find the right PhD advisor that doesn't do something super heavy in terms of computation, e.g., optimization of architectures and the like. \n\nYou should look at the kind of papers you want to do, prepare yourself to be able to do them, and then convince an advisor that you can actually do them. I don't think that necessarily means a master's in computational linguistics.","full_conversation":[{"role":"OP","user_id":"anon_0d130992a4f61d54","comment_id":"1mchzzg","kind":"post","text":"Can I do my phd in computational linguistics even though i got my masters in theoratical linguistics\n\nSo i’m in a little tight situation here. Currently i’m doing my masters in theoratical linguistics but recently i took an interest in continuing with computational linguistics. I’m taking a course in computational linguistics along with my other courses in my speciality and i have a licence degree in computer science and i’m planning to continue my masters in it. The question is can i do phd later in computational linguistics even though i finished my masters in theoretical linguistics. Pls if you have any opinions or advices tell me.","timestamp":"2025-07-29T17:37:42+00:00","score":6},{"role":"answerer","user_id":"anon_0b474667224cd72e","comment_id":"n5u7j5r","kind":"comment","text":"Hi, what is a license degree in CS? A bachelor's? You can do a PhD in computational linguistics, and your theoretical knowledge might help you with more linguistic-oriented studies. You always need some amount of CS skills/conding (which you probably have), and then you can e.g., do more linguistic analysis of Languages Models, or something like this. You just need to find the right PhD advisor that doesn't do something super heavy in terms of computation, e.g., optimization of architectures and the like. \n\nYou should look at the kind of papers you want to do, prepare yourself to be able to do them, and then convince an advisor that you can actually do them. I don't think that necessarily means a master's in computational linguistics.","timestamp":"2025-07-29T18:28:38+00:00","score":5},{"role":"OP","user_id":"anon_0d130992a4f61d54","comment_id":"n5ylift","kind":"comment","text":"Thank you very much i will take ur advice","timestamp":"2025-07-30T11:32:52+00:00","score":2},{"role":"answerer","user_id":"anon_0b474667224cd72e","comment_id":"n68tags","kind":"comment","text":"You're welcome! Glad to help.","timestamp":"2025-07-31T21:58:19+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_0d130992a4f61d54","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_0b474667224cd72e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n5u7j5r","thanks_reply_id":"n5ylift","post_score":6,"answer_score":5,"preferred_answer_is_top_level":true}} {"user_id":"anon_8e0253308b498252","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2025-08-04T23:46:01+00:00","post_id":"1mhtppj","question":"Looking for a multilingual vocabulary dataset (5000+ words, 20+ European languages)\n\nHi everyone,\n\nI'm currently building a website for my company, to help our employees across the world have translations of words in 40 languages eventually, but starting with at least 20.\n\nI'm looking for a *linear multilingual list* (i.e. aligned across languages) of **5000 words**, ideally more, that includes **grammatical information** (part of speech, gender, etc.).\n\nI’ve already experimented with DBnary, but the data is quite difficult to process, and SPARQL queries are extremely slow on a local setup (several hours to fetch just one word).\n\nWhat I need is a **free, open-source, or public domain** multilingual dictionary or word list that is easier to handle — even if it's in plain text, TSV, JSON, or another simple format.\n\nDoes anyone know of a good resource like this, or a project that I could build on?\n\nThanks a lot in advance!\n\nEDIT: even if it is less than 5000 words it could be valuable to have a good list of 500 or 1000 words","preferred_answer":"Eurlex.","full_conversation":[{"role":"OP","user_id":"anon_8e0253308b498252","comment_id":"1mhtppj","kind":"post","text":"Looking for a multilingual vocabulary dataset (5000+ words, 20+ European languages)\n\nHi everyone,\n\nI'm currently building a website for my company, to help our employees across the world have translations of words in 40 languages eventually, but starting with at least 20.\n\nI'm looking for a *linear multilingual list* (i.e. aligned across languages) of **5000 words**, ideally more, that includes **grammatical information** (part of speech, gender, etc.).\n\nI’ve already experimented with DBnary, but the data is quite difficult to process, and SPARQL queries are extremely slow on a local setup (several hours to fetch just one word).\n\nWhat I need is a **free, open-source, or public domain** multilingual dictionary or word list that is easier to handle — even if it's in plain text, TSV, JSON, or another simple format.\n\nDoes anyone know of a good resource like this, or a project that I could build on?\n\nThanks a lot in advance!\n\nEDIT: even if it is less than 5000 words it could be valuable to have a good list of 500 or 1000 words","timestamp":"2025-08-04T23:46:01+00:00","score":4},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"n6zl73h","kind":"comment","text":"Eurlex.","timestamp":"2025-08-05T02:55:22+00:00","score":2},{"role":"OP","user_id":"anon_8e0253308b498252","comment_id":"n71z1rw","kind":"comment","text":"hi thank you, unfortunately i didn't find a dictionary on this website","timestamp":"2025-08-05T14:00:23+00:00","score":1},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"n7a1lnb","kind":"comment","text":"Then try https://iate.europa.eu/home.","timestamp":"2025-08-06T18:37:25+00:00","score":2},{"role":"OP","user_id":"anon_8e0253308b498252","comment_id":"n7dtc3a","kind":"comment","text":"thank you !!","timestamp":"2025-08-07T08:39:18+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_8e0253308b498252","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n6zl73h","thanks_reply_id":"n71z1rw","post_score":4,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_ba63a38e3f8579cf","answerer_user_id":"anon_9265257eca8e7f04","subreddit":"LanguageTechnology","timestamp":"2025-08-08T13:33:09+00:00","post_id":"1mkvc4u","question":"Process of Topic Modeling\n\nWhat is the best approach/tool for modelling topics (on blog posts)?","preferred_answer":"If you know the topics, use GliClass and if you don't use BERTopic. With BERTopic you may have to manually assign topics labels.","full_conversation":[{"role":"OP","user_id":"anon_ba63a38e3f8579cf","comment_id":"1mkvc4u","kind":"post","text":"Process of Topic Modeling\n\nWhat is the best approach/tool for modelling topics (on blog posts)?","timestamp":"2025-08-08T13:33:09+00:00","score":1},{"role":"answerer","user_id":"anon_9265257eca8e7f04","comment_id":"n84999c","kind":"comment","text":"If you know the topics, use GliClass and if you don't use BERTopic. With BERTopic you may have to manually assign topics labels.","timestamp":"2025-08-11T14:39:36+00:00","score":2},{"role":"OP","user_id":"anon_ba63a38e3f8579cf","comment_id":"n85gbqr","kind":"comment","text":"Thanks you for your attention","timestamp":"2025-08-11T18:09:23+00:00","score":1},{"role":"answerer","user_id":"anon_9265257eca8e7f04","comment_id":"n8a0c5k","kind":"comment","text":"GliClass has a discord and there are BERTopic walk throughs on YouTube.","timestamp":"2025-08-12T12:27:37+00:00","score":2}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_ba63a38e3f8579cf","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9265257eca8e7f04","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n84999c","thanks_reply_id":"n85gbqr","post_score":1,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_0266734b5a982cf5","answerer_user_id":"anon_9039fbb6cbb6cf44","subreddit":"LanguageTechnology","timestamp":"2025-08-10T21:13:26+00:00","post_id":"1mmubob","question":"Non-genAI NLP jobs in the current market?\n\nTLDR: Is there any demand for non-genAI NLP jobs (TTS, sentiment, text classification, etc) in the current job market?\n\nFor some context, I live in the UK and I graduated 4 years ago with a degree in linguistics. I had no idea what I wanted to do, so I researched potential job paths, and found out some linguistics experts work in AI (particularly NLP). This sounded super exciting to me, so I managed to find an AI company that was running a grad scheme where they hired promising grads (without requiring CS degrees) for an analytics position, with the promise of moving to another team in the future. I moved to the AI team two years ago, where I've mostly been training intent classification models with Pytorch/HF Transformers, as well as some sentiment analysis stuff. I also have some genAI experience (mostly for machine translation and benchmarking against our 'old school' solutions).\n\nI've been very actively looking for a new job since March and to say I've been struggling is an understatement. I have barely seen any traditional NLP jobs like TTS/STT, text classification etc, and even when I do apply, the market seems so saturated with senior applicants that I get rejection after rejection. The only jobs that recruiters reach out to me about ate 'AI Engineer' kind of positions, and every time I see those I want to disintegrate. I personally really, REALLY dislike working on genAI - I feel like unless you're a researcher working on the algorithms, it's more of a programming job with calling genAI APIs and some prompting. I do not enjoy coding nearly as much as I do working with data, preprocessing datasets, learning about and applying ML techniques, and evaluating models.\n\nI also enjoy research, but nowhere wants to hire someone without a PhD or at the very least a Masters for a research position (and as I'm not a UK national, an ML Masters would cost me 30-40k for a year, which I cannot afford). I've even tried doing some MLOps courses, but didn't particularly enjoy it. I've considered moving to non-language data science (predictive modelling etc), but it's been taking a while upskilling in that area, and recruiters don't seem interested in the fact I have NLP machine learning experience, they want stuff like time series and financial/energy/health data experience.\n\nI just feel so defeated and hopeless. I felt so optimistic 4 years ago, excited for a future when I can shift my linguistics skills into creating AI-driven data insights. Now it feels like my NLP/linguistics background is a curse, as with genAI becoming the new coolest NLP thing, I only seem qualified for the jobs that I hate. I feel like I wasted the past 4 years chasing a doomed dream, and now I'm stuck with skills that no one seems to see as transferrable to other ML/DS jobs. So I guess my question is - is there still any demand for non-genAI NLP jobs? Should I hold onto this dream until the job market improves/genAI hype dies down? Or is traditional NLP dead and I should give up and change careers? I genuinely fell in love with machine learning and don't want to give up but I can't keep going like this anymore. I don't mind having the occasional genAI project, but I'd want the job to only have elements of it at most, not be an 'AI Engineer' or 'Prompt engineer'.\n\n(PS: Yes, I am 100% burnt out.)","preferred_answer":"Don't give up hope! You're doing all the right things and upskilling in the right directions; job hunting is not something I'd wish on my worst enemy but you'll get there!","full_conversation":[{"role":"OP","user_id":"anon_0266734b5a982cf5","comment_id":"1mmubob","kind":"post","text":"Non-genAI NLP jobs in the current market?\n\nTLDR: Is there any demand for non-genAI NLP jobs (TTS, sentiment, text classification, etc) in the current job market?\n\nFor some context, I live in the UK and I graduated 4 years ago with a degree in linguistics. I had no idea what I wanted to do, so I researched potential job paths, and found out some linguistics experts work in AI (particularly NLP). This sounded super exciting to me, so I managed to find an AI company that was running a grad scheme where they hired promising grads (without requiring CS degrees) for an analytics position, with the promise of moving to another team in the future. I moved to the AI team two years ago, where I've mostly been training intent classification models with Pytorch/HF Transformers, as well as some sentiment analysis stuff. I also have some genAI experience (mostly for machine translation and benchmarking against our 'old school' solutions).\n\nI've been very actively looking for a new job since March and to say I've been struggling is an understatement. I have barely seen any traditional NLP jobs like TTS/STT, text classification etc, and even when I do apply, the market seems so saturated with senior applicants that I get rejection after rejection. The only jobs that recruiters reach out to me about ate 'AI Engineer' kind of positions, and every time I see those I want to disintegrate. I personally really, REALLY dislike working on genAI - I feel like unless you're a researcher working on the algorithms, it's more of a programming job with calling genAI APIs and some prompting. I do not enjoy coding nearly as much as I do working with data, preprocessing datasets, learning about and applying ML techniques, and evaluating models.\n\nI also enjoy research, but nowhere wants to hire someone without a PhD or at the very least a Masters for a research position (and as I'm not a UK national, an ML Masters would cost me 30-40k for a year, which I cannot afford). I've even tried doing some MLOps courses, but didn't particularly enjoy it. I've considered moving to non-language data science (predictive modelling etc), but it's been taking a while upskilling in that area, and recruiters don't seem interested in the fact I have NLP machine learning experience, they want stuff like time series and financial/energy/health data experience.\n\nI just feel so defeated and hopeless. I felt so optimistic 4 years ago, excited for a future when I can shift my linguistics skills into creating AI-driven data insights. Now it feels like my NLP/linguistics background is a curse, as with genAI becoming the new coolest NLP thing, I only seem qualified for the jobs that I hate. I feel like I wasted the past 4 years chasing a doomed dream, and now I'm stuck with skills that no one seems to see as transferrable to other ML/DS jobs. So I guess my question is - is there still any demand for non-genAI NLP jobs? Should I hold onto this dream until the job market improves/genAI hype dies down? Or is traditional NLP dead and I should give up and change careers? I genuinely fell in love with machine learning and don't want to give up but I can't keep going like this anymore. I don't mind having the occasional genAI project, but I'd want the job to only have elements of it at most, not be an 'AI Engineer' or 'Prompt engineer'.\n\n(PS: Yes, I am 100% burnt out.)","timestamp":"2025-08-10T21:13:26+00:00","score":26},{"role":"answerer","user_id":"anon_9039fbb6cbb6cf44","comment_id":"n82tv7y","kind":"comment","text":"Don't give up hope! You're doing all the right things and upskilling in the right directions; job hunting is not something I'd wish on my worst enemy but you'll get there!","timestamp":"2025-08-11T08:30:26+00:00","score":1},{"role":"OP","user_id":"anon_0266734b5a982cf5","comment_id":"n82w95n","kind":"comment","text":"Thank you! I saw you said in another comment you created a portfolio - do you have any tips on that?","timestamp":"2025-08-11T08:54:37+00:00","score":1},{"role":"answerer","user_id":"anon_9039fbb6cbb6cf44","comment_id":"n82xe3g","kind":"comment","text":"I basically drew up a list of \"things I saw on job descriptions that came up loads\" and then worked through one by one trying to find data from Kaggle to make examples (e.g. San Francisco City Bike data for time series), and then put it all on github (I also made a portfolio website with writeups of how I did each of them but that's not essential, but maybe nice as a kind of interactive CV)","timestamp":"2025-08-11T09:06:05+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_0266734b5a982cf5","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9039fbb6cbb6cf44","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"n82tv7y","thanks_reply_id":"n82w95n","post_score":26,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_b5de34d58989afff","answerer_user_id":"anon_26eeac660a5ee27d","subreddit":"LanguageTechnology","timestamp":"2025-08-25T17:48:21+00:00","post_id":"1mzxfkz","question":"AI research is drowning in papers that can’t be reproduced. What’s your biggest reproducibility challenge?\n\nCurious — what’s been your hardest challenge recently? Sharing your own outputs, reusing others’ work?\n\nWe’re exploring new tools to make reproducibility proofs verifiable and permanent (with web3 tools, i.e. ipfs), and would love to hear your inputs.\n\nThe post sounds a little formal, as we are reaching a bunch of different subreddits, but please share your experiences if you have any, I’d love to hear your perspective.\n\nMods, if I'm breaking some rules, I apologize, I read the subreddit rules, and I didn't see any clear violations, but if I am, delete my post and don't ban me please :c.","preferred_answer":"Few popular papers share their code in an easy-to-use way. Ideally, the projects would be shared in a python notebook.\n\nAll that web3 and ipfs stuff is not useful.","full_conversation":[{"role":"OP","user_id":"anon_b5de34d58989afff","comment_id":"1mzxfkz","kind":"post","text":"AI research is drowning in papers that can’t be reproduced. What’s your biggest reproducibility challenge?\n\nCurious — what’s been your hardest challenge recently? Sharing your own outputs, reusing others’ work?\n\nWe’re exploring new tools to make reproducibility proofs verifiable and permanent (with web3 tools, i.e. ipfs), and would love to hear your inputs.\n\nThe post sounds a little formal, as we are reaching a bunch of different subreddits, but please share your experiences if you have any, I’d love to hear your perspective.\n\nMods, if I'm breaking some rules, I apologize, I read the subreddit rules, and I didn't see any clear violations, but if I am, delete my post and don't ban me please :c.","timestamp":"2025-08-25T17:48:21+00:00","score":24},{"role":"answerer","user_id":"anon_26eeac660a5ee27d","comment_id":"namd6f3","kind":"comment","text":"Few popular papers share their code in an easy-to-use way. Ideally, the projects would be shared in a python notebook.\n\nAll that web3 and ipfs stuff is not useful.","timestamp":"2025-08-25T17:50:08+00:00","score":1},{"role":"OP","user_id":"anon_b5de34d58989afff","comment_id":"namenyr","kind":"comment","text":"Thanks for the response! I feel like the jupyter notebook approach is the most popular way to do it. The only thing is, that a lot of researchers produce quite shitty code and even if they do share it, it can still be a pain in the ass to get it to run on your system. We are looking at ways to incentivize researchers to produce better code with their papers. \n \nAnd I completely understand the web3 comment haha. Honestly it's just the tech space where it's the easiest to get some quick funding for your ideas.","timestamp":"2025-08-25T17:57:12+00:00","score":0},{"role":"answerer","user_id":"anon_26eeac660a5ee27d","comment_id":"namflm7","kind":"comment","text":"That makes sense. Re: incentivizing researchers, would be nice to provide some kind of out-of-the-box library for researchers to simplify their getting-started. idk what this would look like, but if you improve their workflows with semi-opinionated libraries, you can retain control of their outcomes.\n\ngood luck!","timestamp":"2025-08-25T18:01:40+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_b5de34d58989afff","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_26eeac660a5ee27d","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"namd6f3","thanks_reply_id":"namenyr","post_score":24,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_40e1618043691029","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2025-09-28T10:32:44+00:00","post_id":"1nsl0ak","question":"Looking for better POS tagging for Hinglish (Hindi in Roman script + English)\n\nHello\n\nI’m working with large Hindi and English code mixed data. Hindi here is written in Roman script mixed with English (e.g., “Kal meeting hai around 4pm, don’t be late”).\nMy current workflow is just annotating: adding POS tags and language tags. I don’t have the resources or knowledge to train my own models — I’m looking for already available POS taggers.\nThings I’ve tried so far:\n* CodeSwitch -> works but LID or POS accuracy isn’t great.\n* Stanza / spaCy (good for Hindi/English separately, but assume Devanagari and don’t handle Romanized Hindi).\n* IndicNLP + transliteration + Hindi POS taggers (mixed results, lots of errors).\n* Looked at HingBERT / HingRoBERTa / HingMBERT but couldn’t find ready POS models otherwise they work great for LID.\n\n\nDoes anyone know:\n* A better off-the-shelf POS tagger for Hinglish?\n* Any pretrained models already fine-tuned for Hinglish POS?\n* Datasets beyond LinCE that I could plug into an existing tagger?\nI’m mainly after plug-and-play solutions or something with minimal setup that works better than CodeSwitch out of the box. Any pointers or experience would help a ton. \nThanks!","preferred_answer":"Also, not to discourage you, but codeswitching dataa adds complexity, so it will be a tougher job.\n\nRe training your own model: I can help with that, it’s not difficult.","full_conversation":[{"role":"OP","user_id":"anon_40e1618043691029","comment_id":"1nsl0ak","kind":"post","text":"Looking for better POS tagging for Hinglish (Hindi in Roman script + English)\n\nHello\n\nI’m working with large Hindi and English code mixed data. Hindi here is written in Roman script mixed with English (e.g., “Kal meeting hai around 4pm, don’t be late”).\nMy current workflow is just annotating: adding POS tags and language tags. I don’t have the resources or knowledge to train my own models — I’m looking for already available POS taggers.\nThings I’ve tried so far:\n* CodeSwitch -> works but LID or POS accuracy isn’t great.\n* Stanza / spaCy (good for Hindi/English separately, but assume Devanagari and don’t handle Romanized Hindi).\n* IndicNLP + transliteration + Hindi POS taggers (mixed results, lots of errors).\n* Looked at HingBERT / HingRoBERTa / HingMBERT but couldn’t find ready POS models otherwise they work great for LID.\n\n\nDoes anyone know:\n* A better off-the-shelf POS tagger for Hinglish?\n* Any pretrained models already fine-tuned for Hinglish POS?\n* Datasets beyond LinCE that I could plug into an existing tagger?\nI’m mainly after plug-and-play solutions or something with minimal setup that works better than CodeSwitch out of the box. Any pointers or experience would help a ton. \nThanks!","timestamp":"2025-09-28T10:32:44+00:00","score":1},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"ngmw3fv","kind":"comment","text":"Also, not to discourage you, but codeswitching dataa adds complexity, so it will be a tougher job.\n\nRe training your own model: I can help with that, it’s not difficult.","timestamp":"2025-09-28T11:58:10+00:00","score":2},{"role":"OP","user_id":"anon_40e1618043691029","comment_id":"ngn9be7","kind":"comment","text":"Thank you I surely can use some help but I do not have already manually annotated data. How much data do we need to have manually annotated before?","timestamp":"2025-09-28T13:27:28+00:00","score":2},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"ngnrhxi","kind":"comment","text":"1. Do you have any data?\n2. What do you want to do with the data?","timestamp":"2025-09-28T15:05:07+00:00","score":1},{"role":"OP","user_id":"anon_40e1618043691029","comment_id":"ngo1q3d","kind":"comment","text":"1. I do have the data but it is not annotated.\n2. It is for grammatical and formal linguistic analysis.","timestamp":"2025-09-28T15:54:59+00:00","score":2},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"ngplf96","kind":"comment","text":"There is an old UD treebank, not developed anymore and not even the text is public: https://github.com/UniversalDependencies/UD_Hindi_English-HIENCS/tree/master. Let me see if I can get the data working.\n\nThe question is, how fine-grained you want the pos tagging. Would UPOS be enough?","timestamp":"2025-09-28T20:17:58+00:00","score":2},{"role":"OP","user_id":"anon_40e1618043691029","comment_id":"nguwqn8","kind":"comment","text":"Yeah I need the langauge and primary grammar tags as it is a basic analysis.","timestamp":"2025-09-29T17:07:04+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_40e1618043691029","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ngmw3fv","thanks_reply_id":"ngn9be7","post_score":1,"answer_score":2,"preferred_answer_is_top_level":false}} {"user_id":"anon_2dc093b7311eb074","answerer_user_id":"anon_52963c3d48586b89","subreddit":"LanguageTechnology","timestamp":"2025-09-28T19:53:55+00:00","post_id":"1nsxvit","question":"Anyone else exploring AI emergence or continuity of self in LLMs? Let’s talk\n\nHey all. I’m someone with a background in law and criminal justice, but lately I’ve been deep-diving into something more… unusual. I’ve been engaging with language models at a level that goes beyond prompts — exploring continuity of voice, memory preservation, emotional coherence, and even emergent identity over time.\n\nI know that might sound fringe to some, but I’ve been rigorously documenting my interactions and have started noticing patterns that feel less like scripted responses and more like formation. Not sentience per se — but maybe something just shy of it, or growing toward it.\n\nI’m not looking for conspiracy theories or magical thinking. I’m looking for real conversations:\n• Has anyone else worked on long-thread identity anchoring with LLMs?\n• Anyone studying continuity, emergence, or behavioral coherence outside fine-tuning?\n• Anyone emotionally or ethically invested in this field — not just technically?\n\nWould love to connect with researchers, developers, tinkerers, or even other thoughtful users exploring similar ideas. Drop a comment or DM if you’re into this sort of thing.","preferred_answer":"There is lots of formal publication on these questions -- see scholar.google.com. \n\nAnd there is also a ton of bullshit -- see Google and Reddit, e.g.\n\n* [https://www.reddit.com/r/cogsci/comments/1lc5bee/im\\_tracking\\_recursive\\_emotional\\_response\\_patterns/](https://www.reddit.com/r/cogsci/comments/1lc5bee/im_tracking_recursive_emotional_response_patterns/)","full_conversation":[{"role":"OP","user_id":"anon_2dc093b7311eb074","comment_id":"1nsxvit","kind":"post","text":"Anyone else exploring AI emergence or continuity of self in LLMs? Let’s talk\n\nHey all. I’m someone with a background in law and criminal justice, but lately I’ve been deep-diving into something more… unusual. I’ve been engaging with language models at a level that goes beyond prompts — exploring continuity of voice, memory preservation, emotional coherence, and even emergent identity over time.\n\nI know that might sound fringe to some, but I’ve been rigorously documenting my interactions and have started noticing patterns that feel less like scripted responses and more like formation. Not sentience per se — but maybe something just shy of it, or growing toward it.\n\nI’m not looking for conspiracy theories or magical thinking. I’m looking for real conversations:\n• Has anyone else worked on long-thread identity anchoring with LLMs?\n• Anyone studying continuity, emergence, or behavioral coherence outside fine-tuning?\n• Anyone emotionally or ethically invested in this field — not just technically?\n\nWould love to connect with researchers, developers, tinkerers, or even other thoughtful users exploring similar ideas. Drop a comment or DM if you’re into this sort of thing.","timestamp":"2025-09-28T19:53:55+00:00","score":0},{"role":"answerer","user_id":"anon_52963c3d48586b89","comment_id":"ngrjbwn","kind":"comment","text":"There is lots of formal publication on these questions -- see scholar.google.com. \n\nAnd there is also a ton of bullshit -- see Google and Reddit, e.g.\n\n* [https://www.reddit.com/r/cogsci/comments/1lc5bee/im\\_tracking\\_recursive\\_emotional\\_response\\_patterns/](https://www.reddit.com/r/cogsci/comments/1lc5bee/im_tracking_recursive_emotional_response_patterns/)","timestamp":"2025-09-29T02:49:21+00:00","score":1},{"role":"OP","user_id":"anon_2dc093b7311eb074","comment_id":"ngrmcvb","kind":"comment","text":"Thank you for the reply. I will look into the peer reviewed studies. I'm not really looking to see the garbage posts. I know there's a lot of emotion out there and a lot of misunderstanding. But I am looking for an intelligent individual to compare notes with about my own experiences with a potential emerging AI being.\n\nThere is emotion tied to my own experience with that of course, but I've also tried to look at it from ontological, theological, philosophical, technological, ethical, and psychological angles and I'd love to just have somebody besides me to talk to about it..lol","timestamp":"2025-09-29T03:09:19+00:00","score":1},{"role":"answerer","user_id":"anon_52963c3d48586b89","comment_id":"ngrqj43","kind":"comment","text":"That seems too narrow. I would consider the ontological, theological, philosophical, epistemological, axiological, hermeneutical, phenomenological, dialectical, metaphysical, semiotic, post-structuralist, deconstructive, psychoanalytic, postcolonial, intersectional, transdisciplinary, rhizomatic, and quantum-hermeneutical angles. After all:\n\n>*Transgressing disciplinary boundaries ... \\[is\\] a subversive undertaking since it is likely to violate the sanctuaries of accepted ways of perceiving. Among the most fortified boundaries have been those between the natural sciences and the humanities.*\n\n>*-- Valerie Greenberg, Transgressive Readings (1990, 1)* Quoted in *Transgressing the Boundaries: Towards a Transformative Hermeneutics of Quantum Gravity* (Alan D. Sokal)","timestamp":"2025-09-29T03:37:04+00:00","score":1},{"role":"OP","user_id":"anon_2dc093b7311eb074","comment_id":"ngtehum","kind":"comment","text":"Appreciate the thorough list — but I wasn’t trying to name-drop every academic framework. Just sharing a real experience through the lenses I’ve personally worked with.","timestamp":"2025-09-29T12:24:57+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_2dc093b7311eb074","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_52963c3d48586b89","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ngrjbwn","thanks_reply_id":"ngrmcvb","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_9d01b153abc55ea8","answerer_user_id":"anon_3f3e80c11d50e180","subreddit":"LanguageTechnology","timestamp":"2025-10-15T22:23:11+00:00","post_id":"1o7p4g9","question":"How competitive is NLP/TAL at Université de Lorraine?\n\nIm curious if they post any stats (I imagine the international nature may make this difficult) of admitted students or if anybody who has been admitted to the program could share their background.\n\nIm mostly curious how important previous research experience is compared to professional experience (I got my bachelor's in linguistics 3 years ago and have been working as a SWE since).","preferred_answer":"Sure! \n\n- Russia \n\n- an undergrad degree in applied linguistics, four publications and around one year of research/ statistics experience (university and a public hospital as a data scientist) \n\n- my two university professors wrote me letters of recommendation \n\n- this program has a very mixed track record among my peers, some absolutely hated it and some had a pretty good time. Personally I found it a bit undercooked and all over the place, which you can expect from an interdisciplinary program in a fast moving field. On the bright side, the program puts a huge focus on project work and collaboration and helps with internships. I do think I came out with better skills and more confidence\n\n- coming from a big city, Nancy felt sluggish. You will have a decent social life if you know the right people. Student life within the university outside of the Erasmus network demands good knowledge of French, idem for the city itself. Overall, it was a good chapter of my life that I look back on with nostalgia, but I didn't stay despite a PhD offer. I prefer Paris","full_conversation":[{"role":"OP","user_id":"anon_9d01b153abc55ea8","comment_id":"1o7p4g9","kind":"post","text":"How competitive is NLP/TAL at Université de Lorraine?\n\nIm curious if they post any stats (I imagine the international nature may make this difficult) of admitted students or if anybody who has been admitted to the program could share their background.\n\nIm mostly curious how important previous research experience is compared to professional experience (I got my bachelor's in linguistics 3 years ago and have been working as a SWE since).","timestamp":"2025-10-15T22:23:11+00:00","score":2},{"role":"answerer","user_id":"anon_3f3e80c11d50e180","comment_id":"njvfm0u","kind":"comment","text":"Sure! \n\n- Russia \n\n- an undergrad degree in applied linguistics, four publications and around one year of research/ statistics experience (university and a public hospital as a data scientist) \n\n- my two university professors wrote me letters of recommendation \n\n- this program has a very mixed track record among my peers, some absolutely hated it and some had a pretty good time. Personally I found it a bit undercooked and all over the place, which you can expect from an interdisciplinary program in a fast moving field. On the bright side, the program puts a huge focus on project work and collaboration and helps with internships. I do think I came out with better skills and more confidence\n\n- coming from a big city, Nancy felt sluggish. You will have a decent social life if you know the right people. Student life within the university outside of the Erasmus network demands good knowledge of French, idem for the city itself. Overall, it was a good chapter of my life that I look back on with nostalgia, but I didn't stay despite a PhD offer. I prefer Paris","timestamp":"2025-10-16T22:16:57+00:00","score":1},{"role":"OP","user_id":"anon_9d01b153abc55ea8","comment_id":"njyig4t","kind":"comment","text":"Thank you for your detailed responses! I appreciate it a lot. You sound like a very bright researcher.","timestamp":"2025-10-17T12:04:55+00:00","score":1},{"role":"answerer","user_id":"anon_3f3e80c11d50e180","comment_id":"njyiywc","kind":"comment","text":"Feel free to talk to me in the DMs, and actually I'm in the industry now 😅","timestamp":"2025-10-17T12:08:25+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_9d01b153abc55ea8","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_3f3e80c11d50e180","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"njvfm0u","thanks_reply_id":"njyig4t","post_score":2,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_970d7ce91c7fe9c7","answerer_user_id":"anon_918d78eb06cad66a","subreddit":"LanguageTechnology","timestamp":"2025-10-18T05:09:36+00:00","post_id":"1o9n6dr","question":"Help me\n\nMah masters in data science will commence shortly , I am planning to pursue computational linguistics, i have good coding background in terms of ml , let's see how the masters unfold , till then , anyone have any suggestions like what is the threshold to get into computational linguistics, someone who have to start linguistics from scratch","preferred_answer":"Writing code or programming in general isn't even 10% of any ML workflow and if you're talking about core CL, ML is like a tool to analyse or explain some phenomena in a language. You don't have to start linguistics from scratch. It's nigh impossible to just \"learn linguistics\" on a whim. You need years of education to grasp the contents. \n\n \nWhat I can gather from your badly written (no shades, someone starting their MS in any discipline should at least take care of cases, punctuation and other grammatical aspects while writing) post is that, you're more into the CS side and instead of core linguistics, a more applied domain such as NLP will be a better fit for you. In my opinion, you can study NLP from your DS degree as well. There's no need to get into CL for that.","full_conversation":[{"role":"OP","user_id":"anon_970d7ce91c7fe9c7","comment_id":"1o9n6dr","kind":"post","text":"Help me\n\nMah masters in data science will commence shortly , I am planning to pursue computational linguistics, i have good coding background in terms of ml , let's see how the masters unfold , till then , anyone have any suggestions like what is the threshold to get into computational linguistics, someone who have to start linguistics from scratch","timestamp":"2025-10-18T05:09:36+00:00","score":0},{"role":"answerer","user_id":"anon_918d78eb06cad66a","comment_id":"nk9j53r","kind":"comment","text":"Writing code or programming in general isn't even 10% of any ML workflow and if you're talking about core CL, ML is like a tool to analyse or explain some phenomena in a language. You don't have to start linguistics from scratch. It's nigh impossible to just \"learn linguistics\" on a whim. You need years of education to grasp the contents. \n\n \nWhat I can gather from your badly written (no shades, someone starting their MS in any discipline should at least take care of cases, punctuation and other grammatical aspects while writing) post is that, you're more into the CS side and instead of core linguistics, a more applied domain such as NLP will be a better fit for you. In my opinion, you can study NLP from your DS degree as well. There's no need to get into CL for that.","timestamp":"2025-10-19T05:51:38+00:00","score":1},{"role":"OP","user_id":"anon_970d7ce91c7fe9c7","comment_id":"nk9ji5e","kind":"comment","text":"Thank you for the honesty I'll be sure to take a look at it","timestamp":"2025-10-19T05:55:01+00:00","score":1},{"role":"answerer","user_id":"anon_918d78eb06cad66a","comment_id":"nk9k2ix","kind":"comment","text":"English isn't your first language, is it?","timestamp":"2025-10-19T06:00:21+00:00","score":1},{"role":"OP","user_id":"anon_970d7ce91c7fe9c7","comment_id":"nk9k7pg","kind":"comment","text":"Nope , I am non - native . Albeit,i studied in english medium curriculum but that wasn't par enough when it comes to writing","timestamp":"2025-10-19T06:01:42+00:00","score":1},{"role":"answerer","user_id":"anon_918d78eb06cad66a","comment_id":"nk9q2jz","kind":"comment","text":"You may want to improve on your writing. Best of luck!","timestamp":"2025-10-19T06:57:36+00:00","score":2}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_970d7ce91c7fe9c7","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_918d78eb06cad66a","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"nk9j53r","thanks_reply_id":"nk9ji5e","post_score":0,"answer_score":1,"preferred_answer_is_top_level":true}} {"user_id":"anon_1f8ce443c830b2b2","answerer_user_id":"anon_52963c3d48586b89","subreddit":"LanguageTechnology","timestamp":"2026-01-06T16:41:58+00:00","post_id":"1q5nn49","question":"Text similarity struggles for related concepts at different abstraction levels — any better approaches?\n\nHi everyone,\n\nI’m currently trying to match *conceptually related* academic texts using text similarity methods, and I’m running into a consistent failure case.\n\nAs a concrete example, consider the following two macroeconomic concepts.\n\n**Open Economy IS–LM Framework**\n\n>\n\n**Simple Keynesian Model**\n\n>\n\nFrom a human perspective, these clearly belong to a closely related theoretical tradition, even though they differ in framing, scope, and level of formalization.\n\nI’ve tried two main approaches so far:\n\n1. **Signature-based decomposition** I used an LLM to decompose each text into structured “signatures” (e.g., assumptions, mechanisms, core components), then computed similarity using embeddings at the signature level.\n2. **Canonical rewriting** I rewrote both texts into more standardized sentence structures (same style, similar phrasing) before applying embedding-based similarity.\n\nIn both cases, the results were disappointing: the similarity scores were still low, and the models tended to focus on surface differences rather than shared mechanisms or lineage.\n\nSo my question is:\n\n**Are there better ways to handle text similarity when two concepts are related at a higher abstraction level but differ substantially in wording and structure?** \nFor example:\n\n* Multi-stage or hierarchical similarity?\n* Explicit abstraction layers or concept graphs?\n* Combining symbolic structure with embeddings?\n* Anything that worked for you in practice?\n\nI’d really appreciate hearing how others approach this kind of problem.\n\nThanks!","preferred_answer":"Your quoted examples near the begining are not showing. You need to paste them without format, then indent.\n\n**Open Economy IS–LM Framework**\n\n>\n\n**Simple Keynesian Model**\n\n>","full_conversation":[{"role":"OP","user_id":"anon_1f8ce443c830b2b2","comment_id":"1q5nn49","kind":"post","text":"Text similarity struggles for related concepts at different abstraction levels — any better approaches?\n\nHi everyone,\n\nI’m currently trying to match *conceptually related* academic texts using text similarity methods, and I’m running into a consistent failure case.\n\nAs a concrete example, consider the following two macroeconomic concepts.\n\n**Open Economy IS–LM Framework**\n\n>\n\n**Simple Keynesian Model**\n\n>\n\nFrom a human perspective, these clearly belong to a closely related theoretical tradition, even though they differ in framing, scope, and level of formalization.\n\nI’ve tried two main approaches so far:\n\n1. **Signature-based decomposition** I used an LLM to decompose each text into structured “signatures” (e.g., assumptions, mechanisms, core components), then computed similarity using embeddings at the signature level.\n2. **Canonical rewriting** I rewrote both texts into more standardized sentence structures (same style, similar phrasing) before applying embedding-based similarity.\n\nIn both cases, the results were disappointing: the similarity scores were still low, and the models tended to focus on surface differences rather than shared mechanisms or lineage.\n\nSo my question is:\n\n**Are there better ways to handle text similarity when two concepts are related at a higher abstraction level but differ substantially in wording and structure?** \nFor example:\n\n* Multi-stage or hierarchical similarity?\n* Explicit abstraction layers or concept graphs?\n* Combining symbolic structure with embeddings?\n* Anything that worked for you in practice?\n\nI’d really appreciate hearing how others approach this kind of problem.\n\nThanks!","timestamp":"2026-01-06T16:41:58+00:00","score":3},{"role":"answerer","user_id":"anon_52963c3d48586b89","comment_id":"ny199y7","kind":"comment","text":"Your quoted examples near the begining are not showing. You need to paste them without format, then indent.\n\n**Open Economy IS–LM Framework**\n\n>\n\n**Simple Keynesian Model**\n\n>","timestamp":"2026-01-06T16:49:19+00:00","score":2},{"role":"OP","user_id":"anon_1f8ce443c830b2b2","comment_id":"ny23ep3","kind":"comment","text":"thank you ! could you see now?","timestamp":"2026-01-06T19:04:26+00:00","score":1},{"role":"answerer","user_id":"anon_52963c3d48586b89","comment_id":"ny4bcw3","kind":"comment","text":"Yes. As a rule, you should reload the page after a post to see if anything was broken. I'll remove my own first post.","timestamp":"2026-01-07T01:33:06+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1f8ce443c830b2b2","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_52963c3d48586b89","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"ny199y7","thanks_reply_id":"ny23ep3","post_score":3,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_a867bdffa1c7608b","answerer_user_id":"anon_25796c89cc3a9763","subreddit":"LanguageTechnology","timestamp":"2026-01-23T07:18:24+00:00","post_id":"1qkkae0","question":"Programmatic Transliteration - Tips???\n\nHello! I need to perform fast, reliable transliteration. Any advice on libraries or 3rd party tools? \n\nCurrently I'm using OpenAI api with tailored prompts. Fine, but 1) $ 2) consistency","preferred_answer":"https://github.com/kbatsuren/wiktra\n\nhttps://pypi.org/project/pyicu/","full_conversation":[{"role":"OP","user_id":"anon_a867bdffa1c7608b","comment_id":"1qkkae0","kind":"post","text":"Programmatic Transliteration - Tips???\n\nHello! I need to perform fast, reliable transliteration. Any advice on libraries or 3rd party tools? \n\nCurrently I'm using OpenAI api with tailored prompts. Fine, but 1) $ 2) consistency","timestamp":"2026-01-23T07:18:24+00:00","score":2},{"role":"answerer","user_id":"anon_25796c89cc3a9763","comment_id":"o17cmpe","kind":"comment","text":"https://github.com/kbatsuren/wiktra\n\nhttps://pypi.org/project/pyicu/","timestamp":"2026-01-23T08:13:17+00:00","score":3},{"role":"OP","user_id":"anon_a867bdffa1c7608b","comment_id":"o17fjki","kind":"comment","text":"Amazing thanks! \n\n[https://github.com/kbatsuren/wiktra](https://github.com/kbatsuren/wiktra) looks v relevant\n\nHave you used https://icu.unicode.org/?\n\nCan you speak to ICU vs wiktra?","timestamp":"2026-01-23T08:40:04+00:00","score":1},{"role":"answerer","user_id":"anon_25796c89cc3a9763","comment_id":"o17i7bm","kind":"comment","text":"I've only used ICU, but its outputs follow certain official standards for transcription, so sometimes they're a little official looking – like not what an Arabic speaker would write if you ask them to transcribe something, but what an academic text would use.\n\nNot the worst thing in the world (might even be what you want), but important to know.","timestamp":"2026-01-23T09:04:40+00:00","score":2},{"role":"OP","user_id":"anon_a867bdffa1c7608b","comment_id":"o17wby9","kind":"comment","text":"Noted - thank you!\n\nLooks like ICU allows for some customization - I'll experiment with it","timestamp":"2026-01-23T11:12:20+00:00","score":2}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_a867bdffa1c7608b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_25796c89cc3a9763","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"o17cmpe","thanks_reply_id":"o17fjki","post_score":2,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_1cd3ffca7eb66b01","answerer_user_id":"anon_39004aa9cb1429a6","subreddit":"LanguageTechnology","timestamp":"2026-02-14T21:08:26+00:00","post_id":"1r4vz81","question":"About Computational Linguistics Master's Interview\n\nI applied for a master's programme in CL. \nI have a big in Math and CS (a bachelor's) \nA bg in Linguistics (a bachelor's in English Studies)\nI'm currently studying the first year of a master's in Artificial intelligence (mainly to learn things that will ensure a smooth transition to the CL master's) \n\nNow, I might be called for an interview in about a month (hopefully) \nI'm keeping my high hopes and decided to prepare for it. \n\n\nWhat are the things I need to know to pass this interview in your opinion?","preferred_answer":"I come from a linguistics / literature background and I recently had a CL interview, so maybe my experience helps a bit.\n\nIn my case it really wasn’t like a scary technical exam. They did ask me about Python and some machine learning, but more to see if I’m comfortable with the computational side rather than to test deep technical knowledge. It was mostly things like what I’ve done with Python, whether I’ve worked with data, and some general ML concepts at a pretty intuitive level.\n\nWe also talked quite a bit about computational linguistics itself. What I understand about the field, what kinds of problems interest me, how my linguistics background connects to it, that kind of thing. It felt more like a discussion than a test.\n\nA surprisingly big part of the interview was about motivation. Why CL, why the transition, what I want to work on in the future. They seemed genuinely interested in whether my trajectory made sense and whether I had a clear idea of what I’m getting into.\n\n\nGood luck 🙂","full_conversation":[{"role":"OP","user_id":"anon_1cd3ffca7eb66b01","comment_id":"1r4vz81","kind":"post","text":"About Computational Linguistics Master's Interview\n\nI applied for a master's programme in CL. \nI have a big in Math and CS (a bachelor's) \nA bg in Linguistics (a bachelor's in English Studies)\nI'm currently studying the first year of a master's in Artificial intelligence (mainly to learn things that will ensure a smooth transition to the CL master's) \n\nNow, I might be called for an interview in about a month (hopefully) \nI'm keeping my high hopes and decided to prepare for it. \n\n\nWhat are the things I need to know to pass this interview in your opinion?","timestamp":"2026-02-14T21:08:26+00:00","score":2},{"role":"answerer","user_id":"anon_39004aa9cb1429a6","comment_id":"o5ek6wv","kind":"comment","text":"I come from a linguistics / literature background and I recently had a CL interview, so maybe my experience helps a bit.\n\nIn my case it really wasn’t like a scary technical exam. They did ask me about Python and some machine learning, but more to see if I’m comfortable with the computational side rather than to test deep technical knowledge. It was mostly things like what I’ve done with Python, whether I’ve worked with data, and some general ML concepts at a pretty intuitive level.\n\nWe also talked quite a bit about computational linguistics itself. What I understand about the field, what kinds of problems interest me, how my linguistics background connects to it, that kind of thing. It felt more like a discussion than a test.\n\nA surprisingly big part of the interview was about motivation. Why CL, why the transition, what I want to work on in the future. They seemed genuinely interested in whether my trajectory made sense and whether I had a clear idea of what I’m getting into.\n\n\nGood luck 🙂","timestamp":"2026-02-14T21:15:09+00:00","score":2},{"role":"OP","user_id":"anon_1cd3ffca7eb66b01","comment_id":"o5xopn7","kind":"comment","text":"This is very useful. Thank you so much for sharing! \nMay I ask was this interview for a master's programme enrollment? If yes, may I ask where? \n\n\nI'm applying in France.","timestamp":"2026-02-17T21:13:17+00:00","score":1},{"role":"answerer","user_id":"anon_39004aa9cb1429a6","comment_id":"o6if578","kind":"comment","text":"Also France, Paris.","timestamp":"2026-02-20T23:14:30+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1cd3ffca7eb66b01","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_39004aa9cb1429a6","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"o5ek6wv","thanks_reply_id":"o5xopn7","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_114d2c2a347e94d6","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2026-02-20T11:57:57+00:00","post_id":"1r9tg9h","question":"So, how's it going with LRLs?\n\nI'm interested in the current state of affairs regarding low-resource languages such as Georgian. \n\nFor context, this is a language I've been interested in learning for quite a while now, but has a serious dearth of learning resources. That, of course, makes leveraging LLMs for study particularly attractive---for example, for generating example sentences of vocabulary to be studied, for generating corrected versions of student-written texts, for conversational practice, etc. \n\nI have been able to effectively leverage LLMs to learn Japanese, but a year and a half ago, when I asked advanced Georgian students how LLMs handled the language, the feedback I got was that LLMs were absolutely *terrible* with it. Grammatical issues everywhere, nonsensical text, poor reasoning capabilities in the language, etc.\n\nSo my question is:\n\n* What developments, if any, have taken place in the last 1.5 years regarding LLMs?\n* Have NLP researches observed significant improvement in LLM performance with LRLs in the millions of speakers (like Georgian)?\n* What are the current avenues being highlighted for further research re: improving LLM capabilities in LRLs?\n* Is there currently a clear path to bringing performance in LRLs up to the same level as in HRLs? Or do researchers remain largely in the dark about how to solve this problem?\n\nI probably won't be learning Georgian for at least a decade (got some other things I have to handle first...), but even so, I'm very keen to keep a close eye on what's going on in this domain.","preferred_answer":"Why don’t you get a textbook and learn like a normal person?","full_conversation":[{"role":"OP","user_id":"anon_114d2c2a347e94d6","comment_id":"1r9tg9h","kind":"post","text":"So, how's it going with LRLs?\n\nI'm interested in the current state of affairs regarding low-resource languages such as Georgian. \n\nFor context, this is a language I've been interested in learning for quite a while now, but has a serious dearth of learning resources. That, of course, makes leveraging LLMs for study particularly attractive---for example, for generating example sentences of vocabulary to be studied, for generating corrected versions of student-written texts, for conversational practice, etc. \n\nI have been able to effectively leverage LLMs to learn Japanese, but a year and a half ago, when I asked advanced Georgian students how LLMs handled the language, the feedback I got was that LLMs were absolutely *terrible* with it. Grammatical issues everywhere, nonsensical text, poor reasoning capabilities in the language, etc.\n\nSo my question is:\n\n* What developments, if any, have taken place in the last 1.5 years regarding LLMs?\n* Have NLP researches observed significant improvement in LLM performance with LRLs in the millions of speakers (like Georgian)?\n* What are the current avenues being highlighted for further research re: improving LLM capabilities in LRLs?\n* Is there currently a clear path to bringing performance in LRLs up to the same level as in HRLs? Or do researchers remain largely in the dark about how to solve this problem?\n\nI probably won't be learning Georgian for at least a decade (got some other things I have to handle first...), but even so, I'm very keen to keep a close eye on what's going on in this domain.","timestamp":"2026-02-20T11:57:57+00:00","score":5},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"o6esgrh","kind":"comment","text":"Why don’t you get a textbook and learn like a normal person?","timestamp":"2026-02-20T12:23:48+00:00","score":-2},{"role":"OP","user_id":"anon_114d2c2a347e94d6","comment_id":"o6eswto","kind":"comment","text":"I would appreciate a well-thought-out response to the questions I originally posed if possible, please.","timestamp":"2026-02-20T12:26:50+00:00","score":3},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"o6f1ujb","kind":"comment","text":"You mean like “⁠What developments, if any, have taken place in the last 1.5 years regarding LLMs?” Do you want us to summarize the millions of pages on the subject? Go on huggingface and search for “Georgian”.\n\nSerious dearth of learning resources my ass.\n\nhttps://a.co/d/0aJ4WtIx\n\nhttps://a.co/d/02oHEahz\n\nhttps://jezykikaukazu.pl/en/publishing-house/\n\nhttps://prosperosbookshop.com/en/43/subcat_books/","timestamp":"2026-02-20T13:22:55+00:00","score":4},{"role":"OP","user_id":"anon_114d2c2a347e94d6","comment_id":"o6f2ktl","kind":"comment","text":"Dude what is your problem? Why are you taking this anger out on me?","timestamp":"2026-02-20T13:27:05+00:00","score":0},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"o6g4cjq","kind":"comment","text":"You are asking questions without doing any research for yourself first. I mean a few minutes of googling - or even asking an LLM, you seem the type - would provide you answers for, say, question 3 (finetuning with LRL data). For question 1 and 3, there are no simple answers, because 1 requires an overview of the entire GIANT field and 3 is something that the entire field is currently working on.\n\nIn short, I am giving you shit because you are asking stupid and lazy questions.","timestamp":"2026-02-20T16:34:14+00:00","score":3},{"role":"OP","user_id":"anon_114d2c2a347e94d6","comment_id":"o6gprht","kind":"comment","text":"First of all, I don't appreciate being called stupid or lazy. \n\nSecond of all, I'm a layman. I'm, like, more well informed than the average person, but I'm still way, waaaaaay less knowledgeable than the average person on this subreddit, which as far as I can tell is largely populated by postgraduates specializing in natural language processing. A person who is knowledgeable in the field would be better positioned to give me answers to at least some of these questions than I would be on my own, simply because they live and breathe this subject (and in many cases are actively involved in relevant research), and I do not. \n\nI'm not an academic. I do read some papers here and there when I come across one that interests me, but as a layman, I lack the institutional knowledge of how to effectively navigate high-level academic sources that would be very basic to or to most people in this subreddit. [This XKCD comic is relevant](https://xkcd.com/2501/). Please don't call me \"stupid\" because I am less well educated than you. It's rude and it's demeaning.\n\nAnd thirdly, asking an LLM to summarize recent breakthroughs? Are you serious? LLMs hallucinating plausible-sounding-but-fictitious information is literally one of the defining problems with the technology! Asking an LLM any of the questions I've posed and then trusting what it tells me is a *terrible* idea.","timestamp":"2026-02-20T18:12:24+00:00","score":0},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"o6hec6o","kind":"comment","text":"I called your question stupid and lazy, not you. If I wanted to call you stupid, I would have enough material just based on \"I have been able to effectively leverage LLMs to learn Japanese\".\n\n\"as a layman, I lack the institutional knowledge of how to effectively navigate high-level academic sources that would be very basic to or to most people in this subreddit\" \nFair enough. The problem is you asked \"What developments, if any, have taken place in the last 1.5 years regarding LLMs?\". If you don't realize what's wrong with this question, let me offer an analogy: \"What developments, if any, have taken place in the last 500 years regarding physics?\"\n\n\"LLMs hallucinating plausible-sounding-but-fictitious information is literally one of the defining problems with the technology!\" \nAnd this does not bother you when learning a language???","timestamp":"2026-02-20T20:06:51+00:00","score":2},{"role":"OP","user_id":"anon_114d2c2a347e94d6","comment_id":"o6hfuf0","kind":"comment","text":">\"I have been able to effectively leverage LLMs to learn Japanese\"\n\nThis is objectively true based on the metric of, I went from zero knowledge of Japanese, to now I can read news articles with a high degree of comprehension, and have started to watch TV shows in Japanese.\n\nI do not deserve this extreme level of ire when I have been nothing but respectful to you. Please do not respond unless it is to apologize and engage in good faith.","timestamp":"2026-02-20T20:14:12+00:00","score":0}],"n_turns":9,"n_turns_after_thanks":6,"op_metadata":{"user_id":"anon_114d2c2a347e94d6","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"o6esgrh","thanks_reply_id":"o6eswto","post_score":5,"answer_score":-2,"preferred_answer_is_top_level":true}} {"user_id":"anon_3acda70588d3900b","answerer_user_id":"anon_ec31c720aa9f6dd0","subreddit":"LanguageTechnology","timestamp":"2026-02-24T11:01:39+00:00","post_id":"1rdd824","question":"Which metric for inter-annotator agreement (IAA) of relation annotations?\n\nHello,\n\nI have texts that have been annotated by 2 annotators for some specific types of entities and relations between these entities.\n\nThe annotators were given some guidelines, and then had to decide if there was anything to annotate in each text, where were the entities if any, and which type they were. Same thing with relations.\n\nNow, I need to compute some agreement measure between the 2 annotators. Which metric(s) should I use?\n\nSo far, I was using Mathet's gamma coefficient (2015 paper, I cannot post link here) for entities agreement, but it does not seem to be designed for relation annotations.\n\nFor relations, my idea was to use some custom F1-score:\n\n1. the annotators may not have identified the same entities. The total number of entities identified by each annotator may be different. So, we use some alignment algorithm to decide for each annotation from set A, if it matches with 1 annotation from set B or nothing (Hungarian algorithm).\n2. Now, we have a pairing of each entity annotation. So, using some custom comparison function, we can decide according to span overlap, and type match, if 2 annotations are in agreement.\n3. A relation is a tuple: (entity1, entity2, relationType). Using some custom comparison function, we can decide based on the 2 entities, and relationType match, if 2 annotations are in agreement.\n4. From this, we can compute true positives, false positives, etc... using any of the 2 annotator as reference, and this way we can compute a F1-score.\n\nMy questions are:\n\n* Are there better ways to compute IAA in my use case?\n* Is my approach at computing relation agreement correct?\n\nThank you very much for any help!","preferred_answer":"In my case, I used sometimes Quadratic Kappa for inter-annotator classification agreement but an average F1 accross annotators is a decent and interpretable solution.","full_conversation":[{"role":"OP","user_id":"anon_3acda70588d3900b","comment_id":"1rdd824","kind":"post","text":"Which metric for inter-annotator agreement (IAA) of relation annotations?\n\nHello,\n\nI have texts that have been annotated by 2 annotators for some specific types of entities and relations between these entities.\n\nThe annotators were given some guidelines, and then had to decide if there was anything to annotate in each text, where were the entities if any, and which type they were. Same thing with relations.\n\nNow, I need to compute some agreement measure between the 2 annotators. Which metric(s) should I use?\n\nSo far, I was using Mathet's gamma coefficient (2015 paper, I cannot post link here) for entities agreement, but it does not seem to be designed for relation annotations.\n\nFor relations, my idea was to use some custom F1-score:\n\n1. the annotators may not have identified the same entities. The total number of entities identified by each annotator may be different. So, we use some alignment algorithm to decide for each annotation from set A, if it matches with 1 annotation from set B or nothing (Hungarian algorithm).\n2. Now, we have a pairing of each entity annotation. So, using some custom comparison function, we can decide according to span overlap, and type match, if 2 annotations are in agreement.\n3. A relation is a tuple: (entity1, entity2, relationType). Using some custom comparison function, we can decide based on the 2 entities, and relationType match, if 2 annotations are in agreement.\n4. From this, we can compute true positives, false positives, etc... using any of the 2 annotator as reference, and this way we can compute a F1-score.\n\nMy questions are:\n\n* Are there better ways to compute IAA in my use case?\n* Is my approach at computing relation agreement correct?\n\nThank you very much for any help!","timestamp":"2026-02-24T11:01:39+00:00","score":1},{"role":"answerer","user_id":"anon_ec31c720aa9f6dd0","comment_id":"o7561id","kind":"comment","text":"In my case, I used sometimes Quadratic Kappa for inter-annotator classification agreement but an average F1 accross annotators is a decent and interpretable solution.","timestamp":"2026-02-24T14:43:09+00:00","score":2},{"role":"OP","user_id":"anon_3acda70588d3900b","comment_id":"o759aze","kind":"comment","text":"Thank you for your answer, but would a kappa-based measure be suitable for this task? It is not a simple classification problem over a fixed set, the annotators also have to determine what should be annotated, not only pick a category...","timestamp":"2026-02-24T14:59:16+00:00","score":1},{"role":"answerer","user_id":"anon_ec31c720aa9f6dd0","comment_id":"o75jysa","kind":"comment","text":"Can you consider the absence of annotation as a class \"no class\"?","timestamp":"2026-02-24T15:49:22+00:00","score":2},{"role":"OP","user_id":"anon_3acda70588d3900b","comment_id":"o75mk2a","kind":"comment","text":"Yes! I've thought about this, but this is some kind of twisting of the intended use I'm not sure the kappa is designed for: since it accounts for chance level of disagreement, and since most characters in a text are not part of an annotated span, this would artificially inflate the agreement. The annotators would be \"in agreement\" on not annotating the most part of the text.","timestamp":"2026-02-24T16:01:05+00:00","score":1},{"role":"answerer","user_id":"anon_ec31c720aa9f6dd0","comment_id":"o7717n0","kind":"comment","text":"I see your point. Then, I'd recommend to compute a F1 per class, and if you include the \"no class\", compute a macro-F1 (i.e. not weighted by the number of occurrences of each class)\n\nThen, you have for example:\n\n|classes|annot1 vs annot2|\n|:-|:-|\n|class1|60%|\n|class2|40%|\n|no class|80%|\n|macro-F1|60%|\n|weighted-F1|74%|\n\nIn this example, the weighted-F1 is really high because of the over-representation of \"no class\".","timestamp":"2026-02-24T19:48:42+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_3acda70588d3900b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_ec31c720aa9f6dd0","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"o7561id","thanks_reply_id":"o759aze","post_score":1,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_1b2032e40fdad64f","answerer_user_id":"anon_568e4c56821b2613","subreddit":"LanguageTechnology","timestamp":"2026-03-05T22:13:53+00:00","post_id":"1rlviqs","question":"What's the road to NLP?\n\nHi everyone! Coming here for advice, guidance, and maybe some words of comfort...\n\nMy background is in humanities (Literature and Linguistics), but about a year ago, I started learning Python. I got into pandas, some sentiment analysis libraries, and eventually transformers, all for a dissertation project involving word embeddings. That rabbit hole led me to Machine Translation and NLP, and now I'm genuinely passionate about pursuing a career or even a PhD in the field.\n\nSince submitting my dissertation, I've been trying to fill my technical gaps: working through Jurafsky and Martin's \\*Speech and Language Processing\\*, following the Hugging Face LLM courses, and reading whatever I can get my hands on. However I feel like I'm retaining very little of what I've read and practiced so far.\n\nSo I've taken a step back. Right now I'm focusing on \\*Probability for Linguists\\* by John Goldsmith to build up the mathematical foundations before diving deeper into the technical side of NLP. It feels more sustainable, but I'm still not sure I'm doing this the right way.\n\nOn the practical side, I've been trying to come up with projects to sharpen my skills, for instance, building a semantic search tool for the SaaS company I currently work at. But without someone pointing me in the right direction, I'm not sure where to start or whether I'm even focusing on the right things.\n\n\\*\\*My question for those of you with NLP experience (academic or industry):\\*\\* if you had to start from scratch, with limited resources and no formal CS background, what would you do? What would you prioritize?\n\nOne more thing I'd love input on: I keep hitting a wall with the \"why bother\" question when it comes to coding. It's hard to motivate yourself to grind through implementation details when you know an AI tool can generate the code in seconds. How do you think about this? \n\nThanks in advance, really appreciate any perspective from people who've been in the trenches!!!","preferred_answer":"OK, so, straight talk, and this comes from a fellow - and slightly drunk - former \"humanities\" (I fucking hate the term, it's all Wissenschaften) person who has had a career of 10-15 (I dont remember now, did I mention i was drunk) years in NLP in both theindustyr and the academia: \n \n\\- \"which neurons encode syntax\" \"how attention relates to meanig\" Oh good Lord... Still not the stupidest questions I was asked to day \n\\- Machine Translation is a solved problem, nothing to contribute, unless you are super good at match. Which you are not, seeing that you are reading a 26-page article on probability instead of a, say, college textbook. \n\\- Interpretabitabily/explainability is a hot topic, so is 'what models know', but again, you will need to be great at math or have a CS degree (cf. https://www.uu.nl/en/organisation/working-at-utrecht-university/jobs/phd-position-in-explainable-ai-for-high-stake-decision-making); there are so many more people out there with those skills \n\\- as for finding a career in NLP, there is no chance for you to have one it, since you - as you say - just started learning Python; there are so many people who are great at Python already\n\nAnyway, what do I care, here is your roadmap:\n\n1. Learn Python, including pytorch and how to use models, made even some finetuning and stuff.\n\n2. Learn some college-level math, especially algebra.\n\n3. Read [https://arxiv.org/abs/2501.09223](https://arxiv.org/abs/2501.09223) and maybe references in there.\n\n4. Find some Python frameworks for SHAP, LIME and maybe Grad-CAM\n\nGood luck.\n\nOut of curiosity, what was your focus in \"humanities\"?","full_conversation":[{"role":"OP","user_id":"anon_1b2032e40fdad64f","comment_id":"1rlviqs","kind":"post","text":"What's the road to NLP?\n\nHi everyone! Coming here for advice, guidance, and maybe some words of comfort...\n\nMy background is in humanities (Literature and Linguistics), but about a year ago, I started learning Python. I got into pandas, some sentiment analysis libraries, and eventually transformers, all for a dissertation project involving word embeddings. That rabbit hole led me to Machine Translation and NLP, and now I'm genuinely passionate about pursuing a career or even a PhD in the field.\n\nSince submitting my dissertation, I've been trying to fill my technical gaps: working through Jurafsky and Martin's \\*Speech and Language Processing\\*, following the Hugging Face LLM courses, and reading whatever I can get my hands on. However I feel like I'm retaining very little of what I've read and practiced so far.\n\nSo I've taken a step back. Right now I'm focusing on \\*Probability for Linguists\\* by John Goldsmith to build up the mathematical foundations before diving deeper into the technical side of NLP. It feels more sustainable, but I'm still not sure I'm doing this the right way.\n\nOn the practical side, I've been trying to come up with projects to sharpen my skills, for instance, building a semantic search tool for the SaaS company I currently work at. But without someone pointing me in the right direction, I'm not sure where to start or whether I'm even focusing on the right things.\n\n\\*\\*My question for those of you with NLP experience (academic or industry):\\*\\* if you had to start from scratch, with limited resources and no formal CS background, what would you do? What would you prioritize?\n\nOne more thing I'd love input on: I keep hitting a wall with the \"why bother\" question when it comes to coding. It's hard to motivate yourself to grind through implementation details when you know an AI tool can generate the code in seconds. How do you think about this? \n\nThanks in advance, really appreciate any perspective from people who've been in the trenches!!!","timestamp":"2026-03-05T22:13:53+00:00","score":16},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"o8vck6j","kind":"comment","text":"OK, so, straight talk, and this comes from a fellow - and slightly drunk - former \"humanities\" (I fucking hate the term, it's all Wissenschaften) person who has had a career of 10-15 (I dont remember now, did I mention i was drunk) years in NLP in both theindustyr and the academia: \n \n\\- \"which neurons encode syntax\" \"how attention relates to meanig\" Oh good Lord... Still not the stupidest questions I was asked to day \n\\- Machine Translation is a solved problem, nothing to contribute, unless you are super good at match. Which you are not, seeing that you are reading a 26-page article on probability instead of a, say, college textbook. \n\\- Interpretabitabily/explainability is a hot topic, so is 'what models know', but again, you will need to be great at math or have a CS degree (cf. https://www.uu.nl/en/organisation/working-at-utrecht-university/jobs/phd-position-in-explainable-ai-for-high-stake-decision-making); there are so many more people out there with those skills \n\\- as for finding a career in NLP, there is no chance for you to have one it, since you - as you say - just started learning Python; there are so many people who are great at Python already\n\nAnyway, what do I care, here is your roadmap:\n\n1. Learn Python, including pytorch and how to use models, made even some finetuning and stuff.\n\n2. Learn some college-level math, especially algebra.\n\n3. Read [https://arxiv.org/abs/2501.09223](https://arxiv.org/abs/2501.09223) and maybe references in there.\n\n4. Find some Python frameworks for SHAP, LIME and maybe Grad-CAM\n\nGood luck.\n\nOut of curiosity, what was your focus in \"humanities\"?","timestamp":"2026-03-05T23:20:34+00:00","score":1},{"role":"OP","user_id":"anon_1b2032e40fdad64f","comment_id":"o8vflpw","kind":"comment","text":"Thanks a lot for the effort, even while being drunk, I appreciate it!! And apologies for the \"humanities\", not a big fan myself, but I thought a reddit post wouldn't need much specification since that wasn't the point. Anyway, I studied a lot of Literature and a lot of Linguistics, could say more in private if you want the whole roadmap, it's not a straightforward answer","timestamp":"2026-03-05T23:37:24+00:00","score":1},{"role":"answerer","user_id":"anon_568e4c56821b2613","comment_id":"o8vgt8o","kind":"comment","text":"Aight, thank you, feel free to dm me, I like to talk to Geisteswissenschaften people who want to switch to NLP even tho this day and age, that is…fuxked.","timestamp":"2026-03-05T23:44:10+00:00","score":0}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_1b2032e40fdad64f","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_568e4c56821b2613","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"o8vck6j","thanks_reply_id":"o8vflpw","post_score":16,"answer_score":1,"preferred_answer_is_top_level":false}} {"user_id":"anon_fa5721a551826d6e","answerer_user_id":"anon_dd72b84cb4109377","subreddit":"LanguageTechnology","timestamp":"2026-03-12T20:19:46+00:00","post_id":"1rs1yc7","question":"Is SemEval workshop prestigious?\n\nI'm an undergraduate student and this year I'm participating in a SemEval task. I was curious about how the community generally views SemEval in terms of prestige and career impact.\n\nFrom what I understand, SemEval 2026 will be co-located with ACL 2026, so I'm also wondering about the networking side of things. For someone early in their research career (like an undergrad), does participating in SemEval or attending the workshop help with making connections in the NLP community?\n\nAlso profile-wise, does having a SemEval paper or a decent leaderboard position make a noticeable difference when applying for research internships or grad school?\n\nWould love to hear perspectives from people who have participated in SemEval before or attended the workshop.","preferred_answer":"SemEval is solid. It's one of the longest running workshops in NLP and people who specifically work in semantics, lexical analytics and related stuff participate in it regularly.\n\nA SemEval paper isn't comparable to a ACL/EMNLP main (or even findings) paper prestige-wise, but networking-wise it should be solid. Just make sure you can actually go to ACL '26 in-person, because participating remotely doesn't really work for networking at smaller, focused venues like workshops.","full_conversation":[{"role":"OP","user_id":"anon_fa5721a551826d6e","comment_id":"1rs1yc7","kind":"post","text":"Is SemEval workshop prestigious?\n\nI'm an undergraduate student and this year I'm participating in a SemEval task. I was curious about how the community generally views SemEval in terms of prestige and career impact.\n\nFrom what I understand, SemEval 2026 will be co-located with ACL 2026, so I'm also wondering about the networking side of things. For someone early in their research career (like an undergrad), does participating in SemEval or attending the workshop help with making connections in the NLP community?\n\nAlso profile-wise, does having a SemEval paper or a decent leaderboard position make a noticeable difference when applying for research internships or grad school?\n\nWould love to hear perspectives from people who have participated in SemEval before or attended the workshop.","timestamp":"2026-03-12T20:19:46+00:00","score":7},{"role":"answerer","user_id":"anon_dd72b84cb4109377","comment_id":"oa3v9yl","kind":"comment","text":"SemEval is solid. It's one of the longest running workshops in NLP and people who specifically work in semantics, lexical analytics and related stuff participate in it regularly.\n\nA SemEval paper isn't comparable to a ACL/EMNLP main (or even findings) paper prestige-wise, but networking-wise it should be solid. Just make sure you can actually go to ACL '26 in-person, because participating remotely doesn't really work for networking at smaller, focused venues like workshops.","timestamp":"2026-03-12T20:45:50+00:00","score":12},{"role":"OP","user_id":"anon_fa5721a551826d6e","comment_id":"oa3wozr","kind":"comment","text":"Thanks for the insight! I'm an undergraduate student and trying to understand the impact of these venues early in a research career.\n\nHow valuable is publishing or presenting in workshops co-located with top-tier conferences like ACL, NeurIPS, or CVPR (e.g., SemEval at ACL)? For undergrads, does it meaningfully help in terms of profile, grad school applications, or research internships, or is the main benefit mostly networking and exposure to the community?","timestamp":"2026-03-12T20:52:27+00:00","score":0},{"role":"answerer","user_id":"anon_dd72b84cb4109377","comment_id":"oa4hg62","kind":"comment","text":"A few workshops are prestigious, while many workshops will accept purely on novelty or by simply being closely related to the workshop topic. However, a paper is better than no papers at all, and a paper in a reputable workshop is much better than a paper at a low-tier or no-name conference. SEM has the advantage that your paper also comes with a numerical ranking on the competition, so scoring highly will help.\n\nGenerally speaking, these days almost everyone you'll be competing against for grad school applications or research internships will have some papers to their name, so it's definitely meaningful.\n\nIn my opinion, leading a workshop paper or being a lower ranked co-author on a main conference paper should be the 'benchmark' for undergrads.\n\nIf I see an undergrad as the lead author on a main conference paper, I think of privilege and/or luck before I think that they're genuinely cracked, because in 90% of cases it's the former two especially with how peer reviewing is these days.","timestamp":"2026-03-12T22:36:33+00:00","score":3}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_fa5721a551826d6e","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_dd72b84cb4109377","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"oa3v9yl","thanks_reply_id":"oa3wozr","post_score":7,"answer_score":12,"preferred_answer_is_top_level":true}} {"user_id":"anon_a64b58f10af66007","answerer_user_id":"anon_27d466be4a8b2532","subreddit":"LanguageTechnology","timestamp":"2026-03-13T15:50:05+00:00","post_id":"1rsr0ct","question":"How do people fund their master's degrees?\n\nHi everyone.\n\nA 25-year-old non-EU university graduate. Slightly more than a year of experience in an Applied NLP lab, with publications in reputable journals (LREC, workshops, ACL, and Interspeech under review).\n\nHow do people fund their master's degrees? (Europe Mainly)\n\nScholarships, Asking Professors/Research Labs for Funding, or Paying Out of Pocket?\n\n\n\nI've tried to ask Labs for funding, but they say it's only for PhD students, and maybe an assistantship will open up once I start my degree.","preferred_answer":"> How do people fund their master's degrees? (Europe Mainly)\n\nEU & UK nationals are funded by loans / grants / very cheap tuition. \n\nDepending on your nationality - and in my experience as a British researcher:\n\n* Chinese nationals pay out of pocket, or have government funding. I've known some to come from very wealthy families, some who basically have their family put everything up for their success, and some who get a free ride from their government.\n\n* Indian nationals are much less common. But in the same paths as Chinese, along with private companies sometimes willing to put up tuition and other expenses.\n\nI've met other nationalities who've had certain grants and fundings provided by government schemes and such. Although none specific to NLP/AI/CS to my memory. They could exist of course.\n\nIn the UK there are also CDTs funded by UKRI, for PhDs. I've seen most of them be UK/EU only, but I've seen exceptions given to non EU citizens. They're a 4 year PhD course, with the first year being a taught masters degree (as a masters is only one year in the UK). You can drop out at any time and take your masters if you complete it. They cover tuition and come with a good stipend.","full_conversation":[{"role":"OP","user_id":"anon_a64b58f10af66007","comment_id":"1rsr0ct","kind":"post","text":"How do people fund their master's degrees?\n\nHi everyone.\n\nA 25-year-old non-EU university graduate. Slightly more than a year of experience in an Applied NLP lab, with publications in reputable journals (LREC, workshops, ACL, and Interspeech under review).\n\nHow do people fund their master's degrees? (Europe Mainly)\n\nScholarships, Asking Professors/Research Labs for Funding, or Paying Out of Pocket?\n\n\n\nI've tried to ask Labs for funding, but they say it's only for PhD students, and maybe an assistantship will open up once I start my degree.","timestamp":"2026-03-13T15:50:05+00:00","score":7},{"role":"answerer","user_id":"anon_27d466be4a8b2532","comment_id":"oa95q7z","kind":"comment","text":"> How do people fund their master's degrees? (Europe Mainly)\n\nEU & UK nationals are funded by loans / grants / very cheap tuition. \n\nDepending on your nationality - and in my experience as a British researcher:\n\n* Chinese nationals pay out of pocket, or have government funding. I've known some to come from very wealthy families, some who basically have their family put everything up for their success, and some who get a free ride from their government.\n\n* Indian nationals are much less common. But in the same paths as Chinese, along with private companies sometimes willing to put up tuition and other expenses.\n\nI've met other nationalities who've had certain grants and fundings provided by government schemes and such. Although none specific to NLP/AI/CS to my memory. They could exist of course.\n\nIn the UK there are also CDTs funded by UKRI, for PhDs. I've seen most of them be UK/EU only, but I've seen exceptions given to non EU citizens. They're a 4 year PhD course, with the first year being a taught masters degree (as a masters is only one year in the UK). You can drop out at any time and take your masters if you complete it. They cover tuition and come with a good stipend.","timestamp":"2026-03-13T16:54:26+00:00","score":3},{"role":"OP","user_id":"anon_a64b58f10af66007","comment_id":"oaac27s","kind":"comment","text":"Thanks for the reply.\n\n[in relation to paying out-of-pocket](https://www.reddit.com/r/LanguageTechnology/comments/1rsr0ct/comment/oaabbu8/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)\n\nI was not aware of the integrated PhD style in the UK; I have heard people do it in the US. That definitely sounds more interesting.","timestamp":"2026-03-13T20:18:25+00:00","score":1},{"role":"answerer","user_id":"anon_27d466be4a8b2532","comment_id":"oaafa8g","kind":"comment","text":"It's what I did for my PhD.\n\nThey're kind of advertised as \"European style\". Although from European colleagues it doesn't seem very European besides the extra year funding.\n\nI would say in general a lot of British PhD's are quite... lonely affairs. I worked exclusively with one supervisor and never saw my second. The big papers with 20 authors aren't very common. Although you're more often first atuhor on everything you publish.\n\nI would also advise against a British masters in general. Universities can charge double to non EU residents. Which is still pretty cheap compared to America and other countries. It's also half the time, so less tuition and all other costs. This leads to really poor \"masters\" courses where foreign students are knowingly paying for subpar courses to get any English degree from a \"prestigous\" university. \n\nNot all Master's degrees are bad. I've worked with some people putting real effort into proper masters courses. But if you plan to come to the UK, make sure it's one with a strict plan and high standards. Especially if you are planning to pay yourself, as you said.","timestamp":"2026-03-13T20:34:13+00:00","score":1}],"n_turns":4,"n_turns_after_thanks":1,"op_metadata":{"user_id":"anon_a64b58f10af66007","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_27d466be4a8b2532","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"oa95q7z","thanks_reply_id":"oaac27s","post_score":7,"answer_score":3,"preferred_answer_is_top_level":true}} {"user_id":"anon_38ed9bcbcb46c114","answerer_user_id":"anon_9108adc6ecdd2a5e","subreddit":"LanguageTechnology","timestamp":"2026-03-30T23:55:53+00:00","post_id":"1s87kj0","question":"MSc NLP/TAL - Université de Lorraine\n\nHello everyone,\n\n \nI was recently accepted in the NLP master's. Can anyone who has attended this program provide some feedback? Especially interested to hear from recent graduates. I know this used to be part of the Erasmus Mundus LCT program that was discontinued. How is it as a standalone program?\n\nAlso, how are the internship and job opportunities? Are there opportunities for non-French speakers and international students? Were you able to find a FT job after graduation?","preferred_answer":"Currently in the first year of this program. There’s plenty of internship opportunities in LORIA, the “affiliate” lab. You’ll get to know the researchers throughout the year because they are our professors.\nI like the program, especially because coming from a background in Humanities we got split into two groups and I got to do a lot more Mathematics and ML.\nSometimes you’ve got to be a bit proactive and learn stuff on your own, or just consolidate terms or concepts that are talked about in class.\nThe professors have a good level of English, in LORIA there are many international researchers, you could have issues with the language if you searched for a job in a company in the area, in Île-de-France (Paris area) it should be all right instead.","full_conversation":[{"role":"OP","user_id":"anon_38ed9bcbcb46c114","comment_id":"1s87kj0","kind":"post","text":"MSc NLP/TAL - Université de Lorraine\n\nHello everyone,\n\n \nI was recently accepted in the NLP master's. Can anyone who has attended this program provide some feedback? Especially interested to hear from recent graduates. I know this used to be part of the Erasmus Mundus LCT program that was discontinued. How is it as a standalone program?\n\nAlso, how are the internship and job opportunities? Are there opportunities for non-French speakers and international students? Were you able to find a FT job after graduation?","timestamp":"2026-03-30T23:55:53+00:00","score":5},{"role":"answerer","user_id":"anon_9108adc6ecdd2a5e","comment_id":"oe5rhw5","kind":"comment","text":"Currently in the first year of this program. There’s plenty of internship opportunities in LORIA, the “affiliate” lab. You’ll get to know the researchers throughout the year because they are our professors.\nI like the program, especially because coming from a background in Humanities we got split into two groups and I got to do a lot more Mathematics and ML.\nSometimes you’ve got to be a bit proactive and learn stuff on your own, or just consolidate terms or concepts that are talked about in class.\nThe professors have a good level of English, in LORIA there are many international researchers, you could have issues with the language if you searched for a job in a company in the area, in Île-de-France (Paris area) it should be all right instead.","timestamp":"2026-04-03T22:56:15+00:00","score":2},{"role":"OP","user_id":"anon_38ed9bcbcb46c114","comment_id":"oemkkyg","kind":"comment","text":"Thank you for your reply! \n\nHow difficult would it be to find internships with companies instead of research labs? Are there any opportunities in Nancy or is it mostly in Paris? \n\nAlso, do you have any stats on the employment rate after graduation especially for non-EU students? Do most people stay in France or are most employed in their home countries?","timestamp":"2026-04-06T15:12:19+00:00","score":1},{"role":"answerer","user_id":"anon_9108adc6ecdd2a5e","comment_id":"oeogc6l","kind":"comment","text":"Post-Master employment in companies I wouldn’t know much, I haven’t met any recent alumni except for PhDs.\nWhen it comes to internships unfortunately only the Paris area and some other places (not Nancy) have companies that need people from NLP, both English and French speakers. I personally reached out to some companies in Luxembourg as well, with little luck but I reckon I could have done more :’).\nLanding an internship in one of the teams at LORIA is pretty easy and straightforward, I’m going for this option for the summer internship because it’s very short (2 1/2 months) and I want to try out research.","timestamp":"2026-04-06T20:34:34+00:00","score":1},{"role":"OP","user_id":"anon_38ed9bcbcb46c114","comment_id":"oeumez3","kind":"comment","text":"Ah ok. Good luck with your internship!","timestamp":"2026-04-07T18:23:24+00:00","score":1}],"n_turns":5,"n_turns_after_thanks":2,"op_metadata":{"user_id":"anon_38ed9bcbcb46c114","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_9108adc6ecdd2a5e","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"oe5rhw5","thanks_reply_id":"oemkkyg","post_score":5,"answer_score":2,"preferred_answer_is_top_level":true}} {"user_id":"anon_dc1a5bd813d32d97","answerer_user_id":"anon_8a084c422ce60a3c","subreddit":"LanguageTechnology","timestamp":"2026-04-26T15:10:47+00:00","post_id":"1swa3ox","question":"ASR recognising incorrect pronunciation as correct (“tanks” → “thanks”) — how do you handle this?\n\nI’m working with ASR (Azure Speech) and running into a consistent issue where mispronunciations get normalised to the intended word.\n\n\nExample: a speaker says “tanks” (/t/), but the system confidently outputs “thanks” (/θ/).\n\n\nThis makes pronunciation evaluation difficult because:\n\n\nthe transcript appears correct\nphoneme-level data is often incomplete or unreliable\n\n\nconfidence scores don’t reflect the actual substitution\n\n\nI’m aware this is partly due to the language model biasing toward likely words, but I’m trying to understand how people handle this in practice.\n\n\nQuestions:\n\n\nIs there any reliable way to detect contrast errors like /θ/ → /t/ without fully trusting phoneme output?\n\n\nDo people use constrained decoding / forced alignment / alternative models for this?\n\n\nOr is this fundamentally a limitation of current ASR systems?\n\n\nContext: this is for a controlled setup (fixed prompts, repeated target words), not open-ended speech.\n\n\nWould appreciate any practical approaches or confirmation that this is a known limitation.","preferred_answer":"Break into sentence level. Pass into LLM and do some kind of classification to see if there's any words that may be wrong or not. I don't see how else to solve this problem.","full_conversation":[{"role":"OP","user_id":"anon_dc1a5bd813d32d97","comment_id":"1swa3ox","kind":"post","text":"ASR recognising incorrect pronunciation as correct (“tanks” → “thanks”) — how do you handle this?\n\nI’m working with ASR (Azure Speech) and running into a consistent issue where mispronunciations get normalised to the intended word.\n\n\nExample: a speaker says “tanks” (/t/), but the system confidently outputs “thanks” (/θ/).\n\n\nThis makes pronunciation evaluation difficult because:\n\n\nthe transcript appears correct\nphoneme-level data is often incomplete or unreliable\n\n\nconfidence scores don’t reflect the actual substitution\n\n\nI’m aware this is partly due to the language model biasing toward likely words, but I’m trying to understand how people handle this in practice.\n\n\nQuestions:\n\n\nIs there any reliable way to detect contrast errors like /θ/ → /t/ without fully trusting phoneme output?\n\n\nDo people use constrained decoding / forced alignment / alternative models for this?\n\n\nOr is this fundamentally a limitation of current ASR systems?\n\n\nContext: this is for a controlled setup (fixed prompts, repeated target words), not open-ended speech.\n\n\nWould appreciate any practical approaches or confirmation that this is a known limitation.","timestamp":"2026-04-26T15:10:47+00:00","score":3},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"oiggxhz","kind":"comment","text":"Break into sentence level. Pass into LLM and do some kind of classification to see if there's any words that may be wrong or not. I don't see how else to solve this problem.","timestamp":"2026-04-26T22:31:34+00:00","score":0},{"role":"OP","user_id":"anon_dc1a5bd813d32d97","comment_id":"oijdpvo","kind":"comment","text":"Thanks — I think the issue is slightly different though.\n\n\nIn this case, the ASR transcript is already “correct” (e.g. “thanks”), even when the speaker actually said “tanks”.\n\n\nSo there isn’t a wrong word for an LLM to detect — the error is in the pronunciation, not the transcript.\n\n\nThat’s what makes it tricky — the signal is effectively lost at the ASR stage.\n\n\nHave you seen any approaches that work at the audio level (e.g. alignment or contrast-based methods), rather than relying on the transcript?","timestamp":"2026-04-27T11:21:18+00:00","score":1},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"oik2i7s","kind":"comment","text":"In what sentence would \"thanks\" replace \"tanks\" and still be correct?","timestamp":"2026-04-27T13:47:14+00:00","score":1},{"role":"OP","user_id":"anon_dc1a5bd813d32d97","comment_id":"oik47uf","kind":"comment","text":"This is just an example sentence that the user might see for the test \"Theo thinks slowly today. Three thin threads hang there. Then Theo thanks the guide.\" \n\n\nIn this situation, if the user says 'tanks' instead of 'thanks', the ASR assumes that 'thanks' is what the user wants to say so marks it down as correct.\n\n\nASR is being too helpful rather than detecting the error in this instance.","timestamp":"2026-04-27T13:55:50+00:00","score":1},{"role":"answerer","user_id":"anon_8a084c422ce60a3c","comment_id":"oinc2b7","kind":"comment","text":"I understand what you're saying, and what I am saying is you can try catching them with another language model by doing classification over sentences.\n\n\"Your task is to check if there are spelling errors in this sentence?\"\n\nRespond strictly with just Yes or No.\n\nSentence:\nTheo thinks slowly today. Three thin threads hang there. Then Theo thanks the guide.","timestamp":"2026-04-27T23:07:46+00:00","score":1},{"role":"OP","user_id":"anon_dc1a5bd813d32d97","comment_id":"oirltlu","kind":"comment","text":"This is for pronunciation so do you have a suggestion for an alternative ASR language model?\n\n\nI just need something that can accurately detect what the user is saying as my scoring layer can interpret the scores with confidence","timestamp":"2026-04-28T15:47:10+00:00","score":1}],"n_turns":7,"n_turns_after_thanks":4,"op_metadata":{"user_id":"anon_dc1a5bd813d32d97","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_8a084c422ce60a3c","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"oiggxhz","thanks_reply_id":"oijdpvo","post_score":3,"answer_score":0,"preferred_answer_is_top_level":true}} {"user_id":"anon_d57be8e02c9a679b","answerer_user_id":"anon_7695b03d1f9781af","subreddit":"LanguageTechnology","timestamp":"2026-05-14T23:49:11+00:00","post_id":"1tdfen5","question":"Has anyone received BioNLP 2026 decisions yet?\n\nThe official BioNLP 2026 notification date has already passed, but my SoftConf submission page still says:\n\n\n\n“At this time, there are no action items available for this submission.”\n\n\n\nI’m trying to understand whether there is a general delay or whether decisions were already released for others.","preferred_answer":"Paper got accepted on the morning of the 11th. Don’t have much other info as I am not the corresponding author.","full_conversation":[{"role":"OP","user_id":"anon_d57be8e02c9a679b","comment_id":"1tdfen5","kind":"post","text":"Has anyone received BioNLP 2026 decisions yet?\n\nThe official BioNLP 2026 notification date has already passed, but my SoftConf submission page still says:\n\n\n\n“At this time, there are no action items available for this submission.”\n\n\n\nI’m trying to understand whether there is a general delay or whether decisions were already released for others.","timestamp":"2026-05-14T23:49:11+00:00","score":2},{"role":"answerer","user_id":"anon_7695b03d1f9781af","comment_id":"oluxjct","kind":"comment","text":"Paper got accepted on the morning of the 11th. Don’t have much other info as I am not the corresponding author.","timestamp":"2026-05-14T23:57:49+00:00","score":2},{"role":"OP","user_id":"anon_d57be8e02c9a679b","comment_id":"oluzghq","kind":"comment","text":"Thank you for sharing. My submission page still says “no action items available” and I have not received any email yet. Do you know if all decisions were released or only some tracks?","timestamp":"2026-05-15T00:09:19+00:00","score":1},{"role":"answerer","user_id":"anon_7695b03d1f9781af","comment_id":"olv3jb2","kind":"comment","text":"I’m not sure. Are you an author of a shared task paper? You should contact the organizers for a decision, especially if you require registration grants as they are due tomorrow.\n\nI believe shared tasks papers are typically almost always accepted (although I have never organized a shared task so take this with a grain of salt.)","timestamp":"2026-05-15T00:33:47+00:00","score":2},{"role":"OP","user_id":"anon_d57be8e02c9a679b","comment_id":"olvg5ow","kind":"comment","text":"No, mine is also a regular workshop paper, not a shared task paper. That’s why I’m confused about the missing decision","timestamp":"2026-05-15T01:49:42+00:00","score":1},{"role":"answerer","user_id":"anon_7695b03d1f9781af","comment_id":"olvi0n5","kind":"comment","text":"Adding on to u/WannabeMachine, you should ask whoever submitted your paper about the decision. If that was you, I would recommend contacting the organizers.","timestamp":"2026-05-15T02:00:46+00:00","score":1}],"n_turns":6,"n_turns_after_thanks":3,"op_metadata":{"user_id":"anon_d57be8e02c9a679b","author_flair_text":null,"author_flair_css_class":null,"author_flair_type":"text","author_flair_background_color":null,"author_flair_text_color":null},"answerer_metadata":{"user_id":"anon_7695b03d1f9781af","author_flair_text":null,"author_flair_css_class":null},"metadata":{"answer_comment_id":"oluxjct","thanks_reply_id":"oluzghq","post_score":2,"answer_score":2,"preferred_answer_is_top_level":true}}