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 9213651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:47:53+00:00 2026-06-18T01:47:53+00:00

I am trying to segment a Korean string into individual syllable. So the input

  • 0

I am trying to segment a Korean string into individual syllable.
So the input would be a string like “서울특별시” and the outcome “서”,”울”,”특”,”별”,”시”.
I have tried with both C++ and Python to segment a string but the result is a series of ? or white spaces respectively (The string itself however can be printed correctly on the screen).
In c++ I have first initialized the input string as string korean="서울특별시" and then used a string::iterator to go through the string and print each individual component.
In Python I have just used a simple for loop.

I have wondering if there is a solution to this problem. Thanks.

  • 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-06-18T01:47:54+00:00Added an answer on June 18, 2026 at 1:47 am

    I don’t know Korean at all, and can’t comment on the division into syllables, but in Python 2 the following works:

    # -*- coding: utf-8 -*- 
    print(repr(u"서울특별시"))
    print(repr(u"서울특별시"[0]))
    

    Output:

    u'\uc11c\uc6b8\ud2b9\ubcc4\uc2dc'
    u'\uc11c'
    

    In Python 3 you don’t need the u for Unicode strings.

    The outputs are the unicode values of the characters in the string, which means that the string has been correctly cut up in this case. The reason I printed them with repr is that the font in the terminal I used, can’t represent them and so without repr I just see square boxes. But that’s purely a rendering issue, repr demonstrates that the data is correct.

    So, if you know logically how to identify the syllables then you can use repr to see what your code has actually done. Unicode NFC sounds like a good candidate for actually identifying them (thanks to R. Martinho Fernandes), and unicodedata.normalize() is the way to get that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get all css link from html like this segment of
I am trying to draw a figure something like this: I need to have
While trying to evaulate polynomials using Horner's Rule I have a sample code segment
I am trying to simply have a segment when selected pick a factor and
I am trying to setup routing based on the 1st URI segment. I have
I am trying to write an algorithm that tries to segment a webpage into
Trying to match string like this: /2011/10/Lorem-ipsum-dolor-it-amet-consectetur-adipisicing /2011/10/Lorem-ipsum-dolor-it-amet-consectetur-adipisicing/ and /2011/10/4545 /2011/10/4545/ And get year,
I am trying to write a file with data into my shared memory segment.
So, in an html page I'm trying to have a php segment echo some
I'm trying to dynamically segment each generated-label and hardcoded input pair with div tag's.

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.