Differentiate regular grammar and regular expression.

devquora
devquora

Posted On: Feb 22, 2018

 

Regular expression is a sequence of characters that define a search pattern, mainly for use in pattern matching with strings, or string matching. It includes the following elements:

Example: A and B are regular expressions then

  • The regular expression is A. B (concatenation)
  • The regular expression (alternation) is A l B
  • The regular expression (Kleene Star) is A*

Regular Grammars

There are 4 tuples in Regular Grammars (N, ∑, P, S € N). In this formula, N stands for the non-terminals’ sets, ∑ means the set of terminals, P is the set of productions to change the start symbol, P has its productions from one of the types and lastly S is the start non-terminal.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    NLP Interview Questions

    What is NLP?

    Natural Language Processing or NLP is an automated way to understand or analyz..

    NLP Interview Questions

    List some Components of NLP?

    Below are the few major components of NLP.Entity extraction: It involves segmenting a sentence to identify and extract entities, such as a person (real or fictional), organization, geographies, ev...

    NLP Interview Questions

    List some areas of NLP?

    Natural Language Processing can be used forSemantic Analysis Automatic summarization Text classification Question AnsweringSome real-life example of NLP is IOS Siri, the Google assistant, A...