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

Added contacts feature, documented in core/contacts/README.md. #1706

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wolfmanstout
Copy link
Contributor

I have been holding onto this one in my fork for a while, yet it's one of the most useful extensions to community I've written. Long ago I used to put contacts into vocabulary, but they end up conflicting with other words. By adding explicit suffixes and a predictable grammar, it is so much easier to work with them. As a bonus, you never have to remember email addresses again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If preferred, I could add this section directly to the top-level readme, or link to it from there.

@@ -120,14 +120,28 @@ def word(m) -> str:
)


@mod.capture(rule="({user.vocabulary} | <phrase>)+")
@mod.capture(rule="({user.vocabulary} | <user.prose_contact> | <phrase>)+")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could also add this to <user.word> above -- just bear in mind that it'll take multiple words to speak it, and some result in multiple words.

)
def raw_prose(m) -> str:
"""Mixed words and punctuation, auto-spaced & capitalized, without quote straightening and commands (for use in dictation mode)."""
return apply_formatting(m)


# For dragon, omit support for abbreviations
# For dragon, omit support for abbreviations and contacts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it works with Dragon -- I just don't know because I don't use that anymore.

Copy link
Member

@knausj85 knausj85 left a comment

Choose a reason for hiding this comment

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

This looks great and is working very well for me, thanks! I'll leave it open for now for other maintainers to chime in.

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.

3 participants