Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allign word and count searches #81

Open
another-helpful-user opened this issue Sep 28, 2022 · 4 comments
Open

Allign word and count searches #81

another-helpful-user opened this issue Sep 28, 2022 · 4 comments

Comments

@another-helpful-user
Copy link

Hello,
thank you for the nice package and documentation!

I managed to search for co-occurences using the pattern
terms =[[A],[B]
inclusions=[C]
coming to a search string of "(A) AND (B) AND (C)".

How can I design a word search with the same search string?
So far I only managed "(A) OR (B) AND (C)" or "(A) AND (B or C)" via inclusions. I can then get the dois from the result and find overlaps, but that's rather annoying and not within the package framework.

Any help is appreciated.

@TomDonoghue
Copy link
Member

Hey @another-helpful-user - sorry for being late to reply to this, I missed it before.

I'm not quite sure I understand the questions - in terms of search terms, there are several examples on the tutorials / documentation that cover different kinds of searches:
https://lisc-tools.github.io/lisc/auto_tutorials/index.html

If this doesn't answer your request, could you provide an example of what you are trying to search for?

@JoaoPimenta88
Copy link

Hello Tom,
Is it possible to have more than one inclusion on a term?

Meaning:
Term: (A)
Inclusion: (B)
Inclusion: (C)

(A) AND (B) AND (C)

Thank you.

@TomDonoghue
Copy link
Member

Hey @JoaoPimenta88 - yeh, you can add more than one inclusion per term, just add them as a list of inclusions, and they should all be joined together with 'AND'. You can see an overview of term construction here - in the inclusions part try out adding extra terms and double check that it works as expected.

@JoaoPimenta88
Copy link

I created a list of inclusions but it adds them with OR instead of AND.

terms = [['cars']]
base = Base()
base.add_terms(terms)
inclusions = [['wheels','colour','year']]
base.add_terms(inclusions, 'inclusions')
base.check_terms()
print(base.make_search_term(0))

Output:
("cars")AND("wheels"OR"colour"OR"year")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants