public ActionResult Save(QualityMetric qualityMetric) { int temp = 0; foreach (var qmetric in _context.QualityMetrics.ToList()) { if (qualityMetric.MetricNum == qmetric.MetricNum) { temp = qmetric.MetricNum; } } if (qualityMetric.MetricNum != temp) { _context.QualityMetrics.Add(qualityMetric); } else { var qmterInDb = _context.QualityMetrics.Single(s => s.MetricNum == qualityMetric.MetricNum); qmterInDb.MetricNum = qualityMetric.MetricNum; qmterInDb.Criteria_Id = qualityMetric.Criteria_Id; qmterInDb.Factor_Id = qualityMetric.Factor_Id; qmterInDb.Subject_Id = qualityMetric.Subject_Id; qmterInDb.Description = qualityMetric.Description; qmterInDb.TypeofMetric = qualityMetric.TypeofMetric; qmterInDb.TypesofValue = qualityMetric.TypesofValue; qmterInDb.TypeofQualifiration = qualityMetric.TypeofQualifiration; qmterInDb.RelationofMetric = qualityMetric.RelationofMetric; qmterInDb.RatedBased = qualityMetric.RatedBased; } _context.SaveChanges(); return(RedirectToAction("Index", "Database")); }
public static void AddNewQualityMetric(QualityMetric qm) { qm.SegmentId = SelectedSegmentId; qm.ParagraphId = SelectedParagraphId; qm.Created = DateTime.Now; qm.Modified = DateTime.Now; Control.Value.AddNewQualityMetric(qm); }
public static QualityMetricGroup get_QualityMetrics(string type = "") { var metricGroup = new QualityMetricGroup { Name = "", Description = "", MaxSeverityValue = 50, MaxSeverityInValue = 1000, MaxSeverityInType = "words" }; metricGroup.Severities.Add(new Severity("Minor", 1, -1)); metricGroup.Severities.Add(new Severity("Major", 5, -1)); metricGroup.Severities.Add(new Severity("Critical", 10, -1)); QualityMetric qm = null; if (type.Trim() == string.Empty || string.Compare("SAE J2450", type, StringComparison.OrdinalIgnoreCase) == 0) { metricGroup.Name = "SAE J2450"; metricGroup.Description = "SAE J2450 translation quality metric standard\r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf"; qm = new QualityMetric { Name = "Wrong Term", Modifed = DateTime.Now, Description = "Given the definition of term, we define a ‘wrong term’ to be any target language term that: \r\n\r\na. Violates a client term glossary;\r\nb. Is in clear conflict with de facto standard translation(s) of the source language term in the automotive field;\r\nc. Is inconsistent with other translations of the source language term in the same document or type of document unless the context for the source language term justifies the use of a different target language term, for example due to ambiguity of the source language term;\r\nd. Denotes a concept in the target language that is clearly and significantly different from the concept denoted by the source language term\r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[2] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Omission", Modifed = DateTime.Now, Description = "An error of omission has occurred if: \r\n\r\na. A continuous block of text in the source language has no counterpart in the target language text and, as a result, the semantics of the source text is absent in the translation; \r\nb. A graphic which contains source language text has been deleted from the target language deliverable. \r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Syntactic error", Modifed = DateTime.Now, Description = "A syntactic error comprises the following cases: \r\n\r\na. A source term is assigned the wrong part of speech in its target language counterpart. \r\nb. The target text contains an incorrect phrase structure, e.g., a relative clause when a verb phrase is needed.\r\nc. The target language words are correct, but in the wrong linear order according to the syntactic rules of the target language.\r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Word structure or agreement error", Modifed = DateTime.Now, Description = "Word Structure or agreement error: \r\n\r\na. An error of incorrect word structure has occurred if an otherwise correct target language word (or term) is expressed in an incorrect morphological form, e.g., case, gender, number, tense, prefix, suffix, infix, or any other inflection. \r\nb. An error of agreement has occurred when two or more target language words disagree in any form of inflection as would be required by the grammatical rules of that language. \r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Misspelling", Modifed = DateTime.Now, Description = "A misspelling has occurred if a target language term: \r\n\r\na. Violates the spelling as stated in a client glossary, \r\nb. Violates the accepted norms for spelling in the target language,\r\nc. Is written in an incorrect or inappropriate writing system for the target language. \r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Punctuation error", Modifed = DateTime.Now, Description = "The target language text contains an error according to the punctuation rules for that language. \r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Miscellaneous error", Modifed = DateTime.Now, Description = "Any linguistic error related to the target language text which is not clearly attributable to the other categories listed previously should be classified as a miscellaneous error. \r\n\r\nReference: http://www.apex-translations.com/documents/sae_j2450.pdf", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); } else if (string.Compare("MQM Core", type, StringComparison.OrdinalIgnoreCase) == 0) { metricGroup.Name = "MQM Core"; metricGroup.Description = "MQM Core (Multidimensional Quality Metrics)\r\n\r\n"; metricGroup.Description += "In order to simplify the application of MQM, MQM defines a smaller “Core” consisting of 22 issue types that represent the most common issues arising in linguistic quality assessment of translated texts. The Core does not address formatting and many applications may wish to add items from the Design branch to the Core. The Core represents a relatively high level of granularity suitable for many tasks. Where possible, users of MQM are encouraged to use issues from the Core to promote greater interoperability between systems"; qm = new QualityMetric { Name = "Accuracy > Mistranslation", Modifed = DateTime.Now, Description = "The target content does not accurately represent the source content.\r\n\r\nExample: A source text states that a medicine should not be administered in doses greater than 200 mg, but the translation states that it should be administered in doses greater than 200 mg (i.e., negation has been omitted).", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Accuracy > Terminology", Modifed = DateTime.Now, Description = "A term (domain-specific word) is translated with a term other than the one expected for the domain or otherwise specified.\r\n\r\nExample: A French text translates English e-mail as e-mail but terminology guidelines mandated that courriel be used.", MetricSeverity = metricGroup.Severities[2] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Accuracy > Omission", Modifed = DateTime.Now, Description = "Content is missing from the translation that is present in the source.\r\n\r\nExample: A paragraph present in the source is missing in the translation.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Accuracy > Untranslated", Modifed = DateTime.Now, Description = "Content that should have been translated has been left untranslated.\r\n\r\nExample: A sentence in a Japanese document translated into English is left in Japanese.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Verity > Completeness", Modifed = DateTime.Now, Description = "The text is incomplete.\r\n\r\nExample: A process description leaves out key steps needed to complete the process, resulting in an incomplete description of the process.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Verity > Legal requirements", Modifed = DateTime.Now, Description = "A text does not meet legal requirements as set forth in the specifications.\r\n\r\nExample: Specifications stated that FCC regulatory notices be replaced by CE notices rather than translated, but they were translated instead, rendering the text legally problematic for use in Europe.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Verity > Locale-specific content", Modifed = DateTime.Now, Description = "Content specific to the source locale does not apply to the intended target locale, audience, or purpose.\r\n\r\nExample: An advertising text translated for Sweden refers to special offers available only in Germany and therefore is misleading.\r\n\r\nNotes: This issue type is distinguished from locale-convention in that this category applies to cases where text corresponds to the conventions of the target locale, but does not apply to the intended audience in the target locale. For example, if the Swedish advertising text mentioned above is properly translated and follows all mechanical locale conventions (e.g., using Swedish kronor instead of euros) but the offer does not apply to Sweden, cocale-specific-content should be chosen. If, however, the text applies to the locale, but does not follow locale conventions (e.g., numbers are formatted incorrectly for the locale), locale-convention should be used instead.", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Content > Register", Modifed = DateTime.Now, Description = "The text uses a linguistic register inconsistent with the specifications or general language conventions.\r\n\r\nExample: A legal notice in German uses the informal du instead of the formal Sie.", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Content > Stylistics", Modifed = DateTime.Now, Description = "The text has stylistic problems, other than those related to language register.\r\n\r\nExample: A text uses a confusing style with long sentences that are difficult to understand.", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Content > Inconsistency ", Modifed = DateTime.Now, Description = "The text shows internal inconsistency.\r\n\r\nExample: The text states that bug reports should be submitted to a mailing list in one place and via an online bug tracker tool in another.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Mechanical > Spelling", Modifed = DateTime.Now, Description = "Issues related to spelling of words.\r\n\r\nExample: The German word Zustellung is spelled Zustetlugn.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Mechanical > Typography", Modifed = DateTime.Now, Description = "Issues related to the mechanical presentation of text. This category should be used for any typographical errors other than spelling.\r\n\r\nExample: A text uses punctuation incorrectly.\r\n\r\nNotes: Do not use for issues related to spelling.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Mechanical > Style guide", Modifed = DateTime.Now, Description = "The text violates style defined in a normative style specification.\r\n\r\nExample: Specifications stated that English text was to be formatted according to the Chicago Manual of Style, but the text delivered followed the American Psychological Association style guide.", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Mechanical > Grammar", Modifed = DateTime.Now, Description = "Issues related to the grammar or syntax of the text, other than spelling and orthography.\r\n\r\nExample: An English text reads “The man was seeing the his wife.”", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Mechanical > Locale convention", Modifed = DateTime.Now, Description = "The text does not adhere to locale-specific mechanical conventions and violates requirements for the presentation of content in the target locale.\r\n\r\nExample: An incorrect format for currency is used for a German text, with a period (.) instead of a comma (,) as a thousands separator.\r\n\r\nNotes: This issue type is distinguished from locale-specific-content in that this category refers only to whether the text is given the proper mechanical form for the locale, not whether the content applies to the locale or not. If text conforms to conventions for the locale, but does not apply to the target locale, locale-specific-content should be used instead.", MetricSeverity = metricGroup.Severities[0] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Fluency > Unintelligible ", Modifed = DateTime.Now, Description = "The exact nature of the error cannot be determined. Indicates a major break down in fluency.\r\n\r\nExample: The following text appears in an English translation of a German automotive manual: “The brake from whe this કુતારો િસ S149235 part numbr,,.”", MetricSeverity = metricGroup.Severities[2] }; metricGroup.Metrics.Add(qm); } else if (string.Compare("LISA QA Metric", type, StringComparison.OrdinalIgnoreCase) == 0) { metricGroup.Name = "LISA QA Metric"; metricGroup.Description = "LISA and its marks are the property of the Localization Industry Standards Association and are used with permission. LISA is one of the default QA models which your company can use to structure the feedback given by reviewers on the quality of translations. This model is based on the LISA QA metric from the Localization Industry Standards Association. The feedback categories and severities defined in the model are made available to reviewers in the Reviewer Grading window on the Translation screen.\r\n\r\nIn the LISA QA metric, errors are categorized as Minor, Major or Critical. For example if a segment contains one minor and one major mistranslation, you would enter 1 in the Minor column and 1 in the Major column for DOC Language - Mistranslation. When you enter a number in a category it is multiplied by a weighting figure. The weighting figures can be seen in the table below. For example, under DOC Language, if you record two minor mistranslations they will generate a score of 2. But if you record two critical mistranslations, they will generate a score of 20. Scores for all segments in the task are added together to give a total score for the task. If the overall quality of the task falls below a predefined threshold, the task will fail the LISA check. The pass or fail status of the check is for information only. A failed task can be submitted to the next stage as usual."; qm = new QualityMetric { Name = "Doc Language > Mistranslation", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Language > Accuracy", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Language > Terminology", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Language > Language", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Language > Style", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Language > Country", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Language > Consistency", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting > Layout", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting > Typography", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric(); qm.Name = "Doc Formatting > Graphics"; qm.Modifed = DateTime.Now; qm.Description = ""; qm.MetricSeverity = metricGroup.Severities[1]; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting > Call Outs and Captions", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting > TOC", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting > Index", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric(); qm.Name = "Help Formatting > Index"; qm.Modifed = DateTime.Now; qm.Description = ""; qm.MetricSeverity = metricGroup.Severities[1]; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting > Layout", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting > Typography", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting > Graphics", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting - Asian > Index", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting - Asian > Graphics", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting - Asian > Localizable Text", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Help Formatting - Asian > Hyper Text Functionality, Jumps/Popups", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Formatting > Graphics", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Formatting > Alignment", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Formatting > Sizing", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Formatting > Truncation/Overlap", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Formatting > Character Formatting", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric(); qm.Name = "Software Functionality Testing > Localizable Text"; qm.Modifed = DateTime.Now; qm.Description = ""; qm.MetricSeverity = metricGroup.Severities[1]; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Functionality Testing > Dialog Functionality", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric(); qm.Name = "Software Functionality Testing > Menu Functionality"; qm.Modifed = DateTime.Now; qm.Description = ""; qm.MetricSeverity = metricGroup.Severities[1]; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Functionality Testing > Hotkeys/Accelerators", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Software Functionality Testing > Jumps/Links", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > TOC", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Index", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Layout", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Typography", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Graphics", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Call Outs And Captions", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Double/Single Size", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); qm = new QualityMetric { Name = "Doc Formatting - Asian > Punctuation Marks", Modifed = DateTime.Now, Description = "", MetricSeverity = metricGroup.Severities[1] }; metricGroup.Metrics.Add(qm); } return(metricGroup); }