Hello friends,
I'm trying to grep out sentences. The sentences are previous to an academic citations in a pdf. The goal is to get summaries of citable work.
Her is what I tried reading the MAN page.
pdftotext foo.pdf | grep -A 5 ***chose reg expression below***
pdftotext BioPsych10.pdf | grep -A 5 \([A-Z]*[a-z]\,[1-2][0-9][0-9][0-9]\)
It pauses, but doesn't produce anything. Also it would be nice if I could stop printing at the start of the desired sentence, instead of 5 lines.
These are the regular expressions I will use.
(Daviis, 2004)
\([A-Z]*[a-z]\,[1-2][0-9][0-9][0-9]\)
(Schultz, 2000) and (White, 1989)
\([A-Z]*[a-z]\,[1-2][0-9][0-9][0-9]\) and \(, [A-Z]*[a-z]\,[1-2][0-9][0-9][0-9]\)
(Sutter, 1987; Reid and Shapley, 1992)
\([A-Z]*[a-z]\, [1-2][0-9][0-9][0-9]\; [A-Z]*[a-z] and [A-Z]*[a-z]\, [1-2][0-9][0-9][0-9]\)
(Enroth-Cugell and Robson, 1966)
\([A-Z]*[a-z]\-[A-Z]*[a-z] and [A-Z]*[a-z]\, [1-2][0-9][0-9][0-9]\
(Barlow, 1961, 1989; Atick and Redlich, 1990; Atick, 1992)
\([A-Z]*[a-z]\, [1-2][0-9][0-9][0-9]\, [1-2][0-9][0-9][0-9]\; [A-Z]*[a-z] and [A-Z]*[a-z]\, [1-2][0-9][0-9][0-9]\; [A-Z]*[a-z]\, [1-2][0-9][0-9][0-9]\)
(Dong and Atick, 1995a)
\([A-Z]*[a-z] and [A-Z]*[a-z]\, [1-2][0-9][0-9][0-9][a-z)\)
Thank you for taking the time to read this. Please let me know if you have any ideas.