Jump to content

String searches on English books


Donald Cobb

Recommended Posts

Hello all,

 

This is my first post here, although I have been using Accordance, along with other Bible programs, for a few years now. I've been trying to do a string search on phrases in D. Bonhoeffer's Works. Using parentheses doesn't do the trick (I get all the occurrences of each word in the string, but that just makes it an AND search). I know that, for Biblical texts, it's recommended to use construct searches. Problem is, I can't figure out how to link the searches to English books.

 

Would someone mind giving some suggestions? Any help would be appreciated!

 

Regards,

 

Donald Cobb

Aix-en-Provence, France

Link to comment
Share on other sites

You can use the <OR> command to string together words and phrases:

 

ethical Encounter <OR> Intimacy <OR> Desire

 

You can also display the text as paragraphs (with titles), which will eliminate every paragraph that doesn't have a hit, and add the title of the article containing the paragraph. In a large tool like Bonhoeffer's Works, this helps you quickly see your search results.

 

Screen%20Shot%202017-05-22%20at%208.19.1

  • Like 2
Link to comment
Share on other sites

I don't understand the original question. Phrase searches are found as simply in tools as in texts. They work when pasted or when amplified from a Bible text. What exactly are you trying to do?

Link to comment
Share on other sites

Thank you Mark and Helen for your responses.

 

I was actually trying to find a second occurrence of the phrase "in all this we are in a community that sustains us" (mentioned, FWIW, in the afterword to Life Together, and attributed to a letter written at a date that isn't found in Letters and Papers from Prison). I was thinking there would be a way to simply highlight that phrase, right-click and have Accordance search for it. I realize now, that the command "search for a word" also searches for multiple words when they are highlighted. So it's just that the function of that command is more succinct than what it actually does. I'm learning.

 

However, since that query didn't turn up a second occurrence, I wanted to try a query with "we are in a community" AND "us" in that order. I tried doing a construct search, but couldn't figure out how to link DBW to the construct. It does seem much easier to do with Biblical texts (i.e., it's automatic!). That's what I was requesting help for. I still haven't found a way over that hurdle.

 

Since then, I've played around with the search window and also tried using quotes ("") do what I thought parentheses where supposed to do (but don't; so I'm still wondering what function the parentheses actually have. But that's another question). I see as well that the quotes aren't necessary.

 

Anyway, my successful query ended up looking like this: "a community that" <WITHIN 3 Words> Us

 

As it turns out, the date of the letter in which this phrase is found is erroneous (through no fault of Accordance, I would assume), and the translation is slightly different from what it in the Afterword ("in all this we stand within a community that carries us"). 

 

So that gives an idea of my problem. If there are other ways of doing the same thing, I'm all ears! Thanks again to both of you for your help.

Edited by Donald Cobb
Link to comment
Share on other sites

Thank you for the details. I think what happened is that, since the phrase was not found in the tool, the search converted to a FLEX search which is equivalent to all AND commands. We introduced this because of the effect of years of Google searching by the public. Scholars used to expect very specific searches, but people are now used to entering a few words and getting the most relevant results whether or not the words are treated as a phrase. In 12.0.6, the tool displays a little magnifying glass to the right of the entry box which indicates the type of search and allows you to switch.

Link to comment
Share on other sites

Thank you Helen for that information. I am still left with two questions that perhaps you (or someone else) could help with:

 

- What do the parentheses actually do? The Help blurb says this "Parentheses are used to specify logical groupings of expressions. The expressions inside the parentheses are evaluated first and then combined with the other expressions in the argument". However, I can't for the life of me figure out what it means. What would an example of that look like?

 

- Am I correct in concluding that a construct search can't be done in non Biblical texts such as Bonhoeffer's Work? Or, there again, am I missing something?

 

Many thanks!

 

Don Cobb

Link to comment
Share on other sites

You are correct on the construct searches.

 

Parentheses help with searches with 3 or more elements. For example:

 

(A B) C finds places where either A and B occur together or C occurs alone.

 

A (B C) finds places where A occurs with either B or C.

Link to comment
Share on other sites

You are correct on the construct searches.

 

Parentheses help with searches with 3 or more elements. For example:

 

(A <AND> B) <OR> C finds places where either A and B occur together or C occurs alone.

 

A <AND> (B <OR> C) finds places where A occurs with either B or C.

 

Ok. Thanks for the help Helen. I just tried your first construct, which seems to give slightly different results, i.e., (A <AND> B <OR> C) gives me all the occurrences of A + B or A + C.

 

Regards,

 

Don Cobb

 

Don

Link to comment
Share on other sites

The first one is not displayed correctly, it should be (A B ) C

I added a space so the the B followed by close parenthesis does not turn into a smiley!

 

Yes, A B C might give the same results, but it is better to specify what you want using parentheses.

Link to comment
Share on other sites

The first one is not displayed correctly, it should be (A <AND> B ) <OR> C

I added a space so the the B followed by close parenthesis does not turn into a smiley!

 

Yes, A <AND> B <OR> C might give the same results, but it is better to specify what you want using parentheses.

 

Yes, I was wondering about that smiley! Thanks again for the help!

 

Don

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...