17
44 Comments

I am a researcher in Natural Language Processing and I am bored at home. Anybody need help for their project?

I'd be happy to help you for free.

on March 19, 2020
  1. 2

    Hi Angelo!

    I'm mostly curious about what your research entails, and what framework you enjoy working with the most (Stanford, spaCy, etc.)?

    I do a little NLP using spaCy for my side project-turned-business, but I feel like I'm only scratching the surface capability-wise. Other than the main spaCy tutorial, can you recommend any starting-point resources that focus on high-level concepts and practices?

    Thanks!

    1. 4

      Hey @zakke, sure. At my dayjob I work on both text analysis and NLG. My latest published paper is about syntax and social variation: here is the link if you are interested https://www.aclweb.org/anthology/P19-1246/.

      I used to work with dyNet (http://dynet.io/) but since I joined my current company I started using Tensorflow directly and build what I need on top of it: the new Tensorflow (i.e. version > 2) changes everything and it really is a joy to use, compared to the hell it was.

      For learning more: I think that the educational material that the spaCy people produce is great for developers getting started. If you already went through their tutorial, here are some resources that you migh find useful:

      1. 1

        This is fantastic. Thank you very much!

  2. 2

    Hi Angelo. We have an interesting project that deals with sentiment analysis and machine learning. It also involves some NLP. We could use a person who is knowledgeable in this space. Shoot me a ping and we will discuss further.

    1. 1

      Hi there, thanks but I am not really looking for a new position. If there is any specific problem that you want to discuss here, I'd be happy to help if I can or point you to papers or resources that might help you. If you are looking for someone to hire, you should check https://nlppeople.com/, it's a job board for NLP/ML related positions.

  3. 1

    Not sure if this is the exact field youโ€™re in but what do you think is the best text to speech tool out now? Molly? Google? IBM Watson?

    1. 1

      Yeah, I'm indeed no expert in TTS and have no experience with any of these. Commercial models are harder to evaluate than academic research, but the nice thing is that they all usually let you play with their product for free a bit: It's usually a good idea to prepare a small test set and see what works best for you.

  4. 1

    Curious if you have some suggestions for my experiment;

    I'm trying to extract transcripts from communication on aviation frequencies. I have a few problems here:

    • There's a lot of background noise
    • Lots of different dialects

    The great thing however is that most messages have some of the same structure which is as follows:

    • Who (aircraft registration)
    • What (aircraft type)
    • Where
    • Plan
    • ATIS (Aerodrome Traffic Information Service)
    • Request

    Which should make it fairly easy to process. What would be the least effort way to analyse these audio recordings? Are there any pretrained audio recognition models which could help me?

    In the past I have used Luis.ai for language analysis, but I'm curious whether libraries exist which do this thing which you can host yourself.

    1. 1

      Hi @Corstian, I am sorry but I never worked on ASR or TTS and therefore I will not have anything really helpful to say. I've seen however at least one very good ASR model being released recently: https://paperswithcode.com/paper/listen-attend-and-spell. This model is an end-to-end network for ASR.

      You could however try first with some SaaS solutions, to see if that's enough for your use-case:

      I've only played with the speech-to-text solution by Google and it was more than enough for my case. Maybe you can do some pre-processing to cut out some noise? And from whatI've seen dialects are starting to become a minor issue for ASR. Also, in the case of IBM Watson, you can also fine-tune the model to your data.

      1. 1

        Thanks! I'm trying to go the poor man's route here, so SaaS services are not a possibility for me right now. I have never heard about LAS before, but it seems like something which would be incredibly helpful to me :)

  5. 1

    Hi Angelo, thanks for taking your time for this! ๐Ÿ‘‹๐Ÿผ

    At Cartloop.io (mobile messaging platform) we want to provide conversational insights for our users, such as: most used phrases and words, sentiment analysis. Would love your input on where to start, recommended libraries or frameworks.

    1. 2

      Hi there @flow34, thanks to you for your message and to all you guys here: you've managed to keep boredom away a bit :)

      If I understand it correctly, you mostly want some statistics: I would give scattertext a try https://github.com/JasonKessler/scattertext and play with it a bit.

      You might then want to look into systems for detecting multi-word expressions and unusually frequent phrases, which are the ones that your customers might be interested in.

      If you need a quick way to plug-in sentiment analysis, my company recently opened a free API for that. Ping me in private if interested and I'll point you to it (I don't know what's the policy on IH in this case: is it ok to link stuff I am involved into?)

      1. 1

        Hi Angelo, thanks for your input! Just texted you on Twitter about the API. We can chat there more details. Also feel free to share details via email from my profile.

  6. 1

    hey @angelob, thanks for this. I'd love to get a sense of "how nlp" works and/or what are it's limits...

    I've tried a few ML courses, and they either dive way too deep and I have no idea what they're talking about... or they just use too many abstract examples like "well, you know how we learn by example... well that's how machines learn" ๐Ÿ˜ฌ

    For example... I'll have a shot at explaining what I think it is, and maybe you could point me to some resources that explains the gaps?

    • NLP is the ability of a "model" (?) to take some text as input, and give me back some explanation of what that text is as structure data - such as "is it positive/negative"? "is it a question", "is it a command", what are the limits here?

    • for each type of classification, do you need a different model?

    • is a model just an algorithm that has been constructed by feeding the model MILLIONS AND MILLIONS of examples of text that has pre classified by a human?

    • if that's what a model is.... where do those pre-classified texts come from, and who has classified them?

    • do NLP models just break text into numbers and then compare that to pre-classified texts converted to numbers as a way to see if it is something or the other... or is actual grammar rules built into the model? But I though models were just numbers... hmm ๐Ÿค”

    • which part of a model makes is "good" vs "bad". For example, is a model better than another just because it has been fed "better" examples (the algorithm is the same, but the data that has generate the algorithm is better)?.... or is a better model better because a very specific type of algorithm has been created specifically for that model?

    I'm not a mathematician so please excuse my horrendous misuses of the terms, sorry!

    thanks so much Angelo ๐Ÿ™‡โ€โ™‚๏ธ

    1. 1

      Hey @thatandyrose, that's a lot of stuff you put in here! :)

      You are mostly talking about 'statistical NLP' here, which --- in simple terms --- is about learning from human-labelled examples how to do some task: the result of this learning is called a model. Machines can only process numbers and that's why you need to somehow map words to numbers and then you might want to find some patterns in those numbers that help you solving your task. An alternative approach is the 'rule-based NLP': spaCy's docs have a useful section on this https://spacy.io/usage/rule-based-matching. Once you have a (rule-based or statistical) model, evaluating it is a science of its own: but you usually define some metric that you care about (e.g. accuracy in the case of spam detection) and you have a human-labelled test set, i.e. you know already if a text is spam or not: you then run your two models on this dataset and the one that achieves the highest accuracy is the best one. I can highly recommend this book for getting started: http://themlbook.com/ (disclaimer: I was involved in the translation of the Italian edition).

  7. 1

    Hey Angelo,

    Thanks for doing this. Had a problem I would love to get your feedback on:

    If customers sent order emails to a business. And business responds, confirming the order the date and other information. How easily will it be to translate that text to basic data points such as did_accept, order_date etc

    What tools/libraries and approaches should I look into?

    Thanks!

    1. 2

      Hi @Bsme, I see at least two ways to model this problem:

      a) frame it as an information extraction problem. You could take a look at this page http://nlpprogress.com/english/information_extraction.html for learning about the possible approaches and what is the state-of-the-art
      b) more simply, you could break it down into multiple, simpler problems, e.g.

      • build a classifier for saying if the order was accepted/not-accepted
      • train a Named Entitity Recognizer (NER) to extract things like order_date, etc. spaCy is usually a good solution for this: you might want to take a look at their tutorial on training a NER model on custom entities https://spacy.io/usage/training#ner
      1. 1

        thanks for the insight brother! You are very kind!

  8. 1

    It's really awesome of you to donate your time this way ๐Ÿ‘

    I have a question for you. Given a document and a set of questions about the document, can any NLP tools answer the questions with a decent level of accuracy? How subjective can the questions be? And can you recommend any tools or products I could use?

    1. 2

      Hey there, question answering (QA) is a subfield of NLP which has started to gain a lot of attention recently. Take a look at this: https://rajpurkar.github.io/SQuAD-explorer/. It reports the best results on a question answering shared task with links to the relevant papers: it' s a good way to see what's the state-of-the-art on the task. Real life results tend however to be quite different from what you see on a research dataset.

      The transformers library from huggingface made it possible to get started with QA super quickly thanks to their "pipeline" component: you should probably take a look at this: https://github.com/huggingface/transformers#quick-tour-of-pipelines.

  9. 1

    Hello!

    Thank you for the offering. Here is my question:
    Imagine two internet comments A and B. They are related to the same content. They are short, maybe 10 words in average. How can I know if the topic of A is very similar to B's, even if they have different words. There is no finite list of topics.

    For example:
    A - Thank you!
    B - I am grateful for the work you put in this content.
    Topic: thanking

    A - No, the risk is to see the market plummeted!
    B - You really think the bonds are still a safe investment?
    Topic: economy

    I have been out of touch with NLP for a few years now, but back then I would have started with word2vec. My problem is that there is no exhaustive list of topics, so I don't see how to apply any kind of classification algorithm after that. Can I "just" build the vector representation of the sentence and see if it's somehow "similar" to another one?

    Cheers

    1. 1

      Hi @nakurai, you could try to use word2vec (or something like BERT) to get the representations of the texts and then you would need:

      • a clustering algorithm to group together texts that are somehow similar
      • a way to automatically label the clusters

      https://radimrehurek.com/gensim/ is usually a very good starting point for this: in particular, take a look at their tutorial on LDA. One thing though: this task with short texts is particularly challenging. But once you get started and have one baseline, then there are several things you can try to improve it.

      Naming the clusters once you have them, e.g. having something like 'economy' is a though problem: maybe this paper will be helpful for you https://arxiv.org/abs/1612.05340. But you could also start labelling the clusters manually at the beginning.

      1. 1

        Hello,

        I don't know if you are still providing advices. Let me know if not!

        I am coming back to you because I finally got the time to try something out. I learned some Python , and then followed the tutorial available on the gensim's website. I have a jupyter notebook loading around 500 comments. I am creating the bag of words, a TF-IDF matrix and then applying an LSI model on it. My understanding is that it helps identifying topics by dropping the features carrying less information.

        Now, my hope was to be able to identify a topic, and then create a query to pull the most similar comments linked to this topic. This part is not working too well. I am assuming that because the comments are not that long, there will be only one or two significant words in each of them which is not a lot to compute the "weights" (sorry if my vocabulary is not on point).

        In your previous comment, you mentioned several things that could be done to improve on it, could you give me more details?

        1. 1

          Hey, I am always glad to help!

          Let me say: I am impressed by what you did! You actually went and learnt all of this to get you started: respect!

          Let me ask you some questions to better help you.

          • Could you tell me more about how you are evaluating your model?
          • Furthermore, in order to understand if the issue really is due to the length of the text, you would need at least some statistics about the average length of your texts.
          • Then: what language are you working on?
          • Which genre?
          • Which domain?
          1. 1

            It's good to hear from you!

            Thank you for saying that. I had wanted to learn more data science forever now, it's nice to finally get there. But the depth of what I don't know is quite impressive.

            Anyway. To answer your questions:

            • So far the only evaluation process I had was: start with a few comments (like in the gensim's example). Check that each step seems accurate (number of words in the dictionary, weights of each word in a comment). At this point I would not pay too much attention to the similarities yet because of how small the dictionary was. Then, second step, put more data (like the 500 comments) and try to find similarities.

            The thing is, I am trying to work with YouTube comments. The idea is to create a small dashboard to help successful video makers navigate the comments they get during live events.
            Since every video can be about something very different, I was planning of considering each video independently. I was thinking of using gensim's ability of updating the similarities model on the fly, and add the comments as they come.
            Then the idea is to provide the main keywords of the comments to the Youtuber and they can pick what they are interested in, and see all the related comments. I hope this makes sense, sorry if it's a bit long, I just thought it was better to be concrete. Back to your questions.

            • I am focusing on the English language for now. Since I am using non supervised and statistical methods, my guess is that it should be fairly "easy" (in theory) to expand to other languages. But let's say English for now.

            • I don't understand the question about the genre.

            • The domain is very specific to each live event/video published. The one I was working on is this one: https://www.youtube.com/watch?v=6SrsZVdU740&t=3s
              But really, and it may be the lack of experience talking, I am hoping to be able to generate a new model for any video.

            A few thoughts to finish. I have also loaded the comments in SpaCy to work on the lemme of the words when they exist. I have not linked those to gensim to see if it improves the results, but I am assuming it should.
            I have also used a K-means algorithm to group the comments together. I have not even tried to assess the quality of the resulting model because I have to provide the number of clusters I want to consider to seed the algorithm, which is not very suitable to my context.

            It's nice to be able to share that with someone, thank again for taking the time to answer here.

            1. 1

              Mmm...I see. Ok, let me tell you what I think, hoping that it might helpful to you.

              • Evaluation. First, I would try to build as soon as possible an evaluation dataset and define a metric that you want to optimize: this might mean just looking at the predictions on a small dataset. Ideally, you'd like to have an automated metric and a human evalutiation (I guess yourself). Automated metrics are important because they will allow you to run many experiments quickly and see what works and what not. Also, defining the metric helps you focus on what really matters. I would say: you can do NLP if you have a metric, otherwise there is no point at all. If you want to learn how to evaluate topic models, this might be a good start: https://www.youtube.com/watch?v=rfHCronRgQU.

              • Models. That said, now that I see what you are building, I am not sure that you really want a topic model. Things like LDA are nice when you have some long documents and you want to see what they are about. If all you want is to extract keywords, then something like tf/idf and a cool visualization might be enough. Take a look at this: https://spacy.io/universe/project/scattertext. I think you could frame your problem as a text classfication problem, where you label each comment with whatever tag you want. The first thing I would advise you to do, is to collect a large corpus consisting of these comments that you want to model and to try to do yourself what you want the model to do: spend some hours with the data and label them. This will teach you a ton about the problem. There are specialized tools for this task, e.g. https://prodi.gy/, but Excel would be enough to start with.

              • Language. Deciding to focus on English only it's a great decision, if you know that that's what matters, but don't assume that whatever you do on English, you can port to other languages. Things like morphology, resources and syntax just to name a few, will make things hard.

              • Genre. By genre I mean things like essay, news, tweets, comments, books: a model built for one of these will not work so well for the other and the same applies to domain variation (e.g. book reviews vs. video game reviews) and domain adaptation is a science of its own.

              I hope any of this will be useful to you. Good luck!

  10. 1

    I'm trying to extract nouns, their attributes and, their relationships within a text. Is there any project you recommend for this task?

    1. 1

      Hey @fu_wire, spaCy is becoming the go-to solution for this. You probably want what's called a dependency parse of a text: https://spacy.io/usage/linguistic-features#dependency-parse

      1. 1

        do you know how do they embed binder in their website so you can run the examples?

        1. 1

          Yes, you should check this out: https://github.com/ines/juniper

      2. 1

        Wow, thank you.

  11. 1

    Hey Angelo - I'm working on an intelligent email app for business professionals. In short, we use NLP to prioritize specific types of emails for our clients. We're currently trying to improve the models-- just switched over from NLTK to Spacy. Would love to connect, get your thoughts, and see if you'd be interested in working with us.
    Let me know - you can shoot me a note at hank@moatify.com

    1. 1

      Hi @onraykimbo, if there is any specific problem that you can discuss here, I'd be happy to help if I can. NLTK is a good didactic tool but, yes, spaCy is probably what you need for building commercial products today. https://nlp.stanford.edu/ is also a good option, you might want to check that out.

  12. 1

    In your role do you see where the demand comes from for NLP and voice? For example, do you think that companies building apps that will be primarily used on mobile should implement voice into the UX where an input is required?
    Edit: now I see your comment below about NLP being for text LOL

    1. 2

      Hi @Blake_Emigro, well no, there is a lot of research on voice as well, but that's not something I really know much about: the methods are much closer to digital signal processing and physics (for things like acoustic modelling). From what I've seen, since text and voice are everywhere, there are applications in every industry. If you are into those things, you should follow @solyarisoftware on twitter.

      1. 1

        Thanks Angelo, I found Giorgio on Twitter.

  13. 1

    Oooh, thanks! Can I ask a few questions about:
    1.) What is the biggest database/dataset you've seen?
    2.) What's the approx average data size you see?
    3.) Do you agree that it is challenging to combine disparate data sets? And as far as I'm aware you currently must write custom code to combine various data sources into 1 place for use/analysis/development.

    Thanks so much!

    1. 2

      Among the freely available datasets, https://commoncrawl.org/ is the first one that comes to mind if you ask about size.

      NLP is about text and therefore most of the time the average dataset is big enough to fit into memory.

      With respect to your last question: not really, or not in the sense I think you mean it. Some times you do want to combine different datasets, but the text annotations don't match and normalizing them is not always straightforward.

      With respect to accessing and using the different datasets, I am starting to see cool abstractions/libraries: my favourite is https://www.tensorflow.org/datasets.

  14. 1

    This comment was deleted 5 years ago

    1. 1

      Hi there, could you tell me something more? Do you already have a corpus of conversations that you want to model? I don't think you need sentiment analysis for this and intent detection usually refers to the task of understanding what a user wants to do with uttering a specific sentence, while here it seems you need more a higher level classification before you route the user to a building-habit or breaking-habit dialogue.

      1. 1

        This comment was deleted 5 years ago

        1. 1

          I would do it this way: run your system live and get someone to actually use it. Answer yourself to as many messages as you can and that would be your first corpus. I think you need to see some real examples of conversations. Once you have a first boostrapped corpus, then you can think about how to better model it.