Spreadsheets are widely used for table manipulation and presentation. Stylistic formatting of these tables is an important property for both presentation and analysis. As a result, popular spreadsheet software, such as Excel, supports automatically formatting tables based on rules. Unfortunately, writing such formatting rules can be challenging for users as it requires knowledge of the underlying rule language and data logic. We present CORNET, a system that tackles the novel problem of automatically learning such formatting rules from user examples in the form of formatted cells. CORNET takes inspiration from advances in inductive programming and combines symbolic rule enumeration with a neural ranker to learn conditional formatting rules. To motivate and evaluate our approach, we extracted tables with over 450K unique formatting rules from a corpus of over 1.8M real worksheets. Since we are the first to introduce conditional formatting, we compare CORNET to a wide range of symbolic and neural baselines adapted from related domains. Our results show that CORNET accurately learns rules across varying evaluation setups. Additionally, we show that CORNET finds shorter rules than those that a user has written and discovers rules in spreadsheets that users have manually formatted.
翻译:电子表格被广泛用于表格操作和演示。 这些表格的立体格式化是演示和分析的一个重要属性。 因此, 流行的电子表格软件, 如Excel 支持基于规则的自动格式化表格。 不幸的是, 书写这种格式化规则对于用户来说可能具有挑战性, 因为它需要了解基本规则语言和数据逻辑。 我们展示了CORNET, 这个系统解决了从格式化单元格形式的用户示例中自动学习这种格式化规则的新问题。 CORNET 的灵感来自启动程序的进展, 并且将象征性规则的查点与神经排行器相结合, 学习有条件的格式规则。 为了激励和评估我们的方法, 我们从超过1.8M 实际工作表的堆中提取了超过 450K 独特格式化规则的表格。 由于我们是第一个引入条件格式化的系统, 我们比较了CORNET 和从相关域中修改的范围广泛的符号和神经基线。 我们的结果表明, CORNET 准确学习了不同评价设置的规则。 此外, 我们显示, CORNET 找到比用户在电子表格中已经手工格式格式化过的那些规则更短的规则。