News for hackers. Stuff that matters.
Re:Show HN: Natural Language Processing Demystified (Part One) by jll29 on Wednesday May 18, 2022 @07:31AM (#31421467)
NLP researcher here. It's great to see many offerings for courses and tutorials, and NLP has made a lot of progress, in terms of both its science as well as its re-usable software artifacts (ibraries & notebooks, standalone tools).

But what saddens me is too many people are trying to dive into NLP without trying to understand language & linguistics first. For example, you can run a part of speech (POS) tagger in three lines of Python, but you will still not know much about what parts of speech are, which languages have which ones, what function they have in linguistic theory or practical applications.

What are the advantages of using the C7 tagset over the C5 or PENN tagsets?

Why is AT sometimes called DET?

etc.

I recommend people spend a bit of time to read an(y) introduction to linguistics textbook before diving into NLP, then the second investment will be worth so much more.

Re:Show HN: Natural Language Processing Demystified (Part One) by mywaifuismeta on Wednesday May 18, 2022 @08:06AM (#31421735)
I'm generally not a fan of these kind of high-level tutorials that tell you "use X library to get Y result" - it's just not good for learning. But any content that tries to sell you on learning ML/NLP/etc in a few weeks is just that. I understand people want to make money by targeting a large audience, but it makes me sad when I see (the vast vast majority) of practitioners not having any understanding about ML (or NLP) and just blindly applying libraries.

I don't think you necessarily need a linguistics background for NLP, but I think you need either a strong linguistics OR ML background so that you know what's going on under the hood and can make connections. Anyone can call into Huggingface, you don't need a course for that.

Re:Show HN: Natural Language Processing Demystified (Part One) by scarface74 on Wednesday May 18, 2022 @08:30AM (#31421946)
Everything eventually gets boiled down to libraries. The purpose of technology is to get things done. I could say the same that it makes me sad that today’s developers use high level languages without ever knowing assembly. A chip designer could say that assembly language developers are saddened that the assembly language programmer never had to learn how processors are created.
Re:Show HN: Natural Language Processing Demystified (Part One) by mirker on Wednesday May 18, 2022 @09:07AM (#31422296)
It’s fine when the library is a tight abstraction. Unfortunately, ML libraries are leaky.

Example: take a classification model and change the output dimensions without understanding the model.

Re:Show HN: Natural Language Processing Demystified (Part One) by nmstoker on Wednesday May 18, 2022 @11:53AM (#31424281)
Yes, the challenge people then face is that if they lack too much intuition for the subject, they can't spot obvious issues.

We've all seen how ML people don't necessarily have to have the skills to solve a problem (ie i don't need to speak Vietnamese to make a "passable" ML translator) but it's not long before the lack of knowledge starts to show up embarrassing shortfalls - being too arms length about any topic is a recipe for disaster!

Re:Show HN: Natural Language Processing Demystified (Part One) by Der_Einzige on Wednesday May 18, 2022 @01:33PM (#31425424)
Doing non trivial things (more than .train or .generate) with huggingface models def requires tutorials or other resources, not sure what you're on about at all.
Re:Show HN: Natural Language Processing Demystified (Part One) by amitport on Wednesday May 18, 2022 @07:47AM (#31421586)
NLP is a vast field nowadays, you can solve a research problem with a novel transformer architecture (for example) without knowing anything about linguistics. The thing is that NLP is a vast field and there is plenty room to go around (same goes for vision, you don't really need classical vision background as much as you used to).

(also an NLP researcher. Knows nothing about linguistics)

Re:Show HN: Natural Language Processing Demystified (Part One) by screye on Wednesday May 18, 2022 @04:27PM (#31427217)
I makes sense to completely disregard language when looking at modern NLP solutions. In some sense, 'hand engineering' anything is looked down upon.

Transformers and scaling laws have made it such that the only thing that truly matters is your ability to build a model that can computationally and parametrically scale. The 2nd would be to figure out how to make more data 'viable' for usable within such a hungry model's encoding.

Look at anyone who has written the last 20 seminal papers in NLP, and almost none of them have a strong background in linguistics. Vision went through a similar period of forced obsolescence, during the 2012-2016 Alexnet -> VGG -> Inception -> Resnet transition.

It is unfortunate. But, time is limited and most researchers can only spare enough time to learn a few new things. Unfortunately for linguistics, it does not rank that high.

Re:Show HN: Natural Language Processing Demystified (Part One) by adamsmith143 on Wednesday May 18, 2022 @10:53AM (#31423537)
I'm not at all sympathetic to this viewpoint. The Deep Learning revolution has shown us time and time again that Deep Learning experts universally outperform SME on modelling performance. I an almost 100% certain that the teams building big Transformers which are now by far the best NLP models (OpenAI, Meta, Google Brain, Deepmind, etc) are not made up of linguistic experts but Deep Learning experts.
Re:Show HN: Natural Language Processing Demystified (Part One) by amitport on Wednesday May 18, 2022 @11:31AM (#31424025)
These groups are not mutually exclusive.
Re:Show HN: Natural Language Processing Demystified (Part One) by adamsmith143 on Thursday May 19, 2022 @10:32AM (#31435164)
Maybe not but I'd guess that in this context the marginal gain for learning more about Linguistics is going to be dwarfed by learning more about Deep Learning.
Re:Show HN: Natural Language Processing Demystified (Part One) by sam_lowry_ on Wednesday May 18, 2022 @11:48AM (#31424219)
In practice, they are, AFAIK.
Re:Show HN: Natural Language Processing Demystified (Part One) by philophyse on Wednesday May 18, 2022 @08:01AM (#31421679)
In your opinion, would George Yule's The Study of Language be a good introduction to linguistics? Or is there any other book that you would recommend to someone who has little knowledge of the field, but a lot of interest?
Re:Show HN: Natural Language Processing Demystified (Part One) by photonemitter on Wednesday May 18, 2022 @08:12AM (#31421780)
Jumping in on this; I’ve found jurafsky/martin a good place to start. Covers a lot of ground and is a pretty good read as well.

https://web.stanford.edu/~jurafsky/slp3/

Re:Show HN: Natural Language Processing Demystified (Part One) by ninjin on Wednesday May 18, 2022 @08:49AM (#31422084)
As a somewhat established researcher in the field, I second Jurasky and Martin. It is peerless and what I recommend to anyone joining my team if they think their background NLP knowledge is a bit on the weak side.
Re:Show HN: Natural Language Processing Demystified (Part One) by true_religion on Saturday May 21, 2022 @03:16AM (#31455941)
I don’t know if anyone wants to dive into NLP as much as they just want to solve their problem at hand.

You are right that lack of fundamental knowledge is problematic, especially that tools can allow you to make a greater quantity of solutions and therefore also a greater quantity of mistakes.

However, at least the problem is still being solved.

For example, a few months ago I wanted to organize my media collection by tagging files with artist names. I had a list of artist names but it wasn’t comprehensive so I wired together a bunch of python NLP libraries together to automatically pull out proper nouns from filenames, recognize English names, then annotate the files.

I know almost nothing about parts of speech or anything else, so I made mistakes. About 10% of the results were errors in the first run, but after tuning it was down to about 1% which was good enough to run over the entire media library.

If not for the tools, I would have never been able to finish that chore in a single day. To me, it was worth it despite my amateur mistakes.

I view the library just like any other tool: a screw driver, a hammer, a wrench. I’m not a plumber or a carpenter, or an NLP researcher but I still want to use tools to fix my leaky faucets, remount my leaning cabinet doors, and organize my media collections as weekend projects.

Re:Show HN: Natural Language Processing Demystified (Part One) by LunaSea on Wednesday May 18, 2022 @08:09AM (#31421752)
Is this still true in an era where most NLP problems use language models as a solution?
Re:Show HN: Natural Language Processing Demystified (Part One) by gattilorenz on Wednesday May 18, 2022 @08:47AM (#31422077)
I think so. First of all, knowing some linguistics will teach you terms and concepts (e.g. parse tree, phrase, morpheme, phoneme, etc) that will both help you find relevant literature and avoid reinventing terms for stuff that is widely known (so others will more readily find your work).

Language models are currently the best solution for many problems, but it's hard to predict how we will move forward from here. Maybe the inclusion of linguistic information, or linguistic-inspired knowledge, or whatever, will be the key to having better results, or saving training time/resources. With no linguistics background, I imagine it's hard to get ideas going in that direction (and test if it's actually a good direction)

Re:Show HN: Natural Language Processing Demystified (Part One) by mothcamp on Wednesday May 18, 2022 @11:12AM (#31423795)
I agree. I think having linguistics knowledge can help especially in applied situations. Linguistics knowledge can help create fallback systems when an ML system fails, or help build rules to amplify or dampen the confidence of a response from an ML system, or aid in the engineering of a system (all that comes before or after the ML blackbox).

Sort of like an algorithmic trader knowing market microstructure intimately (versus only pure statistics).

Re:Show HN: Natural Language Processing Demystified (Part One) by k8si on Wednesday May 18, 2022 @01:00PM (#31425066)
Language models as a solution to what problems?

Yes, you can easily use AutoModel.from_pretrained('bert-base-uncased') to convert some text into a vector of floats. What then?

What are the properties of downstream (aka actually useful) datasets that might make few-shot transfer difficult or easy? How much data do your users need to provide to get a useful classifier/tagger/etc. for their problem domain?

Why do seemingly-minor perturbations like typos or concating a few numbers result in major differences in representations, and how do you detect/test/mitigate this to ensure model behavior doesn't result weird downstream system behavior?

How do you train a dialog system to map 'I'm good, thanks' to 'no'? How do you train a sentiment classifier learn from contextual/pragmatic cues rather than purely lexical ones (example: 'I hate to say it but this product solves all my problems.' - positive or negative sentiment?)

How bad is the user experience of your Arabic-speaking customers compared to that of your English-speaking customers, and what can you do to measure this and fix it?

My linguistics background really helps me think through a lot of these 'applied' NLP problems. Knowing how to make matmuls fast on GPUs and knowing exactly how multihead self-attention works is definitely useful too, but that's only one piece of building systems with NLP components.

Re:Show HN: Natural Language Processing Demystified (Part One) by riku_iki on Wednesday May 18, 2022 @02:25PM (#31426013)
> My linguistics background really helps me think through a lot of these 'applied' NLP problems.

There many benchmarks where LMs absolutely outperform mechanical linguistics solutions.

Do you have success stories when there is significant outperforming solution in opposite direction?

Re:Show HN: Natural Language Processing Demystified (Part One) by k8si on Wednesday May 18, 2022 @06:56PM (#31428657)
There's no competition between linguistics and ML/NLP, they have completely different goals as fields.

I meant that my linguistics background helps me understand & solve problems: studying linguistic field work has helped me design crowd labeling jobs, knowing about morphology helps me understand why BPE tokenizers work so well (and when they might not), knowing about syntax/dominant word order makes me think that multilingual Bert should probably do something more intelligent with positional embeddings, methods from psycholinguistics are useful for understanding entropy/surprisal wrt LM next-word probabilities... just a few examples but the list could go on.

Re:Show HN: Natural Language Processing Demystified (Part One) by xtiansimon on Wednesday May 18, 2022 @07:48AM (#31421597)
“I recommend people spend a bit of time to read an(y) introduction to linguistics textbook…”

Linguists is a broad area of study. Can you be more specific? Such as grammar and syntax.

Re:Show HN: Natural Language Processing Demystified (Part One) by ad404b8a372f2b9 on Thursday May 19, 2022 @08:09AM (#31433468)
"Every time I fire a linguist, the performance of the speech recognizer goes up"

- Frederick Jelinek

Re:Show HN: Natural Language Processing Demystified (Part One) by vb234 on Wednesday May 18, 2022 @07:47AM (#31421588)
Could you recommend a good introduction to NLP book?
Re:Show HN: Natural Language Processing Demystified (Part One) by meristem on Wednesday May 18, 2022 @04:20PM (#31427158)
Do you have specific book suggestions?
Re:Show HN: Natural Language Processing Demystified (Part One) by PainfullyNormal on Wednesday May 18, 2022 @07:45AM (#31421572)
> I recommend people spend a bit of time to read an(y) introduction to linguistics textbook

Do you have a favorite you can recommend?

Re:Show HN: Natural Language Processing Demystified (Part One) by sam_lowry_ on Wednesday May 18, 2022 @10:50AM (#31423499)
Elements by Tesnière. I am not kidding, there is a shitload of knowledge there, largely forgotten by the time NLP merged with CompSci.

Jurafsky and Martin, Manning and Schutze are great books for computer scientists but these do not teach about the language.

Re:Show HN: Natural Language Processing Demystified (Part One) by mothcamp on Wednesday May 18, 2022 @09:17AM (#31422389)
In addition to Jurafsky and Martin (https://web.stanford.edu/~jurafsky/slp3/), I also like Emily Bender's book: https://www.goodreads.com/book/show/18128399-linguistic-fund...

Bender's book is NOT an end-to-end text though imo. It's more a central jumping off point. So you can read about a concept and if it sounds interesting, search more about it.

Re:Show HN: Natural Language Processing Demystified (Part One) by rmellow on Wednesday May 18, 2022 @10:44AM (#31423414)
In addition to Jurafsky and Martin, I recommend Foundations of Statistical NLP by Manning and Schutze: https://nlp.stanford.edu/fsnlp/promo/