Jump to content


Photo

Search for word preceded or followed by one of two words


  • Please log in to reply
6 replies to this topic

#1 Jonathan C. Borland

Jonathan C. Borland

    Gold

  • Active Members
  • PipPipPipPip
  • 200 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 09 October 2013 - 10:14 AM

Hello Accordancers,

 

Please help me construct a search for a certain word with one of two words directly preceding or following it. For example, I'd like to find every occurrence of καρδια that is preceded by or followed by any form of the 2nd or 3rd person personal pronouns (συ/υμεις or αυτος, -η, -ο).

 

I tried this just to try to get instances with KARDIA followed by one of the criteria, but was unsuccessful even at this:

 

 

καρδια <FOLLOWED BY> <WITHIN 1 Words> συ <XOR> αυτος

 

This brings up a ridiculous 5783 false hits on the OS X app.

 

Interestingly, when I do the same search on my iPhone I get a correct 66 hits. But I still need to do the other search with <preceded by> to get my other hits. Is there any way to combine these into a single search?

 

Sincerely,

 

Jonathan C. Borland



#2 Jonathan C. Borland

Jonathan C. Borland

    Gold

  • Active Members
  • PipPipPipPip
  • 200 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 09 October 2013 - 10:21 AM

Using Accordance 10.2.4 (very stable) and iOS 1.6.6.



#3 Helen Brown

Helen Brown

    Mithril

  • Admin
  • 8,497 posts
  • Gender:Female
  • Location:heart in Israel
  • Accordance Version:11.x

Posted 09 October 2013 - 11:42 AM

This is best done in the Construct window. Your search string requests every occurrence of αυτος when καρδια is not followed by συ, as well as every καρδια followed by συ but  not followed by αυτος.

 

καρδια <FOLLOWED BY> <WITHIN 1 Words> συ <XOR> αυτος

 

However, this should work, but is less clear:

 

καρδια <FOLLOWED BY> <WITHIN 1 Words> (συ <OR> αυτος)


Helen Brown
OakTree Software

#4 Jonathan C. Borland

Jonathan C. Borland

    Gold

  • Active Members
  • PipPipPipPip
  • 200 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 09 October 2013 - 07:37 PM

Thanks, Helen.

I hate to impose on your (or fellow Accordancers') time, but could one post a screenshot of the following search.

KARDIA (any form) either preceded by OR followed by either SU/UMEIS (any form) OR AUTOS/-H/-O (any form).

I must beg the expertise of others until I arrive at a reasonable level of competence with the Accordance program I've come to love.

Sincerely,

Jonathan

#5 Jonathan C. Borland

Jonathan C. Borland

    Gold

  • Active Members
  • PipPipPipPip
  • 200 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 09 October 2013 - 07:52 PM

Hold on a sec,

Helen's last post with parentheses gave me an idea, so I tried the following search and it worked!

((su <or> autos) <followed by> <within 2 words> kardia) <or> (kardia <FOLLOWED BY> <WITHIN 3 Words> (autos <OR> su))

Thanks for your help!

Sincerely,

Jonathan

#6 Joel Brown

Joel Brown

    Administrator

  • Admin
  • 3,047 posts
  • Gender:Male
  • Location:Houston, TX
  • Accordance Version:11.x
  • Platforms:Mac OS X, Windows

Posted 09 October 2013 - 07:56 PM

Here's a screenshot of both solutions, Jonathan!

 

Attached File  Screen shot 2013-10-09 at 8.53.49 PM.png   544.17KB   16 downloads

 

You'll note that I decided to use the parentheses rather than the <OR> or <XOR>, to keep the logic a bit clearer.  I also got rid of the <FOLLOWED BY> or <PRECEDED BY>, as the normal <WITHIN> will account for either direction.  You can use the Followed or Preceded if you want to specify and find out which ones are in which order.

 

For the construct, you see it is set up in a similar way.  The only key is that I needed to check the 'Search Both Directions' checkbox to ensure either order.

 

Now, the intrepid viewer will note that my construct results are 2 verses less!  This is actually an interesting distinction between the two:  The construct ignores the hits Eph 1:18 and Heb 3:10.  This is because inbetween the words are punctuation marks (a bracket and a comma, respectively) that the construct counts as 'words', so they aren't WITHIN 1 anymore.  The non-construct WITHIN seems to ignore them, so it still finds the hits.  Its an interesting limitation that I know we have on our list to improve a bit, but thats how it is working right now.

 

Hope this helps!


Joel Brown

By day: Consultant for Oaktree
By night: Freelance Trombonist and Private Instructor

#7 Jonathan C. Borland

Jonathan C. Borland

    Gold

  • Active Members
  • PipPipPipPip
  • 200 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 09 October 2013 - 08:12 PM

Dear Joel,

This is exactly what I was hoping for. It helps me understand the powerful but rather intimidating search functions in the Acc program.

Thank you so much!

Sincerely,

Jonathan




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users