ISEResultReadSentence.m 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // ISEResultReadSentence.m
  3. // IFlyMSCDemo
  4. //
  5. // Created by 张剑 on 15/3/7.
  6. //
  7. //
  8. #import "ISEResultReadSentence.h"
  9. #import "ISEResultTools.h"
  10. @implementation ISEResultReadSentence
  11. -(instancetype)init{
  12. if(self=[super init]){
  13. self.category=@"read_sentence";
  14. }
  15. return self;
  16. }
  17. -(NSString*) toString{
  18. NSString* buffer = [[NSString alloc] init];
  19. if ([@"cn" isEqualToString:self.language]) {
  20. buffer=[buffer stringByAppendingFormat:@"[ISE Results]\n"];
  21. buffer=[buffer stringByAppendingFormat:@"Content:%@\n" ,self.content];
  22. buffer=[buffer stringByAppendingFormat:@"Duration:%d\n",self.time_len];
  23. buffer=[buffer stringByAppendingFormat:@"Total Score:%f\n",self.total_score];
  24. buffer=[buffer stringByAppendingFormat:@"[Read Details]:%@\n",[ISEResultTools formatDetailsForLanguageCN:self.sentences]];
  25. } else {
  26. if (self.is_rejected) {
  27. buffer=[buffer stringByAppendingFormat:@"Dirty Read,"];
  28. buffer=[buffer stringByAppendingFormat:@"except_info:%@\n\n",self.except_info];
  29. }
  30. buffer=[buffer stringByAppendingFormat:@"[ISE Results]\n"];
  31. buffer=[buffer stringByAppendingFormat:@"Content:%@\n",self.content];
  32. // buffer=[buffer stringByAppendingFormat:@"Duration:%d\n",self.time_len];
  33. buffer=[buffer stringByAppendingFormat:@"Total Score:%f\n",self.total_score];
  34. buffer=[buffer stringByAppendingFormat:@"[Read Details]:%@\n",[ISEResultTools formatDetailsForLanguageEN:self.sentences]];
  35. }
  36. return buffer;
  37. }
  38. @end