Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6168197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:38:41+00:00 2026-05-23T22:38:41+00:00

I am sorry the last time I had used this website was my first

  • 0

I am sorry the last time I had used this website was my first time and I did not indent my code and all. But this time I tried to do so. I hope the code is understandable. I am working on a python program syllabifier.py written by Joshua Tauberer available from https://p2tk.svn.sourceforge.net/svnrooot/p2tk/python/syllabify/syllabifier.py. This program is free to use and also I have referenced the source in my project. I am using this program to syllabify the list of phonemes I have as an input. This program takes in an input file whose contents is like the following:

pau s aa m ih k l eh k t aa n ih t pau g eh l v ae n ih k pau aa p l ay k pau

These are the phonemes generated from a speech file. pau stands for short pauses. Then this program syllabifies this input to produce an output like the following :

s aa ‘ m ih ‘ k l eh k ‘ t aa ‘ n ih t ‘ g eh l ‘ v ae ‘ n ih ‘ k aa ‘ p l ay k

This output is the syllabified version. But the program generated this output when I manually deleted pau from the input file. As the program only recognizes phonemes and pau is not one. So I need to make a change in the program that would delete all existing pau from the list. I have copied here the main part of the program. I added the lines
text.remove(“pau”) and also tried by adding another one which is phoneme.remove(“pau”). But with both cases I get an error saying: str object has no attribute remove. I do not understand where am I going wrong. Please help. Thank you very much.

def syllabify(language, text) :

 text.remove("pau") 
 if type(text) == str :
    text = text.split()

 syllables = [] # This is the returned data structure.

 internuclei = [] # This maintains a list of phonemes between nuclei.

 for phoneme in text :
    #phoneme.remove("pau")
    phoneme = phoneme.strip()
    if phoneme == "" :
        continue
    stress = None
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:38:42+00:00Added an answer on May 23, 2026 at 10:38 pm
    def syllabify(language, text) :
        #These lines will take any list of phonemes or string of phonemes
        #and strip all of the whitespace and 'pau's
        #and won't return any empty phonemes
        if type(text) is not str:
            text = ' '.join(text)
        text.replace("pau", "") 
        text = text.split()
    
        syllables = [] # This is the returned data structure.
        internuclei = [] # This maintains a list of phonemes between nuclei.
    
        for phoneme in text:
            # so you don't have to check for empty phonemes,
            # delete 'pau's, or strip whitespace here
            stress = None
            # whatever else you do
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First time poster so sorry if this is too long, but I've hit a
First of all thanks for taking your time to help me with this. Sorry
First of all, sorry for my bad English. For my last project on my
Sorry but I am not sure how to ask this question but I am
Sorry for being to vague last time I asked this question. I have this
First of all; sorry if this has been asnwered before, I have searched for
I have been a follower for a long time but this is the first
Sorry for this simple question, but I can't solve it... There is an example:
Sorry, I know this question is easy, but I don't know how to get
Sorry if this question seems stupid, but it's stumped me for a couple days,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.