您现在的位置是:首页 >

单韵母有哪些字母 计算出拼音的声调字母是哪个

火烧 2023-03-08 03:02:37 1046
计算出拼音的声调字母是哪个   im ort java io * //导入操作要用到的类   u lic cla mai {   u lic tatic void mai Stri g arg []

计算出拼音的声调字母是哪个  

  import java io *;//导入操作要用到的类

  public class main {

  public static void main(String args[]) {

  File file = new File( c:/test txt );// 源文件位置

  FileReader fr;

  try {

  fr = new FileReader(file);

  BufferedReader in = new BufferedReader(fr);// 包装文件输入流 可整行读取

  String line;

  try {

  while ((line = in readLine()) != null) {

  String a = pinyin(line);

  int shengdiaoLetter = Integer parseInt(a substring(

  a length() a length()));

  a = a substring( a length() ) +

  + a substring(shengdiaoLetter shengdiaoLetter + );

  System out println(a);

  }

  } catch (IOException e) {

  // TODO Auto generated catch block

  e printStackTrace();

  }

  } catch (FileNotFoundException e) {

  // TODO Auto generated catch block

  e printStackTrace();

  }// 创建文件输入流

  }

  private static String pinyin(String input) {

  int position = ;

  int onlyaeiou = ;

  input = input toLowerCase();

  // 单个韵母不必说 (单个的韵母 当然就标它上面了)

  if (ntains( a )) {

  onlyaeiou++;

  }

  if (ntains( e )) {

  onlyaeiou++;

  }

  if (ntains( i )) {

  onlyaeiou++;

  }

  if (ntains( o )) {

  onlyaeiou++;

  }

  if (ntains( u )) {

  onlyaeiou++;

  }

  if (ntains( v )) {

  onlyaeiou++;

  }

  if (onlyaeiou == ) {

  if (ntains( a )) {

  position = input indexOf( a );

  }

单韵母有哪些字母 计算出拼音的声调字母是哪个

  if (ntains( e )) {

  position = input indexOf( e );

  }

  if (ntains( i )) {

  position = input indexOf( i );

  }

  if (ntains( o )) {

  position = input indexOf( o );

  }

  if (ntains( u )) {

  position = input indexOf( u );

  }

  if (ntains( v )) {

  position = input indexOf( v );

  }

  return input + position;

  }

  if (ntains( a )) {

  position = input indexOf( a );

  return input + position;

  }

  // 没有a母找o e

  else if (ntains( o )) {

  position = input indexOf( o );

  return input + position;

  } else if (ntains( e )) {

  position = input indexOf( e );

  return input + position;

  }

  // iu 并列标在后

  if (ntains( iu )) {

  position = input indexOf( iu ) + ;

  return input + position;

  }

  if (ntains( a )) {

  position = input indexOf( a );

  return input + position;

  }

  if (ntains( e )) {

  position = input indexOf( e );

  return input + position;

  }

  if (ntains( i )) {

  position = input indexOf( i );

  return input + position;

  }

  if (ntains( o )) {

  position = input indexOf( o );

  return input + position;

  }

  if (ntains( u )) {

  position = input indexOf( u );

  return input + position;

  }

  if (ntains( v )) {

  position = input indexOf( v );

  return input + position;

  }

  return input;

  }

  }

lishixinzhi/Article/program/Java/hx/201311/26739  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码