1
$\begingroup$

I am new to NLP. I have few 100 textual sentences (100 rows in dataframe) with an average word length of 10 in a sentence. I would like to know what interesting insights (simple descriptive to advanced) can be derived using NLP techniques. I don't intend to predict anything but analyze and get some interesting insights.

I have thought of the below items that can be done using sample data that I have.

  1. Count the number of occurrences of each word in a sentence and finally find out the most frequently used (top) word and least used (bottom) word in the list of sentences that I have

  2. Find the Entity in each sentence using NER. Which entity is discussed most in the sentences that I have?

  3. Find which sentences are similar using textual similarity metrics.

  4. I can identify the sentiment of the sentence

  5. Can LDA be used to identify the topic of the sentence (which on average has 10 words) and my dataset itself has only 100 sentences?

  6. What do you think is the use of creating syntactic/dependency trees? What can we infer through this? This might be useful for linguists, but can it help the layman end-users/business folks get some insight? Any simple explanation on this topic or directing me to resources would be helpful

  7. I think we cannot summarize it because my sentences only contain 10 words on average

Can you help me with q5, q6, and q7?

Is there anything else that you think can be done? What more do you think can be done using.

$\endgroup$
1
$\begingroup$

First I think it's worth mentioning that in the context of an exploratory study with a small dataset, manual analysis is certainly as useful as applying NLP methods (if not more) since:

  • Small size is an advantage for manual study and a disadvantage for automatic methods.
  • There's no particular goal other than uncovering general patterns or insights, so it's unlikely that the results of an automatic unsupervised method would exhibit anything not directly observable.

That being said one can always apply automatic methods indeed, if only for the sake of observing what they can capture or not.

  • Observing frequency (point 1) can always be useful. You may consider variants with/without stop words and using document frequency (number of documents containing a term) instead of term frequency.
  • points 3 and 5 are closely related: LDA essentially clusters the sentences by their similarity using conditional words probabilities as hidden variable. But the small size makes things difficult for any probabilistic method, and there could be many sentences which have little in common with any other.
  • Syntactic analysis with dependency parsing can perfectly be applied to any sentence, but the question is what for? As far as I know this kind of advanced analysis is not used for exploratory study, it's used for specific applications where one needs to obtain a detailed representation of the full sentence. Traditionally this was used for higher-level tasks involving semantics, often together with semantic role labeling and/or relation extraction. I'm not even sure that this kind of symbolic representation is still in use now that end-to-end neural methods have become state of the art in most applications.
  • I agree that summarizing a short sentence is pointless. You could try to summarize the whole set of sentences though, if that makes sense.

In the logic of playing with any possible NLP method, you could add a few things to your list:

  • Lemmatizing the words, this can actually be useful as preprocessing.
  • Using embeddings or not: on the one hand this can help finding semantic similarities through the embedding space, on the other hand the small size makes it questionable to project the data in a high dimension space.
  • Finding colocations (words which tend to appear together in the same sentence) with association measures such as Pointwise Mutual Information.
  • Spelling correction and/or matching similar words with string similarity measures.
  • It's unlikely that there's any interest in it but there are also stylometry methods, i.e. studying the style of the text instead of the content. These range from general style like detecting the level of formality or readability to trying to predict whether two texts were authored by the same person.
$\endgroup$
6
  • $\begingroup$ thanks, upvoted for your help, Will accept after time limit. May I know is there any package that can help us do stylpometry methods? $\endgroup$
    – The Great
    Jul 3 at 9:34
  • $\begingroup$ Similarly for colocations, spelling correction or matching similar words etc? As I am new to NLP, I would like to do this by learning. If you have any suggestions for python package, they are welcome. $\endgroup$
    – The Great
    Jul 3 at 9:35
  • $\begingroup$ @TheGreat I'm not very knowledgeable about ready-to-use libraries. readability scores is common enough and I can see that there are libraries like this one. I'm not sure that more advanced stylometry methods are mainstream, there are probably some github repos but it's more on the experimental/research side as far as I know (if you're interested search for "nlp author identification" for instance). $\endgroup$
    – Erwan
    Jul 3 at 10:21
  • $\begingroup$ @TheGreat spelling correction is probably standard enough, for example I see this SO question or this spacy package. I'm not sure how standard colocation extraction is but apparently there are some tutorials. try to search around, I might have missed some better resources. $\endgroup$
    – Erwan
    Jul 3 at 10:25
  • $\begingroup$ Btw you probably know these already but afaik spacy and nltk are the two main NLP libraries in python, their documentation might help. $\endgroup$
    – Erwan
    Jul 3 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.