(* Time series conversational engine grammar in EBNF Copyright (C) 2014 Anton Antonov This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Written by Anton Antonov, antononcube @ gmail . com, Windermere, Florida, USA. *) (* Version 1.0 *) (* This grammar is intended to be parsed by the functions in the Mathematica package FunctionalParses.m at GitHub, see https://github.com/antononcube/MathematicaForPrediction/blob/master/FunctionalParsers.m . In order to parse this grammar specification either: - copy all of the grammar rule lines and paste them within a pair of string quotes, or - use Get in Mathematica. *) " = 'find' | 'compute' | 'calculate' | 'show' ; = ( ( 'temperature' | 'pressure' | 'wind' , 'speed' ) <& ( 'of' | 'for' ) ) , <@ TSWeatherSpec[#]& ; = [ 'the' ] &> , ( 'temperature' | 'pressure' | 'wind' , 'speed' ) <@ TSWeatherSpec[Reverse[#]]& ; = | ; = '_LetterString' | '_LetterString' , [ ',' ] , '_LetterString' , [ [ ',' ] , '_LetterString' ] <@ TSCitySpec[Flatten[{#}]]& ; = '_String' <@ TSCompanySpec ; = ( [ 'the' ] &> ( [ 'stock' ] &> 'price' | 'trade' &> 'volume' ) <& [ 'of' | 'for' ] ) , <@ TSFinancialData ; = [ 'the' ] &> , ( [ 'stock' ] &> 'price' | 'trade' &> 'volume' ) <@ TSFinancialData[Reverse[#]]& ; = | ; = [ 'the' ] &> 'last' , [ 'loaded' ] , ( 'data' | 'file' ) <@ TSPastData[Flatten[{#}]]& ; = | | ; = [ ( '1' | 'one' | 'a' ) ] , 'regression' , 'quantile' | 'quantile' , 'regression' <@ TSBSplineQRegression[1]& ; = [ 'Range[1,40]' ] <& ( 'regression' , 'quantiles' ) <@ TSBSplineQRegression[#]& ; = | ; = [ 'the' ] &> [ ( 'top' | 'bottom' | 'largest' | 'smallest' | 'all' ) ] , 'outliers' <@ TSOutliers[Flatten[#]]& ; = ( 'least' , 'squares' , [ 'fit' ] , [ 'with' | 'of' ] ) &> '_String' <@ TSLeastSquaresFit[#]& ; = | | ; = [ ] &> <@ TSOperateCommand[#]& ; = , ( 'for' | 'on' | 'in' | 'over' | 'of' ) &> <@ TSOperateOnDataCommand[#]& ; = ( 'load' , [ 'data' ] , 'file' ) &> ( '_String' ) <@ TSLoadFile[#]& ; = ( 'load' , [ 'the' ] , [ 'data' ] ) &> <@ TSLoadData[#]& ; = 'start' , 'over' | 'clear' <@ TSStartOver[Flatten[{#}]]& ; = 'clear' , ( 'plots' | 'plots' | 'graphics' ) <@ TSClearGraphics ; = 'what' , ( ( 'operations' , 'are' | [ 'are' ] , [ 'the' ] , 'operations' ) , [ 'implemented' | 'in' ] ) | [ 'what' ] , ( 'operation' | 'operations' ) , ( 'I' , 'can' | 'to' ) , ( 'use' | 'do' ) <@ TSWhatOperations[Flatten[{#}]]& ; = 'help' | [ 'all' ] , 'commands' <@ TSHelp[Flatten[{#}]]& ; = | ; = [ 'plot' | 'plots' ] , 'joined' | 'Joined' , '->' , 'True' | 'Joined->True' <@ TSPlotJoined ; = [ 'plot' | 'plots' ] , ( 'not' | 'non' ) , 'joined' | 'Joined' , '->' , 'False' | 'Joined->False' <@ TSPlotNotJoined ; = 'plot' , 'data' <@ TSPlotData ; = | | ; = | | | | | | | ; "