Contents About This Book .......................................................................................1 Audience .......................................................................................................... 1 Prerequisites ..................................................................................................... 1 Typographical Conventions ............................................................................. 1 What’s New in SAS Sentiment Analysis Server 1.3 ...............................3 Overview .......................................................................................................... 3 Logging ............................................................................................................ 3 Licensing .......................................................................................................... 3 1 About This Product ................................................................................5 1.1 What is SAS Sentiment Analysis Server? .................................................. 5 1.2 Benefits to Using SAS Sentiment Analysis Server .................................... 6 1.3 How Does SAS Sentiment Analysis Server Work? ................................... 7 1.4 Configuring SAS Sentiment Analysis Server ............................................ 8 1.5 Overview of the Client APIs ...................................................................... 8 2 Installing the Server ...............................................................................9 2.1 Overview of Installation ............................................................................. 9 2.2 The Prerequisite System Requirements ..................................................... 10 2.3 Install on Windows .................................................................................... 11 2.4 Install on UNIX .......................................................................................... 16 2.5 Uninstall on Windows ................................................................................ 16 3 Configuring and Running the Server ...................................................21 3.1 Overview of Configuring and Running the Server .................................... 21 3.2 Sample Server Configuration Files ............................................................ 22 3.2.1 Windows Configuration File ............................................................ 22 3.2.2 UNIX Configuration File ................................................................. 23 3.2.3 The Directives .................................................................................. 25 3.3 Setting the Path to the SAS License ........................................................... 27 3.4 Using the Data Directory ........................................................................... 28 3.5 Adding Projects .......................................................................................... 28 iii . 3.6 Using sam_log Files ...................................................................................29 3.7 Running the Server .....................................................................................30 3.7.1 Windows ...........................................................................................30 3.7.2 UNIX ................................................................................................30 3.8 Accessing Output for Each Input Document ..............................................31 3.9 Optimize Performance on a Client Windows Machine ..............................32 3.9.1 Overview of Performance Optimization ..........................................32 3.9.2 Before and After You Optimize Performance ..................................32 3.9.3 Adjust the TCP Time Wait State ......................................................33 3.9.4 Reset Ephemeral Ports ......................................................................33 Appendixes ............................................................................ 35 A Recommended Reading ....................................................................... 37 B Glossary ................................................................................................. 39 Index ........................................................................................................... 41 iv SAS Sentiment Analysis Server: Administrator’s Guide . About This Book Audience SAS Sentiment Analysis Server: Administrator’s Guide is designed for the following users: - The system administrator installs and configures SAS Sentiment Analysis Server. - Other users with appropriate access, permissions, and experience can also install and configure SAS Sentiment Analysis Server. - Administrators run and use SAS Sentiment Analysis Server to obtain metadata from the input documents. Prerequisites Here are the prerequisites for using SAS Sentiment Analysis Server: - Use only supported hardware. - Use the supported browser that is installed on your desktop client. - Access the server configuration file. Typographical Conventions This manual uses the following typographical conventions: Convention Description C:\Program Files\Teragram\SAM Server\conf Program names, filenames, and command names are shown in a fixed-width font. Variable portions are italicized. Browse The names of the components are displayed in a bold font. 1 2 Convention Description sentansr.sas Code examples are shown in a fixed-width font. www.sas.com Hypertext links are shown in a light blue, fixed-width font, and are underlined. SAS Sentiment Analysis Server: Administrator’s Guide . What’s New in SAS Sentiment Analysis Server 1.3 Overview New and enhanced features in SAS Sentiment Analysis Server include the following: - improved logging mechanism - SAS licensing replaces the Teragram license Logging Control the size and number of the logging files. Licensing SAS licensing replaces the Teragram license. 3 4 SAS Sentiment Analysis Server: Administrator’s Guide Chapter:1 About This Product - What is SAS Sentiment Analysis Server? - Benefits to Using SAS Sentiment Analysis Server - How Does SAS Sentiment Analysis Server Work? - Configuring SAS Sentiment Analysis Server - Overview of the Client APIs 1.1 What is SAS Sentiment Analysis Server? SAS Sentiment Analysis Server automatically applies sentiment analysis rules to input documents to extract expressed sentiment. This sentiment can be about anything and can apply to any object, person, event, or experience. However, sentiment can also apply to features and attributes. Many organizations are interested in discovering what their customers are saying about their products and services. SAS Sentiment Analysis Server enables you to automatically extract this sentiment from input documents. For the purposes of this document, these objects, persons, events, or experiences are referred to as products and their attributes are referred to as features. SAS Sentiment Analysis Server combines several key technologies to provide a comprehensive solution to sentiment analysis: Automatic rule application automatically extract matches on the rules that you defined in a SAS Sentiment Analysis Studio project. Choice of programming languages use either the Java or Python API to write a client application. 5 Sample Project use the sample SAS Sentiment Analysis Studio project that is included with SAS Sentiment Analysis Server. SAS Sentiment Analysis Server applies sentiment extraction services to networked client applications. SAS Sentiment Analysis Server applies the sentiment analysis rules that your organization develops, using the SAS Sentiment Analysis Studio application, to input documents. Using these two SAS applications, you can automate the processes of sentiment extraction to identify the sentiment expressed about an object. This is true whether the object is a product, feature, or another type of entity. 1.2 Benefits to Using SAS Sentiment Analysis Server SAS Sentiment Analysis Server provides users with the following benefits: 6 - Automatically extract the sentiment expressed in input documents. - Generate metadata. - Gain real-time knowledge of sentiment. - Use SAS Sentiment Analysis Server to resolve the complexities of data creation in any of the 28 world languages that are available. SAS Sentiment Analysis Server: Administrator’s Guide 1.3 How Does SAS Sentiment Analysis Server Work? SAS Sentiment Analysis Server provides rapid, run-time sentiment extraction for documents collected from your corporate intranet or the Internet. This application runs on a server, deploying the .sam file created by SAS Sentiment Analysis Studio to automate the process of identifying sentiment in input documents. SAS Sentiment Analysis Server automates the application of sentiment defined in the rules written in SAS Sentiment Analysis Studio to the text of incoming documents. This process returns the text of the input documents that matches the rules. Figure 1-1 SAS Sentiment Analysis Server Architecture SAS Sentiment Analysis Server is available as a UNIX server or as a Windows service. You can manage SAS Sentiment Analysis Server by using standard UNIX or Windows service management tools. SAS Sentiment Analysis Server: Administrator’s Guide 7 1.4 Configuring SAS Sentiment Analysis Server You can configure SAS Sentiment Analysis Server using a text file where you specify the following settings, among others: - the port numbers for querying and administering the server - the names of one or more SAS Sentiment Analysis Studio projects - the number of parallel service threads - the maximum document size to process - the number of simultaneously pending client threads - the time-out interval for connections to the server For more information about configuring SAS Sentiment Analysis Server, see Section 3.2 Sample Server Configuration Files on page 22. 1.5 Overview of the Client APIs Application Programming Interfaces (APIs) for the SAS Sentiment Analysis Server client are available for the Python and Java programming languages. 8 SAS Sentiment Analysis Server: Administrator’s Guide Chapter:2 Installing the Server - Overview of Installation - The Prerequisite System Requirements - Install on Windows - Install on UNIX - Uninstall on Windows 2.1 Overview of Installation You, as a system administrator can perform this installation. If you are not a system administrator, you can install the server if you have the following capabilities: - access to a system administrator - familiarity with the operating system - sufficient system privileges to create directories Configure the system, where you install SAS Sentiment Analysis Server, in accordance with the recommended system requirements. 9 2.2 The Prerequisite System Requirements Configure the local machine where you install SAS Sentiment Analysis Server according to the recommended system configuration: CPU x86 with 1 GHz or higher required. 2+ CPUs of 2 GHz or higher, each, are recommended. RAM 1 GB or higher is recommended, but this base number depends on the size of the project that you load. Table 2-1: Supported Operating Systems 10 Operating System Platform Windows (32-bit) x86 Windows (64-bit) x86-64 HP-UX (64-bit) Itanium Sun Solaris (64-bit) UltraSPARC, x86-64 Linux, (Red Hat 7.x, 8, 9, Fedora 1-3, RHEL 2.1 and higher), SUSE x86, x86-64 IBM AIX PPC SAS Sentiment Analysis Server: Administrator’s Guide 2.3 Install on Windows The SAS Sentiment Analysis Server installation kit for Windows (SAS_SentAnlysis_Server_Setup.exe) contains all of the components required to install (and uninstall) SAS Sentiment Analysis Server. To install SAS Sentiment Analysis Server on a supported Microsoft Windows system, complete these steps: 1. Double-click SAS_SentAnalysis_Server_Setup.exe and the installation wizard appears. SAS Sentiment Analysis Server: Administrator’s Guide 11 The Welcome page appears. 12 SAS Sentiment Analysis Server: Administrator’s Guide 2. Click Next and the Choose Install Location page appears. By default, the path to the installation location appears in the Destination Folder field. If you choose to use a different location, complete these steps: a. Enter the path to the folder location into the Destination Folder field. SAS Sentiment Analysis Server: Administrator’s Guide 13 b. (Optional) Click Browse and the Browse For Folder dialog box appears. i. (Optional) Select a different installation folder. ii. (Optional) Click Make New Folder. iii. Click OK. 3. Click Install in the SAS Sentiment Analysis Server Setup page. The following dialog box, wrapper screen, and Installation Complete page appear. 14 SAS Sentiment Analysis Server: Administrator’s Guide 4. (Optional) To see a list of the extracted files, click Show details. 5. Click Close to exit the installation wizard. Note: For licensing information, see Section Setting the Path to the SAS License on page 27. 6. (Optional) To start SAS Sentiment Analysis Server, go to Start --> Programs --> SAS Sentiment Analysis Server --> Start SAS Sentiment Analysis Server. SAS Sentiment Analysis Server: Administrator’s Guide 15 2.4 Install on UNIX SAS Sentiment Analysis Server is distributed on UNIX systems as a tar archive. To install the software, use the following UNIX commands: gzip -d installKit.tar.gz tar -xvpf installKit.tar The -d switch on the gzip command decompresses the distribution file (compressed to save space) in preparation for the expansion of the archive tar file. The switches on the tar command extract the contents from the specified tar file, preserving the file and directory permissions of the contents. The actual name of your tar file might vary from the name shown in the example above. Additional information about using the gzip and tar commands is available in the UNIX man pages. Note: For licensing information, see Section Setting the Path to the SAS License on page 27. 2.5 Uninstall on Windows Before you uninstall SAS Sentiment Analysis Server, stop the server. After you stop the server, you can uninstall the server. To uninstall the SAS Sentiment Analysis Server software on a Microsoft Windows system, complete these steps: 16 SAS Sentiment Analysis Server: Administrator’s Guide 1. Go to Start --> Programs --> SAS Sentiment Analysis Server -> Stop SAS Sentiment Analysis Server. The Stop SAS Sentiment Analysis Server screen appears. SAS Sentiment Analysis Server: Administrator’s Guide 17 2. Go to Start --> Programs --> SAS Sentiment Analysis Server -> Uninstall SAS Sentiment Analysis Server. The uninstall wizard appears. 3. Click Uninstall. The following wrapper screen, dialog box, and Uninstallation Complete page appear: 18 SAS Sentiment Analysis Server: Administrator’s Guide 4. Click OK to close the dialog box and the blank screen. 5. Click Close to exit the uninstall wizard. SAS Sentiment Analysis Server: Administrator’s Guide 19 20 SAS Sentiment Analysis Server: Administrator’s Guide Chapter:3 Configuring and Running the Server - Overview of Configuring and Running the Server - Sample Server Configuration Files - Setting the Path to the SAS License - Using the Data Directory - Adding Projects - Using sam_log Files - Running the Server - Accessing Output for Each Input Document - Optimize Performance on a Client Windows Machine 3.1 Overview of Configuring and Running the Server You configure and run SAS Sentiment Analysis Server when you specify directives in the configuration file (samserver.conf). Use this file to specify the types of connections for the server, directories, and other settings. The configuration file is automatically located in the conf folder when you install SAS Sentiment Analysis Server. Before you process documents using SAS Sentiment Analysis Server, configure the server using a text file that contains key - value pair assignments. Use the following form, where each pair appears on a single line. Any blank lines, as well as any comment lines that are preceded by the comment character (#), are ignored. key=value 21 The binary file is stored in the data directory after you install SAS Sentiment Analysis Server. For example, the en_nikon_hybrid_object.sam is located in the data folder. Figure 3-1 Binary File in Data Folder 3.2 Sample Server Configuration Files 3.2.1 Windows Configuration File During installation on a Windows system, a configuration file is placed into the following location: C:\Program Files\Teragram\SAMServer\conf To access the configuration file, complete this step: Go to Start --> Programs --> SAS Sentiment Analysis Server --> Configure SAS Sentiment Analysis Server. The configuration file that appears is similar to the example below. Example 3-1: Sample Configuration File for Windows # samserver.conf # Speficy the SAM object list with names and file paths. # For example: sam=AMAZON,amazon.sam;HOTEL,hotel.sam;BANK,bank.sam # or sam=NikonCameraHybrid,c:\Program Files\Teragram\SAMServer\data\en_nikon_hybrid_object.sa m sam=NikonCameraHybrid,data\en_nikon_hybrid_object.sam 22 SAS Sentiment Analysis Server: Administrator’s Guide # SAM server TCP port number query_port=8888 # Size of server socket queue skt_queue_size=100 # Number of worker threads nb_threads=10 # Maximum length of document submitted to the server max_doc_size=10000000 # Does the server support persistent connections? (0 or 1) persistent_connection=0 # Timeout for the server to abort the connection (in microseconds) timeout=60000000 # Backup directory for the SAM objects backup_directory=backup\ # Setinit info setinit=sentansr.sas # end samserver.conf Use the configurable attributes to modify this file that are described in Section 3.2.3 The Directives on page 25. 3.2.2 UNIX Configuration File On a UNIX system, you name and choose where to store the SAS Sentiment Analysis Server configuration file. This is because there is no default name or location. When you run the SAS Sentiment Analysis Server service, you load the configuration file when you provide the full pathname with the -server switch. Example 3-2: Sample Configuration File for UNIX # This specifies the location of the SAS Sentiment Analysis setinit file # required to verify that this program is licensed by SAS. If you do not have # this file, contact SAS technical support or your SAS account executive to # obtain it. setinit=sentansr.sas # This optional directive indicates what directory should be used to make a SAS Sentiment Analysis Server: Administrator’s Guide 23 # backup copy of each binary file loaded on startup. This can be used to # "roll back" to the previous version of the binaries if, for example, a new # version leads to problems. backup_directory=./backup/ # This line specifies the sentiment analysis (sam) binary # files that SA Server should load at startup. The format is # # sam=binary_file_name1,/path/to/binary/ file1;binary_file_name2,/path/to/binary/file2 # # binary_file_name is a string that the SA Client API can access. sam=NikonCameraHybrid,data\en_nikon_hybrid_object.sam # Uncomment this line to enable detailed sentiment logging. # To keep the log files from growing too large, you can use the # optional sam_log_max_entries and num_sam_logs directives to # constrain the number of entries in each log file and rotate the logs. #sam_log=/path/to/sam.log # These directives specify the ports that SA Server listens on. query_port # is the port that clients connect to. query_port=8888 # Miscellaneous settings to control the performance of SA Server. skt_queue_size=100 nb_threads=10 max_doc_size=10000000 persistent_connection=0 timeout=600000000 Use the configurable attributes to modify this file that are described in Section 3.2.3 The Directives below. 24 SAS Sentiment Analysis Server: Administrator’s Guide 3.2.3 The Directives Use the directives to modify the configuration file. These directives can specify paths that are either absolute or relative. If the path is an absolute path such as C:\MyFolder\MySubFolder\myfile.sam, the absolute path is used by the server. If the path is a relative path such as data\myfile.sam, the path is relative to the folder where the server is installed. These directives are described in the table below: Table 3-1: Configurable Directives Directive Description sam Specifies the path to one, or more, SAS Sentiment Analysis Studio binary files (.sam) that are loaded at start-up. In the example above, the English language version of the Nikon camera hybrid model is entered. For information about adding project files, see Section 3.5 Adding Projects on page 28. Notes: When you specify more than one file, separate the files with a semicolon (;). On both Windows and UNIX systems, the project represented by the first symbolic name, unless otherwise specified, is the default project that is loaded on the server. These names are also used by the client APIs. query_port Specifies the number of the TCP port where the sentiment analysis service is available. The clients connect to this port on the server host. In the Windows and UNIX examples above, port 8888 is entered. skt_queue_size Specifies the number of simultaneous pending client connections that the server accepts before it drops the connection. If all of the server threads are busy, this directive specifies the maximum number of additional clients that can connect to the server. These additional clients wait for a thread to become available. In the examples above, the number 100 is entered. nb_threads Specifies the number of parallel service threads to run. The server is able to handle this number of clients simultaneously. In the examples above, the number 10 is entered. max_doc_size Specify the maximum size, in bytes, of documents that can be analyzed. Larger texts are truncated. In the examples above, the number 10000000 is entered. SAS Sentiment Analysis Server: Administrator’s Guide 25 Table 3-1: Configurable Directives (Continued) Directive Description persistent_ connection Specifies whether the server tries to maintain a continuous socket connection with the client, or not. The default value is zero (0). If this setting is set to one (1), persistent connections are enabled when the client also enables these connections. The maximum number of clients that can be served is the number of threads on the server. timeout Specifies the length of time (in microseconds) that the server waits. If no activity occurs during this period, the server forcibly drops the connection. In the Windows example above, the number 60000000 is entered. sam_log Specifies that a log file is generated for all of the sentiment matches located in the input documents. One entry is specified for each document that matches. The value is the base for the filename. For more information, see Section 3.6 Using sam_log Files on page 29. Notes: Uncomment in UNIX to use. To use this line in a Windows file, type this line as it appears in the UNIX file example. For more information, see Example 3-2 on page 23. sam_log_max _entries Specifies the maximum number of entries allowed in each sam_log file. Note: Enter this line into the configuration file with a specification to activate this operation. num_sam_logs Specifies the maximum number of log files to create. Note: Enter this line into the configuration file with a specification to activate this operation. 26 SAS Sentiment Analysis Server: Administrator’s Guide Table 3-1: Configurable Directives (Continued) Directive Description backup_directory Specifies the directory where the backup sentiment analysis binaries are stored. (By default, this directory is backup.) When a .sam file is accessed by SAS Sentiment Analysis Server at startup, and this directive is specified, a backup copy of the file is written to the specified directory. If a .sam file cannot be opened, SAS Sentiment Analysis Server attempts to use the backup version of the binary file, if it exists. This directive enables SAS Sentiment Analysis Server to keep running, even if a binary cannot be loaded. In the example above, the backup directory is specified. setinit Specifies the SAS license file for SAS Sentiment Analysis Server, which is the setinit file. In the example above, the sentansr.sas file is specified. This SAS installation data file (SID) is in the Software Order E-mail (SOE) that you receive. For more information, see Section 3.3 Setting the Path to the SAS License on page 27. Note: If you modify the configuration file, save the file and restart SAS Sentiment Analysis Server. The changes take effect the next time you access the application. 3.3 Setting the Path to the SAS License Make sure that the SAS license file is specified before you try to start the SAS Sentiment Analysis Server. This SAS installation data file (SID) for SAS Sentiment Analysis Server is located in the Software Order E-mail (SOE) that you received. Save the license file, sentansr.sas, to the installation directory of SAS Sentiment Analysis Server. Note: If the server is started and the license file is not specified, the server can appear to be running but might not process files. SAS Sentiment Analysis Server: Administrator’s Guide 27 If you convert from a Teragram to a SAS license, insert the following line. (The configuration files for updated applications includes this line.) setinit=<path> Specify a relative path to the sentansr.sas file, unless this file is located in the installation directory. 3.4 Using the Data Directory The data directory can be used to store each of the projects that are uploaded to SAS Sentiment Analysis Server. These projects include any sample projects that are shipped with the application. For example, the en_nikon_hybrid_object.sam is located in the data folder. See Figure 3-1 on page 22 for an example of this file. 3.5 Adding Projects Each type of SAS Sentiment Analysis Studio model produces the following type, or types, of .sam files: - A statistical model produces either a Simple_stat_object.sam (simple model) or an Adv_stat_object.sam file (advanced model). - A rules model produces a rule_object.sam file. - A hybrid model produces a hybrid_object.sam file. You can choose to load as many project files to SAS Sentiment Analysis Server as your system can hold in memory. Use the SAS Sentiment Analysis Server API to connect to the server. Specify the (symbolic) names for each SAS Sentiment Analysis Server project in the configuration file. See the example below that writes the project samples above into the configuration file shown in Example 3-1 on page 22: Example 3-3: Sample sam Line for Multiple Projects sam=NikonCameraHybrid,data\en_nikon_hybrid_object.sam; BANK, bank.sam;HOTEL, hotel.sam 28 SAS Sentiment Analysis Server: Administrator’s Guide Note: When you specify more than one project, separate each project with a semicolon (;). 3.6 Using sam_log Files There are several ways that you can use the sam_log files. The word entry is defined as the representation of a document that matches one or more instances of sentiment defined in a project. For example, if an input text matches one sentiment definition in each of two projects, two entries are created. If however, another text matches five sentiment definitions in one project and two in another project, two entries are also created. (For information about loading multiple project files into your SAS Sentiment Analysis Server, see Section 3.5 Adding Projects on page 28.) You might enter, or uncomment, the following line in the SAS Sentiment Analysis Server configuration file: sam_log=sam.log This line means that the SAS Sentiment Analysis Server log file is named sam.log.0. In this case, because there is no specification in this file for sam_log_max_entries, the number of entries continue to grow. This growth continues until the log file is deleted or until there is no more disk space. However, you can specify a maximum number of entries for this file using the following example: sam_log=sam.log sam_log_max_entries=10000 In this example, the sam.log.0 file is regenerated whenever more than 10,000 documents match at least one concept, in at least one project, and during one session. When the sam.log.0 file is regenerated, all existing data in the file is lost. For this reason, you can also configure SAS Sentiment Analysis Server to automatically create more than one log file. See the following example: sam_log=sam.log sam_log_max_entries=10000 num_sam_logs=10 SAS Sentiment Analysis Server: Administrator’s Guide 29 To begin the regeneration process, SAS Sentiment Analysis Server creates a file named sam.log.0. If the server attempts to exceed the specified number of entries such as10,000, sam.log.0 is copied to sam.log.1. sam.log.0 is regenerated to include the excess entries. This process can continue until the limit of sam.log.9 is reached. In this example, excess data is copied and the first log file is destroyed when the maximum number of entries is reached. In other words, this process is reiterative. 3.7 Running the Server 3.7.1 Windows To start the SAS Sentiment Analysis Server service go to Start --> Programs --> SAS Sentiment Analysis Server --> Start SAS Sentiment Analysis Server. When you use this step, the configuration file that you created during installation, is automatically loaded. 3.7.2 UNIX To run SAS Sentiment Analysis Server on a supported UNIX system, go to the installation root directory and enter the following command from the UNIX shell: # ./_sam_server -config configfile In this command line, -config configfile specifies the name and full path to the configuration file. The server program runs in the foreground. This means that it does not fork, and writes its logging output to the terminal that initiated the program (stdout). Note: 30 Use the -verbose switch for debugging purposes. SAS Sentiment Analysis Server: Administrator’s Guide 3.8 Accessing Output for Each Input Document The following information is computed for each input document. Use the client API to access the following data: Overall sentiment is positive, negative, or neutral Sentiment is determined by a numerical value Confidence is the degree of confidence in the analysis Number of keywords is a determinant for sentiment List of keywords includes weight, probability, and position in the document Prominence indicates where in the document the product is mentioned. This score can take one of these values: - top 20%: the product is discussed in the first 20% of the text - bottom 80%: the product is discussed in the lower 80% of the text. - not mentioned: the product is not discussed in the text Dominance indicates how exclusively this product is mentioned in the document: - Exclusive: No other product is mentioned in this document except the specified product. - Dominant: Although other products are mentioned, this product is mentioned more often than any others. - Average: This product is mentioned as frequently as another product. - In passing: This product is mentioned infrequently. - Irrelevant: This product is not mentioned in the document SAS Sentiment Analysis Server: Administrator’s Guide 31 Number of Products and Features is the number of product and feature rules that matched in the input document List of Products and Features provides information about each product and feature rule match. This data includes position in the input document, weight, and sentiment. 3.9 Optimize Performance on a Client Windows Machine 3.9.1 Overview of Performance Optimization The settings that are specified in the following sections are applied if the client program that connects to SAS Sentiment Analysis Server is running on Windows. Otherwise, unexpected behaviors might occur when you process large amounts of documents. 3.9.2 Before and After You Optimize Performance Before you use the following sections to optimize the performance of SAS Sentiment Analysis Server, run the registry editor. To run the registry editor, complete these steps: 1. Select Start --> Run. 2. Type regedit into the Open field of the Run window that appears. 3. Click OK. 4. After you use both Section 3.9.3 Adjust the TCP Time Wait State below and Section 3.9.4 Reset Ephemeral Ports on page 33, reboot your machine. 32 SAS Sentiment Analysis Server: Administrator’s Guide 3.9.3 Adjust the TCP Time Wait State You can choose to lower the setting for the timed wait state in order to avoid depleting available ports on your servers. For example, you can reset this selection in your system registry to 15 seconds. To reset the TCPTimedWaitDelay setting, complete these steps: 1. Go to the registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ Tcpip\Parameters 2. Go to Edit --> New --> DWORD value. By default, the new value is named New Value #1. 3. Rename the value by typing TcpTimedWaitDelay. 4. Double-click on the new TcpTimedWaitDelay value. 5. Select Decimal as the base, and enter 15 for the value data. 6. Reboot your machine. 3.9.4 Reset Ephemeral Ports Ephemeral ports are short-lived ports that are used to create connections to the client computers from the server and between COM server objects. By default, these ports range from 1024 to 5000. Hint: Connection difficulties might occur if there is a shortage of ports. This section explains how to reset the parameter that controls the maximum port number that is used when the SAS Sentiment Analysis Server program requests an available user port from the system. To reset the valid range for ephemeral ports, complete these steps: 1. Go to the registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ Tcpip\Parameters SAS Sentiment Analysis Server: Administrator’s Guide 33 2. Go to Edit --> New --> DWORD value. By default, the new value is named New Value #1. 3. Rename the value by typing MaxUserPort. 4. Double-click on the new MaxUserPort value. 5. Select Decimal as the base, and enter 65534 for the value data. 6. Reboot your machine. 34 SAS Sentiment Analysis Server: Administrator’s Guide Appendixes - Appendix A, Glossary - Appendix B: Recommended Reading on page 31 35 36 SAS Sentiment Analysis Server: Administrator’s Guide Appendix: A Recommended Reading The following books are recommended as companion guides: - SAS Sentiment Analysis Studio: Installation Guide: Install SAS Sentiment Analysis Studio. - SAS Sentiment Analysis Studio: User’s Guide: Create a SAS Sentiment Analysis Studio project, test, and upload it to SAS Sentiment Analysis Server. - SAS Sentiment Analysis Workbench: Installation Guide: Install SAS Sentiment Analysis Workbench. - SAS Sentiment Analysis Workbench: Administrator’s Guide: Administrators use this guide to set up SAS Sentiment Analysis Workbench project for the analysts that review the results. - SAS Sentiment Analysis Workbench: User’s Guide: One, or more, analysts, can work together to edit the output from a SAS Sentiment Analysis Workbench project. - SAS Contextual Extraction Studio: User’s Guide: Write multiple rules to define a single concept definition in SAS Contextual Extraction Studio. Develop these rules in the context of a SAS Content Categorization Studio project. - Use the language book that applies to the language that you use to create your project. Each of the SAS world language books contain a comprehensive list of part-of-speech tags. - SAS offers instructor-led training and self-paced e-learning courses to help you get started with the SAS add-in, learn how the SAS add-in works with the other products in the SAS Enterprise Intelligence Platform, and learn how to run stored processes in the SAS add-in. For more information about the courses available, see support.sas.com/training. 37 For a complete list of SAS publications, see the current SAS Publishing Catalog. To order the most current publications or to receive a free copy of the catalog, contact a SAS representative at SAS Publishing Sales SAS Campus Drive Cary, NC 27513 Telephone: (800) 727-3228* Fax: (919) 677-8166 E-mail: [email protected] Web address:support.sas.com/pubs * For other SAS Institute business, call (919) 677-8000. Customers outside the United States should contact their local SAS office. 38 SAS Sentiment Analysis Server: Administrator’s Guide Appendix: B Glossary configuration file specifies the settings for SAS Sentiment Analysis Server. sentiment expresses feeling, or like or dislike. Sentiment falls within the range of 0 and 1, where 0.5 is neutral, 0 is negative, and 1 is positive. If keywords are used instead, these words are written into rules that are used to determine the degree of sentiment expressed in the document. setinit file is the name of the SAS licensing file. This is the sentansr.sas file. 39 40 SAS Sentiment Analysis Server: Administrator’s Guide Index A architecture diagram ...................................................................................................7 available APIs ......................................................................................................... 5, 8 B backup_directory directive, configuration file .........................................................27 benefits for users .........................................................................................................6 C comment character, configuration file ......................................................................21 configuration file accessing on UNIX ............................................................................................23 accessing on Windows ......................................................................................22 backup_directory directive ................................................................................27 comment character ............................................................................................21 directives ..................................................................................................... 25–27 max_doc_size directive .....................................................................................25 modifying ..........................................................................................................27 nb_threads directive ..........................................................................................25 num_sam_logs directive ....................................................................................26 persistent connection directive ..........................................................................26 query_port directive ..........................................................................................25 sam directive ......................................................................................................25 sam_log directive ..............................................................................................26 sam_log_max_entries directive .........................................................................26 setinit directive ..................................................................................................27 skt_queue_size directive ....................................................................................25 specify settings ....................................................................................................8 timeout directive ................................................................................................26 UNIX ..................................................................................................... 23, 23–24 Windows ...................................................................................................... 22–23 41 configuring the server overview .......................................................................................................21–22 CPU requirements .................................................................................................... 10 D data directory, using ................................................................................................. 28 E entry as document representation ............................................................................. 29 ephemeral ports, resetting ...................................................................................33–34 I installation process overview ................................................................................................. 9 required capabilities ............................................................................................ 9 see extracted files .............................................................................................. 15 selecting location .............................................................................................. 13 UNIX ................................................................................................................ 16 Windows ......................................................................................................11–15 L languages, 28 available .............................................................................................. 6 log entries maximum ................................................................................................ 26 log files ................................................................................................................29–30 M max_doc_size directive, configuration file .............................................................. 25 N nb_threads directive, configuration file ................................................................... 25 num_sam_logs directive, configuration file ............................................................ 26 42 SAS Sentiment Analysis Server: Administrator’s Guide O operating systems .....................................................................................................10 optimize performance ...............................................................................................32 output data ................................................................................................................31 P paths, setting relative and absolute ...........................................................................25 persistent_connection directive, configuration file ..................................................26 project names setting ..................................................................................................8 projects, adding ................................................................................................... 28–29 Q query_port directive, configuration file ....................................................................25 R RAM requirements ...................................................................................................10 S sam directive, configuration file ...............................................................................25 sam_log directive, configuration file ........................................................................26 sam_log_max_entries directive, configuration file ..................................................26 sample configuration file ..........................................................................................23 SAS license, specifying ...................................................................................... 27–28 sentansr.sas, SAS license file location ......................................................................28 sentiment extraction process .......................................................................................6 server, starting ..........................................................................................................15 setinit directive, configuration file ............................................................................27 skt_queue_size directive, configuration file .............................................................25 starting the server ................................................................................................ 15, 30 system configuration requirements ...........................................................................10 SAS Sentiment Analysis Server: Administrator’s Guide 43 T TCPTimedWaitDelay setting ................................................................................... 33 Teragram license, converting to SAS license .......................................................... 28 timeout directive, configuration file ........................................................................ 26 U uninstall on Windows .........................................................................................16–19 UNIX installation, commands ................................................................................. 16 V -verbose switch, UNIX ............................................................................................ 30 W Windows, installation .........................................................................................11–15 44 SAS Sentiment Analysis Server: Administrator’s Guide
© Copyright 2026 Paperzz