<commit_before>//
//  SettingViewController.swift
//  SpeechRecognition
//
//  Created by yolo on 2017/3/31.
//  Copyright © 2017年 <NAME>. All rights reserved.
//

import UIKit

class SettingViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
      view.backgroundColor = UIColor.white
      title = "设置"
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
  }

}<commit_msg>Update 添加设置<commit_after>//
//  SettingViewController.swift
//  SpeechRecognition
//
//  Created by yolo on 2017/3/31.
//  Copyright © 2017年 <NAME>. All rights reserved.
//

import UIKit
import RxSwift
import RxCocoa

class SettingViewController: UIViewController, UITableViewDelegate {
  
  fileprivate weak var tableView: UITableView?
  fileprivate var inputWordObservable = Variable.init(["上传词表"])
  fileprivate let disposeBag = DisposeBag()
  
  override func viewDidLoad() {
    super.viewDidLoad()
    view.backgroundColor = UIColor.white
    title = "设置"
    let tableView = UITableView.init(frame: CGRect.zero, style: .grouped)
      .then {
        $0.register(UITableViewCell.self, forCellReuseIdentifier: "SettingCell")
    }
    view.addSubview(tableView)
    
    tableView.do {
      $0.snp.makeConstraints({ [unowned self] (make) in
        make.edges.equalTo(self.view)
      })
    }
    
    inputWordObservable
      .asObservable()
      .bindTo(tableView.rx.items(cellIdentifier: "SettingCell", cellType: UITableViewCell.self))  { (row, element, cell) in
        cell.textLabel?.text = element
      }
      .addDisposableTo(disposeBag)
    
    tableView.rx
      .setDelegate(self)
      .addDisposableTo(disposeBag)
    
    tableView.rx
      .itemSelected
      .map({ [unowned self] indexPath in
        return (indexPath, self.inputWordObservable.value[indexPath.row])
      })
      .subscribe(onNext: { (indexPath, str) in
        if indexPath.section == 0 && indexPath.row == 0 {
          
        }
      })
      .addDisposableTo(disposeBag)
    
  }
  
  override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
  }
}
{'fraction_non_alphanumeric': 0.10772833723653395, 'fraction_numerical': 0.012177985948477752, 'mean_word_length': 2.7539543057996485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889611', 'n_tokens_mistral': 715, 'n_tokens_neox': 664, 'n_words': 137}