concordance tool context option

74 views
Skip to first unread message

professiona...@gmail.com

unread,
Oct 21, 2018, 11:38:56 AM10/21/18
to AntConc-Discussion
Hello Pr Anthony,

First, thank you for this very useful software!

I have a question about the advanced search option of the concordance tool.
I read in the documentation that we can define context words and a context window within which the search term(s) must appear. For  example,  to  search  for  "student"  where  it  appears  at  least  three words  to  the  left  or  right  of  the  word "university," set the search term as "student," the context word as "university," and set the context window as 'From' 3L 'To' 3R.
So I was wondering if there is a way to also set context word that must NOT appear (like boolean operator NOT or minus in google search)? For example to search "student" with the context word "university"  but not "college".

Laurence Anthony

unread,
Oct 21, 2018, 4:33:05 PM10/21/18
to ant...@googlegroups.com
Hi,

At the moment, it's not possible to set a context for words not appearing together with the search term. However, you might want to consider some complex regex (regular expression) involving negative lookbehind and lookahead to do this. Here's a link that may help.


Of course, the simple way is to produce all the hits and then filter them semi-automatically by searching within the results and deleting the rows where "college" is found. With a good text editor like Notepad++, you can probably do 95% of this task automatically.

I hope that helps!

Laurence.

###############################################################
Laurence ANTHONY, Ph.D.
Professor of Applied Linguistics
Faculty of Science and Engineering
Waseda University
3-4-1 Okubo, Shinjuku-ku, Tokyo 169-8555, Japan
E-mail: antho...@gmail.com
WWW: http://www.laurenceanthony.net/
###############################################################


--
You received this message because you are subscribed to the Google Groups "AntConc-Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antconc+u...@googlegroups.com.
To post to this group, send email to ant...@googlegroups.com.
Visit this group at https://groups.google.com/group/antconc.
For more options, visit https://groups.google.com/d/optout.

professiona...@gmail.com

unread,
Oct 23, 2018, 4:42:13 PM10/23/18
to AntConc-Discussion
It helped a lot !

I didn't know much about regular expressions but you made me want to find out more about it. For now I'll use a text editor to remove result strings that contain unwanted words. By the way, it might be a good idea to add a search tool directly in the results page if it doesn't represent too much programming work.

Thank you again for your work, I wish I can contribute to the project by translating the documentation into French as soon I have some time.

Laurent ADM
(Perpignan university, France)

Laurence Anthony

unread,
Oct 23, 2018, 5:59:24 PM10/23/18
to ant...@googlegroups.com
You're very welcome!

Laurence.

###############################################################
Laurence ANTHONY, Ph.D.
Professor of Applied Linguistics
Faculty of Science and Engineering
Waseda University
3-4-1 Okubo, Shinjuku-ku, Tokyo 169-8555, Japan
E-mail: antho...@gmail.com
WWW: http://www.laurenceanthony.net/
###############################################################

--
Reply all
Reply to author
Forward
0 new messages