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

Write the rule interpreter utils file #566

Closed
code-geek opened this issue Jan 30, 2024 · 0 comments · Fixed by #572
Closed

Write the rule interpreter utils file #566

code-geek opened this issue Jan 30, 2024 · 0 comments · Fixed by #572

Comments

@code-geek
Copy link
Contributor

code-geek commented Jan 30, 2024

Description

Since we're moving to a model where the webapp is the component that interprets our curation rules and not Sinequa, we need to write an interpreter module.

Implementation Considerations

Main module:
Pattern interpreter: Given a pattern, it returns the URLs in the system that match this pattern. This already exists.

Types of rules:

  • Exclude rules
    For these we can simply ignore the URLs being excluded from being added to the final JSON output. We shouldn't delete them off the webapp but rather store them with include=False like we already do.

  • Include rules
    These need to go on the final JSON output. You can add patterns here.

  • Title rules

  1. Rewrite the old title with a new title
  2. Use the {title} variable to reference the old title and add something to the beginning or end of it.
  3. XML component: Use xpaths to select something on the webpage that should be used in the above (don't implement yet.)
  • Document Type rules
    Replace sourcestr56 for certain URLs.

Deliverable

A working module that can interpret rules as outlined above, and integration with existing pipelines.

@code-geek code-geek linked a pull request Jan 31, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant