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

Cookbook receipe on extract event details from text #1269

Conversation

scampion
Copy link
Contributor

If useful, an example to illustrate how to extract event details from a message like :

Hello Kitty, my grandmother will be here , I think it's better to postpone our
appointment to review math lessons to next Friday at 2pm at the same place, 3 avenue des tanneurs, 
I think that one hour will be enough
see you 😘 

to

{
  "title":"Math lessons",
  "location":"3 avenue des tanneurs",
  "start":"2024-11-22T14:00:00Z"
}

Indeed, the next Friday is the 22 November, the smallest models cannot infer relative date like this example of ‘next Friday’ with precision and a real benchmark would be welcome, or maybe another approach with a function call

Btw, moving the python code in a dedicated file allow to benefit of the precommit hooks and homogenous code
In the future, it may also allow to test example dynamically gererate output to be sure that the documentation is consistant (like for the scikit learn documentation )

scampion and others added 2 commits November 15, 2024 16:28
Moving the python code in a dedicated file allow to benefit of the precommit hooks and homogenous codeMoving python code to a dedicated file lets you benefit from precommit hooks and homogeneous code
In the future, it may also allow to test example dynamically gererate output to be sure that the documentation is consistant (like for the scikit learn documentation In the future, it could also be used to test examples and integrate output into the construction of documentation to ensure that it is valid and consistent (as with scikit learn documentation).
)
library dedicated to Apple Silicon processor (M series).

```python
--8<-- "docs/cookbook/extract_event_details.py"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will that inline the content of the python script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and that python script will be evaluated by the precommit hooks.

the mkdoc.yml need also the pymdownx.snippets: config

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, didn't know about this

@rlouf rlouf merged commit 568f252 into dottxt-ai:main Nov 27, 2024
5 checks passed
@rlouf
Copy link
Member

rlouf commented Nov 27, 2024

Thank you!

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 this pull request may close these issues.

2 participants