Frog
Frog-util.h
Go to the documentation of this file.
1 /* ex: set tabstop=8 expandtab: */
2 /*
3  Copyright (c) 2006 - 2020
4  CLST - Radboud University
5  ILK - Tilburg University
6 
7  This file is part of frog:
8 
9  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
10  several languages
11 
12  frog is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 3 of the License, or
15  (at your option) any later version.
16 
17  frog is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program. If not, see <http://www.gnu.org/licenses/>.
24 
25  For questions and suggestions, see:
26  https://github.com/LanguageMachines/frog/issues
27  or send mail to:
28  lamasoftware (at ) science.ru.nl
29 
30 */
31 
32 #ifndef FROG_H
33 #define FROG_H
34 
35 #include <set>
36 #include <ostream>
37 #include <string>
38 
39 #include "ticcutils/Timer.h"
40 
41 std::string prefix( const std::string& path,
42  const std::string& fn );
43 
44 std::set<std::string> getFileNames( const std::string& dirName,
45  const std::string& ext );
46 
47 std::string check_server( const std::string& host,
48  const std::string& port,
49  const std::string& name= "" );
50 
51 class TimerBlock{
52 public:
53  TiCC::Timer parseTimer;
54  TiCC::Timer tokTimer;
55  TiCC::Timer mblemTimer;
56  TiCC::Timer mbmaTimer;
57  TiCC::Timer mwuTimer;
58  TiCC::Timer tagTimer;
59  TiCC::Timer iobTimer;
60  TiCC::Timer nerTimer;
61  TiCC::Timer prepareTimer;
62  TiCC::Timer pairsTimer;
63  TiCC::Timer relsTimer;
64  TiCC::Timer dirTimer;
65  TiCC::Timer csiTimer;
66  TiCC::Timer frogTimer;
67  void reset(){
68  parseTimer.reset();
69  tokTimer.reset();
70  mblemTimer.reset();
71  mbmaTimer.reset();
72  mwuTimer.reset();
73  tagTimer.reset();
74  iobTimer.reset();
75  nerTimer.reset();
76  prepareTimer.reset();
77  pairsTimer.reset();
78  relsTimer.reset();
79  dirTimer.reset();
80  csiTimer.reset();
81  frogTimer.reset();
82  }
83 };
84 
85 
86 #endif
TimerBlock::prepareTimer
TiCC::Timer prepareTimer
Definition: Frog-util.h:61
TimerBlock::mblemTimer
TiCC::Timer mblemTimer
Definition: Frog-util.h:55
TimerBlock::dirTimer
TiCC::Timer dirTimer
Definition: Frog-util.h:64
TimerBlock::tokTimer
TiCC::Timer tokTimer
Definition: Frog-util.h:54
TimerBlock::pairsTimer
TiCC::Timer pairsTimer
Definition: Frog-util.h:62
TimerBlock::mwuTimer
TiCC::Timer mwuTimer
Definition: Frog-util.h:57
getFileNames
std::set< std::string > getFileNames(const std::string &dirName, const std::string &ext)
Definition: Frog-util.cxx:66
TimerBlock::tagTimer
TiCC::Timer tagTimer
Definition: Frog-util.h:58
TimerBlock::csiTimer
TiCC::Timer csiTimer
Definition: Frog-util.h:65
TimerBlock::parseTimer
TiCC::Timer parseTimer
Definition: Frog-util.h:53
TimerBlock::mbmaTimer
TiCC::Timer mbmaTimer
Definition: Frog-util.h:56
TimerBlock::frogTimer
TiCC::Timer frogTimer
Definition: Frog-util.h:66
prefix
std::string prefix(const std::string &path, const std::string &fn)
Definition: Frog-util.cxx:49
TimerBlock::iobTimer
TiCC::Timer iobTimer
Definition: Frog-util.h:59
TimerBlock::reset
void reset()
Definition: Frog-util.h:67
TimerBlock::nerTimer
TiCC::Timer nerTimer
Definition: Frog-util.h:60
check_server
std::string check_server(const std::string &host, const std::string &port, const std::string &name="")
Definition: Frog-util.cxx:103
TimerBlock::relsTimer
TiCC::Timer relsTimer
Definition: Frog-util.h:63
TimerBlock
Definition: Frog-util.h:51