dataesr/scientific-paragraphs-categorization huggingface dataset:
Dataset restrictions for the distribution of complexity inside characters The set of scripts included for testing the prediction that characters' first halves are more complex than their last halves was the same as for the other hypotheses, with one exception. The scripts typically written and read in a top-to-bottom or bottom-to-top direction were excluded, along with scripts for which the direction of writing is uncertain, variable, or in boustrophedon style. The resulting list contains 124 scripts (97 scripts usually written from left to right, 27 scripts usually written and read from right to left). See https://osf. io/pmr34/ and detailed reports in Files at https://osf. io/v8khp/.
Generating pictures of characters A picture of each character was generated using a range of Unicode identifiers (an identifier is a code of four or five alphanumeric characters uniquely identifying a character) and a font (a font is a particular graphical instantiation of a character). The script generating the pictures (written in bash) fixed the size of the picture at 500 by 500 pixels, and an initial font size for drawing the symbols at 60. Whenever a script presented characters that would be to too big to fully fit within the 500 by 500 pixels canvas, it was rerun at a smaller point size. In such cases, we decreased point size 5 by 5, until reaching a size at which all characters would fit inside the canvas. This was necessary for only four scripts ([Egyp], [Bali], [Mymr], [Gran], with respective final point sizes of 55, 45, 55 and 40).
Pictures of characters' vertical halves Each character picture in our dataset was automatically split vertically, i. e. , it was cut into two halves (right and left) separated by a vertical line. To do so, we used the pictures exactly as they had been processed as described in the preceding steps. We split them in two equal-size halves, and re-padded them to an equal, constant size (see Fig. 4 ). Padding avoids having parts of the characters starting at the picture's border, which can be problematic for calculating the perimetric complexity measures in Mathematica. Padding here means that we add pixels of the background's color (black) on the side that directly cuts the character (see step 3 of Fig. 4 ). Vectorized pictures cannot easily be cut in half because they do not have a 'size' in pixels, so the cutting step was applied on pictures processed for perimetric complexity, and then transformed again to compute algorithmic complexity measures.
Phylogeny, size, type, and other information The variables included in our analyses were the graph inventory size of each script (the number of characters that it includes), its family (a category based on each script's geography and ancestry), its type (e. g. , alphabet, abugida, syllabary, etc. ), and whether or not the script was idiosyncratic. We classify scripts created by identifiable creators in the last two centuries, with no predominant influence from any single existing script, as "idiosyncratic". For analyses using character-level measures, an additional grouping variable script refers to the specific script to which they belong. Whenever applicable, ancestor, i. e. , which other script is considered an ancestor of the script, was also used.
Sources Our starting point was the dataset published in  Morin (2018). To obtain information on scripts that were included in this study but not in  Morin (2018) , we used the sources listed in that paper. One of the sources used in Morin (2018) ("Ethnologue: Languages of the World" n. d. ), could not be used in our study, due to its shift to a for-pay model. All variables were coded by pooling together all available information from our sources. A majority rule was applied whenever our sources gave contradictory information.
Script classification: Families Our script family variable mostly followed the classification established by  Morin (2018)  (drawing mainly on  Daniels & Bright, 1996)   This family variable is not strictly phylogenetic: in addition to phylogenetic information in the form of ancestry (i. e. , parent and offspring scripts), family also includes geographic information. This classification adheres to and reflects previously established conventions in reference documents seminal to the study of writing systems  (Daniels & Bright, 1996). A strict interpretation of phylogenetic information is captured by our ancestor variable. As for all other variables, each script's last common ancestor was determined by pooling together information from all our sources. When sources were consistent with one another but differed in their specificity, the most specific source (citing the ancestor that was closest in time to its descendant) was chosen.
Types of writing systems Based on definitions from  Daniels & Bright (1996, p. 4) , we classified scripts according to the linguistic unit their graphemes mapped onto, and recoded the information from our sources according to the following classification (all quotations below from  Daniels & Bright, 1996) : -alphabet: "the characters denote consonants and vowels". -abjad (or consonantary in  Daniels & Bright, 1996) : "the characters denote consonants (only)". In other words, such scripts let readers supply the appropriate vowel. -abugida: "each character denotes a consonant accompanied by a specific vowel, and the other vowels are denoted by a consistent modification of the consonant symbols". They are also referred to as syllabic alphabets, or alphasyllabaries in other sources. -syllabary: "the characters denote particular syllables, and there is no systematic graphic similarity between the characters for phonetically similar syllables".
Idiosyncratic scripts Scripts were considered idiosyncratic if they fulfilled the following criteria. (1) precise information is known about their inventors (most often, their name). (2) There is no scholarly consensus that they derive their shape from the influence of one single identified ancestor. Most resemble no known script; others fuse many influences together so that no single dominant influence is discernible. (3) The script was invented after 1800. This definition excludes invented scripts such as Cherokee  [Cher] , which was invented de novo by an identifiable inventor, but nonetheless bears the dominant influence of one script (in Cherokee's case, the Latin script).
Direction of writing Direction of writing was obtained from four sourcestwo websites: Wikipedia and Omniglot, and two reference books  (Daniels & Bright, 1996; Rogers, 2005). We decided to use the dominant direction of writing in our coding, even for scripts that are occasionally written in the opposite direction. For instance, the sinogram-based script used for the Chinese languages [Hani] is usually written and read from left to right, but occasionally also from right to left: we nonetheless decided to code it as written and read from left to right. For all the scripts included in this study and mentioned in Morin, 2018 (n = 109) we used Morin's information after double-checking it against Omniglot. Scripts that were not referenced on Omniglot were double-checked with the ScriptSource website.
For the remaining 24 scripts, a consensus method was applied. For six scripts, we found discrepancies between Morin's coding and Omniglot (or ScriptSource if the script wasn't referenced on Omniglot). In two cases we established that Morin was mistaken (Meroïtic hieroglyphs [Mero] and Meroïtic cursive  [Merc] ). In four other cases, disagreements between sources were important enough to conclude that the script was either not well documented, or extremely variable, with regard to direction of writing. These scripts were thus excluded: the Batak script (for Karo) [Batk], the Japanese syllabaries [Hrkt], the Linear B script  [Linb] , and the Old North Arabian script [Narb].
Size hypothesis Size has an impact on character complexity: the more characters in a script, the more complex the characters. However, this effect depended on whether large scripts (with graph inventory size >200), including logosyllabaries (or morphosyllabaries), were included or not (see Fig. 5 ). The size variable (number of characters in a script) was used as predictor in a nested regression analysis. The scripts were grouped by family to account for shared cultural influences between distinct scripts. These families were used as the grouping variable in linear mixed models with random intercept, using the lmer function of the lme4 package for R  (Bates, Maechler, Bolker, & Walker, 2014). A null model was built first, with a random intercept for family and for type; a second model introduced the script's size (i.
e. , graph inventory size) as a fixed effect. On the full dataset (total N = 47,880 characters from 133 scripts), the best null model for characters' perimetric complexity included both type and script (the latter variable nested by family) as random effects. A model adding size as a fixed effect shows larger scripts to be more complex than smaller ones (β = 0. 12, 95%CI[0. 073, 0. 175], df = 21. 222, t = 4. 78, p < 0. 001 for perimetric complexity; β = 0. 04, 95%CI[0. 0245, 0. 0747], df = 24. 79, t = 3. 873, p < 0. 01 for algorithmic complexity). Models were refitted using maximum likelihood for comparison purposes, showing that the test model was more informative (informativeness being assessed using Akaike's Information Criterion, AIC) (Δ AIC = 12. 5 for perimetic complexity, Δ AIC = 46 for algorithmic complexity).
Using a subset comprising exclusively scripts with less than 200 characters (N = 5566, on 124 scripts), similar to  Changizi and Shimojo (2005) , there is no longer an effect of graph inventory size. If we remove large scripts (scripts including 200 characters or more) from the dataset, larger scripts were not more complex than simpler ones, neither for perimetric (b = 0. 06, 95%CI[-0. 048, 0. 168], df = 92. 03, t = 1. 086, p = 0. 28) nor for algorithmic complexity (b = 0. 03, 95%CI[-0. 012, 0. 076], df = 100. 58, t = 1. 42, p = 0. 159). Most of the effect of graph inventory size seems to depend on the inclusion of a few very large systems (mostly East Asian) which also tended to have very complex characters. We thus replicated the results from both  Changizi and Shimojo's (2005)  and  Chang et al.
's (2016)  results: character complexity does not seem to be influenced by size, as long as we restrict our analyses to the scripts in the same range as  Changizi and Shimojo (2005) 's analyses. However, we show that this null result depends on the exclusion of high-size, high-complexity scripts. As all such large and highly complex scripts correspond to those which are logographic in our dataset, this finding is consistent with Chang et al. 's interpretation that type determines the size differentials that matter for character complexity.
Homogeneity hypothesis We predicted that the script to which a character belongs would account for over half of the variance in character complexity. Contrary to our prediction, the script variable accounted for less than half of the variance, and in fact type captured more of the variance in character complexity than either script or family. This was true for both perimetric and algorithmic complexity, see Fig. 6. The intraclass correlation (ICC) was calculated on raw values for perimetric complexity measures and on log-transformed values for algorithmic complexity (in order to avoid convergence issues), using the ICC1. lme function in the "psychometric" R package  (Fletcher, 2010). 38. 57% of the variance in perimetric complexity and 38. 49% of the variance in algorithmic complexity is accounted for by a character's inclusion in a particular script.
By comparison, family accounts for 29. 74% (algorithmic complexity) to 45% (perimetric complexity) of the variance, whereas type captures 68. 26% of the variance in perimetric complexity and 55. 43% of the variance in algorithmic complexity. Most of the variance in letter complexity is thus captured by the type of writing system which the letter belongs to (e. g. , alphabetic, syllabic, etc. ). The actual script that a letter belongs to (e. g. Brahmic  [Brah] , Greek [Grek]) does not predict as much variance as its type. This was extremely surprising to us, given all the things that letters from the same script share: a common history, a set of basic constituent strokes, a preferred medium of inscription, a population of users, etc.
Descendants hypothesis We hypothesized that, considering branching-out events, a "parent" script's characters would be more complex than its "offspring" script's characters. For each pair, the ancestor's average complexity (i. e. , the mean complexity of its characters) was subtracted from the descendant's average complexity (as pre-registered). Our dataset included information on 102 branching-out events, from 29 different ancestor scripts. The most frequent parent script was Brahmi [Brah], with 25 offspring scripts. A parent script had, on average, 3. 55 descendants (SD = 4. 98). When controlling for ancestry (i. e, including ancestor as a random effect), algorithmic complexity did not seem subject to any systematic effect: no significant increase or decrease in complexity occurred with branching-out events (β = 12.
001). Adding the script's average character complexity to our model did not make it more informative (Δ AIC = 6 in favor of the Second row: Algorithmic complexity First-last half differential (AC) by script and writing direction. Third row: average perimetric complexity (PC) First-last half differential by script and writing direction. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article. ) original model), suggesting the effect is evenly spread between highcomplexity and low-complexity scripts. Visual search for potential outliers did not suggest the effect to be driven by outlier scripts. Adding script directionality to the model improved model informativeness (Δ AIC = 4), but the effect of directionality was small and non-significant (β = -0.
39, 95% CI  [-18, -17] ; df = 170. 11, t = -0. 43, p = 0. 96), and not indicative of marked differences between Left-right scripts and Right-left scripts. First halves are more algorithmically complex than last halves, regardless of the script's average complexity and directionality. For perimetric complexity, the intercept was positive as predicted, but this effect was weak and did not reach significance (β = 0. 585; 95% CI [0. 001802, 1. 1689]; df = 98. 41, t = 1. 966, p = 0. 0521). However, script directionality strongly influenced the first-half / last-half complexity differential. Our model was made more informative by the inclusion of script directionality (Δ AIC = 5), showing a higher first-half / last-half differential for Right-left scripts (effect of directionality: β = 2. 82, 95%  CI [1.
Prediction 2: Complexity differentials between character halves depend on order (first vs. last), more than laterality (left vs. right) We tested this prediction by comparing two models. Each model used character halves as data points, nested according to the character from which they were taken, the script of that character, and the family of that script. We added each half's position in reading order (first or last) as a fixed effect to the first nesting model (order model). In the second nesting model (side model), however, we included each half's laterality (left or right) as a fixed effect. For algorithmic complexity, the prediction was confirmed: the order model was more informative than the side model (Δ AIC = 64). The order model included a clear negative effect for order (order = last, β = -46.
In other words, we predict that the complexity differential between the left half and the right half is sensitive to writing direction: in scripts written from left to right, the left half / right half differential tends to favor the left half, and vice-versa. This prediction is indifferent to the absolute size or direction of the left half / right half complexity differential, being only interested in how this differential is modulated by the direction of writing in a script. Thus, it tests our hypothesis without being confounded by our measurements' main point of disagreement, i. e. , the distribution of visual complexity between the left and right halves of letters. For each character (in each script, and for each complexity measure), we calculated the Left-right differential, i. e. , the complexity of the Left half minus the complexity of the Right half.
In line with this, we found that most of the variance in complexity was accounted for by the type of writing system that a script was mainly used for (e. g. , alphabetic, syllabic, etc. ). Contrary to our predictions, the script that a character belonged to did not account for as much variance in character complexity as writing system type did. In previous studies, causality was usually assumed to flow from type to graph inventory size to character complexity. This assumption underpins  Chang et al. (2018)  evaluation of different measures of character complexity in relation to the different measures' capacity to distinguish between types of scripts. Our results suggest the relationship between type and character complexity may not be mediated by the graph inventory size, as previously assumed  (Chang et al.
No decrease in character complexity Overall, there was little evidence of a decrease in complexity over the long-term history of scripts. We put forward two hypotheses derived from our assumption that scripts should manifest a historical decrease in character complexity. Neither were supported. Idiosyncratic scripts were not more complex than scripts that were exposed to evolutionary pressures for several centuries. Overall, character complexity did not decrease when parent scripts branched out into descendant scripts. We provide and discuss two possible interpretations of these results: (1) differences in the use of scripts may generate statistical noise, or (2) the decrease in character complexity occurs early and rapidly in a script's history. Social and cultural factors varying from context to context could have impacted the complexity of scripts' characters.
Distinct scripts were used for distinct purposes, and by distinct populations. It is unclear how variation in function would have impacted complexity directly, but it implied different populations of users, ranging from trained scribes to nearly everyone in the population. Higher complexity might have been maintained more easily when scripts were used only by a specialized fraction of the population. Finally, in some cases, writing, and especially handwriting, is made to reflect social belonging, through unnecessary sophistication  (Thornton, 1996). Nevertheless, variation in complexity due to function or users can only be expected to have a local influence, i. e. , to be circumscribed to the specific contexts and environments in which there is either a narrow function for writing and/or restrictions on who can join the community of users.
The distribution of visual complexity inside characters reflects script directionality For algorithmic complexity, we found, as predicted, that the first halves of letters were more complex than their last halves, regardless of the direction in which the script is written (left-to-right or right-to-left). For perimetric complexity, this first-half advantage was not significant, contrary to what we had predicted. However, we had reasons to believe perimetric complexity to be biased at the level of character halves. Cutting character pictures in half creates new delineations absent from the complete picture, and perimetric complexity is by definition highly sensitive to contour lengths. Furthermore, we showed that our two measures differed in the amount of complexity they measure on the right-side and left-side of letters, quite independently of writing direction.
Some argue that important information is concentrated on the right-side of (Latin) letters  (Kolers, 1969; Shimron & Navon, 1981) , others, to the contrary, argue that it is concentrated on the left  (Soares et al. , 2019). The literature on Chinese characters is more consistent, with several studies finding that the left-side of (roughly) symmetrical characters provides more identification-relevant information  (Hsiao & Cottrell, 2009; Tianyin Liu et al. , 2018; Tso et al. , 2014) , an effect possibly mediated by reading direction (mostly left-to-right in contemporary Chinese)  (Chung et al. , 2017). Beyond these two famous scripts (and possibly a few others like Hebrew), the study of information distribution within letters remains unstudied for most literate cultures, and the heterogeneity of methods and measurements allows contradictory positions to persist.
Insofar as visual complexity can be interpreted as a proxy for visual information, our study confirms, on a large observational dataset, the intuition that the majority of experimental studies had gotten from studying a few scripts. The direction of reading and writing drives the distribution of complexity inside letters: left halves are more likely to be more complex when they come first. From a cultural evolution point of view, this result supports the burgeoning body of work studying the ways in which letter shapes fit subtle cognitive and perceptual biases. Interestingly, here, the cognitive bias in question is not derived from the structure of natural scenes (as in  Changizi et al. , 2006) , and neither is it rooted in fundamental neural biases (like the preference for cardinal orientations in  Morin, 2018).
Limitations and future directions The current study has several limitations. First, the images we used to analyze scripts were idealizations (as any representation of a script must be). They abstract away a great deal of internal variation due to time, space, and differences between writers, etc. There is also a need to study writing systems on their own, through their own chronological trajectory, which this study was not meant to fulfil (see  Kelly et al. , 2020  for an example: the Vai syllabary of Liberia). Second, the visual complexity of individual characters is only one of many possible ways to consider complexity in scripts. Future research could address other types of complexity and their evolution, such as setlevel complexity (i. e. , how compressible is the whole set of characters included in a script), or as the inventory of patterns or features are reused by different characters in the same script  (Bennett, Gacs, Li, Vitanyi, & Zurek, 1998; Vitányi, Balbach, Cilibrasi, & Li, 2009).
This may allow us to capture constraints related to feature extraction, i. e. , visual processing which treats some parts of characters as separate units, and to discriminability between characters  (Mueller & Weidemann, 2012). Third, character complexity also depends on the way characters are combined and occur in real world settings. The visual complexity of scripts in use differs from the complexity measured on their characters independently from one another. When used alongside simpler characters, higher complexity characters can benefit from a processing advantage, for instance during visual search  (Bernard & Chung, 2011; Chanceaux, Mathôt, & Grainger, 2014). More complex characters would, in that case, have more different features available for use during visual search, helping to distinguish them from other characters.
Acknowledgments We thank  Hans-Jörg Bibiko  for providing us with the bash code generating the raw pictures of characters. We thank  Noro Schlorke  and  Julia Bespamyatnykh  for their help with data collection, and  Simon Kirby ,  Jamie Tehrani ,  Dan Sperber ,  Christophe Heintz  and  Yoolim Kim  for their comments on earlier versions of this manuscript. This work has received funding from the " Frontiers in Cognition" EUR  grant,  ANR-17-EURE-0017   EUR. The research reported in this manuscript was supported by the  European Research Council  under the European Union's  Seventh Framework Programme  ( FP7/2007-2013/ERC  grant agreement no. 609819 ), SOMICS. H. M. was supported by a Complexity postdoctoral fellowship at the  Santa Fe Institute.