如何向非技术测试人员解释带有示例的排序(数字,词典和排序规则)? [英] How to explain sorting (numerical, lexicographical and collation) with examples to non technical testers?

查看:53
本文介绍了如何向非技术测试人员解释带有示例的排序(数字,词典和排序规则)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用法语和西班牙语的姓氏和姓氏来解释差异.任何指针表示赞赏.我进行了Google搜索,但结果并不令人满意.

I need to explain the differences using French and Spanish first and last names. Any pointers are appreciated. I did a Google search but the results are not satisfactory.

推荐答案

以下是一些说明:

在这种情况下,您在不考虑数字的情况下对文本进行了排序.实际上,数字只是字母",没有数字组合的含义.

In this case, you sort text without considering numbers. In fact, numbers are just "letters", they have no numeric combined meaning.

这意味着文本"ABC123"被排序为字母A,B,C,1、2和3,而不是A,B,C,然后是数字123.

This means that the text "ABC123" is sorted as the letters A, B, C, 1, 2 and 3, not as A, B, C and then the number 123.

不幸的结果是,对看起来像的东西排序应该像数字一样对进行排序.

This has the unfortunate consequence that ordering things that might look like they should order like numbers doesn't.

例如,对这两个进行排序时:

For instance, when sorting these two:

ABC90
ABC100

您可能希望90的那个在100之前排序,因为90在100之前,但这不是字典顺序的工作原理,它将9与1进行比较,然后四处交换.

You might expect the one with 90 to be sorted before 100 because 90 comes before 100, but that's not how lexicographical ordering works, it compares the 9 with the 1, and then swaps them around.

通过使90排在100之前,可以使上述排序正常工作.如果在两个文本中都遇到数字,则自然排序将切换为部分文本的数字排序.

This is the ordering that would make the above ordering work properly, by sorting 90 before 100. Natural ordering switches to numeric ordering for a portion of the text, if it encounters numbers in both texts.

这可以处理诸如语言之间的差异之类的事情.

This one handles things like variations between languages.

通常,字典顺序将一个字母与另一个字母进行比较,并通常根据字母的值"确定其顺序.这可能会产生一些奇怪的效果.

Normally, lexicographical ordering compares one letter to another letter, and determines their order, usually according to the "value" of the letter. This can have some strange effects.

例如,您如何看待以下两个字符串的顺序?

For instance, how do you think the following two strings would be ordered?

ABCTEN
ABCßEN

好吧,由于ß的字母序数值(即Unicode字母中的位置")的值可能比T高,因此上述顺序将是结果.基本上,如果您查看包含所有字母的Unicode图表,您可能会发现T的符号值小于100,而ß大于100.

Well, since the letter for ß might have an ordinal value (ie. its "place" in the Unicode alphabet) that has a higher value than the T, the above order is what would be the outcome. Basically, if you go look in the Unicode chart that contains all the letters, you might find that T has a symbol value of less than 100, and the ß be above 100.

但是,在德国,您应该将上述两个文本视为:

However, in Germany, you should consider the above two texts as this:

ABCTEN
ABCSSEN

,因此它们的顺序应该颠倒,因为S在T之前.

and thus their order should be reversed, since S comes before T.

这是基于排序规则的排序.您为您的文本选择一个排序规则,以描述应在其中处理这些文本的上下文.这样您就可以自然获得不同语言的排序.

This is collation-based ordering. You pick a collation for your text that describes the context in which those texts should be processed. This allows you to get natural ordering in different languages.

例如,在挪威,字母Æ,Ø和Å排在Z之后,但是在其他语言中(我忘记了),Æ应该排在E之后,Ø排在O和Å之后在A之后.排序规则规定了这一点.

For instance, in Norway, the letters Æ, Ø and Å are ranked as coming directly after the Z, however in other languages (I forget which), Æ should be ranked just after E, Ø just after O and Å just after A. The collation dictates this.

这篇关于如何向非技术测试人员解释带有示例的排序(数字,词典和排序规则)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆