Ciprian-Octavian Truicȃ

Jérôme Darmont
email: bjerome.darmont@univ-lyon2.fr

Alexandru Boicea
email: alexandru.boicea@cs.pub.ro

Florin Rȃdulescu
email: dflorin.radulescu@cs.pub.ro

Benchmarking Top-K Keyword and Top-K Document Processing with T 2 K 2 and T 2 K 2 D 2

Keywords: top-k keywords, top-k documents, text analytics, benchmarking, weighting schemes, database systems

Top-k keyword and top-k document extraction are very popular text analysis techniques. Top-k keywords and documents are often computed on-the-fly, but they exploit weighted vocabularies that are costly to build. To compare competing weighting schemes and database implementations, benchmarking is customary. To the best of our knowledge, no benchmark currently addresses these problems. Hence, in this paper, we present T 2 K 2 , a top-k keywords and documents benchmark, and its decision support-oriented evolution T 2 K 2 D 2 .

Both benchmarks feature a real tweet dataset and queries with various complexities and selectivities. They help evaluate weighting schemes and database implementations in terms of computing performance. To illustrate our benchmarks' relevance and genericity, we successfully ran performance tests on the TF-IDF and Okapi BM25 weighting schemes, on one hand, and on different relational (Oracle, PostgreSQL) and document-oriented (MongoDB) database implementations, on the other hand.

Introduction

With the tremendous and continuous development of textual web contents, especially (but not only) on social media, text analytics has become a pivotal trend that still proposes many challenges nowadays. Among text analytics techniques, top-k keyword and document extraction is very popular. For instance, extracting the k most frequent terms from a corpus helps determine trends [START_REF] Ravat | Top keyword: an aggregation function for textual document olap[END_REF][START_REF] Bringay | Towards an on-line analysis of tweets processing[END_REF] or detect specific events [START_REF] Guille | Event detection, tracking, and visualization in twitter: a mention-anomaly-based approach[END_REF]; and finding the k documents that are the most similar to a query is of course the core task of search engines. Moreover, computing top-k keywords and documents requires building a weighted vocabulary, which can also be used for many other text analytics purposes such as topic modeling [START_REF] Alghamdi | A survey of topic modeling in text mining[END_REF] and clustering [START_REF] Aggarwal | A Survey of Text Clustering Algorithms[END_REF].

To compare combinations of weighting schemes, computing strategies and physical implementations, benchmarking is customary. However, most prominent big data benchmarks [START_REF] Huang | The HiBench benchmark suite: Characterization of the MapReduce-based data analysis[END_REF][START_REF] Wang | BigDataBench: A big data benchmark suite from internet services[END_REF][START_REF]Transaction Processing Performance Council (TPC)[END_REF] focus on MapReduce operations and do not specifically model text-oriented workflows. Very few benchmarks do, but still focus on Hadoop-like architectures and remain at the methodology [START_REF] Gattiker | Big data text-oriented benchmark creation for Hadoop[END_REF] and specification [START_REF] Ferrarons | Primeball: a parallel processing framework benchmark for big data applications in the cloud[END_REF] stage. Moreover, computing weighting schemes at the application level can prove inefficient when working with large data volumes, because all the information must be queried, read and processed at a different layer but storage. A better approach is to process the information at the storage layer using aggregation functions and then return the response to the application layer.

Hence, we introduced the Twitter Top-K Keywords Benchmark (T 2 K 2 ) [START_REF] Truicȃ | T 2 k 2 : The twitter top-k keywords benchmark[END_REF], which relies on database storage and features a real tweet dataset, as well as queries with various complexities and selectivities. We also designed T 2 K 2 to be somewhat generic, i.e., it can compare various weighting schemes, database logical and physical implementations and even text analytics platforms in terms of computing efficiency. In this paper, we further this work with the following contributions.

1. Since T 2 K 2 's data model is generic enough to handle any type of textual documents (not only tweets), we complement its workload model with top-k document queries.

2. We illustrate T 2 K 2 's relevance and genericity by performing tests on the TF-IDF and Okapi BM25 weighting schemes, on one hand, and on different relational (Oracle, PostgreSQL) and document-oriented (MongoDB) database implementations, on the other hand.

3. Since T 2 K 2 queries are analytical by nature, we hypothesize that a star (data warehouse) schema should improve query response and propose an evolution of T 2 K 2 named T 2 K 2 D 2 , where the last two Ds stand for Dimensional and Documents, respectively. 4. We complement our first experiments with top-k keyword and top-k document benchmarking with T 2 K 2 D 2 , still testing the TF-IDF and Okapi BM25 weighting schemes, as well as the Oracle, PostgreSQL and Mon-goDB database systems.

We designed our benchmarks' queries by logging computational linguists working on a text analysis platform [START_REF] Truicȃ | Cats: Collection and analysis of tweets made simple[END_REF][START_REF] Truicȃ | A scalable document-based architecture for text analysis[END_REF] on real-world data. After analyzing and clustering similar user queries, we ended up with 8 queries (4 for T 2 K 2 and 4 for T 2 K 2 D 2 ) that we consider generic enough to benchmark any similar system.

Moreover, note that our benchmarks do not apply to Information Retrieval (IR) system evaluation. They rather target database systems built on top of an IR system, with the aim of facilitating text mining, e.g., text classification, topic modeling or event detection. Benchmark queries are relevant to machine learning tasks, where it is important to analyze different subsets of the dataset to extract knowledge. In contrast, IR systems do not handle subsets of the initial corpus well, nor datasets whose size changes in time, because they compute weights only once. However, this creates two result reproducibility problems [START_REF] Lin | Toward reproducible baselines: The open-source ir reproducibility challenge[END_REF]. First, when using subsets of the initial corpus, weights are not recomputed, which induces errors when computing the ranking functions for top-k keywords and documents. Second, weights must be recomputed each time the size of the dataset changes, inducing more write operations that are computationally demanding.

The database approach can solve these result reproducibility problems by dynamically computing weights at search time using fielded data. Although some IR systems do use fielded data [START_REF] Crane | A comparison of document-at-a-time and score-at-a-time query evaluation[END_REF], as they systems compute weights only once, ranking functions do not update weights when subsets of the initial corpus are used or when the volume of data changes [START_REF] Bellot | Report on inex 2013[END_REF], which induces errors during the extraction of top-k documents and keywords. Moreover, computing weights dynamically is ideal for analyzing subsets of the initial dataset or corpora whose size changes over time, e.g., when analyzing stream data [START_REF] Bifet | Sentiment knowledge discovery in twitter streaming data[END_REF]. Database systems are designed to manage large volumes of data with a high throughput and can easily manipulate changing volumes of data by using optimized CRUD (Create, Read, Update, Delete) operations. Thus, they are better suited for handling datasets whose size changes over time and analyzing subsets of the initial corpus.

The remainder of this paper is organized as follows. In Section 2, we survey existing big data and more specifically text processing-oriented benchmarks. In Section 3, we recall T 2 K 2 's data and workload models, and provide T 2 K 2 D 2 's full specifications. In Section 4, we detail how we implement two weighting schemes (namely, TF-IDF and Okapi BM25) and instantiate our benchmarks in Oracle, PostgreSQL and MongoDB. In Section 5, we account for the experiments we performed with both T 2 K 2 and T 2 K 2 D 2 , which demonstrate the feasibility and relevance of our benchmarks. Finally, we conclude the paper and provide research perspectives in Section 6.

Related Works

Big Data Benchmarks

There exist many big data benchmarks, which are mostly data-centric, i.e., they focus on volume and MapReduce-based applications, rather than on variety, and do not include textual data.

For instance, the quasi-standard TPCxHS benchmark models a simple application and features, in addition to classical throughput and response time met-rics, availability and energy metrics [START_REF]Transaction Processing Performance Council (TPC)[END_REF]. Similarly, HiBench is a set of Hadoop programs, ranging from data sorting to clustering, aimed at measuring metrics such as response time, HDFS bandwidth consumption and data access patterns [START_REF] Huang | The HiBench benchmark suite: Characterization of the MapReduce-based data analysis[END_REF].

In contrast, BigDataBench, among 19 benchmarks, features application scenarios from search engines, i.e., the application on Wikipedia entries of operators such as Grep or WordCount [START_REF] Wang | BigDataBench: A big data benchmark suite from internet services[END_REF]. Yet, although BigDataBench is open source, it is quite complex and difficult to extend to test the computation efficiency of term weighting schemes.

Text Analysis Benchmarks

Term weighting schemes are extensively benchmarked in several subdomains of text analytics. In sentiment analysis, dictionary-based methods are benchmarked on various types of corpora (news articles, movie reviews, books and tweets) [START_REF] Reagan | Benchmarking sentiment analysis methods for large-scale texts: A case for using continuum-scored words and word shift graphs[END_REF] to perform both quantitative and qualitative assessments.

In text classification and categorization, benchmarks target different types of texts: short texts represented by sentence pairs with similarity ratings [START_REF] O'shea | Benchmarking short text semantic similarity[END_REF]; large texts from Reuters newswire stories on one hand [START_REF] Lewis | Rcv1: A new benchmark collection for text categorization research[END_REF], and DBpedia and the Open Directory Project on the other hand [START_REF] Partalas | Lshtc: A benchmark for large-scale text classification[END_REF]; or texts in a specific language [START_REF] Kılınç | Ttc-3600: A new benchmark dataset for turkish text categorization[END_REF].

In terms of metrics, all the above-mentioned benchmarks focus on algorithm accuracy. Either term weights are known before the algorithm is applied, or their computation is incorporated with preprocessing. Thus, such benchmarks do not evaluate weighting scheme construction efficiency as we do.

Finally, TextGen is a synthetic textual data generator [START_REF] Wang | Textgen: a realistic text data content generation method for modern storage system benchmarks[END_REF]. TextGen builds corpora by segmenting real-world text datasets and enforces a lognormal wordfrequency distribution. However, TextGen aims at testing the compression performance of word-based compressors, and thus provides no workload or metrics that are suitable to our needs.

Parallel Text Processing Benchmarks

This last family of benchmarks evaluates parallel text processing in big data, cloud applications. However, it is very small (two benchmarks only). The first one is actually a methodology for designing text-oriented benchmarks in Hadoop [START_REF] Gattiker | Big data text-oriented benchmark creation for Hadoop[END_REF]. It provides both guidelines and solutions for data preparation and workload definition. Yet, as text analysis benchmarks, its metrics measure the accuracy of analytics results, while we aim at evaluating computing performance.

PRIMEBALL features a fictitious news site hosted in the cloud that is to be managed by the framework under analysis, together with several objective use cases and measures for evaluating system performance [START_REF] Ferrarons | Primeball: a parallel processing framework benchmark for big data applications in the cloud[END_REF]. One of its metrics notably involves searching a single word in the corpus. However, PRIMEBALL remains a specification only as of today.

Benchmark Specifications

Text analysis deals with discovering hidden patterns from texts. In most cases, it is useful to determine such patterns for given groups, e.g., males and females, because they have different interests and talk about disjunct subjects.

Moreover, if new events appear, depending on the location and time of day, these subject can change for the same group of people. The queries we propose aim to determine such hidden patterns and improve text analysis and anomaly detection.

Typically, a benchmark is constituted of a data model (conceptual schema and extension), a workload model (set of operations) to apply on the dataset, an execution protocol and performance metrics [START_REF] Darmont | Data-Centric Benchmarking[END_REF]. In this section, we provide a conceptual description of T 2 K 2 and T 2 K 2 D 2 , so that it is generic and can cope with various weighting schemes and database logical and physical implementations. For generalization purposes, the models will contain the words "document" and "documents" for naming the entities, instead of words "tweet" and "tweets".

Text Preprocessing

Text preprocessing is an important task used in Text Mining and Analysis, Information Retrieval and Natural Language processing. Text preprocessing involves cleaning and preparing texts for different tasks, e.g., classification, IR or sentiment analysis. Usually, textual data contain lot of noise and uninformative parts such as HTML tags, scripts and links. At the word level, common words impact negatively the task at hand. Removing these so-called stop words decreases the problem's dimensionality [START_REF] Haddi | The role of text pre-processing in sentiment analysis[END_REF]. Moreover, preprocessing is used to extract information and metadata from text, standardize the document corpus, remove useless information and minimize the dimensionality of the data.

In our benchmarks, tweets are preprocessed a priori. Lemmas are extracted from each word and stop words removed to minimize vocabulary size and improve the accuracy of machine learning algorithms such as topic modeling and document clustering. End users can preprocess data as they see fit and then store the information in the database using the models provided by the benchmark. In our preprocessing step, words that are abbreviated are considered words in their own sense, i.e., they are not expanded. For instance, we consider "omg" as a word on his own. Misspellings are currently retained, although in a next version of the preprocessing step, we plan to address this problem. Moreover, abbreviations and misspellings only affect the selectivity of queries, as the vocabulary stores them too.

The preprocessing steps we apply on raw texts to construct the weighted vocabulary follow.

1. For each tweet, we extract tags, i.e., hashtags (which make good keywords), attags, and remove links.

2. We expand contractions, i.e., shortened versions of the written and spoken forms of a word, syllable, or word group, created by omission of internal letters and sounds [START_REF] Cooper | Literacy: Helping students construct meaning[END_REF]. For example, "it's" becomes "it is".

3. We split the text of a tweet into sentences.

4. We extract the part of speech for each sentence.

5. We build a clean text by removing punctuation and stop words.

6. For each term in a clean text, we use the part of speech to extract lemmas and create a lemma text. 7. For each lemma t in lemma text d, we compute the number of co-occurrences f t,d and term frequency T F (t, d), which normalizes f t,d .

3.2. T 2 K 2

Data Model

All the information and metadata extracted during the preprocessing step are modeled using the entity-relationship presented in Figure 1. Let us describe all entities in this conceptual model.

• Author stores information about a tweet author, e.g., unique identifier, firstname, lastname, and age.

• Gender is used to store the authors gender and to remove duplication in the database.

• Document entity stores all the textual information and metadata for a tweet, e.g., the unique identifier of the tweet, the date, and the original and the processed text of the text, i.e., original text (RawText), clean text (CleanText) and lemma (LemmaText).

• Writes is the many-to-many relationship between an author and a tweet.

• to eliminate duplicates and minimize the storage space, the Geo Location is used to store the geo-location for each tweet.

• Word entity stores the lemma and its unique identifier.

• Vocabulary is a many-to-many relationship between the Word and Document entities that stores, beside the unique identifiers of the lemma and tweet, the number of co-occurrence f t,d and term frequency T F (t, d) for a lemma in a tweet. For extracting top-k documents, an additional constraint c 4 on the terms of the vocabulary is needed. This constraint is used to select only the tweets that contain at least one of the word from a list of search terms and construct the tweets hierarchy only for them. Therefore, c 4 is Words.Lemma = pTerms where pTerms ∈ { term | term ∈ vocabulary } . The queries in this case rewritten using the constraints c 1 to c 4 as

c 1 ∧ c 4 (Q1), c 1 ∧ c 2 ∧ c 4 (Q2), c 1 ∧ c 3 ∧ c 4 (Q3) and c 1 ∧ c 2 ∧ c 3 ∧ c 4 (Q4). 3.3. T 2 K 2 D 2 3.3.1. Data Model T 2 K 2 's workload model (Section 3.2.
2) is made of grouping queries akin to OLAP queries. Thus, to improve query performance, we remodel its schema into a multidimensional star schema (Figure 2) featuring a central fact table and multiple dimensions. T 2 K 2 D 2 's schema contains the following entities.

• Document Fact is the central fact entity and contains the number of cooccurrence f t,d and term frequency T F (t, d) for a lemma in a document.

• Document Dimension is the tweets dimension table, containing each tweet's unique identifier and the original and processed text, i.e., original text (RawTtext), clean text (CleanText) and lemma text(LemmaText).

• Word Dimension stores the lema and its unique identifier.

• Time Dimension stores the full date and also its hierarchy composed of minute, hour, day, month and year • Author Dimension is the author dimension and stores information about an author's unique identifier, gender, age, firstname, and lastname.

• Location Dimension is the geo-location dimension.

Workload Model

To adjust to T 2 K 2 D 2 's multidimensional data model, we rewrite T 2 K 2 's queries as OLAP queries. We retain the same constraints c 1 to c 4 , only adapting entity and attribute names. The redefined constraints' specification follows.

• c 1 is Autor Dimension.gender = pGender with pGender ∈ {male, female}. Then, OLAP queries that extract top-k keywords and documents bear the

following contraints: c 1 (Q1), c 1 ∧ c 2 (Q2), c 1 ∧ c 3 (Q3) and c 1 ∧ c 2 ∧ c 3 (Q4); and c 1 ∧c 4 (Q1), c 1 ∧c 2 ∧c 4 (Q2), c 1 ∧c 3 ∧c 4 (Q3)
and c 1 ∧c 2 ∧c 3 ∧c 4 (Q4), respectively.

Performance Metrics and Execution Protocol

We use query response time as the only metric in both T 2 K 2 and T 2 K 2 D 2 . It is detail for each query as t(Q i )∀i ∈ [START_REF] Ravat | Top keyword: an aggregation function for textual document olap[END_REF][START_REF] Alghamdi | A survey of topic modeling in text mining[END_REF]. All queries Q1 to Q4 are executed 40 times for top-k keywords and 10 times for top-k documents, which is sufficient according to the central limit theorem. Average response times and standard deviations are computed for t(Q i ). All executions are warm runs, i.e., either caching mechanisms must be deactivated, or a cold run of Q1 to Q4 must be executed once (but not taken into account in the benchmark's results) to fill in the cache. Queries must be written in the native scripting language of the target database system and executed directly inside said system using the command line interpreter.

Benchmark Implementations

Weighting Schemes

Given a corpus of documents D = {d 1 , d 2 , ..., d N }, where N = |D| is the total number of documents in the dataset and n the number of documents where some term t appears. The TF-IDF weight is computed by multiplying the augmented

term frequency T F (t, d) = K + (1 -K) • f t,d max t ∈d (f t ,d ) ) by the inverted document frequency IDF (t, D) = 1 + log N n , i.e., T F IDF (t, d, D) = T F (t, d) • IDF (t, D).
The augmented form of T F prevents a bias towards long tweets when the free parameter K is set to 0.5 [START_REF] Paltoglou | A study of information retrieval weighting schemes for sentiment analysis[END_REF]. It uses the number of co-occurrences f t,d of a word in a document, normalized with the frequency of the most frequent term t , i.e., max t ∈d (f t ,d ).

The Okapi BM25 weight is given in Equation ( 1 [START_REF] Manning | Introduction to information retrieval[END_REF][START_REF] Jones | A probabilistic model of information retrieval: development and comparative experiments: Part 1[END_REF][START_REF] Jones | A probabilistic model of information retrieval: development and comparative experiments: Part 2[END_REF].

Okapi(t, d, D) = T F IDF (t, d, D) • (k 1 + 1) T F (t, d) + k 1 • (1 -b + b • ||d|| avg d ∈D (||d ||) ) (1)
To extract top-k keywords, the overall relevance of a term t for a given corpus D is computed as the sum of all the TF-IDF (Equation ( 2)) or Okapi BM25

(Equation ( 3)) weights for that term.

S T K T F IDF (t, D) = di∈D T F IDF (t, d i , D) (2)
S T K Okapi(t, D) = di∈D Okapi(t, d i , D) (3)
TF-IDF and Okapi BM25 are also used to ranks a set of documents based on the search query's terms appearing in each document. Given a search query Q = {q 1 , q 2 , ..., q m }, where m = |Q| is the number of terms contained in the query, a document d is scored by either summing all the TFDIF (Equation ( 4))

or the Okapi BM25 (Equation ( 5)) scores for the query terms in the document. • Q1 = γ L ( π documents.id,words.word,fw ( σ c1 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c9 words))).

S T D T F IDF (Q, d, D) = qi∈Q T F (q i , d) • IDF (q i , D) (4)
S T D Okapi(Q, d, D) = qi∈Q T F IDF (q i , d, D) • (k 1 + 1) T F (q i , d) + k 1 • (1 -b + b • ||d|| avg d ∈D (||d ||) ) (5)
• Q2 = γ L ( π documents.id,words.word,fw ( σ c1∧c2 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c8 words))).

• Q3 = γ L ( π documents.id,words.word,fw ( σ c1∧c3 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c9 words c10 geo location)))

• Q4 = γ L ( π documents.id,words.word,fw ( σ c1∧c2∧c3 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c9 words c10 geo location)))

The constraints for the queries are:

• c 1 is the constraint on gender.

• c 2 is the constraint on time.

• c 3 is the constraint on location.

• c 5 to c 10 are the join conditions as follows:

c 5 is the JOIN condition between the documents and documents authors entities.

c 6 is the JOIN condition between the documents authors and authors entities.

c 7 is the JOIN condition between the authors and genders entities.

c 8 is the JOIN condition between the documents and vocabulary entities.

c 9 is the JOIN condition between the vocabulary and words entities.

c 10 is the JOIN condition between the documents and geo location.

Function f w is used to compute the weighting schema using nested queries: words : [ { " t f " : 1 , " count " : 1 , "word" : "amanda" } , { " t f " : 1 , " count " : 1 , "word" : " c a r " } , { " t f " : 1 , " count " : 1 , "word" : " headache " } ] , d a t e : ISODate ( "2015-09-17T23 : 3 9 : 1 1 Z" ) } Queries. In DODBMSs, user-defined functions written in JavaScript are used to compute top-k keywords, regardless of the schema. For T 2 K 2 , the TF-IDF weight can take advantage of both native database aggregation (aggregation pipeline -AP) and MapReduce (MR). However, due to the multitude of parameters involvedand the calculations needed for the Okapi BM25 weighting scheme, the NA method is usually difficult to develop. Thus, we recommend to only use MR in benchmark runs. • Q2 = γ L ( π word dimension.word,fw ( σ c1∧c2 ( document fact c5 word dimension c6 author dimension c7 time dimension ))).

• Q4 = γ L ( π documents
• Q3 = γ L ( π word dimension.word,fw ( σ c1∧c3 ( document fact c5 word dimension c6 author dimension c8 location dimension ))).

• Q4 = γ L ( π word dimension.word,fw ( σ c1∧c2∧c3 ( document fact c5 word dimension c6 author dimension c7 time dimension c8 location dimension ))).

The constraints for the queries are:

• c 1 is the constraint on gender.

• c 2 is the constraint on time.

• c 3 is the constraint on location.

• c 5 to c 8 are the JOIN constraints:

c 5 is the JOIN constraint between document fact and word dimension entities.

c 6 is the JOIN constraint between document fact and author dimension entities.

c 7 is the JOIN constraint between document fact and time dimension entities.

c 8 is the JOIN constraint between document fact and location dimension entities.

Function f w is used to compute the weighting schema using nested queries:

• TF-IDF with the parameters document f act.tf = T F (t, d), the total number of tweets in the corpus and the number of tweets where a term appears;

the last two parameters are computed using individual nested queries.

• Okapi BM25 with parameters document f act.tf = T F (t, d), the total number of tweets oin the corpus, the length of each tweet and the number of tweets where a term appears; the last three parameters are computed using individual nested queries.

Finally, we present the aggregation operator γ L , where L = (F, G) is:

• F = sum(f w ), the sum is the aggregation function that computes S T K T F IDF (t, D) (Equation (2)), respectively S T K Okapi(t, D) ((Equation (3))).
• G = (word dimension.word) is a list of attributes in the GROUP BY clause, in the case the terms (word dimension.word ).

T 2 K 2 D 2 's top-k keywords queries expressed in relational algebra are:

• Q1 = γ L ( π document f act.id document,fw ( σ c1∧c4 ( document fact c5 word dimension c6 author dimension ))).

• Q2 = γ L ( π document f act.id document,fw ( σ c1∧c2∧c4 ( document fact c5 word dimension c6 author dimension c7 time dimension ))).

• Q3 = γ L ( π document f act.id document,fw ( σ c1∧c3∧c4 ( document fact c5 word dimension c6 author dimension c8 location dimension ))).

• Q4 = γ L ( π document f act.id document,fw ( σ c1∧c2∧c3∧c4 ( document fact c5 word dimension c6 author dimension c7 time dimension c8 location dimension

))).

T 2 K 2 D 2 queries that compute the top-k documents on the star schema are similar with the ones that compute the top-k keywords, only the constraint c 4 is added to select the documents that contain the required search terms.

Regardless of the weighting schema used, the f w function is computed differently because it uses different parameters, as follows:

• document f act.tf = T F (t, d).

• the length of each tweet is computed using a nested query

• the number of tweets where a term appears is computed using a nested query Moreover, the aggregation operator γ L is also different from the one in the top-k Keywords, i.e., the grouping is done using the tweet unique identifier (document f act.id document) and the aggregation function

F = sum(f w )
computes the hierarchy of tweets using S T D T F IDF (Q, d, D) (Equation ( 4))

for TF-IDF, respectively S T D Okapi(Q, d, D) (Equation ( 5)) for Okapi BM25, where Q is the list of search terms.

Document-ortiented implementation

Dataset. To implement T 2 K 2 D 2 's star schema in a DODBMS each dimension becomes a nested document, thus a document contains multiple nested docu-ments [START_REF] Chevalier | Implementation of multidimensional databases with document-oriented nosql[END_REF], one for each dimension. Figure 6 presents a document sample for implementing a multidimensional model in a DODBMS. " g e n d e r " : " male " } , " t i m e d i m e n s i o n " : { " minute " : 3 9 , " hour " : 2 3 , " day " : 1 7 , "month" : 9 , " y e a r " : 2 0 1 5 , " f u l l d a t e " : ISODate ( "2015-09-17T23 : 3 9 : 1 1 Z" ) } , " l o c a t i o n d i m e n s i o n " : { "X" : 3 2 , "Y" : 79 } , " words " : [ { " t f " : 1 , " count " : 1 , "word" : "amanda" } , { " t f " : 1 , " count " : 1 , "word" : " c a r " } , { " t f " : 1 , " count " : 1 , "word" : " headache " } ] } MongoDB's performance is tested both in a single-instance and a distributed environment. The distributed environment is composed of a configuration node and 5 slave nodes; each slave becoming a worker in the MR algorithm. The database is distributed using horizontal scaling to test whether weighting scheme computing time decreases as the number of nodes increases. In MongoDB, horizontal scaling is achieved using sharding, and each individual data partition is refered as a shard [START_REF] Bonnet | Reduce, you say: What nosql can do for data aggregation and bi in large repositories[END_REF].

The relational database implementations are tested only on a single-instance environment, because the Oracle Real Application Cluster that is needed to distribute Oracle databases is not free; and because PostgreSQL does not distribute natively, requiring third party software.

Besides indexes on primary keys, no other indexes are used in our tests. The sharding key in the MongoDB distributed environment is the tweet's unique identifier.

Eventually, query parameterization is provided in Table 1.

Dataset

Experiments are done on a 2 500 000 tweets corpus. The initial corpus is split into 5 different datasets that all keep an equal balance between the number of tweets for both genders, location and date. These datasets contain 500 000, 1 000 000, 1 500 000, 2 000 000 and 2 500 000 tweets, respectively. They allow scaling experiments and are associated to a scale factor (SF ) parameter, where SF ∈ {0.5, 1, 1.5, 2, 2.5}, for conciseness sake.

Query Selectivity

Selectivity, i.e., the amount of retrieved data (n(Q)) w.r.t. the total amount of data available (N ), depends on the number of attributes in the where and group by clauses. The selectivity formula used for a query All queries filter on gender, to determine the trending words for female and male users. Starting from Q1, subsequent queries Q2 to Q4 are built by decreasing selectivity (Table 2), regardless of the benchmark, i.e., T 2 K 2 or T 2 K 2 D 2 . Moreover, by adding a constraint on the location in Q3 and Q4, query complexity changes, too.

Q is S(Q) = 1-n(Q) N . For T 2 K 2 ,
Selectivity for the top-k documents is decreased even more by adding a condition on the words attribute for all the queries. Moreover, for both benchmarks, selectivity remains the same (Table 3).

Query Complexity

Complexity relates to the number of traversals involved in the query. Query complexity depends on the number of relationship and entity traversals. The T 2 K 2 D 2 queries complexity for top-k documents is presented in Table 6. In MongoDB, computing TF-IDF is faster than computing Okapi BM25 for all queries, regardless of SF (Figure 7a). The same results are observed in the distributed environment (Figure 7b). The biggest difference in computation time between TF-IDF and Okapi BM25 is obtained for Q1, while the smallest is obtained for Q4 because of its higher selectivity.

The execution times of Q2 and Q4 on Oracle and PostgreSQL are almost constant for all tested scenarios, regardless of weighting scheme or SF , because selectivity is constant in these queries. TF-IDF computing time is almost a third of the computing time for Okapi BM25's for Q4 in Oracle (Figure 7c) due to the complexity of the query itself and of the formula for computing Okapi BM25 w.r.t. TF-IDF. In PostgreSQL, the biggest performance difference between TF-IDF and Okapi BM25 is obtained for Q1 (Figure 7d) due to the large number of rows returned when joining all tables.

Figure 8 presents a comparison by database system and weighting scheme of query response time for retrieving top-k documents w.r.t. scale factor SF .

In MongoDB, computing TF-IDF is faster than computing Okapi BM25 for all queries, regardless of SF (Figure 8a). The same results are observed in the distributed environment (Figure 8b). In this case the performance of MongoDB is stable, regardless of the environment (single node or distributed), the performance curve increases linearly (Figures 8a and8b). Such results are an expected consequence of the variation of query selectivity and complexity, as seletivity decreases and complexity increases from Q1 to Q2. Furthermore, as SF increases, so does seletivity in all queries.

The execution times of Q1 and Q3 for Oracle are getting worse when SF increases, since selectivity increases with the number of documents. In Oracle, the execution time for computing TF-IDF is half of the execution time for computing Okapi BM25 (Figure 8c) regardless of SF . This is a direct consequence of query complexity. The complexity of queries that use the TF-IDF weighting is indeed lower than those that use Okapi BM25 (Table 4). Moreover, in Oracle, the execution time is unstable as the standard deviation fluctuates w.r.t SF due to automatic cache cleaning when query results are too big to be stored in the database's internal buffers.

In PostgreSQL, the biggest performance difference between TF-IDF and Okapi BM25 is obtained for all the queries as the SF increases (Figure 8d).

Moreover, the performance time for computing Okapi BM25 is smaller in all test scenarios than when computing TF-IDF. This is unexpected, as query complexity for computing the top-k documents with TF-IDF is smaller then when using Okapi BM25. We hypothesize that such results are a direct consequence of how the DBMS builds query execution plans, with Oracle being the most 0 100 200

SF 0.5 1 1.5 2 2.5 Time (s)
TF-IDF (Q1 -male) TF-IDF (Q1 -female) Okapi BM25 (Q1 -male) Okapi BM25 (Q1 -female) TF-IDF (Q2 -male) TF-IDF (Q2 -female) Okapi BM25 (Q2 -male) Okapi BM25 (Q2 -female) TF-IDF (Q3 -male) TF-IDF (Q3 -female) Okapi BM25 (Q3 -male) Okapi BM25 (Q3 -female) TF-IDF (Q4 -male) TF-IDF (Q4 -female) Okapi BM25 (Q4 -male) Okapi BM25 (Q4 -female) In MongoDB, using AP instead of MR for computing TF-IDF yields better execution time. In the worst case, AP execution time is indeed half of the time than MR's (Figure 9), because MongoDB is optimized to use AP instead of MR.

Thus, AP provides an alternative to MR and may be preferred sfor aggregation tasks, where the complexity of MP may be unwarranted. However, AP bears some limitations on value types, result size [START_REF] Mongodb | The MongoDB Manual v3.4[END_REF] and memory use [START_REF] Chodorow | MongoDB: The Definitive Guide: Powerful and Scalable Data Storage (2rd Edition)[END_REF].

In the distributed environment, computing TF-IDF using AP takes almost half the time than when using MR for all queries, too, regardless of SF (Figure 9), because AP is also optimized to perform better in a distributed environment than MR, though in both cases, the workload is distributed among all shards. Oracle outperforms MongoDB in a single instance environment for both weighting schemas. Moreover, Oracle is optimized to make the best use of system resources in a single instance environment [START_REF] Bhatiya | Oracle Database Performance Tuning Guide[END_REF].

MongoDB in a distributed environment has the best performance time regardless of the weighting schema. Query execution performance in MongoDB is improved because the workload is distributed between shards and results are aggregated after each shard finishes a task.

5.3.2. T 2 K 2 D 2
Weighting schema comparison. For MongoDB the same patterns in performance appear as for the T 2 K 2 test scenarios. The time performance is almost non-existent between the queries run on T 2 K 2 (Figures 7a and7b) and the ones executed on T 2 K 2 D 2 (Figures 13a and13b). This pattern emerges because MongoDB is a schemaless database and the data modeling does not really influence performance. The same results are optained for the top-k documents (Figures 14a and14b).

Using a multidimensional model improves performance with both Oracle and

PostgreSQL. Using such a model, the indexes used for primary and foreign keys to associate entities make query execution plan optimization easy, because a join does not have to pass through multiple tables as in the normalized model. 5 and6), plays an important role. In Oracle and PostgreSQL, Okapi BM25 weights are computed through nested queries, but in MongoDB, separate queries are needed. To improve MongoDB query performance, an indexing and sharding key analysis should be made, but such a extensive study is outside the scope of this paper.

MongoDB in a single environment has the overall worst performance between the tested databases for top-k keywords (Figures 15 and16), while PostgreSQL for top-k documents (Figures 17 and16). conceptual level, and thus does not include any bridge tables at the logical level for expressing many-to-many relationships, as in T 2 K 2 . Therefore, the number of joins in queries decreases and so does query complexity.

Conclusion

Jim Gray defined four primary criteria to specify a "good" benchmark [START_REF] Gray | The Benchmark Handbook for Database and Transaction Systems[END_REF]:

• Relevance: The benchmark must deal with aspects of performance that appeal to the largest number of users. Considering the wide usage of top-k keywords and documents queries in various text analytics tasks, we think T 2 K 2 and T 2 K 2 D 2 fulfills this criterion. We also show in Section 5 that our benchmark achieves what it is designed for.

• Portability: The benchmark must be reusable to test the performances of different database systems. We successfully used T 2 K 2 and T 2 K 2 D 2 to compare two types of database systems, namely relational and documentoriented systems.

• Simplicity: The benchmark must be feasible and must not require too many resources. We designed T 2 K 2 and T 2 K 2 D 2 with this criterion in mind (Section 3), which is particularly important for reproducibility. We notably made up parameters that are easy to setup.

• Scalability: The benchmark must adapt to small or large computer architectures. By introducing scale factor SF , we allow users to simply parameterize T 2 K 2 and T 2 K 2 D 2 and achieve some scaling, though it could be pushed further in terms of data volume.

Regarding experimental results, for T 2 K 2 's top-k keywords the best TF- When using a multidimensional model with T 2 K 2 D 2 , MongoDB registers the same performance or both top-k keywords and top-k documents as with T 2 K 2 .

Oracle in a single instance has the overall best performance for both tasks. For top-k keywords MongoDB in a single instance has the worst performance while for top-k documents, PostgreSQL has the worst performance.

In future work, we plan to expand T 2 K 2 and T 2 K 2 D 2 dataset significantly to aim at big data-scale volume (scalability). We also plan to adapt our benchmarks so that they run in the Hadoop and Spark environments. Moreover, we intend to further our proof of concept and validation efforts by benchmarking other NoSQL database systems and gain insight regarding their capabilities and shortcomings (relevance). Eventually, we considered in this paper that TF-IDF and Okapi BM25 were enough for machine learning tasks. Yet, the next version of our benchmarks should include other weighting schemes, such as KL-divergence [START_REF] Raiber | Kullback-leibler divergence revisited[END_REF], also to improve their relevance.

Figure 1 :• c 3 is

 13 Figure 1: T 2 K 2 conceptual data model

Figure 2 :

 2 Figure 2: T 2 K 2 D 2 conceptual data model

  ), where ||d|| is d's length, i.e., the number of terms appearing in d. Average document length avg d ∈D (||d ||) is used to remove any bias towards long documents. The values of free parameters k 1 and b are usually chosen, in absence of advanced optimization, as k 1 ∈ [1.2, 2.0] and b = 0.75

4. 2 .

 2 T 2 K 2 implementation 4.2.1. Relational implementation Dataset. The logical relational schema for T 2 K 2 used in both Oracle and Post-greSQL (Figure 3) directly translates the conceptual schema from Figure 1.

Figure 3 :

 3 Figure 3: T 2 K 2 relational data model

  Amanda ' s c a r i s t o o much f o r my headache " , c l e a n T e x t : "Amanda i s c a r i s t o o much f o r my headache " , lemmaText : "amanda c a r headache " , a u t h o r : 9 7 0 9 9 3 1 4 2 , g e o L o c a t i o n : [ 3 2 , 79 ] , g e n d e r : " male " , age : 2 3 , lemmaTextLength : 3 ,

Figure 4 :

 4 Figure 4: Sample T 2 K 2 DODBMS Document

4. 3 .

 3 T 2 K 2 D 2 implementation 4.3.1. Relational implementation Dataset. The logical multidimensional star schema for T 2 K 2 D 2 used in both relational databases management systems (Figure 5) directly translates from the conceptual schema from Figure 2.

Figure 5 :

 5 Figure 5: Star schema diagram

  : "Amanda ' s c a r i s t o o much f o r my headache " , " c l e a n T e x t " : "Amanda i s c a r i s t o o much f o r my headache " , "lemmaText" : "amanda c a r headache " , " lemmaTextLength " : 3 } , " a u t h o r d i m e n s i o n " : { " a u t h o r " : 9

Figure 6 :

 6 Figure 6: Sample T 2 K 2 D 2 DODBMS Document

  all queries traverse the Document, Vocabulary, Word and Gender entities, and the Write and Vocabulary relationships, to extract lemmas and compute weights. All queries use the the document fact, Word Dimnesion and Author Dimension for T 2 K 2 D 2 .

Figure 7 :

 7 Figure 7: Top-k keywords TF-IDF vs. Okapi BM25 comparison

Figure 11 Figure 8 :FigureFigure 10 :

 11810 Figure 11 presents a time performance comparison of database implementations w.r.t. SF and weighting schemes for the top-k documents queries that use the TF-IDF weighting schema, while Figure 12 for the queries that use the Okapi BM25 weighting schema. PostgreSQL has the worst execution time regardless of the weighting schema or SF . Our hypothesis is that PostgreSQL does not optimize the query execution plan due to the absence of indexes.

  Figure 14 for retrieving top-k documents.

ForFigure 11 :Figure 12 :

 1112 Figure 11: Top-k documents query comparison: TF-IDF

Using a multidimensional modelFigure 13 :Figure 14 :

 1314 Figure 13: OLAP top-k keywords TF-IDF vs. Okapi BM25 comparison

Figure 15 :Figure 16 : 17 :Figure 18 :

 15161718 Figure 15: Top-k keywords OLAP query comparison: TF-IDF

  .id,words.word,fw ( σ c1∧c2∧c3∧c4 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c9 words c10

	geo location)))
	4.2.2. Document-ortiented implementation
	Dataset. In a Document Oriented Database Management System (DODBMS),
	all information is typically stored in a single collection. An example of DODBMS
	document is presented in Figure 4. The many-to-many Vocabulary relationship

from Figure

1

is modeled as a nested document for each record. The information about user and date become single fields in a document, while the location becomes an array.

Table 1 :

 1 Query parameter values

	pGender pStartDate pEndDate pStartX pEndX pStartY	pEndY	pWords
								think |
	male |	2015-09-17	2015-09-18	20	40	-100	100	today |
	female	00:00:00	00:00:00
								friday

Table 2 :

 2 Top-k keywords query selectivity

	SF	Q1	Q1	Q2	Q2	Q3	Q3	Q4	Q4
		male	female	male	female	male	female	male	female
	0.5 0.336	0.337	0.517	0.517	0.556	0.558	0.677	0.679
	1	0.342	0.342	0.662	0.662	0.562	0.565	0.774	0.775
	1.5 0.347	0.346	0.736	0.736	0.569	0.572	0.823	0.824
	2	0.351	0.350	0.783	0.783	0.574	0.575	0.855	0.856
	2.5 0.353	0.354	0.815	0.815	0.579	0.580	0.876	0.877

Table 3 :

 3 Top-k documents selectivity for 3 search terms

	SF	Q1	Q1	Q2	Q2	Q3	Q3	Q4	Q5
		male	female	male	female	male	female	male	female
	0.5 0.9844 0.9848 0.9904 0.9905 0.9921 0.9926 0.9951 0.9954
	1	0.9866 0.9868 0.9952 0.9953 0.9932 0.9936 0.9975 0.9977
	1.5 0.9835 0.9837 0.9968 0.9968 0.9917 0.9920 0.9984 0.9985
	2	0.9822 0.9824 0.9976 0.9976 0.9910 0.9913 0.9988 0.9988
	2.5 0.9825 0.9827 0.9981 0.9981 0.9912 0.9915 0.9990 0.9991
	Independently from any weighting schema, for T 2 K 2 computing the number
	of tweets where a term appears and the total number of documents implies two
	aggregation queries that traverse either all entities (Q3, Q4) or all entities but
	Geo Location (Q1, Q2), resulting in a number of 5 traversals for Q3 and Q4
	and 4 traversals for Q1 and Q2. Moreover, some weighting schemes may require
	additional queries, e.g., Okapi BM25 involves tweet lengths. Table 4 presents
	query complexities w.r.t. weighting schemes. Query complexity is the same
	for T 2 K 2 implementation regardless of computing the top-k keywords or top-k
	documents.

Table 5

 5 present the T 2 K 2 D 2 queries complexity for top-k keywords.

Table 4 :

 4 T 2 K 2 query complexity

		Q1 Q2 Q3 Q4
	TF-IDF	12	12	15	15
	Okapi BM25 17	17	21	21

Table 5 :

 5 T 2 K 2 D 2 query complexity for top-k keywords

		Q1 Q2 Q3 Q4
	TF-IDF	3	5	5	7
	Okapi BM25	4	6	6	8

Table 6 :

 6 T 2 K 2 D 2 query complexity for top-k documents

		Q1 Q2 Q3 Q4
	TF-IDF	5	8	8	11
	Okapi BM25	6	9	9	12
	5.3. Experimental Results
	5.3.1. T 2 K

2

Weighting schema comparison. Figure

7

presents a comparison by database system and weighting scheme of query response time for retrieving top-k keywords w.r.t. scale factor SF . This comparison uses only MongoDB's MR query implementations in single-instance and distributed environments, because there is no AP implementation for queries that use Okapi BM25.

https://github.com/cipriantruica/T2K2D2_Benchmark

• TF-IDF with the parameters vocabulary.tf = T F (t, d), the total number of tweets in the corpus and the number of tweets where a term appears; the last two parameters are computed using individual nested queries.

• Okapi BM25 with parameters vocabulary.tf = T F (t, d), the total number of tweets in the corpus, the length of each tweet and the number of tweets where a term appears; the last three parameters are computed using individual nested queries.

The last operator is the aggregation operator γ L where L = (F, G) is:

• G = (words.word) is a list of attributes in the GROUP BY clause, in the case the terms (words.word ).

The queries for determining the top-k documents are similar to the ones that compute the top-k keywords, i.e., the join conditions and function f w are the same. Only the constraint c 4 is added to select the tweets that contain the required search terms. The modification appears at the aggregation operator γ L where the list of the GROUP BY clause attributes changes, this time grouping is done by using the documents.id. Moreover, the aggregation F = sum(f w ) computes the hierarchy of tweets, S T D T F IDF (Q, d, D) (Equation ( 4)) for TF-IDF or S T D Okapi(Q, d, D) (Equation ( 5)) for Okapi BM25, where Q is the list of search terms. T 2 K 2 's top-k documents queries expressed in relational algebra are:

• Q1 = γ L ( π documents.id,words.word,fw ( σ c1∧c4 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c9 words))).

• Q2 = γ L ( π documents.id,words.word,fw ( σ c1∧c2∧c4 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c8 words))).

• Q3 = γ L ( π documents.id,words.word,fw ( σ c1∧c3∧c4 ( documents c5 documents authors c6 authors c7 genders c8 vocabulary c9 words c10 geo location)))


Yves Méheust
email: yves.meheust@univ-rennes1.fr

Simon Dagois-Bohy

Kenneth D Knudsen

Jon O Fossum
email: jon.fossum@ntnu.no

Mesoscopic structure of dry-pressed clay samples from small-angle X-ray scattering measurements

We study weakly-hydrated samples of platelet-shaped nanoparticles obtained by dry-pressing suspensions of the synthetic Nafluorohectorite clay. The particles consist of stacks of several tenths of 1 nm-thick nanosilicate sheets. They form a compound of quasitwo-dimensional particles whose average director is aligned with the direction of the uniaxial stress applied at dehydration. Small-angle X-ray scattering images from these samples are either isotropic or anisotropic, depending on the sample orientation with respect to the X-ray beam. From anisotropic images, we investigate changes in the scattering objects' orientation distribution probability (ODP) function, as we lower the temperature, thus triggering swelling of the individual particles by water intercalation. This is done on the one hand by inferring the width of the ODP function from the eccentricity of quasielliptic iso-intensity cuts of the small-angle scattering images, and on the other hand by obtaining the ODP function from azimuthal profiles of the images. The decays of the scattering intensity as a function of momentum transfer along the two principal directions of the images exhibit power law behaviors. A crossover scale between two power law regimes is observed on the profiles recorded along the horizontal axis; it corresponds to the typical pore size along the direction of the initially-applied load. These results are compared to a previous study of similar systems.

Introduction

Clays are minerals with a grain size smaller than 2 µm. From the morphological point of view, they consist of platelet-shaped grains/crystallites [START_REF] Velde | Introduction to Clay Minerals[END_REF]. The basic structural unit of 2:1 clays, in particular, is a 1 nm-thick phyllosilicate platelet with a negative structural charge on the top and bottom surfaces. Such is Laponite, a much-studied model system for monodisperse platelet colloids (Mourchid et al., 1998;Bonn et al., 1999;Lemaire et al., 1996). Another synthetic 2:1 clay is fluorohectorite. It possesses a structural charge much larger than that of laponite (1.2 e -as opposed to 0.4 e -), which allows the platelets to stack by sharing an intercalated cation X (the particular clay being denoted as X-fluorohectorite) and to remain stacked either in dispersed-or weakly-hydrated state. In poly-crystalline fluorohectorite samples, the grains therefore consist of such nano-stacked particles, with a thickness of about 100 nm (DiMasi et al., 2001;da Silva et al., 2002). They remain platelet-shaped and essentially two-dimensional, their lateral dimension being much larger than their thickness. They also exhibit a large polydispersity in their lateral sizes.

Weakly-hydrated assemblies of nano-stacked particles can be studied in the framework of intercalation compounds [START_REF] Solin | Chemical Physics of Intercalation II[END_REF]. Hydration of individual clay particles, in particular, occurs through the intercalation of water molecules in the space between adjacent silica platelets, inside the stacks. The stepwise swelling of the nano-stacks resulting from molecular packing between clay platelets [START_REF] Skipper | [END_REF][START_REF] Skipper | [END_REF], is a well-known first order transition between hydration states corresponding to up to 4 [START_REF] Suzuki | [END_REF][START_REF] Wada | [END_REF]da Silva et al., 2002). "water layers". The thermodynamically stable state is controlled by the ambient temperature (T ) and humidity (H), and transitions occurring along given (H, T ) lines [START_REF] Wada | [END_REF][START_REF] Da Silva | [END_REF]. For Na-Fluorohectorite and at H ≃ 100%, for example, the system goes from 0 water layers (WL) up to 2WL between 393 and 275 K [START_REF] Da Silva | [END_REF].

In this paper, we study weakly-hydrated poly-crystalline samples of Na-fluorohectorite obtained by dry-pressing aqueous suspensions, under a uniaxial load. In such samples, the platelet-shaped nano-stacks are tightly packed and preferentially oriented perpendicular to the load applied at dehydration. Re-hydrating them causes particle-swelling, and a subsequent re-arrangement of the particles with respect to each other. In a recent study (Méheust et al., 2006a), we studied similar samples and monitored the changes in the particles' orientation probability densities during hydration transitions. In this paper, we also investigate the changes in the geometry of the whole weakly-hydrated assembly under the effect of individual particle swelling, but using small-angle X-ray scattering (SAXS), thus probing larger length scales. Note that small-angle neutron scattering (SANS) has previously been used on similar samples, focusing on typical pore sizes (Knudsen et al., 2004). Here we address predominantly orientational order.

Theoretical background

Sample geometry

The meso-structure of the samples consists of an assembly of Nafluorohectorite particles, i. e., of ∼ 100 nm-thick platelet-shaped nanostacks. The orientation of one clay particle can be described through its director, a unit length director n normal to the top/bottom surfaces of the particle.

The collective geometry of these particles retains a trace of the compaction process that created it: the particles have their directors on average parallel to the direction of the load applied during dehydration. We denote that direction by a mean director n 0. In Fig. 1, we show a schematical cut of a sample through a plane parallel to n 0. The directors of the various particles are distributed in the entire solid angle according to an orientation distribution probability function f that only depends on the deviation angle α of a given director from the mean director n 0 (Méheust et al., 2006a). This geometric description is identical to that of a uniaxial nematic liquid crystal. In order to describe the shape of the ODP function, we use a function identical to that obtained by Maier and Saupe in their classical description of the uniaxial nematic order (Maier & Saupe, 1958;Maier & Saupe, 1959), in the form f (α) ∝ exp(m cos 2 α) .

(1)

Note that: (i) f is normalized to 1 on the range α ∈ [0; π/2], (ii) m is a parameter that controls the width of the distribution, and (iii) in contrast to nematic liquid crystals, there is no theoretical reason to motivate the choice of that particular function in our system. In the process of fitting a model to the data in order to quantify the angular width of the distribution, the Maier-Saupe function provided good fits while allow-

conference papers

ing to relate our observations to a well-known description of an analog geometry.

Regarding the shape of the distribution, the parameter m controls the angular width of the distribution. We rather characterize the halfwidth as the two-dimensional (2D) root mean square of the distribution, defined as

p α 2 f = " 2 π Z π/2 0 α 2 f (α) sin α dα « 1 2 . ( 2
)
To a first approximation, the porous space inside the samples can be described as a system with a mesoporosity at the 0.1 -1 µm scale, in-between the clay particles (see gray shading in Fig. 1), and a microporosity in the inter-layer spaces of the clay particles, i. e., in-between adjacent platelets inside the nano-stacks (see red lines in Fig. 1).

Small-angle scattering by aggregates of particles

Small angle scattering profiles recorded from aggregates of colloids often exhibit power laws on a wide q range (Dietler et al., 1986;Schaefer & Keefer, 1986;Vacher et al., 1988). Except for the anisotropy of the platelet-shaped clay particles and the overall orientational order of their assembly, these models are well suited to describe scattering by the samples presented in section 2.1. Power laws in the scattering curves arise from long range correlations either in the mass geometry of the aggregates, or in the roughness of their pores. However, the exponent D of the power law

I(q) = A q -D + B (3)
(B is the incoherent background scattering) that is fitted to the scattering data is related to the fractal property of the scattering aggregate in a way that depends on whether one addresses a mass-or a surfacefractal [START_REF] Schmidt | The fractal approach to heterogeneous chemistry[END_REF]): If we consider systems in which the aggregated particles are positioned with respect to one another so that their two-point correlation function is a power law function in the form g(r) ∝ r Dm-3 , (4) where D m is a fractal dimension, a power law scattering curve with an exponent -Dm is observed for q values in the range 1/l q 1/a. Here a is the typical size of an aggregated particle, and l is the size of the whole system, i.e., the largest accessible length scale [START_REF] Sinha | Kinetics of Aggregation and Gelation[END_REF][START_REF] Schmidt | The fractal approach to heterogeneous chemistry[END_REF]. The exponent D in Eq. ( 3) is simply D = D m, and is by definition in the range 1 ≤ D < 3.

If we now probe length scales smaller than the particle size, the scattering becomes sensitive to the roughness of the aggregated particles. If this roughness qualifies the particle for being considered a surface fractal with a dimension D s, or more generally if the area of the surface is a power law of its linear dimension with an exponent Ds on a given range of scales, then the scattering profiles exhibit a power law behavior with an exponent -(6 -D s) on that range of scales (Bale & Schmidt, 1984;[START_REF] Schmidt | The fractal approach to heterogeneous chemistry[END_REF]. Here by definition Ds is in the range 2 ≤ D s < 3, and the exponent D in the range 3 < D ≤ 4, with the well-known Porod law limit (4) being reached for smooth particles (Porod, 1951).

Therefore, the scattering curve can be interpreted as resulting either from surface scattering, or from bulk scattering, depending on whether the exponent is in the range 3 < D ≤ 4 or in the range 1 ≤ D < 3. Often those two behaviors are both present, on two q ranges corresponding to length scales smaller-or larger-than the typical particle size, respectively. Note that the understanding of such data is more difficult in the presence of a polydispersity of the aggregated particles, or, equivalently, of a wide distribution for the pore sizes. In this case, an exponent D > 3 can arise both from surface scattering from rough pore walls, or from bulk scattering by a porous media with a wide pore size distribution (Pfeifer & Avnir,83). In the case of the anisotropic clay particles, which have two characteristic length scales instead of one, the experiments are carried out in an intermediate q range corresponding to length scales intermediate between the typical particle thickness and the typical particle width.

Orientation distribution probability functions of platelet-

shaped scattering objects from two-dimensional SAXS data If the incoming X-ray beam hits the sample perpendicular to the mean platelet director n 0 (direction (2) in Fig. 1), the preferential orientation of the scattering objects results in an anisotropy of the twodimensional small-angle scattering images. For nematic systems of monodisperse platelets, the ODP function can be computed from smallangle data, provided that there is no coupling between positional and orientational order, or that no positional correlations are found in the probed q range. Indeed, under these assumptions, the scattering intensity is proportional to the integral over the ODP function of the form factor F(q) of an individual platelet-shaped particle:

I(q, φ) ∝ Z f (α)F(q) sin α dα . (5)
Using this relation, Lemaire et al. have fitted a model to the whole twodimensional scattering pattern in order to compute the order parameter of a nematic dispersion of laponite colloids (Lemaire et al., 1996). Note that Eq. ( 5) still holds when a polydispersity is present, but a further integration on the varying size parameter(s) must be included. Recently, van der Beek et al. proposed a method to infer the ODPs function based on the monitoring of the scattering intensity along circular rings (at a given q value), for systems in which Eq. ( 5) is valid (van der [START_REF] Van Der Beek | [END_REF]. The authors derived an expression for the scattering intensity in the range of q values corresponding to length scales intermediate between the platelet thickness and the platelet width, in the form

I(q, φ) ∝ f (α = φ) q 2 , ( 6
)
where φ is the azimuthal angle. Their study was carried out on a suspension of Gibbsite colloids that were partially aligned by an external magnetic field, and consequently had their directors uniformly distributed in a plane orthogonal to the magnetic field. Such a configuration is analog to, but different from, the nematic geometry addressed here. However, a closer look at the details of their method shows that it can be applied to a configuration such as that presented in Fig. 1, with the beam arriving at the sample according to direction (2). In our polydisperse system, the exponents of q-plots is significantly different from -2 (see section 2.2). Nevertheless, we assume to a first approximation that we can consider, as in the monodisperse case, that the azimuthal intensity variations are controlled by the ODP function and decoupled from the decay along the (radial) q-axis. Hence, we assume that

I(q, φ) ∝ f (α = φ) q γ , ( 7
)
in which γ is an average decay exponent for our system. In what follows, we use Eq. ( 7) to infer the ODP function from two-dimensional SAXS data.

Experiments conference papers

3.1. Experimental method:

3.1.1. Samples: Suspension samples were prepared from sodium fluorohectorite produced by Corning Inc., New York. The raw powder was first suspended in deonized water and stirred for several days. The suspensions were then ion-exchanged in solutions of NaCl, for two days and with an excess of Na + cations approximately 5 times the cation exchange capacity (Kaviratna et al., 1996), so as to yield a suspension where the cations intercalated inside the colloids are all Na + . After removal of the supernatant and of excess cations, by dialysis, the suspension samples were heat-pressed at a temperature of 120 • C, applying a moderate uniaxial load (0.12 MPa) in the direction of gravity. The resulting dehydrated samples were disks with a diameter of 7.2 cm and a thickness of ∼ 2 mm. The global porosity of the samples (i.e, ratio of the pore volume to the total volume) was measured to be 50 % (Knudsen et al., 2004). The clay disks were then cut into 2 × 2 × 6 mm 3 parallelepipedic slices, proper for synchrotron experiments.

SAXS experiments:

Measurements were carried out at beamline BM-26B of the European Synchrotron Radiation Facility (ESRF), in Grenoble (France), using an energy ∼ 8 keV. Scattered X-rays were recorded on a 2-dimensional detector (a square matrix of 512 × 512 elements). The X-ray wavelength and the camera length were both calibrated using the fiber diffraction of wet rat-tail collagen, which has strong characteristic peaks at q = 2π n/67.2 nm -1 (n = 1, 3, 5). The wavelength was found to be λ = 1.53 Å and the camera length D = 8355 mm. The exposure time for each image was 500 s. This wavelength and this camera length, combined with the diameters of the detector and beam stop, provided SAXS data in a range of momentum transfer values between qmin = 0.02 nm -1 and qmax = 0.31 nm -1 .

The samples were placed in a custom-made cell that ensured control of the temperature and relative humidity in the vicinity of the sample. A detailed description of this cell can be found in (Méheust et al., 2006a). Two orthogonal orientations of the sample with respect to the incoming X-ray beam were used; they are denoted (1) and (2) in Fig. 1. The sample thickness parallel to the incoming beam was 2 mm, in both configurations.

Protocol:

After distance calibrations and proper sample positioning, we performed a series of measurements in configuration (1) (see Fig. 1) under large relative humidity (H = 98%), decreasing temperatures between 393 K and 278 K, in steps of 30 to 10 K. The hydration state at the beginning of the series was a mix of 0WL and 1WL states; at the end of the series it was a 2WL state. After imposing each new temperature value, 6 SAXS pictures were taken regularly during 1h. In what follows, we only present the results obtained from the last picture at a given temperature. We assume that for this picture, the system had time to adjust to the imposed temperature, in particular with respect to water intake.

Subsequently, the sample was rotated into configuration (2) (see Fig. 1), and the same series of measurements was performed again.

Results

Anisotropy of the SAXS images:

Fig. 2 shows two SAXS images recorded at 333 K, in configurations (1) and (2). In configuration (1), the image is isotropic, which is expected due to the axial symmetry (at least statistically) of the sample meso-structure around the average director n 0. An anisotropy could be observed if this director's direction were significantly different from that of the incident beam, which does not seem to be the case. In contrast, the image obtained from configuration (2) is strongly anisotropic; it is this type of images that are to be analyzed to infer the ODP functions of the clay particles in the sample.

An estimate of the image anisotropy was obtained by fitting ellipses to iso-intensity lines of the images. In practice, a narrow intensity range was considered, in order to improve the statistics. The fits provided the ellipse large semi-axis, a, its short semi-axis, b, and their directions.

The eccentricity e = √ 1b 2 /a 2 was computed and used to quantify the image anisotropy. For perfectly random orientations of the particles, the ellipse is a circle and e = 0; for a system of perfectly aligned platelets, the eccentricity is expected to approach 1. A systematic check of the influence on the elliptic fit parameters of the intensity level chosen to perform the fit provided an uncertainty on e of ±0.01, while the uncertainty on the direction of the axes was found to be ∼ ±1°. The evolution of the eccentricity when decreasing temperature is addressed in section 3.2.2.

Radial intensity profiles were then extracted along the principal directions of the image, as defined by the ellipse orientation; they were obtained by integrating sectors of the image, ±5°-wide and centered on those directions, over azimuthal angles. The two profiles obtained from the image shown in Fig. 2(2) are presented in Fig. 3. They are different from each other in that the horizontal profile, denoted (a), exhibits a crossover at a length scale qc = 0.071 nm -1 corresponding to a length scale lc = 1/qc ∼ 14 nm. This length should be attributed to a typical pore size in the direction of the applied pressure. Particles present, on average, their lateral side to the beam, with their thickness along the horizontal direction; consequently, the pores resulting from particle aggregation exhibit a large aspect ratio: their smallest dimension is found along that direction (Knudsen et al., 2004). The average thickness typical of these clay particles in suspension (around 100 nm) is itselft out of our data range. Note that the typical pore size (which is further discussed in section 4) should not be understood in terms of a repeated motif in the meso-structure, since we do not observe a correlation peak at this length scale; it is not allowed by the system's disorder (arising mostly from the particle polydispersity). At length scales smaller than l c, the exponent of the power law (Eq. ( 3)) is D = 4 which indicates scattering by smooth surfaces; at length scales larger than lc, the exponent is larger than-, but close to D = 3, indicating surface scattering by very rough surfaces.

Along the vertical direction, in contrast, a single power law is observed with an exponent intermediate between the two latter regimes. Indeed, if a typical length scale exists along that direction (i.e, a mean particle length or equivalently a mean vertical pore size), it is larger than the larger scale probed by the SAXS (∼ 200 nm). Note that in the scale range adressed by the SAXS experiment, the particle surfaces are rougher along the vertical direction than horizontally. This difference in the exponent is not surprising, as the horizontal roughness as probed by the SAXS arises mostly from the stacking of the individual platelets into a clay particle, while the vertical roughness (i. e., along a particle's edge), is related to the irregular shape of individual platelets, in the form of an irregular polygon. This radial behavior has been observed on several different images, but its dependence on temperature has not been investigated yet.

ODP widths from the eccentricity values

Assuming the validity of Eq. ( 7), it is possible to relate the eccentricity of the isointensity lines to the width of the ODP function. Following the line of page 54 in chapter 4 of (van der Beek, 2005), which dealt with a monodisperse system, the ratio f (φ)/q γ is constant along such a line, and therefore, since the semi-axes a and b of the ellipse are given in terms of q values, the ratio of the minimal value of the ODP function conference papers along the line, fmin, to that of its maximal value, fmax can be written as

fmin fmax = " b a « γ = " 1 -e 2 " γ 2 . ( 8
)
Introducing the form chosen for the ODP function, one obtains the m parameter from the eccentricity as

m = - γ 2 ln " 1 -e 2 " . (9)
The two-dimensional RMS width of the distribution is then computed numerically.

In Fig. 5(a), we show in red, and with error bars, the eccentricity values as a function of the decreasing temperature. We have used an intensity value corresponding to q values smaller than q c. The ODP widths inferred from theses eccentricities are shown in blue, with error bars as well; they were computed using γ = -3.2, a value that we obtained from Fig. 3. as an average of the exponents in plots (a) (value -3.1) and (b) (value -3.3) at q values smaller than q c .

ODPs from azimuthal intensity profiles:

Azimuthal profiles extracted at the same q value (0.045 nm -1 ), in the intermediate q regime, are plotted for all temperatures in Fig. 4. The plots have been normalized to 1 on the [0; 2 π] φ range, and subsequently translated vertically, for clarity. Maier-Saupe functions in the form of Eq. ( 1) have been fitted to them; they are shown on top of the experimental data. Their 2D RMS width is plotted in blue in Fig. 5(b), as a function of temperature.

The width of the ODP function, whether inferred from eccentricity values (Fig. 5(a)) or from azimuthal profiles (Fig. 5(b)), increases below 313 K, by a value that appears small but is significant with respect to the uncertainty on the fit parameter m. This behavior indicates a decrease in the orientational order of the scattering objects as clay particles swell by water intercalation.

Discussion

In a previous study, we addressed the same topic from two-dimensional wide-angle scattering (WAXS) data. The ODP functions for similar samples were inferred from the azimuthal dependence of the amplitude of diffraction peaks, following a method that we have recently developed (Méheust et al., 2006b). We observed an increase in the orientational order during the hydration transitions (Méheust et al., 2006a), which we attributed to steric effects: during sample preparation, the platelet-shaped particles do not have time to find the most favorable configuration; they are locked into a more ordered meso-structure by the constraint arising from the swelling of the individual particles. The 2D RMS width of the ODPs computed in (Méheust et al., 2006a) were around 40 to 50°(see also the rocking curve in (da Silva et al., 2002)). The two studies seem to be in contradiction when it comes to whether ordering increases or decreases as a consequence of particle swelling. Though different samples were addressed in the two studies (the load applied at dehydration are respectively 0.12 MPa and 2.60 MPa), this apparent discrepancy is probably not so much due to the difference in the sample preparation, but stems from the fact that the objects probed by WAXS and SAXS are different. Indeed, the ODPs obtained from WAXS are those of the thick (∼ 100 nm) nano-stacked particles (Méheust et al., 2006b), which are rather well aligned; clay particles belonging to the lower tail of the thickness distribution do not contribute to the WAXS signal. In contrast, the exponents measured radially on the SAXS images (Fig. 3) indicate surface scattering from discontinuities in the porous medium consisting of the aggregated clay particles: SAXS is sensitive to all discontinuity surfaces, not only those belonging to thick nano-stacked particles. The ODPs inferred from the SAXS signal are therefore relative to diffracting objects that are considerably different from-, and less ordered in their orientation than-, the nano-stacked particles probed by WAXS. Considering that the discontinuity surfaces at which scattering properties vary the most are those between a clay particles and an adjacent cavity, and invoking the Babinet principle, we may argue that the SAXS signal can be partly interpreted from the population of cavities/pores, which is complementary to the clay aggregate and is also expected to consist of anisotropicallyshaped objects. This is supported by the crossover length scale at 14 nm, which we interpret as a typical pore size in the direction parallel to the initially-applied load. Apparently, the ordering of the population of cavities decreases at hydration, while that of the thick nano-stacks increases. Both effects are detectable but quite limited, though, and one might argue that there is hardly no change in the assembly's ordering due to the effect of individual particle swelling.

Note also that the ODP width plots shown in Fig. 5(a) and Fig. 5(b), though qualitatively similar, do not superimpose. Width values inferred from ellipse eccentricities are overestimated with respect to those obtained from monitoring the scattering intensity at a fixed q value. This shows the limits of this simple analysis, in which we have adapted to a polydisperse system a theory initially developed for a monodisperse system. However, we believe that this study still grabs the qualitative change of orientational order within the clay assembly.

Conclusion

Two-dimensional SAXS data was used to quantify the orientational order in dry-pressed samples of platelet-shaped clay particles. The temperature was changed in order to trigger hydration transitions and consequently particle swelling, and changes in ODP functions were monitored. The method seems to be able to detect very small changes in the ODPs width. By comparison with a previous study that provided clay particle ODP functions from WAXS data, we conclude that the ODP functions probed by SAXS are relative to all discontinuity surfaces in the clay aggregate, at the probed scales, and are therefore quite different from those obtained from WAXS data.

The prospects to this study are many. The first one is to extend the experiments, both of hydration and dehydration, and to investigate the dependence of q plots such as those shown in Fig. 3 on temperature. An interesting study would also consist in a joint use of WAXS and SAXS to estimate ODPs in such samples, confronting the two techniques. This could be done on samples with various overall densities (going from gels to pressed samples), so as to characterize if (and when) the observed SAXS data converges to that of individual platelets (Eq. ( 5)) when the density is increased: the ODPs obtained from SAXS are then expected to converge to those obtained from WAXS. Finally, one could think of improving the method used here so as to account for the direction of the incident beam not being perfectly parallel to that of the average particle director, which results in the amplitudes of the two peaks in Fig. 4 being different.

We acknowledge the help of Igor Dolbnya at the DUBBLE beamline (ESRF) for alignment of the X-ray optics and trouble-shooting with the acquisition setup. This work was supported by the Research Council of Norway (RCN) through a Strategical University Program and through the Nanomat Program: RCN projects 152426/431, 154059/420, 148865/432, and 138368/V30 and SUP154059/420. We also thank the two anonymous referees for their suggestions.

Figure 1

Sketch of a vertical cut of one 2 × 2 × 6 mm 3 dry-pressed Na-fluorohectorite sample, as it stands in the beam. The gray shadings denote the sample's mesopores, while the red lines represent the nano-porosity inside the nano-stacks. Two configurations were used: one in which the beam is oriented with respect to the sample according to the direction denoted (1), and one in which it is oriented according to the direction denoted (2).

(1)

(2)

Two-dimensional SAXS images recorded in the two configurations ( 1) and ( 2) (see Fig. 1). In both images, a narrow range of intensities has been painted white so a to highlight the shape of an iso-intensity line: in (1), the image is isotropic; in (2), it is strongly anisotropic. RMS width of the ODP as directly obtained from the intensity profiles at a fixed q value (see Fig. 4). Both plots show that a moderate decrease of the orientational order occurs as particles swell by taking in one more layer of water, at around 313 K.

Figure 3 Figure 4

 34 Figure 3Radial intensity profiles from a SAXS image recorded at 393 K: (a) along the ellipse's long principal axis (close to horizontal in Fig.2(2)), and (b) along the ellipse's short principal axis (close to vertical in Fig.2(2)).

  Figure5(a) Dependence on temperature of the eccentricity of iso-intensity lines (in red) and of the 2D RMS of the ODP functions (in blue) inferred from the eccentricity values. -(b) 2D RMS width of the ODP as directly obtained from the intensity profiles at a fixed q value (see Fig.4). Both plots show that a moderate decrease of the orientational order occurs as particles swell by taking in one more layer of water, at around 313 K.

IUCr macros version 2.0β15: 2004/05/19

J.Appl. Cryst. (2003). 59, 000-000IUCr macros version 2.0β15: 2004/05/19