python best api to test if its a valid sentence code example
Example: grammar check in python nlp
S -> NP_Sg VP_Sg | NP_Pl VP_PlNP -> NP_Pl | NP_SgNP_Sg -> N_Sg | Det_Sg N_Sg | Det_Both N_Sg | Adj N_Sg | Det_Sg Adj N_Sg | Det_Both Adj N_Sg| PropN_SgNP_Pl -> N_Pl | Det_Pl N_Pl | Det_Both N_Pl | Adj N_Pl | Det_Pl Adj N_Pl | Det_Both Adj N_Pl| PropN_PlVP_Sg -> IV_Pres_Sg | IV_Past | TV_Pres_Sg | TV_Past | TV_Pres_Sg NP | TV_Past NP | Adv IV_Pres_Sg | Adv IV_Past | Adv TV_Pres_Sg NP | Adv TV_Past NPVP_Pl -> IV_Pres_Pl | IV_Past | TV_Pres_Pl | TV_Past | TV_Pres_Pl NP | TV_Past NP | Adv IV_Pres_Pl | Adv IV_Past | Adv TV_Pres_Pl NP | Adv TV_Past NPN_Pl -> 'girls' | 'boys' | 'children' | 'cars' | 'apples' | 'dogs'Adj -> 'good' | 'bad' | 'beautiful' | 'innocent'Adv -> 'happily' | 'sadly' | 'nicely'N_Sg -> 'dog' | 'girl' | 'car' | 'child' | 'apple' | 'elephant'PropN_Sg -> 'rashmi' | 'piyumika'PropN_Pl -> 'they' | 'i'Det_Sg -> 'this' | 'every' | 'a' | 'an'Det_Pl -> 'these' | 'all'Det_Both -> 'some' | 'the' | ' several'IV_Pres_Sg -> 'dissappeares' | 'walks'TV_Pres_Sg -> 'sees' | 'likes' |'eat'IV_Pres_Pl -> 'dissappear' | 'walk'TV_Pres_Pl ->'see' | 'like'IV_Past -> 'dissappeared' | 'walked'TV_Past -> 'saw' | 'liked' | 'ate' | 'shot'