question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Arguments

See original GitHub issue

Hello,

I’d like to request arguments for phones_for_word such as stress_marks=False. That would be brilliant.

And also the ability to convert multiple words in a single string. Perhaps a for_phone_in_words function

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aparrishcommented, Aug 30, 2018

These are great suggestions, thank you! In the first case, it’s easy enough to implement on your own, something like:

>>> import pronouncing, re
>>> [re.sub(r"\d", "", item) for item in pronouncing.phones_for_word("perfect")]
['P ER F EH K T', 'P ER F IH K T']

In the second case, I’m hesitant to introduce word tokenization logic into the library, since it’s such a can of worms, and I feel like most of the bug reports I would get would be about the word tokenization algorithm being wrong or insufficient (instead of what the library is supposed to be about, e.g., getting pronunciation information about words). I’d encourage users instead to make a decision about their own method of tokenizing words for their particular use case and work from there. E.g., with nltk:

>>> import nltk
>>> ' '.join([pronouncing.phones_for_word(item)[0] for item in nltk.word_tokenize("this is a test!") if item in pronouncing.lookup])
'DH IH1 S IH1 Z AH0 T EH1 S T'

Though on second thought that is kind of a mouthful. I’ll take it into consideration and would also be happy to consider a pull request with this feature…

0reactions
Acryptarchcommented, May 26, 2020

That’s a fair point. What other features do you think would be useful? Maybe an implementation of the logios tool in python would be a good addition to this library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Content Parameters/Arguments
Hello,. Writing to request the following feature: The ability to add parameters to the shortcode that will replace text in the content. Like...
Read more >
3 ways to manage software feature request - Amoeboids
Some best practices to consider include: · Keep all feature requests in one place. · Create a process for updating it. · Communicate...
Read more >
pass arguments automatically and individually in pipelines ...
Feature request A form of pipeline that automatically passes its first input argument on to the next actor, along with any additional ...
Read more >
Feature Request: Parameter automation - Decent Sampler Q&A
Hi Dash. Thanks for your question. The problem we've been facing is that JUCE, the audio library that DecentSampler is based on, ...
Read more >
Feature request: support for vectorized parameters in httpstan
As of version 4.5.0, httpstan's log_prob endpoint does not support models which define vectors of parameters. My team is interested in integrating Stan...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found